Creating a Programmers manual for Koha 3

Using the neat little module Pod::Manual I whacked up a quick script to combine all the man pages for koha into 1, then output it as docbook (xml not sgml).


#!/usr/bin/perl
use Pod::Manual;
my $manual = Pod::Manual->new({ title => 'C4 Manual'});
my $path = $ARGV[0];
my @chapters = <$path/*>;
foreach $chapter (@chapters){
$chapter =~ s/$path///;
$chapter =~ s/.3pm//;
eval {$manual->add_chapter ($chapter);};
}
print $manual->as_docbook();

I then used the dblatex tools to convert it to pdf.
./manual.pl /path/to/man/files > file.xml
dblatex -tpdf file.xml

1 thought on “Creating a Programmers manual for Koha 3”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s