aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'clarkzjw.cc/config/bia/ansible/roles/cgit/templates/filters/about-formatting.sh')
-rw-r--r--clarkzjw.cc/config/bia/ansible/roles/cgit/templates/filters/about-formatting.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/clarkzjw.cc/config/bia/ansible/roles/cgit/templates/filters/about-formatting.sh b/clarkzjw.cc/config/bia/ansible/roles/cgit/templates/filters/about-formatting.sh
new file mode 100644
index 0000000..220afc6
--- /dev/null
+++ b/clarkzjw.cc/config/bia/ansible/roles/cgit/templates/filters/about-formatting.sh
@@ -0,0 +1,27 @@
1#!/bin/sh
2
3# This may be used with the about-filter or repo.about-filter setting in cgitrc.
4# It passes formatting of about pages to differing programs, depending on the usage.
5
6# Markdown support requires python and markdown-python.
7# RestructuredText support requires python and docutils.
8# Man page support requires groff.
9
10# The following environment variables can be used to retrieve the configuration
11# of the repository for which this script is called:
12# CGIT_REPO_URL ( = repo.url setting )
13# CGIT_REPO_NAME ( = repo.name setting )
14# CGIT_REPO_PATH ( = repo.path setting )
15# CGIT_REPO_OWNER ( = repo.owner setting )
16# CGIT_REPO_DEFBRANCH ( = repo.defbranch setting )
17# CGIT_REPO_SECTION ( = section setting )
18# CGIT_REPO_CLONE_URL ( = repo.clone-url setting )
19
20cd "$(dirname $0)/html-converters/"
21case "$(printf '%s' "$1" | tr '[:upper:]' '[:lower:]')" in
22 *.markdown|*.mdown|*.md|*.mkd) exec ./md2html.py; ;;
23 *.rst) exec ./rst2html; ;;
24 *.[1-9]) exec ./man2html; ;;
25 *.htm|*.html) exec cat; ;;
26 *.txt|*) exec ./txt2html; ;;
27esac
Powered by cgit v1.2.3 (git 2.41.0)