diff options
feat: things!! :3
Diffstat (limited to 'image/filters')
-rwxr-xr-x | image/filters/about-formatting | 27 | ||||
-rwxr-xr-x[-rw-r--r--] | image/filters/email-libravatar.lua | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | image/filters/syntax-highlighting.sh | 0 |
3 files changed, 27 insertions, 0 deletions
diff --git a/image/filters/about-formatting b/image/filters/about-formatting new file mode 100755 index 0000000..edc7ec2 --- /dev/null +++ b/image/filters/about-formatting @@ -0,0 +1,27 @@ +#!/bin/sh + +# This may be used with the about-filter or repo.about-filter setting in cgitrc. +# It passes formatting of about pages to differing programs, depending on the usage. + +# Markdown support requires python and markdown-python. +# RestructuredText support requires python and docutils. +# Man page support requires groff. + +# The following environment variables can be used to retrieve the configuration +# of the repository for which this script is called: +# CGIT_REPO_URL ( = repo.url setting ) +# CGIT_REPO_NAME ( = repo.name setting ) +# CGIT_REPO_PATH ( = repo.path setting ) +# CGIT_REPO_OWNER ( = repo.owner setting ) +# CGIT_REPO_DEFBRANCH ( = repo.defbranch setting ) +# CGIT_REPO_SECTION ( = section setting ) +# CGIT_REPO_CLONE_URL ( = repo.clone-url setting ) + +cd "$(dirname $0)/html-converters/" +case "$(printf '%s' "$1" | tr '[:upper:]' '[:lower:]')" in + *.markdown|*.mdown|*.md|*.mkd) exec /usr/bin/markdown-tool; ;; + *.rst) exec ./rst2html; ;; + *.[1-9]) exec ./man2html; ;; + *.htm|*.html) exec cat; ;; + *.txt|*) exec ./txt2html; ;; +esac diff --git a/image/filters/email-libravatar.lua b/image/filters/email-libravatar.lua index 5e8554e..5e8554e 100644..100755 --- a/image/filters/email-libravatar.lua +++ b/image/filters/email-libravatar.lua diff --git a/image/filters/syntax-highlighting.sh b/image/filters/syntax-highlighting.sh index 46ad2bb..46ad2bb 100644..100755 --- a/image/filters/syntax-highlighting.sh +++ b/image/filters/syntax-highlighting.sh |