aboutsummaryrefslogtreecommitdiffstats
path: root/image/filters
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-01-15 13:48:32 +0100
committerLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-01-15 13:48:32 +0100
commit6f080713489cfc11bfc4fc77b57ea9398bef424b (patch)
tree35fc2a7e96aba5fc5159b2b664e105fde2b47da7 /image/filters
parented7a5cfe5508f3b7b1f79149c4436679b191f4fd (diff)
downloadcgit-oci-6f080713489cfc11bfc4fc77b57ea9398bef424b.tar.gz
cgit-oci-6f080713489cfc11bfc4fc77b57ea9398bef424b.tar.bz2
cgit-oci-6f080713489cfc11bfc4fc77b57ea9398bef424b.tar.lz
cgit-oci-6f080713489cfc11bfc4fc77b57ea9398bef424b.zip

feat: things!! :3

Diffstat (limited to 'image/filters')
-rwxr-xr-ximage/filters/about-formatting27
-rwxr-xr-x[-rw-r--r--]image/filters/email-libravatar.lua0
-rwxr-xr-x[-rw-r--r--]image/filters/syntax-highlighting.sh0
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