From: Richard Jones Date: Thu, 9 Apr 2009 15:48:46 +0000 (+0100) Subject: Generate webpages. X-Git-Tag: 0.7~2 X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=commitdiff_plain;h=233595cc4e3c3422a5f5d8aec3314029da3f0ec7 Generate webpages. --- diff --git a/.gitignore b/.gitignore index 90a3b52..1b1a0bd 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,8 @@ examples/hello fish/guestfish guestfish.1 guestfs.3 +html/guestfish.1.html +html/guestfs.3.html initramfs initramfs.timestamp initramfs.*.img @@ -60,6 +62,7 @@ perl/Makefile-pl perl/Makefile.PL perl/blib perl/pm_to_blib +pod2htm?.tmp stamp-h1 test*.img update-initramfs.sh diff --git a/Makefile.am b/Makefile.am index 241a0a8..3a18600 100644 --- a/Makefile.am +++ b/Makefile.am @@ -60,13 +60,6 @@ $(INITRAMFSIMG): initramfs/fakeroot.log daemon/guestfsd bash $(builddir)/update-initramfs.sh touch $@ -# Make clean. - -CLEANFILES = $(fs_DATA) emptydisk - -clean-local: - rm -rf initramfs - # Manual pages. # guestfs-actions.pod and guestfs-structs are autogenerated. There is # no include mechanism for POD, so we have to do it by hand. @@ -96,6 +89,32 @@ guestfish.1: guestfish.pod guestfish-actions.pod --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ > $@ +noinst_DATA = html/guestfs.3.html html/guestfish.1.html + +html/guestfs.3.html: guestfs.pod guestfs-actions.pod guestfs-structs.pod + sed \ + -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' \ + -e '/@STRUCTS@/rguestfs-structs.pod' -e 's/@STRUCTS@//' \ + < $< | \ + pod2html \ + --css 'pod.css' \ + --title "libguestfs API documentation" \ + --htmldir html \ + --outfile $@ + +html/guestfish.1.html: guestfish.pod guestfish-actions.pod + sed \ + -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \ + < $< | \ + pod2html \ + --css 'pod.css' \ + --title "guestfish, libguestfs filesystem interactive shell" \ + --htmldir html \ + --outfile $@ + +website: html/guestfs.3.html html/guestfish.1.html + cp $^ html/pod.css $(HOME)/d/redhat/et-website/libguestfs/ + # Test-boot the image. test-boot: emptydisk @@ -123,3 +142,10 @@ test-boot-realistic: emptydisk -net channel,6666:unix:/tmp/sock,server,nowait \ -net user,vlan=0 \ -net nic,vlan=0 + +# Make clean. + +CLEANFILES = $(fs_DATA) emptydisk pod2htm?.tmp + +clean-local: + rm -rf initramfs diff --git a/fish/cmds.c b/fish/cmds.c index 5c7d553..12c2c1e 100644 --- a/fish/cmds.c +++ b/fish/cmds.c @@ -153,7 +153,7 @@ void display_command (const char *cmd) pod2text ("read-lines - read file as lines", " read-lines \n\nReturn the contents of the file named C.\n\nThe file contents are returned as a list of lines. Trailing\nC and C character sequences are I returned.\n\nNote that this function cannot correctly handle binary files\n(specifically, files containing C<\\0> character which is treated\nas end of line). For those you need to use the C\nfunction which has a more complex interface."); else if (strcasecmp (cmd, "aug_init") == 0 || strcasecmp (cmd, "aug-init") == 0) - pod2text ("aug-init - create a new Augeas handle", " aug-init \n\nCreate a new Augeas handle for editing configuration files.\nIf there was any previous Augeas handle associated with this\nguestfs session, then it is closed.\n\nYou must call this before using any other C\ncommands.\n\nC is the filesystem root. C must not be NULL,\nuse C instead.\n\nThe flags are the same as the flags defined in\nEaugeas.hE, the logical I of the following\nintegers:\n\n=over 4\n\n=item 1 C\n\nKeep the original file with a C<.augsave> extension.\n\n=item 2 C\n\nSave changes into a file with extension C<.augnew>, and\ndo not overwrite original. Overrides C.\n\n=item 4 C\n\nTypecheck lenses (can be expensive).\n\n=item 8 C\n\nDo not use standard load path for modules.\n\n=item 16 C\n\nMake save a no-op, just record what would have been changed.\n\n=item 32 C\n\nDo not load the tree in C.\n\n=back\n\nTo close the handle, you can call C.\n\nTo find out more about Augeas, see L."); + pod2text ("aug-init - create a new Augeas handle", " aug-init \n\nCreate a new Augeas handle for editing configuration files.\nIf there was any previous Augeas handle associated with this\nguestfs session, then it is closed.\n\nYou must call this before using any other C\ncommands.\n\nC is the filesystem root. C must not be NULL,\nuse C instead.\n\nThe flags are the same as the flags defined in\nEaugeas.hE, the logical I of the following\nintegers:\n\n=over 4\n\n=item C = 1\n\nKeep the original file with a C<.augsave> extension.\n\n=item C = 2\n\nSave changes into a file with extension C<.augnew>, and\ndo not overwrite original. Overrides C.\n\n=item C = 4\n\nTypecheck lenses (can be expensive).\n\n=item C = 8\n\nDo not use standard load path for modules.\n\n=item C = 16\n\nMake save a no-op, just record what would have been changed.\n\n=item C = 32\n\nDo not load the tree in C.\n\n=back\n\nTo close the handle, you can call C.\n\nTo find out more about Augeas, see L."); else if (strcasecmp (cmd, "aug_close") == 0 || strcasecmp (cmd, "aug-close") == 0) pod2text ("aug-close - close the current Augeas handle", " aug-close\n\nClose the current Augeas handle and free up any resources\nused by it. After calling this, you have to call\nC again before you can use any other\nAugeas functions."); diff --git a/guestfish-actions.pod b/guestfish-actions.pod index 00911db..d218e0e 100644 --- a/guestfish-actions.pod +++ b/guestfish-actions.pod @@ -85,28 +85,28 @@ integers: =over 4 -=item 1 C +=item C = 1 Keep the original file with a C<.augsave> extension. -=item 2 C +=item C = 2 Save changes into a file with extension C<.augnew>, and do not overwrite original. Overrides C. -=item 4 C +=item C = 4 Typecheck lenses (can be expensive). -=item 8 C +=item C = 8 Do not use standard load path for modules. -=item 16 C +=item C = 16 Make save a no-op, just record what would have been changed. -=item 32 C +=item C = 32 Do not load the tree in C. diff --git a/guestfish.pod b/guestfish.pod index d5a7e5a..9d988bf 100644 --- a/guestfish.pod +++ b/guestfish.pod @@ -183,14 +183,10 @@ Size can be specified (where C means a number): =over 4 -=item C +=item C or CK or CKB number of kilobytes, eg: C<1440> = standard 3.5in floppy -=item CK or CKB - -number of kilobytes - =item CM or CMB number of megabytes diff --git a/guestfs-actions.pod b/guestfs-actions.pod index c5fadcf..29f8538 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -109,28 +109,28 @@ integers: =over 4 -=item 1 C +=item C = 1 Keep the original file with a C<.augsave> extension. -=item 2 C +=item C = 2 Save changes into a file with extension C<.augnew>, and do not overwrite original. Overrides C. -=item 4 C +=item C = 4 Typecheck lenses (can be expensive). -=item 8 C +=item C = 8 Do not use standard load path for modules. -=item 16 C +=item C = 16 Make save a no-op, just record what would have been changed. -=item 32 C +=item C = 32 Do not load the tree in C. diff --git a/html/pod.css b/html/pod.css new file mode 100644 index 0000000..9a0b4b5 --- /dev/null +++ b/html/pod.css @@ -0,0 +1,24 @@ +/* CSS to make pod2html files look a little bit better. */ +@import url("http://et.redhat.com/~rjones/css/standard.css"); + +/* Put the index on the right hand side in a floating box. */ +div[name="index"] { + float: right; + width: 24em; + background-color: white; + margin-right: 2em; +} + +/* Get rid of those horrible
's :-( */ +hr { display: none; } + +/* Demote

's. */ +h1 { + font-size: 100%; + border-bottom: none; +} + +h2 { + font-size: 120%; + border-bottom: none; +} diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm index 2941466..9fefb9a 100644 --- a/perl/lib/Sys/Guestfs.pm +++ b/perl/lib/Sys/Guestfs.pm @@ -164,28 +164,28 @@ integers: =over 4 -=item 1 C +=item C = 1 Keep the original file with a C<.augsave> extension. -=item 2 C +=item C = 2 Save changes into a file with extension C<.augnew>, and do not overwrite original. Overrides C. -=item 4 C +=item C = 4 Typecheck lenses (can be expensive). -=item 8 C +=item C = 8 Do not use standard load path for modules. -=item 16 C +=item C = 16 Make save a no-op, just record what would have been changed. -=item 32 C +=item C = 32 Do not load the tree in C<$h-Eaug_init>. diff --git a/src/generator.ml b/src/generator.ml index 3f42c39..4279c0d 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -353,28 +353,28 @@ integers: =over 4 -=item 1 C +=item C = 1 Keep the original file with a C<.augsave> extension. -=item 2 C +=item C = 2 Save changes into a file with extension C<.augnew>, and do not overwrite original. Overrides C. -=item 4 C +=item C = 4 Typecheck lenses (can be expensive). -=item 8 C +=item C = 8 Do not use standard load path for modules. -=item 16 C +=item C = 16 Make save a no-op, just record what would have been changed. -=item 32 C +=item C = 32 Do not load the tree in C.