Made a generator for HTML man page

This commit is contained in:
Thomas Schmitt 2008-01-18 17:03:41 +00:00
parent 869b8f4a2d
commit dac5a4b801
3 changed files with 144 additions and 10 deletions

test/ Executable file
View File

@ -0,0 +1,106 @@
# - ts A80118
# Generates a HTML version of man page xorriso.1
# To be executed within the libburn toplevel directory (eg. ./libisoburn-0.1.0)
# set -x
export MANPATH="$man_dir"
if test -r "$man_dir"/"$manpage".1
echo "Cannot find readable man page source $1" >&2
exit 1
if test -e "$man_dir"/man1
ln -s . "$man_dir"/man1
if test "$1" = "-work_as_filter"
# set -x
sed \
-e 's/<meta name="generator" content="groff -Thtml, see">/<meta name="generator" content="groff -Thtml, via man -H, via xorriso\/">/' \
-e 's/<meta name="Content-Style" content="text\/css">/<meta name="Content-Style" content="text\/css"><META NAME="description" CONTENT="man page of xorriso"><META NAME="keywords" CONTENT="man xorriso, manual, xorriso, CD, CD-RW, CD-R, burning, cdrecord, compatible"><META NAME="robots" CONTENT="follow">/' \
-e 's/<title>XORRISO<\/title>/<title>man 1 xorriso<\/title>/' \
-e 's/<h1 align=center>XORRISO<\/h1>/<h1 align=center>man 1 xorriso<\/h1>/' \
-e 's/<body>/<body BGCOLOR="#F5DEB3" TEXT=#000000 LINK=#0000A0 VLINK=#800000>/' \
-e 's/<b>Overview of features:<\/b>/\&nbsp;<BR><b>Overview of features:<\/b>/' \
-e 's/<b>General information paragraphs:<\/b>/\&nbsp;<BR><b>General information paragraphs:<\/b>/' \
-e 's/have a look at section EXAMPLES/have a look at section <A HREF="#EXAMPLES">EXAMPLES<\/A>/' \
-e 's/<b>Session model:<\/b>/\&nbsp;<BR><b>Session model:<\/b>/' \
-e 's/<b>Media types and states:<\/b>/\&nbsp;<BR><b>Media types and states:<\/b>/' \
-e 's/<b>Creating, Growing, Modifying:<\/b>/\&nbsp;<BR><b>Creating, Growing, Modifying:<\/b>/' \
-e 's/<b>Libburn drives:<\/b>/\&nbsp;<BR><b>Libburn drives:<\/b>/' \
-e 's/^-dev /\&nbsp;\&nbsp;-dev /' \
-e 's/^-devices /\&nbsp;\&nbsp;-devices /' \
-e 's/<b>Rock Ridge, POSIX, X\/Open:<\/b>/\&nbsp;<BR><b>Rock Ridge, POSIX, X\/Open:<\/b>/' \
-e 's/<b>Command processing:<\/b>/\&nbsp;<BR><b>Command processing:<\/b>/' \
-e 's/<b>Dialog, Readline, Result pager:<\/b>/\&nbsp;<BR><b>Dialog, Readline, Result pager:<\/b>/' \
-e 's/<b>Aquiring source and target drive:<\/b>/\&nbsp;<BR><b>Aquiring source and target drive:<\/b><BR>\&nbsp;<BR>/' \
-e 's/<b>Data manipulations:<\/b>/\&nbsp;<BR><b>Data manipulations:<\/b><BR>\&nbsp;<BR>/' \
-e 's/^<p><b>&minus;iso_rr_pattern/<p>\&nbsp;<BR><b>\&minus;iso_rr_pattern/' \
-e 's/EXAMPLES):<br>/<A HREF="#EXAMPLES">EXAMPLES<\/A>):<br>/' \
-e 's/<b>Writing the result:<\/b>/\&nbsp;<BR><b>Writing the result:<\/b><BR>/' \
-e 's/^-find \/ /\&nbsp;\&nbsp;-find \/ /' \
-e 's/<b>Settings for data insertion:<\/b>/\&nbsp;<BR><b>Settings for data insertion:<\/b><BR>\&nbsp;<BR>/' \
-e 's/^$<\/b> ln -s/\&nbsp;\&nbsp;$<\/b> ln -s/' \
-e 's/<b>Settings for result writing:<\/b>/\&nbsp;<BR><b>Settings for result writing:<\/b><BR>\&nbsp;<BR>/' \
-e 's/^706k = 706kB/\&nbsp;\&nbsp;706k = 706kB/' \
-e 's/^5540k = 5540kB/\&nbsp;\&nbsp;5540k = 5540kB/' \
-e 's/<b>Exception processing:<\/b>/\&nbsp;<BR><b>Exception processing:<\/b><BR>\&nbsp;<BR>/' \
-e 's/<b>Dialog mode control:<\/b>/\&nbsp;<BR><b>Dialog mode control:<\/b><BR>\&nbsp;<BR>/' \
-e 's/<b>Drive and media related inquiry actions:<\/b>/\&nbsp;<BR><b>Drive and media related inquiry actions:<\/b><BR>\&nbsp;<BR>/' \
-e 's/<b>Navigation in ISO image/\&nbsp;<BR><b>Navigation in ISO image/' \
-e 's/^filesystem:<\/b>/filesystem:<\/b><BR>\&nbsp;<BR>/' \
-e 's/<b>Scripting, dialog and/\&nbsp;<BR><b>Scripting, dialog and/' \
-e 's/^features:<\/b>/features:<\/b><BR>\&nbsp;<BR>/' \
-e 's/<b>Support for frontend/\&nbsp;<BR><b>Support for frontend/' \
-e 's/^listening at stdout:<\/b>/listening at stdout:<\/b><BR>\&nbsp;<BR>/' \
-e 's/xorriso -outdev \/dev\/sr2 \\ -blank fast \\ -pathspecs on/xorriso -outdev \/dev\/sr2 -blank fast -pathspecs on/' \
-e 's/\\ -add \\ \/sounds=\/home\/me\/sounds \\ \/pictures \\ -- \\ -rm_r \\/ -add \/sounds=\/home\/me\/sounds \/pictures -- -rm_r /' \
-e 's/\/sounds\/indecent \\ \&rsquo;\/pictures\/\*private\*\&rsquo; \\/\/sounds\/indecent \&rsquo;\/pictures\/*private*\&rsquo; /' \
-e 's/\/pictures\/confidential \\ -- \\ -add \\/\/pictures\/confidential -- -add/' \
-e 's/xorriso -dev \/dev\/sr2 \\ -rm_r \/sounds -- \\ -mv \\/xorriso -dev \/dev\/sr2 -rm_r \/sounds -- -mv /' \
-e 's/\/pictures\/confidential \\ \/pictures\/restricted \\ -- \\ -chmod/\/pictures\/confidential \/pictures\/restricted -- -chmod/' \
-e 's/go-rwx \/pictures\/restricted -- \\ -pathsspecs on \\ -add \\/go-rwx \/pictures\/restricted -- -pathsspecs on -add /' \
-e 's/\/sounds=\/home\/me\/prepared_for_dvd\/sounds_dummy /\/sounds=\/home\/me\/prepared_for_dvd\/sounds_dummy/' \
-e 's/\/movies=\/home\/me\/prepared_for_dvd\/movies \\ -- \\ -commit/\/movies=\/home\/me\/prepared_for_dvd\/movies -- -commit/' \
-e 's/xorriso -indev \/dev\/sr2 \\ -rm_r \/sounds -- \\/xorriso -indev \/dev\/sr2 -rm_r \/sounds -- /' \
-e 's/-outdev \/dev\/sr0 -blank fast \\ -commit -eject all/-outdev \/dev\/sr0 -blank fast -commit -eject all/' \
-e 's/See section FILES/See section <A HREF="#FILES">FILES<\/A>/' \
-e 's/See section EXAMPLES/See section <A HREF="#EXAMPLES">EXAMPLES<\/A>/' \
<"$2" >"$htmlpage"
set +x
chmod u+rw,go+r,go-w "$htmlpage"
echo "Emerged file:"
ls -lL "$htmlpage"
export BROWSER='cp "%s" '"$raw_html"
man -H "$manpage"
"$0" -work_as_filter "$raw_html"
rm "$raw_html"
rm "$man_dir"/man1

View File

@ -98,6 +98,8 @@ copy_files \
ng_src/*.[ch] \
create_dir "$lone_dir"/xorriso
copy_files \
test/ng_xorrisoburn.[ch] \
@ -105,10 +107,10 @@ copy_files \
test/xorriso_private.h \
test/xorriso_timestamp.h \
test/changelog.txt \
test/xorriso_eng.html \
test/man_1_xorriso.html \
copy_files test/xorriso_eng.html "$lone_dir"/xorriso/xorriso_eng.html
mv "$lone_dir"/xorriso/ng_xorrisoburn.h "$lone_dir"/xorriso/xorrisoburn.h
mv "$lone_dir"/xorriso/ng_xorrisoburn.c "$lone_dir"/xorriso/xorrisoburn.c

View File

@ -235,11 +235,15 @@ Even those which will not be useable for reading an ISO image.
MMC compliant (i.e. optical) drives on Linux usually get addressed by
the path of their block device or of their generic character device. E.g.
-dev /dev/sr0
-dev /dev/hdc
-dev /dev/sg2
Get a list of accessible drives by command
It might be necessary to do this as
@ -249,6 +253,7 @@ Consider to bundle the authorized users in a group like old "floppy".
Filesystem objects of nearly any type can be addressed by prefix "stdio:" and
their path in the filesystem. E.g.:
-dev stdio:/tmp/pseudo_drive
If path leads to a regular file or to a block device then the emulated drive
@ -325,7 +330,8 @@ them as commands with their parameters. It provides assisting services
to make dialog more comfortable.
Readline is an enhancement for the input line. You may know it already from
the bash shell.
the bash shell. Whether it is available in xorriso depends on the availability
of package readline-dev at the time when xorriso was built from its sourcecode.
It allows to move the cursor over the text in the line by help of the
Leftward and the Rightward arrow key.
@ -576,7 +582,7 @@ Relative times counted from current clock time:
where "s" means seconds, "h" hours, "d" days, "w" weeks, "m"=30d,
"y"=365.25d plus 1d added multiplication result.
"y"=365.25d plus 1d added to multiplication result.
Absolute seconds counted from Jan 1 1970:
@ -654,6 +660,7 @@ other file causes a SORRY event.
Delete empty directories.
Mark end of particular action argument list.
@ -843,7 +850,9 @@ Speed can be given in media dependent numbers or as a
desired throughput per second in MMC compliant kB (= 1000)
or MB (= 1000 kB). Media x-speed factor can be set explicity
by "c" for CD and "d" for "DVD". Example speeds:
706k = 706kB/s = 4c = 4xCD
5540k = 5540kB/s = 4d = 4xDVD
If there is no hint about the speed unit attached, then the
@ -876,6 +885,7 @@ and is one aspect of growisofs option -dvd-compat.
\fB\-abort_on\fR severity
Set the threshold for events to abort the program.
Events are classified by severity :
@ -938,6 +948,7 @@ use -rollback to revoke the whole session.
.B Drive and media related inquiry actions:
Show media specific table of content. This is the media
structure, not the ISO image directory tree. In case of
overwriteable media holding a valid ISO image, a single
@ -981,9 +992,11 @@ image as it is at the moment.
Change the current working directory on filesystem.
Tell the current working directory in the ISO image.
Tell the current working directory on local filesystem.
\fB\-ls\fR iso_rr_pattern [***]
@ -1048,9 +1061,9 @@ List size of directories and files in the local filesystem
which match one of the patterns.
Similar to shell command du -sk.
\fB\-findx\fR disk_path [-name pattern] --
\fB\-findx\fR disk_path [-name pattern] [-type t] --
Like -find but operating on local filesystem and not on the ISO image.
This action is subject to the settings of -follow.
This is subject to the settings of -follow.
-findx accepts the -exec actions as does -find. But it will
always perform action "echo".
@ -1058,11 +1071,16 @@ always perform action "echo".
.B Scripting, dialog and program control features:
Only if used as first command line argument this option
prevents reading and interpretation of eventual startup
files. See section FILES below.
\fB\-options_from_file\fR fileaddress
Reads lines from fileaddress and executes them as dialog lines.
Print helptext.
@ -1074,8 +1092,11 @@ Copy textline into libreadline history.
\fB\-status\fR [mode|filter]
Print the current settings of xorriso.
short... print only important or altered settings
long ... print all settings including defaults
long_history like long plus history lines
Filters begin with '-' and are compared literally against the
@ -1091,9 +1112,6 @@ buffering. Currently this applies to pattern expansion only.
Default is 16m = 16 MiB, minimum 64k = 64 kiB, maximum 1024m = 1 GiB.
\fB\-options_from_file\fR fileaddress
Reads lines from fileaddress and executes them as dialog lines.
\fB\-print\fR text
Print a text to result channel.
@ -1103,6 +1121,7 @@ wait for the user to hit the Enter key
resp. to send a line via stdin.
End program immediately
\fB#\fR any text
@ -1117,7 +1136,9 @@ Consolidate text output on stdout and classify each
line by a channel indicator:
'R:' for result lines,
'I:' for notes and error messages,
'M:' for -mark texts.
Next is a decimal number of which only bit 0 has a meaning for now.
@ -1126,6 +1147,7 @@ the end of the output line belongs to the payload. After another colon follows
the payload text.
I:1: enter option and arguments :
\fB\-logfile\fR channel fileaddress
@ -1287,9 +1309,13 @@ Seconds since Jan 1 1970:
If not -no_rc is given as the first argument then xorriso attempts on startup
to read and execute lines from the following files:
The files are read in the sequence given above, but none of them is required