summaryrefslogtreecommitdiff
path: root/about-formatting.sh
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-12-14 12:38:33 +0100
committerHampusM <hampus@hampusmat.com>2021-12-14 12:38:33 +0100
commit362c3265031b91eb78890a515da48b47ca20376d (patch)
treec437a9c15c828c584b255779596f6b43f77c2caa /about-formatting.sh
parent5b2643bbbc53fabf4a49e5eb4df52ffe88c150e7 (diff)
add Cgit filtersHEADmaster
Diffstat (limited to 'about-formatting.sh')
-rw-r--r--about-formatting.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/about-formatting.sh b/about-formatting.sh
new file mode 100644
index 0000000..d11b738
--- /dev/null
+++ b/about-formatting.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+cd "$(dirname $0)/html-converters/"
+
+case "$(printf '%s' "$1" | tr '[:upper:]' '[:lower:]')" in
+ *.markdown|*.mdown|*.md|*.mkd) exec /filters/markdown_filter.py; ;;
+ *.rst) exec ./rst2html; ;;
+ *.[1-9]) exec ./man2html; ;;
+ *.htm|*.html) exec cat; ;;
+ *.txt|*) exec ./txt2html; ;;
+esac