A (static) git repository browser [mirror]
Go to file
Eric Sunshine 84d628c690 views/blob: suppress double-slash in page title
For blobs in subdirectories, the page title always includes a double
slash between the final directory component and the filename (for
example, "git >> repo >> branch >> doc//readme.txt"). This is unsightly.

git-arr:blob() ensures that the directory passed to views/blob always
has a trailing slash, so we can drop the slash inserted by views/blob
between the directory and the filename.

As a side-effect, this also changes the page title for blobs in the root
directory. Instead of "git >> repo >> branch >> /readme.txt", the title
becomes "git >> repo >> branch >> readme.txt", which is slightly more
aesthetically pleasing.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
2015-01-24 19:23:18 +00:00
hooks Add a post-receive hook 2013-03-12 22:09:25 +00:00
static blob: cap amount of rendered binary blob content 2015-01-13 19:51:45 +00:00
views views/blob: suppress double-slash in page title 2015-01-24 19:23:18 +00:00
.gitignore Initial commit 2012-11-10 17:49:54 +00:00
git-arr branch: pass branch name view explicitly 2015-01-17 13:11:43 +00:00
git.py Repo: retire new_in_branch() and notion of "bound" branch 2015-01-17 13:11:46 +00:00
LICENSE Initial commit 2012-11-10 17:49:54 +00:00
README Add a note about pygments in the README 2012-11-21 00:29:43 +00:00
sample.conf git-arr: increase default 'max_pages' value 2015-01-12 09:00:18 +00:00
TODO Initial commit 2012-11-10 17:49:54 +00:00
utils.py blob: render hexdump(1)-style binary blob content 2015-01-13 19:51:44 +00:00

git-arr - A git repository browser
----------------------------------

git-arr is a git repository browser that can generate static HTML instead of
having to run dynamically.

It is smaller, with less features and a different set of tradeoffs than
other similar software, so if you're looking for a robust and featureful git
browser, please look at gitweb or cgit instead.

However, if you want to generate static HTML at the expense of features, then
it's probably going to be useful.

It's open source under the MIT licence, please see the LICENSE file for more
information.


Getting started
---------------

You will need Python, and the bottle.py framework (the package is usually
called python-bottle in most distributions).

If pygments is available, it will be used for syntax highlighting, otherwise
everything will work fine, just in black and white.


First, create a configuration file for your repositories. You can start by
copying sample.conf, which has the list of the available options.

Then, to generate the output to "/var/www/git-arr/" directory, run:

  $ ./git-arr --config config.conf generate --output /var/www/git-arr/

That's it!

The first time you generate, depending on the size of your repositories, it
can take some time. Subsequent runs should take less time, as it is smart
enough to only generate what has changed.


You can also use git-arr dynamically, although it's not its intended mode of
use, by running:

  $ ./git-arr --config config.conf serve

That can be useful when making changes to the software itself.


Contact
-------

If you want to report bugs, send patches, or have any questions or comments,
just let me know at albertito@blitiri.com.ar.