extra_build:
./ikiwiki doc templates html --wikiname="ikiwiki" --verbose \
--nosvn --exclude=/discussion
-
+ ./mdwn2man doc/usage.mdwn > ikiwiki.man
+
extra_clean:
- rm -rf html
- rm -rf doc/.ikiwiki
+ rm -rf html doc/.ikiwiki
+ rm -f ikiwiki.man
extra_install:
install -d $(PREFIX)/share/ikiwiki/templates
$(MAKE) pure_install INSTALLDIRS=vendor \
PREFIX=$(shell pwd)/debian/ikiwiki/$(shell perl -MConfig -e 'print $$Config{prefix}')
dh_installdocs html
- dh_installexamples
+ dh_installman ikiwiki.man
dh_installchangelogs
dh_compress
dh_fixperms
already, so just look at the userdb, svnlook at what's changed, and send
mails to people who have subscribed.
-## docs
-
-Need to turn [[usage]] into a man page.
-this wiki too. Can markdown generate a man page somehow?
-
## pluggable renderers
I'm considering a configurable rendering pipeline for each supported
# AUTHOR
Joey Hess <joey@kitenet.net>
+
+Warning: this page is automatically made into ikiwiki's man page, edit with care
--- /dev/null
+#!/usr/bin/perl
+# Warning: hack
+
+print ".TH ikiwiki 1\n";
+
+while (<>) {
+ s/^#\s/.SH /;
+ s/^\s+//;
+ s/^Warning:.*//g;
+ s/^$/.PP\n/;
+ s/\[\[//g;
+ s/\]\]//g;
+ s/\`//g;
+ s/^\*\s+(.*)/.IP "$1"/;
+ next if $_ eq ".PP\n" && $skippara;
+ if (/^.IP /) {
+ $inlist=1;
+ $spippara=0;
+ }
+ elsif (/.SH/) {
+ $skippara=0;
+ $inlist=0;
+ }
+ elsif (/^\./) {
+ $skippara=1;
+ }
+ else {
+ $skippara=0;
+ }
+ if ($inlist && $_ eq ".PP\n") {
+ $_=".IP\n";
+ }
+
+ print $_;
+}