This patch makes minor changes to the code that handles embedded images,
mostly to make it use mimetypes, and to remove SVG support (at least for now)
due to security concerns.
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
This patch adds a post-receive hook that can be used to trigger a git-arr
update when there is a push to a repository.
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
When the tool is invoked like /path/to/git-arr, it currently fails because
both the serving of static files and bottle templates assume they're on the
current working directory.
This patch fixes that by computing the directories based on the executable
location.
Note this is assuming the static directory and the templates live next to the
executable, which will not always be the case, and eventually it should be
configurable; but it's ok for the time being.
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
This patch fixes the --only option, and makes it avoid generating the
top-level index so we don't get a broken one with only the specified
repositories.
The intention is that this option is used in hooks to update the views after a
commit or push.
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
The lexer guesser based on content is often wrong; to minimize the chances of
that happening, we only use it on files that start with "#!", for which it
usually has smarter rules.
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
If we can't guess the lexer by the file name, try to guess based on the
content.
This allows pygments to colorize extension-less files, usually scripts.
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
In practise pygments seems to have a very hard time processing large files and
files with long lines, so try to avoid using it in those cases.
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
This patch improves the way we find the path to the repositories, both in the
recursive and in the non-recursive cases.
We now support specifying non-bare repositories directly, and also recursing
on them.
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>