Add dirlisting example with map.gph support, like gophernicus. - geomyidae - A small C-based gopherd.
HTML git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit a0062e9cd00351ee001c3fcf27850324159da683
DIR parent 19f0f8840233b5a0cac3fdb4e251c5a7f29c6c4a
HTML Author: Christoph Lohmann <20h@r-36.net>
Date: Sat, 2 Apr 2022 22:54:39 +0200
Add dirlisting example with map.gph support, like gophernicus.
Diffstat:
A cgi-examples/maplisting.dcgi | 10 ++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)
---
DIR diff --git a/cgi-examples/maplisting.dcgi b/cgi-examples/maplisting.dcgi
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# List all .md files in some directory and show a dir listing.
+# Display map.gph first.
+#
+
+[ -f map.gph ] && cat map.gph
+
+find *.md -printf "[0|%TY-%Tm-%Td %f|%f|server|port]\r\n" | sort -r
+