diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-09 16:48:46 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-09 16:48:46 +0100 |
commit | 233595cc4e3c3422a5f5d8aec3314029da3f0ec7 (patch) | |
tree | c13d144c7a0b47ded862f37617d76660c865ac8c | |
parent | e7eca50046e9a69dac27c0bee832af0a3014e02c (diff) | |
download | libguestfs-233595cc4e3c3422a5f5d8aec3314029da3f0ec7.tar.gz libguestfs-233595cc4e3c3422a5f5d8aec3314029da3f0ec7.tar.xz libguestfs-233595cc4e3c3422a5f5d8aec3314029da3f0ec7.zip |
Generate webpages.
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Makefile.am | 40 | ||||
-rw-r--r-- | fish/cmds.c | 2 | ||||
-rw-r--r-- | guestfish-actions.pod | 12 | ||||
-rw-r--r-- | guestfish.pod | 6 | ||||
-rw-r--r-- | guestfs-actions.pod | 12 | ||||
-rw-r--r-- | html/pod.css | 24 | ||||
-rw-r--r-- | perl/lib/Sys/Guestfs.pm | 12 | ||||
-rwxr-xr-x | src/generator.ml | 12 |
9 files changed, 86 insertions, 37 deletions
@@ -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 241a0a8d..3a186001 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 5c7d5530..12c2c1e8 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 <path>\n\nReturn the contents of the file named C<path>.\n\nThe file contents are returned as a list of lines. Trailing\nC<LF> and C<CRLF> character sequences are I<not> 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<read_file>\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 <root> <flags>\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<aug_*>\ncommands.\n\nC<root> is the filesystem root. C<root> must not be NULL,\nuse C</> instead.\n\nThe flags are the same as the flags defined in\nE<lt>augeas.hE<gt>, the logical I<or> of the following\nintegers:\n\n=over 4\n\n=item 1 C<AUG_SAVE_BACKUP>\n\nKeep the original file with a C<.augsave> extension.\n\n=item 2 C<AUG_SAVE_NEWFILE>\n\nSave changes into a file with extension C<.augnew>, and\ndo not overwrite original. Overrides C<AUG_SAVE_BACKUP>.\n\n=item 4 C<AUG_TYPE_CHECK>\n\nTypecheck lenses (can be expensive).\n\n=item 8 C<AUG_NO_STDINC>\n\nDo not use standard load path for modules.\n\n=item 16 C<AUG_SAVE_NOOP>\n\nMake save a no-op, just record what would have been changed.\n\n=item 32 C<AUG_NO_LOAD>\n\nDo not load the tree in C<aug_init>.\n\n=back\n\nTo close the handle, you can call C<aug_close>.\n\nTo find out more about Augeas, see L<http://augeas.net/>."); + pod2text ("aug-init - create a new Augeas handle", " aug-init <root> <flags>\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<aug_*>\ncommands.\n\nC<root> is the filesystem root. C<root> must not be NULL,\nuse C</> instead.\n\nThe flags are the same as the flags defined in\nE<lt>augeas.hE<gt>, the logical I<or> of the following\nintegers:\n\n=over 4\n\n=item C<AUG_SAVE_BACKUP> = 1\n\nKeep the original file with a C<.augsave> extension.\n\n=item C<AUG_SAVE_NEWFILE> = 2\n\nSave changes into a file with extension C<.augnew>, and\ndo not overwrite original. Overrides C<AUG_SAVE_BACKUP>.\n\n=item C<AUG_TYPE_CHECK> = 4\n\nTypecheck lenses (can be expensive).\n\n=item C<AUG_NO_STDINC> = 8\n\nDo not use standard load path for modules.\n\n=item C<AUG_SAVE_NOOP> = 16\n\nMake save a no-op, just record what would have been changed.\n\n=item C<AUG_NO_LOAD> = 32\n\nDo not load the tree in C<aug_init>.\n\n=back\n\nTo close the handle, you can call C<aug_close>.\n\nTo find out more about Augeas, see L<http://augeas.net/>."); 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<aug_init> again before you can use any other\nAugeas functions."); diff --git a/guestfish-actions.pod b/guestfish-actions.pod index 00911dbe..d218e0ec 100644 --- a/guestfish-actions.pod +++ b/guestfish-actions.pod @@ -85,28 +85,28 @@ integers: =over 4 -=item 1 C<AUG_SAVE_BACKUP> +=item C<AUG_SAVE_BACKUP> = 1 Keep the original file with a C<.augsave> extension. -=item 2 C<AUG_SAVE_NEWFILE> +=item C<AUG_SAVE_NEWFILE> = 2 Save changes into a file with extension C<.augnew>, and do not overwrite original. Overrides C<AUG_SAVE_BACKUP>. -=item 4 C<AUG_TYPE_CHECK> +=item C<AUG_TYPE_CHECK> = 4 Typecheck lenses (can be expensive). -=item 8 C<AUG_NO_STDINC> +=item C<AUG_NO_STDINC> = 8 Do not use standard load path for modules. -=item 16 C<AUG_SAVE_NOOP> +=item C<AUG_SAVE_NOOP> = 16 Make save a no-op, just record what would have been changed. -=item 32 C<AUG_NO_LOAD> +=item C<AUG_NO_LOAD> = 32 Do not load the tree in C<aug_init>. diff --git a/guestfish.pod b/guestfish.pod index d5a7e5ac..9d988bf9 100644 --- a/guestfish.pod +++ b/guestfish.pod @@ -183,14 +183,10 @@ Size can be specified (where C<nn> means a number): =over 4 -=item C<nn> +=item C<nn> or C<nn>K or C<nn>KB number of kilobytes, eg: C<1440> = standard 3.5in floppy -=item C<nn>K or C<nn>KB - -number of kilobytes - =item C<nn>M or C<nn>MB number of megabytes diff --git a/guestfs-actions.pod b/guestfs-actions.pod index c5fadcfc..29f8538a 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -109,28 +109,28 @@ integers: =over 4 -=item 1 C<AUG_SAVE_BACKUP> +=item C<AUG_SAVE_BACKUP> = 1 Keep the original file with a C<.augsave> extension. -=item 2 C<AUG_SAVE_NEWFILE> +=item C<AUG_SAVE_NEWFILE> = 2 Save changes into a file with extension C<.augnew>, and do not overwrite original. Overrides C<AUG_SAVE_BACKUP>. -=item 4 C<AUG_TYPE_CHECK> +=item C<AUG_TYPE_CHECK> = 4 Typecheck lenses (can be expensive). -=item 8 C<AUG_NO_STDINC> +=item C<AUG_NO_STDINC> = 8 Do not use standard load path for modules. -=item 16 C<AUG_SAVE_NOOP> +=item C<AUG_SAVE_NOOP> = 16 Make save a no-op, just record what would have been changed. -=item 32 C<AUG_NO_LOAD> +=item C<AUG_NO_LOAD> = 32 Do not load the tree in C<guestfs_aug_init>. diff --git a/html/pod.css b/html/pod.css new file mode 100644 index 00000000..9a0b4b58 --- /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 <hr>'s :-( */ +hr { display: none; } + +/* Demote <h1>'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 29414662..9fefb9a5 100644 --- a/perl/lib/Sys/Guestfs.pm +++ b/perl/lib/Sys/Guestfs.pm @@ -164,28 +164,28 @@ integers: =over 4 -=item 1 C<AUG_SAVE_BACKUP> +=item C<AUG_SAVE_BACKUP> = 1 Keep the original file with a C<.augsave> extension. -=item 2 C<AUG_SAVE_NEWFILE> +=item C<AUG_SAVE_NEWFILE> = 2 Save changes into a file with extension C<.augnew>, and do not overwrite original. Overrides C<AUG_SAVE_BACKUP>. -=item 4 C<AUG_TYPE_CHECK> +=item C<AUG_TYPE_CHECK> = 4 Typecheck lenses (can be expensive). -=item 8 C<AUG_NO_STDINC> +=item C<AUG_NO_STDINC> = 8 Do not use standard load path for modules. -=item 16 C<AUG_SAVE_NOOP> +=item C<AUG_SAVE_NOOP> = 16 Make save a no-op, just record what would have been changed. -=item 32 C<AUG_NO_LOAD> +=item C<AUG_NO_LOAD> = 32 Do not load the tree in C<$h-E<gt>aug_init>. diff --git a/src/generator.ml b/src/generator.ml index 3f42c391..4279c0d2 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -353,28 +353,28 @@ integers: =over 4 -=item 1 C<AUG_SAVE_BACKUP> +=item C<AUG_SAVE_BACKUP> = 1 Keep the original file with a C<.augsave> extension. -=item 2 C<AUG_SAVE_NEWFILE> +=item C<AUG_SAVE_NEWFILE> = 2 Save changes into a file with extension C<.augnew>, and do not overwrite original. Overrides C<AUG_SAVE_BACKUP>. -=item 4 C<AUG_TYPE_CHECK> +=item C<AUG_TYPE_CHECK> = 4 Typecheck lenses (can be expensive). -=item 8 C<AUG_NO_STDINC> +=item C<AUG_NO_STDINC> = 8 Do not use standard load path for modules. -=item 16 C<AUG_SAVE_NOOP> +=item C<AUG_SAVE_NOOP> = 16 Make save a no-op, just record what would have been changed. -=item 32 C<AUG_NO_LOAD> +=item C<AUG_NO_LOAD> = 32 Do not load the tree in C<guestfs_aug_init>. |