diff options
author | clarkzjw <[email protected]> | 2023-01-20 14:55:36 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-01-20 14:55:36 -0800 |
commit | 9be2b67e354773c1f65d7502b5eee2dbf1bb1498 (patch) | |
tree | 38015f826072694783a40470a0536bb60152fedb /clarkzjw.cc/config/bia/ansible/roles/cgit/templates/filters/about-formatting.sh | |
parent | 3ca3701bde891b8bd6ba989c8ee92bff0dc452dd (diff) | |
download | homelab-9be2b67e354773c1f65d7502b5eee2dbf1bb1498.tar.gz |
bia: add cgit filters
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.sh | 27 |
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 | |||
20 | cd "$(dirname $0)/html-converters/" | ||
21 | case "$(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; ;; | ||
27 | esac | ||