Reacting on changes in the output of my local man -H
This commit is contained in:
parent
e65ab7648a
commit
0adcb08a86
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# man_xorrecord_to_html.sh - ts A80118 , B10309
|
||||
# man_xorrecord_to_html.sh - ts A80118 , B10309 , B50730
|
||||
#
|
||||
# Generates a HTML version of man page xorrecord.1
|
||||
#
|
||||
@ -42,15 +42,16 @@ then
|
||||
-e 's/<title>XORRECORD<\/title>/<title>man 1 xorrecord<\/title>/' \
|
||||
-e 's/<h1 align=center>XORRECORD<\/h1>/<h1 align=center>man 1 xorrecord<\/h1>/' \
|
||||
-e 's/<body>/<body BGCOLOR="#F5DEB3" TEXT=#000000 LINK=#0000A0 VLINK=#800000>/' \
|
||||
-e 's/<b>MMC, Session, Track, Media types:<\/b>/\ <BR><b>MMC, Session, Track, Media types:<\/b>/' \
|
||||
-e 's/<b>MMC, Session, Track, Media types:<\/b>/\ <BR><b>MMC, Session, Track, Media types:<\/b>/' \
|
||||
-e 's/<b>Relation to program xorriso:<\/b>/\ <BR><b>Relation to program xorriso:<\/b>/' \
|
||||
-e 's/<b>MMC, Session, Track, Media types: <br> MMC<\/b>/<b>MMC, Session, Track, Media types:<\/b><BR>\ <BR><b>MMC<\/b>/' \
|
||||
-e 's/<b>Drive preparation and addressing:<\/b>/<b>Drive preparation and addressing:<\/b><BR>/' \
|
||||
-e 's/<b>Relation to program xorriso: <br> xorrecord<\/b>/<b>Relation to program xorriso:<\/b><BR>\ <BR><b>xorrecord<\/b>/' \
|
||||
-e 's/<b>Addressing the drive: <br> --devices<\/b>/<b>Addressing the drive: <\/b><BR>\ <BR><b>--devices<\/b>/' \
|
||||
-e 's/EXAMPLES):<br>/<A HREF="#EXAMPLES">EXAMPLES<\/A>):<br>/' \
|
||||
-e 's/<b>Drive addressing:<\/b>/\ <BR><b>Drive addressing:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Inquiring drive and media:<\/b>/\ <BR><b>Inquiring drive and media:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Settings for the burn run<\/b>/\ <BR><b>Settings for the burn run:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Program version and verbosity:<\/b>/\ <BR><b>Program version and verbosity:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Options not compatible to cdrecord:<\/b>/\ <BR><b>Options not compatible to cdrecord:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Settings for the burn run:<\/b>/\ <BR><b>Settings for the burn run:<\/b><BR>/' \
|
||||
-e 's/<b><br> blank=mode<\/b>/<BR>\ <BR><b>blank=mode<\/b>/' \
|
||||
-e 's/<b>Program version and verbosity: <br> −version<\/b>/\ <BR><b>Program version and verbosity:<\/b><BR>\ <BR><b>-version<\/b>/' \
|
||||
-e 's/<b>Options not compatible to cdrecord: <br> --no_rc<\/b>/\ <BR><b>Options not compatible to cdrecord:<\/b><BR>\ <BR><b>--no_rc<\/b>/' \
|
||||
\
|
||||
-e 's/<\/body>/<BR><HR><FONT SIZE=-1><CENTER>(HTML generated from '"$manpage"'.1 on '"$(date)"' by '$(basename "$0")' )<\/CENTER><\/FONT><\/body>/' \
|
||||
-e 's/−/-/g' \
|
||||
@ -64,8 +65,10 @@ then
|
||||
|
||||
else
|
||||
|
||||
export BROWSER='cp "%s" '"$raw_html"
|
||||
# export BROWSER='cp "%s" '"$raw_html"
|
||||
export BROWSER=$(pwd)/'xorriso/unite_html_b_line "%s" '"$raw_html"
|
||||
man -H "$manpage"
|
||||
# cp "$raw_html" /tmp/x.html
|
||||
"$0" -work_as_filter "$raw_html"
|
||||
rm "$raw_html"
|
||||
rm "$man_dir"/man1
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# man_xorriso_to_html.sh - ts A80118 , B10309
|
||||
# man_xorriso_to_html.sh - ts A80118 , B10309 , B50730
|
||||
#
|
||||
# Generates a HTML version of man page xorriso.1
|
||||
#
|
||||
@ -44,55 +44,53 @@ then
|
||||
-e 's/<body>/<body BGCOLOR="#F5DEB3" TEXT=#000000 LINK=#0000A0 VLINK=#800000>/' \
|
||||
-e 's/<b>Overview of features:<\/b>/\ <BR><A NAME="Overview"><\/A><b>Overview of features:<\/b>/' \
|
||||
-e 's/<b>General information paragraphs:<\/b>/\ <BR><A NAME="General"><\/A><b>General information paragraphs:<\/b>/' \
|
||||
-e 's/^<p>Session model<br>/<p><A HREF="#Model">Session model<\/A><br>/' \
|
||||
-e 's/^Media types and states/<A HREF="#Media">Media types and states/' \
|
||||
-e 's/Session model <br>/<A HREF="#Model">Session model<\/A> <br>/' \
|
||||
-e 's/^Media types and states/<A HREF="#Media">Media types and states<\/A>/' \
|
||||
-e 's/^Creating, Growing, Modifying, Blind Growing/<A HREF="#Methods">Creating, Growing, Modifying, Blind Growing<\/A>/' \
|
||||
-e 's/^Libburn drives/<A HREF="#Drives">Libburn drives<\/A>/' \
|
||||
-e 's/^Rock Ridge, POSIX, X\/Open, El Torito, ACL, xattr/<A HREF="#Extras">Rock Ridge, POSIX, X\/Open, El Torito, ACL, xattr<\/A>/' \
|
||||
-e 's/^Command processing/<A HREF="#Processing">Command processing<\/A>/' \
|
||||
-e 's/^Dialog, Readline, Result pager/<A HREF="#Dialog">Dialog, Readline, Result pager<\/A>/' \
|
||||
-e 's/have a look at section EXAMPLES/have a look at section <A HREF="#EXAMPLES">EXAMPLES<\/A>/' \
|
||||
-e 's/<b>Session model:<\/b>/\ <BR><A NAME="Model"><\/A><b>Session model:<\/b>/' \
|
||||
-e 's/<b>Media types and states:<\/b>/\ <BR><A NAME="Media"><\/A><b>Media types and states:<\/b>/' \
|
||||
-e 's/<b>Creating, Growing, Modifying, Blind/\ <BR><A NAME="Methods"><\/A><b>Creating, Growing, Modifying, Blind/' \
|
||||
-e 's/<b>Libburn drives:<\/b>/\ <BR><b>Libburn drives:<\/b><A NAME="Drives"><\/A>/' \
|
||||
-e 's/<b>Session model:<\/b>/\ <BR><A NAME="Model"><\/A><b>Session model:<\/b><BR>/' \
|
||||
-e 's/<b>Media types and states:<\/b>/\ <BR><A NAME="Media"><\/A><b>Media types and states:<\/b><BR>/' \
|
||||
-e 's/<b>Creating, Growing, Modifying, Blind Growing:<\/b>/\ <BR><A NAME="Methods"><\/A><b>Creating, Growing, Modifying, BlindBlind Growing:<\/b><BR>/' \
|
||||
-e 's/<b>Libburn drives:<\/b>/\ <BR><b>Libburn drives:<\/b><A NAME="Drives"><\/A><BR>/' \
|
||||
-e 's/^-dev /\ \ -dev /' \
|
||||
-e 's/^-devices /\ \ -devices /' \
|
||||
-e 's/<b>Rock Ridge, POSIX, X\/Open, El Torito, ACL,/\ <BR><A NAME="Extras"><\/A><b>Rock Ridge, POSIX, X\/Open, El Torito, ACL,/' \
|
||||
-e 's/<b>Command processing:<\/b>/\ <BR><A NAME="Processing"><\/A><b>Command processing:<\/b>/' \
|
||||
-e 's/<b>Dialog, Readline, Result pager:<\/b>/\ <BR><A NAME="Dialog"><\/A<b>Dialog, Readline, Result pager:<\/b>/' \
|
||||
-e 's/<b>Execution order of program arguments:<\/b>/\ <BR><A NAME="ArgSort"><\/A><b>Execution order of program arguments:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Acquiring source and target drive:<\/b>/\ <BR><A NAME="AqDrive"><\/A><b>Acquiring source and target drive:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Rock Ridge, POSIX, X\/Open, El Torito, ACL, xattr: <br> Rock Ridge<\/b>/\ <BR><A NAME="Extras"><\/A><b>Rock Ridge, POSIX, X\/Open, El Torito, ACL, xattr:<\/b><BR>\ <BR><b>Rock Ridge<\/b>/' \
|
||||
-e 's/<b>Command processing:<\/b>/\ <BR><A NAME="Processing"><\/A><b>Command processing:<\/b><BR>/' \
|
||||
-e 's/<b>Dialog, Readline, Result pager:<\/b>/<A NAME="Dialog"><\/A><b>Dialog, Readline, Result pager:<\/b><BR>/' \
|
||||
-e 's/<b><br> Execution order of program arguments:<\/b>/<br>\ <BR><A NAME="ArgSort"><\/A><b>Execution order of program arguments:<\/b><BR>/' \
|
||||
-e 's/<b>Acquiring source and target drive:<\/b>/\ <BR><A NAME="AqDrive"><\/A><b>Acquiring source and target drive:<\/b><BR>/' \
|
||||
-e 's/<b>Influencing the behavior of image/\ <BR><A NAME="Loading"><\/A><b>Influencing the behavior of image/' \
|
||||
-e 's/<b>Inserting files into ISO image:<\/b>/\ <BR><A NAME="Insert"><\/A><b>Inserting files into ISO image:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Inserting files into ISO image:<\/b>/\ <BR><A NAME="Insert"><\/A><b>Inserting files into ISO image:<\/b><BR>/' \
|
||||
-e 's/<b>Settings for file insertion:<\/b>/\ <BR><A NAME="SetInsert"><\/A><b>Settings for file insertion:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>File manipulations:<\/b>/\ <BR><A NAME="Manip"><\/A><b>File manipulations:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Tree traversal command -find:<\/b>/\ <BR><A NAME="CmdFind"><\/A><b>Tree traversal command -find:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Tree traversal command -find: <br> \−find<\/b>/\ <BR><A NAME="CmdFind"><\/A><b>Tree traversal command -find:<\/b><BR>\ <BR><b>-find<\/b>/' \
|
||||
-e 's/<b>File manipulations:<\/b>/\ <BR><A NAME="Manip"><\/A><b>File manipulations:<\/b><BR>/' \
|
||||
-e 's/^<p><b>−iso_rr_pattern/<p>\ <BR><b>\−iso_rr_pattern/' \
|
||||
-e 's/EXAMPLES):<br>/<A HREF="#EXAMPLES">EXAMPLES<\/A>):<br>/' \
|
||||
-e 's/<b>Filters for data file content:<\/b>/\ <BR><A NAME="Filter"><\/A><b>Filters for data file content:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Writing the result, drive control:<\/b>/\ <BR><A NAME="Writing"><\/A><b>Writing the result, drive control:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Filters for data file content:<\/b>/\ <BR><A NAME="Filter"><\/A><b>Filters for data file content:<\/b><BR>/' \
|
||||
-e 's/<b>Writing the result, drive control:<\/b>/\ <BR><A NAME="Writing"><\/A><b>Writing the result, drive control:<\/b><BR>/' \
|
||||
-e 's/^-find \/ /\ \ -find \/ /' \
|
||||
-e 's/^$<\/b> ln -s/\ \ $<\/b> ln -s/' \
|
||||
-e 's/<b>Settings for result writing:<\/b>/\ <BR><A NAME="SetWrite"><\/A><b>Settings for result writing:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Settings for result writing:<\/b>/\ <BR><A NAME="SetWrite"><\/A><b>Settings for result writing:<\/b><BR>/' \
|
||||
-e 's/^706k = 706kB/\ \ 706k = 706kB/' \
|
||||
-e 's/^5540k = 5540kB/\ \ 5540k = 5540kB/' \
|
||||
-e 's/<b>Bootable ISO images:<\/b>/\ <BR><A NAME="Bootable"><\/A><b>Bootable ISO images:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Jigdo Template Extraction:<\/b>/\ <BR><A NAME="Jigdo"><\/A><b>Jigdo Template Extraction:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Character sets:<\/b>/\ <BR><A NAME="Charset"><\/A><b>Character sets:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Exception processing:<\/b>/\ <BR><A NAME="Exception"><\/A><b>Exception processing:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Dialog mode control:<\/b>/\ <BR><A NAME="DialogCtl"><\/A><b>Dialog mode control:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Drive and media related inquiry actions:<\/b>/\ <BR><A NAME="Inquiry"><\/A><b>Drive and media related inquiry actions:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Navigation in ISO image/\ <BR><A NAME="Navigate"><\/A><b>Navigation in ISO image/' \
|
||||
-e 's/^filesystem:<\/b>/filesystem:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Evaluation of readability and recovery:<\/b>/\ <BR><A NAME="Verify"><\/A><b>Evaluation of readability and recovery:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>osirrox ISO-to-disk restore commands:<\/b>/\ <BR><A NAME="Restore"><\/A><b>osirrox ISO-to-disk restore commands:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Command compatibility emulations:<\/b>/\ <BR><A NAME="Emulation"><\/A><b>Command compatibility emulations:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Bootable ISO images:<\/b>/\ <BR><A NAME="Bootable"><\/A><b>Bootable ISO images:<\/b><BR>/' \
|
||||
-e 's/<b>Jigdo Template Extraction:<\/b>/\ <BR><A NAME="Jigdo"><\/A><b>Jigdo Template Extraction:<\/b><BR>/' \
|
||||
-e 's/<b>Character sets:<\/b>/\ <BR><A NAME="Charset"><\/A><b>Character sets:<\/b><BR>/' \
|
||||
-e 's/<b>Exception processing:<\/b>/\ <BR><A NAME="Exception"><\/A><b>Exception processing:<\/b><BR>/' \
|
||||
-e 's/<b>Dialog mode control: <br> −dialog<\/b>/\ <BR><A NAME="DialogCtl"><\/A><b>Dialog mode control:<\/b><BR>\ <BR><b>-dialog<\/b>/' \
|
||||
-e 's/<b>Drive and media related inquiry actions: <br> −devices<\/b>/\ <BR><A NAME="Inquiry"><\/A><b>Drive and media related inquiry actions:<\/b><BR>\ <BR><b>-devices<\/b>/' \
|
||||
-e 's/<b>Navigation in ISO image and disk filesystem: <br> −cd/\ <BR><A NAME="Navigate"><\/A><b>Navigation in ISO image and disk filesystem:<\/b><BR>\ <BR><b>-cd<\/b>/' \
|
||||
-e 's/<b>Evaluation of readability and recovery:<\/b>/\ <BR><A NAME="Verify"><\/A><b>Evaluation of readability and recovery:<\/b><BR>/' \
|
||||
-e 's/<b>osirrox ISO-to-disk restore commands:<\/b>/\ <BR><A NAME="Restore"><\/A><b>osirrox ISO-to-disk restore commands:<\/b><BR>/' \
|
||||
-e 's/<b>Command compatibility emulations:<\/b>/\ <BR><A NAME="Emulation"><\/A><b>Command compatibility emulations:<\/b><BR>/' \
|
||||
-e 's/^<p><b>−as</<p>\ <BR><b>\−as</' \
|
||||
-e 's/<b>Scripting, dialog and/\ <BR><A NAME="Scripting"><\/A><b>Scripting, dialog and/' \
|
||||
-e 's/^features:<\/b>/features:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Support for frontend/\ <BR><A NAME="Frontend"><\/A><b>Support for frontend/' \
|
||||
-e 's/^listening at stdout:<\/b>/listening at stdout:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Scripting, dialog and program control features:<\/b>/\ <BR><A NAME="Scripting"><\/A><b>Scripting, dialog and program control features:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Support for frontend programs via stdin and stdout: <br> −pkt_output<\/b>/\ <BR><A NAME="Frontend"><\/A><b>Support for frontend programs via stdin and stdout:<\/b><BR>\ <BR><b>-pkt_output<\/b>/' \
|
||||
-e 's/disk_path_stdin disk_path_stdout <br>/disk_path_stdin disk_path_stdout/' \
|
||||
-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 \\ \’\/pictures\/\*private\*\’ \\/\/sounds\/indecent \’\/pictures\/*private*\’ /' \
|
||||
@ -118,8 +116,10 @@ then
|
||||
|
||||
else
|
||||
|
||||
export BROWSER='cp "%s" '"$raw_html"
|
||||
# export BROWSER='cp "%s" '"$raw_html"
|
||||
export BROWSER=$(pwd)/'xorriso/unite_html_b_line "%s" '"$raw_html"
|
||||
man -H "$manpage"
|
||||
# cp "$raw_html" /tmp/x.html
|
||||
"$0" -work_as_filter "$raw_html"
|
||||
rm "$raw_html"
|
||||
rm "$man_dir"/man1
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# man_xorrisofs_to_html.sh - ts A80118 , B10309
|
||||
# man_xorrisofs_to_html.sh - ts A80118 , B10309 , B50730
|
||||
#
|
||||
# Generates a HTML version of man page xorrisofs.1
|
||||
#
|
||||
@ -42,22 +42,23 @@ then
|
||||
-e 's/<title>XORRISOFS<\/title>/<title>man 1 xorrisofs<\/title>/' \
|
||||
-e 's/<h1 align=center>XORRISOFS<\/h1>/<h1 align=center>man 1 xorrisofs<\/h1>/' \
|
||||
-e 's/<body>/<body BGCOLOR="#F5DEB3" TEXT=#000000 LINK=#0000A0 VLINK=#800000>/' \
|
||||
-e 's/<b>ISO 9660, Rock Ridge, Joliet, HFS+:<\/b>/\ <BR><b>ISO 9660, Rock Ridge, Joliet, HFS+:<\/b>/' \
|
||||
-e 's/<b>Inserting files into the ISO image:<\/b>/\ <BR><b>Inserting files into the ISO image:<\/b>/' \
|
||||
-e 's/<b>Relation to program xorriso:<\/b>/\ <BR><b>Relation to program xorriso:<\/b>/' \
|
||||
-e 's/<b>ISO 9660, Rock Ridge, Joliet, HFS+: <br> ISO 9660<\/b>/\ <BR><b>ISO 9660, Rock Ridge, Joliet, HFS+:<\/b><BR>\ <BR><b>ISO 9660<\/b>/' \
|
||||
-e 's/<b>Inserting files into the ISO image: <br> xorrisofs<\/b>/\ <BR><b>Inserting files into the ISO image:<\/b><BR>\ <BR><b>xorrisofs<\/b>/' \
|
||||
-e 's/<b>Relation to program xorriso: <br> xorrisofs<\/b>/\ <BR><b>Relation to program xorriso:<\/b><BR>\ <BR><b>xorrisofs<\/b>/' \
|
||||
-e 's/EXAMPLES):<br>/<A HREF="#EXAMPLES">EXAMPLES<\/A>):<br>/' \
|
||||
-e 's/<b>Image loading:<\/b>/\ <BR><b>Image loading:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Settings for file insertion:<\/b>/\ <BR><b>Settings for file insertion:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Settings for image production:<\/b>/\ <BR><b>Settings for image production:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Settings for standards compliance:<\/b>/\ <BR><b>Settings for standards compliance:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Image loading:<\/b>/<b>Image loading:<\/b><BR>/' \
|
||||
-e 's/<b>Settings for file insertion: <br> \−path-list<\/b>/\ <BR><b>Settings for file insertion:<\/b><BR>\ <BR><b>-path-list<\/b>/' \
|
||||
-e 's/<b>Settings for image production: <br> −o<\/b>/\ <BR><b>Settings for image production:<\/b><BR>\ <BR><b>-o<\/b>/' \
|
||||
-e 's/<b>Settings for standards compliance: <br> \−iso-level<\/b>/\ <BR><b>Settings for standards compliance:<\/b><BR>\ <BR><b>-iso-level<\/b>/' \
|
||||
-e 's/<b>Settings for standards extensions:<\/b>/\ <BR><b>Settings for standards extensions:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Settings for file hiding:<\/b>/\ <BR><b>Settings for file hiding:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>ISO image ID strings:<\/b>/\ <BR><b>ISO image ID strings:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>El Torito Bootable ISO images:<\/b>/\ <BR><b>El Torito Bootable ISO images:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>System Area, MBR, other boot blocks:<\/b>/\ <BR><b>System Area, MBR, other boot blocks:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Character sets:<\/b>/\ <BR><b>Character sets:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Jigdo Template Extraction:<\/b>/\ <BR><b>Jigdo Template Extraction:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Miscellaneous options:<\/b>/\ <BR><b>Miscellaneous options:<\/b><BR>\ <BR>/' \
|
||||
-e 's/<b>Settings for file hiding: <br> \−hide<\/b>/\ <BR><b>Settings for file hiding:<\/b><BR>\ <BR><b>-hide<\/b>/' \
|
||||
-e 's/<b>ISO image ID strings:<\/b>/\ <BR><b>ISO image ID strings:<\/b><BR>/' \
|
||||
-e 's/<b>El Torito Bootable ISO images:<\/b>/\ <BR><b>El Torito Bootable ISO images:<\/b><BR>/' \
|
||||
-e 's/<b>System Area, MBR, GPT, APM, other boot blocks:<\/b>/\ <BR><b>System Area, MBR, GPT, APM, other boot blocks:<\/b><BR>/' \
|
||||
-e 's/<b><br> −G<\/b> disk_path/<BR>\ <BR><b>-G<\/b> disk_path/' \
|
||||
-e 's/<b>Character sets:<\/b>/\ <BR><b>Character sets:<\/b><BR>/' \
|
||||
-e 's/<b>Jigdo Template Extraction:<\/b>/\ <BR><b>Jigdo Template Extraction:<\/b><BR>/' \
|
||||
-e 's/<b>Miscellaneous options: <br> −print-size<\/b>/\ <BR><b>Miscellaneous options:<\/b><BR>\ <BR><b>-print-size<\/b>/' \
|
||||
\
|
||||
-e 's/<\/body>/<BR><HR><FONT SIZE=-1><CENTER>(HTML generated from '"$manpage"'.1 on '"$(date)"' by '$(basename "$0")' )<\/CENTER><\/FONT><\/body>/' \
|
||||
-e 's/−/-/g' \
|
||||
@ -71,8 +72,10 @@ then
|
||||
|
||||
else
|
||||
|
||||
export BROWSER='cp "%s" '"$raw_html"
|
||||
# export BROWSER='cp "%s" '"$raw_html"
|
||||
export BROWSER=$(pwd)/'xorriso/unite_html_b_line "%s" '"$raw_html"
|
||||
man -H "$manpage"
|
||||
# cp "$raw_html" /tmp/x.html
|
||||
"$0" -work_as_filter "$raw_html"
|
||||
rm "$raw_html"
|
||||
rm "$man_dir"/man1
|
||||
|
124
libisoburn/trunk/xorriso/unite_html_b_line.c
Normal file
124
libisoburn/trunk/xorriso/unite_html_b_line.c
Normal file
@ -0,0 +1,124 @@
|
||||
|
||||
/*
|
||||
( cd xorriso ; cc -g -Wall -o unite_html_b_line unite_html_b_line.c )
|
||||
*/
|
||||
/*
|
||||
Specialized converter for the output of man -H,
|
||||
which unites lines where the line end is between <b> and </b>.
|
||||
|
||||
Copyright 2015 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
|
||||
Provided under GPL version 2 or later.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
int unite_lines(char *buffer, int *b_open, int *b_state, int flag)
|
||||
{
|
||||
char *cpt;
|
||||
int last_was_nl= 0;
|
||||
|
||||
for(cpt= buffer; *cpt != 0; cpt++) {
|
||||
if(*b_open) {
|
||||
if(*b_state == 0 && *cpt == '<') {
|
||||
*b_state= 1;
|
||||
} else if(*b_state == 1) {
|
||||
if(*cpt == '/')
|
||||
*b_state= 2;
|
||||
else
|
||||
*b_state= 0;
|
||||
} else if(*b_state == 2) {
|
||||
if(*cpt == 'b' || *cpt == 'B')
|
||||
*b_state= 3;
|
||||
else
|
||||
*b_state= 0;
|
||||
} else if(*b_state == 3) {
|
||||
if(*cpt == '>')
|
||||
*b_open= 0;
|
||||
*b_state= 0;
|
||||
}
|
||||
} else {
|
||||
if(*b_state == 0 && *cpt == '<') {
|
||||
*b_state= 1;
|
||||
} else if(*b_state == 1) {
|
||||
if(*cpt == 'b' || *cpt == 'B')
|
||||
*b_state= 2;
|
||||
else
|
||||
*b_state= 0;
|
||||
} else if(*b_state == 2) {
|
||||
if(*cpt == '>')
|
||||
*b_open= 1;
|
||||
*b_state= 0;
|
||||
}
|
||||
}
|
||||
last_was_nl= (*cpt == '\n');
|
||||
}
|
||||
if(*b_open && last_was_nl) {
|
||||
/* replace newline */
|
||||
*(cpt - 1)= ' ';
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
FILE *fpin, *fpout;
|
||||
char buffer[4096], *respt;
|
||||
int ret, b_open= 0, b_state= 0;
|
||||
|
||||
if(argc != 3) {
|
||||
fprintf(stderr, "usage: %s input_path output_path\n", argv[0]);
|
||||
return(1);
|
||||
}
|
||||
if(strcmp(argv[1], "-") == 0) {
|
||||
fpin= stdin;
|
||||
} else {
|
||||
fpin= fopen(argv[1], "rb");
|
||||
if(fpin == 0) {
|
||||
fprintf(stderr, "Error with input file '%s' : %s\n",
|
||||
argv[1], strerror(errno));
|
||||
return(2);
|
||||
}
|
||||
}
|
||||
if(strcmp(argv[2], "-") == 0) {
|
||||
fpout= stdout;
|
||||
} else {
|
||||
fpout= fopen(argv[2], "wb");
|
||||
if(fpout == 0) {
|
||||
fprintf(stderr, "Error with output file '%s' : %s\n",
|
||||
argv[2], strerror(errno));
|
||||
return(3);
|
||||
}
|
||||
}
|
||||
while(1) {
|
||||
respt= fgets(buffer, sizeof(buffer), fpin);
|
||||
if(respt == NULL)
|
||||
break;
|
||||
ret= unite_lines(buffer, &b_open, &b_state, 0);
|
||||
if(ret <= 0)
|
||||
break;
|
||||
ret= fputs(buffer, fpout);
|
||||
if(ret < 0) {
|
||||
fprintf(stderr, "Error writing to output file '%s' : %s\n",
|
||||
argv[2], strerror(errno));
|
||||
return(4);
|
||||
}
|
||||
}
|
||||
if(fpin != stdin)
|
||||
fclose(fpin);
|
||||
if(fpout != stdout)
|
||||
fclose(stdout);
|
||||
return(0);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2015.07.31.162206"
|
||||
#define Xorriso_timestamP "2015.07.31.165816"
|
||||
|
Loading…
Reference in New Issue
Block a user