man page generation
parent
1186094987
commit
a1a7019f27
|
@ -14,10 +14,11 @@ pure_install:: extra_install
|
|||
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
|
||||
|
|
|
@ -24,7 +24,7 @@ binary-indep: build
|
|||
$(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
|
||||
|
|
|
@ -19,11 +19,6 @@ is built. (As long as all changes to all pages is ok.)
|
|||
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
|
||||
|
|
|
@ -100,3 +100,5 @@ flags such as --verbose can be negated with --no-verbose.
|
|||
# AUTHOR
|
||||
|
||||
Joey Hess <joey@kitenet.net>
|
||||
|
||||
Warning: this page is automatically made into ikiwiki's man page, edit with care
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
#!/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 $_;
|
||||
}
|
Loading…
Reference in New Issue