diff options
author | Ralph Amissah <ralph@amissah.com> | 2013-02-04 00:11:52 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2013-02-04 00:11:52 -0500 |
commit | b509e362a21e86e95cc46ff582db1f8e2bc14319 (patch) | |
tree | 7911fb8f6a2b4784f70ad7dd90f2744e0dbeed31 | |
parent | debian/changelog (4.0.4-1) (diff) | |
parent | v4: documentation, include --html-scroll and --html-seg options (diff) |
Merge tag 'sisu_4.0.5' into debian/sid
-rw-r--r-- | data/doc/sisu/CHANGELOG_v3 | 15 | ||||
-rw-r--r-- | data/doc/sisu/CHANGELOG_v4 | 40 | ||||
-rw-r--r-- | data/doc/sisu/html/sisu.1.html | 432 | ||||
-rw-r--r-- | data/doc/sisu/markup-samples/v4/sisu_manual/sisu_commands.sst | 12 | ||||
-rw-r--r-- | data/sisu/v3/v/version.yml | 6 | ||||
-rw-r--r-- | data/sisu/v4/v/version.yml | 6 | ||||
-rw-r--r-- | lib/sisu/v3/css.rb | 12 | ||||
-rw-r--r-- | lib/sisu/v3/epub_format.rb | 10 | ||||
-rw-r--r-- | lib/sisu/v3/html.rb | 14 | ||||
-rw-r--r-- | lib/sisu/v3/html_scroll.rb | 14 | ||||
-rw-r--r-- | lib/sisu/v3/sysenv.rb | 3 | ||||
-rw-r--r-- | lib/sisu/v4/css.rb | 10 | ||||
-rw-r--r-- | lib/sisu/v4/epub_format.rb | 10 | ||||
-rw-r--r-- | lib/sisu/v4/html.rb | 114 | ||||
-rw-r--r-- | lib/sisu/v4/html_scroll.rb | 14 | ||||
-rw-r--r-- | lib/sisu/v4/hub.rb | 45 | ||||
-rw-r--r-- | lib/sisu/v4/options.rb | 24 | ||||
-rw-r--r-- | lib/sisu/v4/sysenv.rb | 3 | ||||
-rw-r--r-- | lib/sisu/v4/urls.rb | 12 | ||||
-rw-r--r-- | man/man1/sisu.1 | 21 |
20 files changed, 470 insertions, 347 deletions
diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 53028424..81ccd058 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -29,6 +29,21 @@ v1 branch is removed; it is available in sisu =< 2.7 %% Reverse Chronological: +%% 3.3.8.orig.tar.xz (2013-02-03:04/7) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_3.3.8 +http://www.jus.uio.no/sisu/pkg/src/sisu_3.3.8.orig.tar.xz + sisu_3.3.8.orig.tar.xz + sisu_3.3.8-1.dsc + +* v3: sysenv, on --redirect, stop creation of redundant dir + +* v3: html, includes book index fix, rest cosmetic + +* v3: css (html & epub) line spacing reduced, paragraph spacing increased + * may need to tune spacing further to distinguish lines from new paragraphs + (especially where ocn is not used as the distinction may be less + clear/obvious) [sync with v4] + %% 3.3.7.orig.tar.xz (2013-01-31:04/4) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_3.3.7 http://www.jus.uio.no/sisu/pkg/src/sisu_3.3.7.orig.tar.xz diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index c5981d88..739b4ba5 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -17,6 +17,31 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: +%% 4.0.5.orig.tar.xz (2013-02-03:04/7) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.5 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.5-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.5.orig.tar.xz + sisu_4.0.5.orig.tar.xz + sisu_4.0.5-1.dsc + +* v4: html (urls), scroll & seg optionally discrete, individually callable + * --html (both), --html-scroll, --html-seg + * [possibly of interest where only one form of html of interest for use &/or + to cut generation time (roughly to 63% for --html-scroll only)] + +* v4: sysenv, on --redirect, stop creation of redundant dir + +* v4: html, includes book index fix, rest cosmetic + +* v4: css (html & epub) line spacing reduced, paragraph spacing increased + * may need to tune spacing further to distinguish lines from new paragraphs + (especially where ocn is not used as the distinction may be less + clear/obvious) + +* v4: documentation, include --html-scroll and --html-seg options + * sisu_manual/sisu_commands + * manpage & html + %% 4.0.4.orig.tar.xz (2013-01-31:04/4) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.4 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.4-1 @@ -25,10 +50,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.4.orig.tar.xz sisu_4.0.4-1.dsc * v4: param_make, :cover_image: regex, less finicky match of image & details - [bug reported by Mikael Böök] + * [bug reported by Mikael Böök] * v4: dal, on ocn excluded paragraphs (~# -#), hang/indent bullet, fix - [bug reported indirectly by Cory Doctorow (discovered in work with markup)] + * [bug reported indirectly by Cory Doctorow (discovered in work with markup)] * v4: epub, constants, debug alternative for various readers ... work on @@ -62,11 +87,12 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.2.orig.tar.xz * v4: epub * remove unnecessary conversion of some utf-8 characters to xhtml representation; fix as messed up table of contents, toc.ncx - (e.g. in calibre) [bug reported by Mikael Böök] + (e.g. in calibre) + * [bug reported by Mikael Böök] * provide full depth epub table of contents [request Mikael Böök] * cosmetic arrangement of code <<-WOK * xhtml structure error, fix missing </div> - [bug reported by Mikael Böök] (fix of additional detail) + * [bug reported by Mikael Böök] (fix of additional detail) * v4: html * remove unnecessary conversion of some utf-8 characters to html @@ -89,7 +115,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.1.orig.tar.xz * v4: html_segments (by_filename by_filetype) internal document links do not work filenames need to include lang code, fixed - [chals on irc, re live-manual, debian-live] + * [chals on irc, re live-manual, debian-live] * v4: bin/sisu & sysenv, rc_path_options, provide fixed path to rc files, (used e.g. to load sisurc.yml) @@ -98,8 +124,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.1.orig.tar.xz document header, sisurc, fixes * v4: plaintext, in code blocks retain a blank empty line, a fix - [known old bug, affects sisu_manual, fix request from SynrG on irc, re - live-manual] + * [known old bug, affects sisu_manual, fix request from SynrG on irc, re + live-manual] * v4: manpage, attempt to improve output (line-spacing) diff --git a/data/doc/sisu/html/sisu.1.html b/data/doc/sisu/html/sisu.1.html index f7268daa..2063c021 100644 --- a/data/doc/sisu/html/sisu.1.html +++ b/data/doc/sisu/html/sisu.1.html @@ -255,47 +255,46 @@ To skip it see -n. Alias -m </dd> <dt><b>--dump[=directory_path] [filename/wildcard]</b> </dt> <dd>places output in directory specified, if none is specified -in the current directory (pwd). Compare --redirect </dd> +in the current directory (pwd). Unlike using default settings <i>HTML</i> files +have embedded css. Compare --redirect </dd> <dt><b>-e [filename/wildcard]</b> </dt> -<dd>see ---epub </dd> +<dd>see --epub </dd> -<dt><b>--epub [filename/wildcard]</b> </dt> -<dd>produces an epub document, [sisu version ->=2 ] (filename.epub). Alias -e </dd> +<dt><b>--epub +[filename/wildcard]</b> </dt> +<dd>produces an epub document, [sisu version >=2 ] (filename.epub). +Alias -e </dd> <dt><b>--exc-*</b> </dt> -<dd>exclude output feature, overrides configuration -settings --exc-ocn, (exclude <i>object</i> citation numbering, (switches off <i>object</i> -citation numbering ) , affects html (seg, scroll), epub, xhtml, xml, pdf) -; --exc-toc, (exclude table of contents, affects html (scroll), epub, pdf) -; --exc-links-to-manifest, --exc-manifest-links, (exclude links to manifest, affects -html (seg, scroll)); --exc-search-form, (exclude search form, affects html -(seg, scroll), manifest); --exc-minitoc, (exclude mini table of contents, -affects html (seg), concordance, manifest); --exc-manifest-minitoc, (exclude -mini table of contents, affects manifest); --exc-html-minitoc, (exclude mini -table of contents, affects html (seg), concordance); --exc-html-navigation, -(exclude navigation, affects html (seg)); --exc-html-navigation-bar, (exclude -navigation bar, affects html (seg)); --exc-html-search-form, (exclude search -form, affects html (seg, scroll)); --exc-html-right-pane, (exclude right pane/column, -affects html (seg, scroll)); --exc-html-top-band, (exclude top band, affects -html (seg, scroll), concordance (minitoc forced on to provide seg navigation)); ---exc-segsubtoc (exclude sub table of contents, affects html (seg), epub) -; see also --inc-* </dd> +<dd>exclude output feature, overrides configuration settings --exc-ocn, +(exclude <i>object</i> citation numbering, (switches off <i>object</i> citation numbering +) , affects html (seg, scroll), epub, xhtml, xml, pdf) ; --exc-toc, (exclude +table of contents, affects html (scroll), epub, pdf) ; --exc-links-to-manifest, +--exc-manifest-links, (exclude links to manifest, affects html (seg, scroll)); +--exc-search-form, (exclude search form, affects html (seg, scroll), manifest); +--exc-minitoc, (exclude mini table of contents, affects html (seg), concordance, +manifest); --exc-manifest-minitoc, (exclude mini table of contents, affects +manifest); --exc-html-minitoc, (exclude mini table of contents, affects html +(seg), concordance); --exc-html-navigation, (exclude navigation, affects html +(seg)); --exc-html-navigation-bar, (exclude navigation bar, affects html (seg)); +--exc-html-search-form, (exclude search form, affects html (seg, scroll)); --exc-html-right-pane, +(exclude right pane/column, affects html (seg, scroll)); --exc-html-top-band, +(exclude top band, affects html (seg, scroll), concordance (minitoc forced +on to provide seg navigation)); --exc-segsubtoc (exclude sub table of contents, +affects html (seg), epub) ; see also --inc-* </dd> <dt><b>-F [--webserv=webrick]</b> </dt> <dd>see --sample-search-form </dd> -<dt><b>-f [optional string -part of filename]</b> </dt> +<dt><b>-f [optional string part of filename]</b> </dt> <dd>see --find </dd> <dt><b>--find [optional string part of filename]</b> </dt> -<dd>without -match string, glob all .sst .ssm files in directory (including language subdirectories). -With match string, find files that match given string in directory (including -language subdirectories). Alias -f, --glob, -G </dd> +<dd>without match string, glob all .sst .ssm files in directory +(including language subdirectories). With match string, find files that +match given string in directory (including language subdirectories). Alias +-f, --glob, -G </dd> <dt><b>-G [optional string part of filename]</b> </dt> @@ -305,193 +304,192 @@ language subdirectories). Alias -f, --glob, -G </dd> <dd>see --git </dd> <dt><b>--git [filename/wildcard]</b> </dt> -<dd>produces -or updates markup source file structure in a git repo (experimental and -subject to change). Alias -g </dd> +<dd>produces or updates markup source file +structure in a git repo (experimental and subject to change). Alias -g </dd> -<dt><b>--glob [optional string part of filename]</b> </dt> -<dd>see ---find </dd> +<dt><b>--glob +[optional string part of filename]</b> </dt> +<dd>see --find</dd> <dt><b>-h [filename/wildcard]</b> </dt> <dd>see --html </dd> <dt><b>--harvest *.ss[tm]</b> </dt> -<dd>makes two lists of -sisu output based on the sisu markup documents in a directory: list of -author and authors works (year and titles), and; list by topic with titles -and author. Makes use of header metadata fields (author, title, date, topic_register). -Can be used with maintenance (-M) and remote placement (-R) flags. </dd> +<dd>makes two lists of sisu output based on the sisu markup +documents in a directory: list of author and authors works (year and titles), +and; list by topic with titles and author. Makes use of header metadata +fields (author, title, date, topic_register). Can be used with maintenance +(-M) and remote placement (-R) flags. </dd> + +<dt><b>--help [topic]</b> </dt> +<dd>provides help on the selected +topic, where topics (keywords) include: list, (com)mands, short(cuts), +(mod)ifiers, (env)ironment, markup, syntax, headers, headings, endnotes, +tables, example, customise, skin, (dir)ectories, path, (lang)uage, db, +install, setup, (conf)igure, convert, termsheet, search, sql, features, +license. </dd> + +<dt><b>--html [filename/wildcard]</b> </dt> +<dd>produces html output, in two forms (i) +segmented text with table of contents (toc.html and index.html) and (ii) +the document in a single file (scroll.html). Alias -h </dd> -<dt><b>--help [topic]</b> +<dt><b>--html-scroll [filename/wildcard]</b> </dt> -<dd>provides help on the selected topic, where topics (keywords) include: list, -(com)mands, short(cuts), (mod)ifiers, (env)ironment, markup, syntax, headers, -headings, endnotes, tables, example, customise, skin, (dir)ectories, path, -(lang)uage, db, install, setup, (conf)igure, convert, termsheet, search, -sql, features, license. </dd> +<dd>produces html output, the document in a single file (scroll.html) only. Compare +--html-seg and --html </dd> -<dt><b>--html [filename/wildcard]</b> </dt> +<dt><b>--html-seg [filename/wildcard]</b> </dt> <dd>produces html output, segmented -text with table of contents (toc.html and index.html) and the document in -a single file (scroll.html). Alias -h </dd> +text with table of contents (toc.html and index.html). Compare --html-scroll +and --html </dd> <dt><b>-I [filename/wildcard]</b> </dt> <dd>see --texinfo </dd> -<dt><b>-i -[filename/wildcard]</b> </dt> -<dd>see --manpage </dd> +<dt><b>-i [filename/wildcard]</b> </dt> +<dd>see --manpage</dd> <dt><b>--inc-*</b> </dt> -<dd>include output feature, overrides -configuration settings, (usually the default if none set), has precedence -over --exc-* (exclude output feature). Some detail provided under --exc-*, see ---exc-* </dd> +<dd>include output feature, overrides configuration settings, (usually +the default if none set), has precedence over --exc-* (exclude output feature). +Some detail provided under --exc-*, see --exc-* </dd> <dt><b>-j [filename/wildcard]</b> </dt> -<dd>copies images associated with a file for use -by html, xhtml & xml outputs (automatically invoked by --dump & redirect). </dd> +<dd>copies images associated with a file for use by html, xhtml & xml outputs (automatically +invoked by --dump & redirect). </dd> -<dt><b>-k</b> -</dt> +<dt><b>-k</b> </dt> <dd>see --color-off </dd> <dt><b>--keep-processing-files [filename/wildcard/url]</b> </dt> -<dd>see --maintenance -</dd> +<dd>see --maintenance </dd> <dt><b>-L</b> </dt> <dd>prints license information. </dd> <dt><b>-M [filename/wildcard/url]</b> </dt> -<dd>see --maintenance -</dd> +<dd>see --maintenance </dd> <dt><b>-m [filename/wildcard/url]</b> </dt> <dd>see --dal (document abstraction level/layer) </dd> -<dt><b>--machine -[filename/wildcard/url]</b> </dt> -<dd>see --dal (document abstraction level/layer) </dd> +<dt><b>--machine [filename/wildcard/url]</b> </dt> +<dd>see --dal (document abstraction +level/layer) </dd> -<dt><b>--maintenance -[filename/wildcard/url]</b> </dt> -<dd>maintenance mode, interim processing files are -preserved and their locations indicated. (also see -V). Aliases -M and --keep-processing-files. -</dd> +<dt><b>--maintenance [filename/wildcard/url]</b> </dt> +<dd>maintenance mode, interim +processing files are preserved and their locations indicated. (also see +-V). Aliases -M and --keep-processing-files. </dd> <dt><b>--manpage [filename/wildcard]</b> </dt> -<dd>produces man page of file, not suitable for -all outputs. Alias -i </dd> +<dd>produces +man page of file, not suitable for all outputs. Alias -i </dd> <dt><b>-N [filename/wildcard/url]</b> </dt> -<dd>document digest or document -content certificate ( DCC ) as md5 digest tree of the document: the digest -for the document, and digests for each object contained within the document -(together with information on software versions that produced it) (digest.txt). --NV for verbose digest output to screen. </dd> - -<dt><b>-n [filename/wildcard/url]</b> </dt> -<dd>skip the -creation of intermediate processing files (document abstraction) if they -already exist, this skips the equivalent of -m which is otherwise assumed -by most processing flags. </dd> +<dd>document digest or document content certificate ( DCC ) as md5 digest tree +of the document: the digest for the document, and digests for each object +contained within the document (together with information on software versions +that produced it) (digest.txt). -NV for verbose digest output to screen. </dd> + +<dt><b>-n +[filename/wildcard/url]</b> </dt> +<dd>skip the creation of intermediate processing files +(document abstraction) if they already exist, this skips the equivalent +of -m which is otherwise assumed by most processing flags. </dd> <dt><b>--no-*</b> </dt> <dd>see --exc-* </dd> -<dt><b>-o [filename/wildcard/url]</b> </dt> -<dd>see --odt -</dd> +<dt><b>-o +[filename/wildcard/url]</b> </dt> +<dd>see --odt </dd> <dt><b>--odf [filename/wildcard/url]</b> </dt> <dd>see --odt </dd> -<dt><b>--odt [filename/wildcard/url]</b> </dt> -<dd>output -basic document in opendocument file format (opendocument.odt). Alias -o </dd> +<dt><b>--odt +[filename/wildcard/url]</b> </dt> +<dd>output basic document in opendocument file format +(opendocument.odt). Alias -o </dd> -<dt><b>--output-by-*</b> -</dt> -<dd>select output directory structure from 3 alternatives: --output-by-language, -(language directory (based on language code) with filetype (html, epub, -pdf etc.) subdirectories); --output-by-filetype, (filetype directories with -language code as part of filename); --output-by-filename, (filename directories -with language code as part of filename). This is configurable. Alias --by-* -</dd> +<dt><b>--output-by-*</b> </dt> +<dd>select output directory structure from +3 alternatives: --output-by-language, (language directory (based on language +code) with filetype (html, epub, pdf etc.) subdirectories); --output-by-filetype, +(filetype directories with language code as part of filename); --output-by-filename, +(filename directories with language code as part of filename). This is configurable. +Alias --by-* </dd> <dt><b>-P [language_directory/filename language_directory]</b> </dt> <dd>see --po4a </dd> -<dt><b>-p [filename/wildcard]</b> -</dt> +<dt><b>-p +[filename/wildcard]</b> </dt> <dd>see --pdf </dd> <dt><b>--pdf [filename/wildcard]</b> </dt> -<dd>produces <i>LaTeX</i> pdf (portrait.pdf & landscape.pdf). -Default paper size is set in config file, or document header, or provided -with additional command line parameter, e.g. --papersize-a4 preset sizes include: -’A4’, U.S. ’letter’ and ’legal’ and book sizes ’A5’ and ’B5’ (system defaults to A4). -Alias -p </dd> +<dd>produces <i>LaTeX</i> pdf +(portrait.pdf & landscape.pdf). Default paper size is set in config file, or +document header, or provided with additional command line parameter, e.g. +--papersize-a4 preset sizes include: ’A4’, U.S. ’letter’ and ’legal’ and book sizes +’A5’ and ’B5’ (system defaults to A4). Alias -p </dd> <dt><b>--pg [instruction] [filename]</b> </dt> -<dd>database <i>PostgreSQL</i> ( --pgsql may be -used instead) possible instructions, include: --createdb; --create; --dropall; ---import [filename]; --update [filename]; --remove [filename]; see database section -below. Alias -D </dd> +<dd>database +<i>PostgreSQL</i> ( --pgsql may be used instead) possible instructions, include: +--createdb; --create; --dropall; --import [filename]; --update [filename]; --remove +[filename]; see database section below. Alias -D </dd> -<dt><b>--po [language_directory/filename language_directory]</b> </dt> -<dd>see --po4a -</dd> +<dt><b>--po [language_directory/filename +language_directory]</b> </dt> +<dd>see --po4a </dd> <dt><b>--po4a [language_directory/filename language_directory]</b> </dt> -<dd>produces .pot and -po files for the file in the languages specified by the language directory. -<b>SiSU</b> markup is placed in subdirectories named with the language code, e.g. -en/ fr/ es/. The sisu config file must set the output directory structure -to multilingual. v3, experimental </dd> +<dd>produces .pot and po files for the file in the languages specified by the +language directory. <b>SiSU</b> markup is placed in subdirectories named with the +language code, e.g. en/ fr/ es/. The sisu config file must set the output +directory structure to multilingual. v3, experimental </dd> -<dt><b>-Q [filename/wildcard]</b> </dt> +<dt><b>-Q [filename/wildcard]</b> +</dt> <dd>see --qrcode </dd> -<dt><b>-q [filename/wildcard]</b> -</dt> +<dt><b>-q [filename/wildcard]</b> </dt> <dd>see --quiet </dd> <dt><b>--qrcode [filename/wildcard]</b> </dt> -<dd>generate QR code image of metadata -(used in manifest). v3 only. </dd> +<dd>generate +QR code image of metadata (used in manifest). v3 only. </dd> <dt><b>--quiet [filename/wildcard]</b> </dt> -<dd>quiet less output -to screen. </dd> +<dd>quiet less output to screen. </dd> <dt><b>-R [filename/wildcard]</b> </dt> <dd>see --rsync </dd> <dt><b>-r [filename/wildcard]</b> </dt> -<dd>see --scp -</dd> +<dd>see --scp </dd> <dt><b>--redirect[=directory_path] [filename/wildcard]</b> </dt> -<dd>places output in subdirectory -under specified directory, subdirectory uses the filename (without the -suffix). If no output directory is specified places the subdirectory under -the current directory (pwd). Compare --dump </dd> +<dd>places output in +subdirectory under specified directory, subdirectory uses the filename +(without the suffix). If no output directory is specified places the subdirectory +under the current directory (pwd). Unlike using default settings <i>HTML</i> files +have embedded css. Compare --dump </dd> <dt><b>--rsync [filename/wildcard]</b> </dt> -<dd>copies -sisu output files to remote host using rsync. This requires that sisurc.yml -has been provided with information on hostname and username, and that you -have your "keys" and ssh agent in place. Note the behavior of rsync different -if -R is used with other flags from if used alone. Alone the rsync --delete -parameter is sent, useful for cleaning the remote directory (when -R is -used together with other flags, it is not). Also see --scp. Alias -R </dd> +<dd>copies sisu output +files to remote host using rsync. This requires that sisurc.yml has been +provided with information on hostname and username, and that you have your +"keys" and ssh agent in place. Note the behavior of rsync different if -R +is used with other flags from if used alone. Alone the rsync --delete parameter +is sent, useful for cleaning the remote directory (when -R is used together +with other flags, it is not). Also see --scp. Alias -R </dd> <dt><b>-S</b> </dt> -<dd>see --sisupod -</dd> +<dd>see --sisupod </dd> <dt><b>-S [filename/wildcard]</b> </dt> <dd>see --sisupod </dd> @@ -499,110 +497,102 @@ used together with other flags, it is not). Also see --scp. Alias -R </dd> <dt><b>-s [filename/wildcard]</b> </dt> <dd>see --source </dd> -<dt><b>--sample-search-form -[--webserv=webrick]</b> </dt> -<dd>generate examples of (naive) cgi search form for <i>SQLite</i> -and PgSQL depends on your already having used sisu to populate an <i>SQLite</i> -and/or PgSQL database, (the <i>SQLite</i> version scans the output directories -for existing sisu_sqlite databases, so it is first necessary to create -them, before generating the search form) see -d -D and the database section -below. If the optional parameter --webserv=webrick is passed, the cgi examples -created will be set up to use the default port set for use by the webrick -server, (otherwise the port is left blank and the system setting used, -usually 80). The samples are dumped in the present work directory which -must be writable, (with screen instructions given that they be copied to -the cgi-bin directory). Alias -F </dd> +<dt><b>--sample-search-form [--webserv=webrick]</b> </dt> +<dd>generate examples of (naive) cgi search form for <i>SQLite</i> and PgSQL depends +on your already having used sisu to populate an <i>SQLite</i> and/or PgSQL database, +(the <i>SQLite</i> version scans the output directories for existing sisu_sqlite +databases, so it is first necessary to create them, before generating the +search form) see -d -D and the database section below. If the optional parameter +--webserv=webrick is passed, the cgi examples created will be set up to use +the default port set for use by the webrick server, (otherwise the port +is left blank and the system setting used, usually 80). The samples are +dumped in the present work directory which must be writable, (with screen +instructions given that they be copied to the cgi-bin directory). Alias -F </dd> <dt><b>--scp [filename/wildcard]</b> </dt> -<dd>copies sisu output -files to remote host using scp. This requires that sisurc.yml has been provided -with information on hostname and username, and that you have your "keys" -and ssh agent in place. Also see --rsync. Alias -r </dd> - -<dt><b>--sqlite --[instruction] [filename]</b> -</dt> -<dd>database type set to <i>SQLite,</i> this produces one of two possible databases, -without additional database related instructions it produces a discreet -<i>SQLite</i> file for the document processed; with additional instructions it -produces a common <i>SQLite</i> database of all processed documents that (come -from the same document preparation directory and as a result) share the -same output directory base path (possible instructions include: --createdb; ---create; --dropall; --import [filename]; --update [filename]; --remove [filename]); -see database section below. Alias -d </dd> +<dd>copies sisu output files to remote host using scp. +This requires that sisurc.yml has been provided with information on hostname +and username, and that you have your "keys" and ssh agent in place. Also +see --rsync. Alias -r </dd> + +<dt><b>--sqlite --[instruction] [filename]</b> </dt> +<dd>database type set to +<i>SQLite,</i> this produces one of two possible databases, without additional +database related instructions it produces a discreet <i>SQLite</i> file for the +document processed; with additional instructions it produces a common <i>SQLite</i> +database of all processed documents that (come from the same document preparation +directory and as a result) share the same output directory base path (possible +instructions include: --createdb; --create; --dropall; --import [filename]; --update +[filename]; --remove [filename]); see database section below. Alias -d </dd> <dt><b>--sisupod</b> </dt> -<dd>produces a sisupod a zipped -sisu directory of markup files including sisu markup source files and the -directories local configuration file, images and skins. Note: this only -includes the configuration files or skins contained in is tested only -with zsh). Alias -S </dd> +<dd>produces a sisupod a zipped sisu directory of markup files including sisu +markup source files and the directories local configuration file, images +and skins. Note: this only includes the configuration files or skins contained +in is tested only with zsh). Alias -S </dd> <dt><b>--sisupod [filename/wildcard]</b> </dt> -<dd>produces a zipped file of -the prepared document specified along with associated images, by default -named sisupod.zip they may alternatively be named with the filename extension -.ssp This provides a quick way of gathering the relevant parts of a sisu -document which can then for example be emailed. A sisupod includes sisu -markup source file, (along with associated documents if a master file, -or available in multilingual versions), together with related images and -skin. <b>SiSU</b> commands can be run directly against a sisupod contained in a -local directory, or provided as a url on a remote site. As there is a security -issue with skins provided by other users, they are not applied unless the -flag --trust or --trusted is added to the command instruction, it is recommended -that file that are not your own are treated as untrusted. The directory -structure of the unzipped file is understood by sisu, and sisu commands -can be run within it. Note: if you wish to send multiple files, it quickly -becomes more space efficient to zip the sisu markup directory, rather than -the individual files for sending). See the -S option without [filename/wildcard]. -Alias -S </dd> +<dd>produces +a zipped file of the prepared document specified along with associated +images, by default named sisupod.zip they may alternatively be named with +the filename extension .ssp This provides a quick way of gathering the relevant +parts of a sisu document which can then for example be emailed. A sisupod +includes sisu markup source file, (along with associated documents if a +master file, or available in multilingual versions), together with related +images and skin. <b>SiSU</b> commands can be run directly against a sisupod contained +in a local directory, or provided as a url on a remote site. As there is +a security issue with skins provided by other users, they are not applied +unless the flag --trust or --trusted is added to the command instruction, it +is recommended that file that are not your own are treated as untrusted. +The directory structure of the unzipped file is understood by sisu, and +sisu commands can be run within it. Note: if you wish to send multiple files, +it quickly becomes more space efficient to zip the sisu markup directory, +rather than the individual files for sending). See the -S option without +[filename/wildcard]. Alias -S </dd> <dt><b>--source [filename/wildcard]</b> </dt> -<dd>copies sisu markup file to output directory. -Alias -s </dd> +<dd>copies sisu markup file to output directory. Alias -s </dd> <dt><b>-T [filename/wildcard (*.termsheet.rb)]</b> </dt> -<dd>standard form document builder, -preprocessing feature </dd> +<dd>standard form document builder, preprocessing feature </dd> <dt><b>-t [filename/wildcard]</b> </dt> <dd>see --txt </dd> -<dt><b>--texinfo [filename/wildcard]</b> -</dt> -<dd>produces texinfo and info file, (view with pinfo). Alias -I </dd> +<dt><b>--texinfo [filename/wildcard]</b> </dt> +<dd>produces texinfo and info file, (view with +pinfo). Alias -I </dd> -<dt><b>--txt [filename/wildcard]</b> -</dt> -<dd>produces <i>plaintext</i> with Unix linefeeds and without markup, (object numbers -are omitted), has footnotes at end of each paragraph that contains them -[ -A for equivalent dos (linefeed) output file] [see -e for endnotes]. (Options -include: --endnotes for endnotes --footnotes for footnotes at the end of each -paragraph --unix for unix linefeed (default) --msdos for msdos linefeed). Alias --t </dd> +<dt><b>--txt [filename/wildcard]</b> </dt> +<dd>produces <i>plaintext</i> with Unix linefeeds +and without markup, (object numbers are omitted), has footnotes at end +of each paragraph that contains them [ -A for equivalent dos (linefeed) +output file] [see -e for endnotes]. (Options include: --endnotes for endnotes +--footnotes for footnotes at the end of each paragraph --unix for unix linefeed +(default) --msdos for msdos linefeed). Alias -t </dd> <dt><b>-U [filename/wildcard]</b> </dt> <dd>see --urls </dd> <dt><b>-u [filename/wildcard]</b> </dt> -<dd>provides url mapping -of output files for the flags requested for processing, also see -U </dd> - -<dt><b>--urls -[filename/wildcard]</b> </dt> -<dd>prints url output list/map for the available processing -flags options and resulting files that could be requested, (can be used -to get a list of processing options in relation to a file, together with -information on the output that would be produced), -u provides url output -mapping for those flags requested for processing. The default assumes sisu_webrick -is running and provides webrick url mappings where appropriate, but these -can be switched to file system paths in sisurc.yml. Alias -U </dd> +<dd>provides url mapping of output files for the flags +requested for processing, also see -U </dd> + +<dt><b>--urls [filename/wildcard]</b> </dt> +<dd>prints url +output list/map for the available processing flags options and resulting +files that could be requested, (can be used to get a list of processing +options in relation to a file, together with information on the output +that would be produced), -u provides url output mapping for those flags +requested for processing. The default assumes sisu_webrick is running and +provides webrick url mappings where appropriate, but these can be switched +to file system paths in sisurc.yml. Alias -U </dd> <dt><b>-V</b> </dt> -<dd>on its own, -provides <b>SiSU</b> version and environment information (sisu --help env) </dd> +<dd>on its own, provides <b>SiSU</b> version +and environment information (sisu --help env) </dd> -<dt><b>-V [filename/wildcard]</b> -</dt> +<dt><b>-V [filename/wildcard]</b> </dt> <dd>even more verbose than the -v flag. </dd> <dt><b>-v</b> </dt> diff --git a/data/doc/sisu/markup-samples/v4/sisu_manual/sisu_commands.sst b/data/doc/sisu/markup-samples/v4/sisu_manual/sisu_commands.sst index 2811e961..86f818f6 100644 --- a/data/doc/sisu/markup-samples/v4/sisu_manual/sisu_commands.sst +++ b/data/doc/sisu/markup-samples/v4/sisu_manual/sisu_commands.sst @@ -86,7 +86,7 @@ assumed for most other flags, creates new intermediate files for processing (doc see --zap !_ --dump[=directory_path] [filename/wildcard] \\ -places output in directory specified, if none is specified in the current directory (pwd). Compare --redirect +places output in directory specified, if none is specified in the current directory (pwd). Unlike using default settings HTML files have embedded css. Compare --redirect !_ -e [filename/wildcard] \\ see --epub @@ -142,7 +142,13 @@ makes two lists of sisu output based on the sisu markup documents in a directory provides help on the selected topic, where topics (keywords) include: list, (com)mands, short(cuts), (mod)ifiers, (env)ironment, markup, syntax, headers, headings, endnotes, tables, example, customise, skin, (dir)ectories, path, (lang)uage, db, install, setup, (conf)igure, convert, termsheet, search, sql, features, license. !_ --html [filename/wildcard] \\ -produces html output, segmented text with table of contents (toc.html and index.html) and the document in a single file (scroll.html). Alias -h +produces html output, in two forms (i) segmented text with table of contents (toc.html and index.html) and (ii) the document in a single file (scroll.html). Alias -h + +!_ --html-scroll [filename/wildcard] \\ +produces html output, the document in a single file (scroll.html) only. Compare --html-seg and --html + +!_ --html-seg [filename/wildcard] \\ +produces html output, segmented text with table of contents (toc.html and index.html). Compare --html-scroll and --html !_ -I [filename/wildcard] \\ see --texinfo @@ -243,7 +249,7 @@ see --rsync see --scp !_ --redirect[=directory_path] [filename/wildcard] \\ -places output in subdirectory under specified directory, subdirectory uses the filename (without the suffix). If no output directory is specified places the subdirectory under the current directory (pwd). Compare --dump +places output in subdirectory under specified directory, subdirectory uses the filename (without the suffix). If no output directory is specified places the subdirectory under the current directory (pwd). Unlike using default settings HTML files have embedded css. Compare --dump !_ --rsync [filename/wildcard] \\ copies sisu output files to remote host using rsync. This requires that sisurc.yml has been provided with information on hostname and username, and that you have your "keys" and ssh agent in place. Note the behavior of rsync different if -R is used with other flags from if used alone. Alone the rsync --delete parameter is sent, useful for cleaning the remote directory (when -R is used together with other flags, it is not). Also see --scp. Alias -R diff --git a/data/sisu/v3/v/version.yml b/data/sisu/v3/v/version.yml index 133bc6bb..7c0f9b6d 100644 --- a/data/sisu/v3/v/version.yml +++ b/data/sisu/v3/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 3.3.7 -:date_stamp: 2013w04/4 -:date: "2013-01-31" +:version: 3.3.8 +:date_stamp: 2013w04/7 +:date: "2013-02-03" :project: SiSU diff --git a/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml index 7707ce69..a81c8c01 100644 --- a/data/sisu/v4/v/version.yml +++ b/data/sisu/v4/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 4.0.4 -:date_stamp: 2013w04/4 -:date: "2013-01-31" +:version: 4.0.5 +:date_stamp: 2013w04/7 +:date: "2013-02-03" :project: SiSU diff --git a/lib/sisu/v3/css.rb b/lib/sisu/v3/css.rb index cee2ea8e..c18d10c5 100644 --- a/lib/sisu/v3/css.rb +++ b/lib/sisu/v3/css.rb @@ -8,7 +8,7 @@ * Author: Ralph Amissah * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010, 2011, 2013, 2013 Ralph Amissah, All Rights Reserved. + 2007, 2008, 2009, 2010, 2011, 2012, 2013 Ralph Amissah, All Rights Reserved. * License: GPL 3 or later: @@ -428,10 +428,10 @@ WOK } .norm, .bold, .verse, .group, .block, .alt { - line-height: 150%; + line-height: 133%; margin-left: 0em; margin-right: 2em; - margin-top: 10px; + margin-top: 12px; margin-bottom: 0px; padding-left: 0em; text-indent: 0em; @@ -441,13 +441,13 @@ WOK font-family: verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; font-size: 100%; font-weight: normal; - line-height: 150%; + line-height: 133%; text-align: justify; margin-left: 0em; margin-right: 2em; text-indent: 0mm; - margin-top: 3px; - margin-bottom: 3px; + margin-top: 4px; + margin-bottom: 4px; } /* indent */ diff --git a/lib/sisu/v3/epub_format.rb b/lib/sisu/v3/epub_format.rb index 38717359..c202c2f6 100644 --- a/lib/sisu/v3/epub_format.rb +++ b/lib/sisu/v3/epub_format.rb @@ -151,10 +151,10 @@ module SiSU_EPUB_Format } .norm, .bold, .verse, .group, .block, .alt { - line-height: 150%; + line-height: 133%; margin-left: 0em; margin-right: 2em; - margin-top: 10px; + margin-top: 12px; margin-bottom: 0px; padding-left: 0em; text-indent: 0mm; @@ -164,13 +164,13 @@ module SiSU_EPUB_Format font-family: verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; font-size: 100%; font-weight: normal; - line-height: 150%; + line-height: 133%; text-align: justify; margin-left: 0em; margin-right: 2em; text-indent: 0mm; - margin-top: 3px; - margin-bottom: 3px; + margin-top: 4px; + margin-bottom: 4px; } p.norm { } p.i1 {padding-left: 1em;} diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb index 2dbb688b..7faf8f99 100644 --- a/lib/sisu/v3/html.rb +++ b/lib/sisu/v3/html.rb @@ -542,14 +542,16 @@ WOK toc_shared << format_head_toc.scroll_head_title_banner_open @segtoc << format_head_toc.seg_head_title_banner_open tmp_head=nil - doc_title_endnote=@md.title.full.gsub(/(\*+)/,'<sup><a href="#endnotes">\1</a></sup>') + doc_title_endnote=@md.title.full.gsub(/(\*+)/, + '<sup><a href="#endnotes">\1</a></sup>') tmp_head=doc_title_endnote + "\n" txt_obj={ txt: tmp_head } format_txt_obj=SiSU_HTML_Format::FormatTextObject.new(@md,txt_obj) toc_shared << format_txt_obj.center_bold @segtoc << format_txt_obj.center_bold if defined? @md.creator.author - creator_endnote=@md.creator.author.gsub(/(\*+)/,%{ <sup><a href="#notes">\\1</a></sup>}) + creator_endnote=@md.creator.author.gsub(/(\*+)/, + %{ <sup><a href="#notes">\\1</a></sup>}) tmp_head=creator_endnote + "\n" txt_obj={ txt: tmp_head } format_txt_obj=SiSU_HTML_Format::FormatTextObject.new(@md,txt_obj) @@ -657,11 +659,9 @@ WOK ensure @filename_html_segtoc.close pwd_set=Dir.pwd - idx_lnk=if @o_str.dump_or_redirect? - @file.base_filename.manifest - else - @file.base_filename.html_segtoc - end + idx_lnk=(@o_str.dump_or_redirect?) \ + ? @file.base_filename.manifest + : @file.base_filename.html_segtoc mlnk=@file.base_filename.html_seg_index Dir.chdir(@file.output_path.html_seg.dir) FileUtils::rm_f(mlnk) diff --git a/lib/sisu/v3/html_scroll.rb b/lib/sisu/v3/html_scroll.rb index 15bea9eb..07fa5d98 100644 --- a/lib/sisu/v3/html_scroll.rb +++ b/lib/sisu/v3/html_scroll.rb @@ -86,7 +86,8 @@ module SiSU_HTML_Scroll dob.obj=dob.obj.gsub(/#{@md.file.output_path.html_seg.rel_image}/m,@md.file.output_path.html_scroll.rel_image) if defined? dob.name and dob.name =~/^meta/ \ and dob.obj =~/Document Information/ - dob.obj=dob.obj.gsub(/(Document Information(?: \(metadata\))?)/,'\1<a name="docinfo"></a>') + dob.obj=dob.obj.gsub(/(Document Information(?: \(metadata\))?)/, + '\1<a name="docinfo"></a>') end if dob.obj =~/^Metadata$/ \ and dob.lv =='B' @@ -152,7 +153,8 @@ module SiSU_HTML_Scroll sto.heading_body4 book_idx=SiSU_Particulars::CombinedSingleton.instance.get_idx_html(@md.opt).html_idx book_idx.each do |x| #takes book index prepared for segments & strips segment identifying info - x=x.gsub(/<a href="\S+?\.html#(\d+)">(\1(?:-\d+)?)<\/a>/,'<a href="#\1">\2</a>') + x.gsub!(/<a href="\S+?\.html#(\d+)">(\1(?:-\d+)?)<\/a>/, + '<a href="#\1">\2</a>') end book_idx.join("\n") elsif dob.ln==5 @@ -170,11 +172,9 @@ module SiSU_HTML_Scroll and dob.indent =~/[0-9]/ \ and dob.hang =~/[0-9]/ if dob.bullet_ - if dob.indent =~/[1-9]/ - sto.format('li',"i#{dob.indent}") - else - sto.format('li','bullet') - end + (dob.indent =~/[1-9]/) \ + ? sto.format('li',"i#{dob.indent}") + : sto.format('li','bullet') elsif dob.indent == dob.hang sto.format('p',"i#{dob.indent}") elsif dob.indent != dob.hang diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index bfe35c5d..8ed17f88 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -4106,7 +4106,8 @@ WOK end def html_segtoc pth=((by_filename?) \ - || (output_dir_structure.dump?)) \ + || (output_dir_structure.dump?) \ + || (output_dir_structure.redirect?)) \ ? "#{output_path.html.dir}" : "#{output_path.html.dir}/#{@md.fnb}" fn=base_filename.html_segtoc diff --git a/lib/sisu/v4/css.rb b/lib/sisu/v4/css.rb index b1d47fce..ca526010 100644 --- a/lib/sisu/v4/css.rb +++ b/lib/sisu/v4/css.rb @@ -428,10 +428,10 @@ WOK } .norm, .bold, .verse, .group, .block, .alt { - line-height: 150%; + line-height: 133%; margin-left: 0em; margin-right: 2em; - margin-top: 10px; + margin-top: 12px; margin-bottom: 0px; padding-left: 0em; text-indent: 0em; @@ -441,13 +441,13 @@ WOK font-family: verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; font-size: 100%; font-weight: normal; - line-height: 150%; + line-height: 133%; text-align: justify; margin-left: 0em; margin-right: 2em; text-indent: 0mm; - margin-top: 3px; - margin-bottom: 3px; + margin-top: 4px; + margin-bottom: 4px; } /* indent */ diff --git a/lib/sisu/v4/epub_format.rb b/lib/sisu/v4/epub_format.rb index d8baae63..7be18331 100644 --- a/lib/sisu/v4/epub_format.rb +++ b/lib/sisu/v4/epub_format.rb @@ -151,10 +151,10 @@ module SiSU_EPUB_Format } .norm, .bold, .verse, .group, .block, .alt { - line-height: 150%; + line-height: 133%; margin-left: 0em; margin-right: 2em; - margin-top: 10px; + margin-top: 12px; margin-bottom: 0px; padding-left: 0em; text-indent: 0mm; @@ -164,13 +164,13 @@ module SiSU_EPUB_Format font-family: verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; font-size: 100%; font-weight: normal; - line-height: 150%; + line-height: 133%; text-align: justify; margin-left: 0em; margin-right: 2em; text-indent: 0mm; - margin-top: 3px; - margin-bottom: 3px; + margin-top: 4px; + margin-bottom: 4px; } p.norm { } p.i1 {padding-left: 1em;} diff --git a/lib/sisu/v4/html.rb b/lib/sisu/v4/html.rb index 57ac79c1..9e6ec0fa 100644 --- a/lib/sisu/v4/html.rb +++ b/lib/sisu/v4/html.rb @@ -101,16 +101,22 @@ module SiSU_HTML data=nil tuned_file_array=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions data=tuned_file_array - scr_endnotes=SiSU_HTML::Source::Endnotes.new(data,@md).scroll + if @opt.act[:html_scroll][:set]==:on + scr_endnotes=SiSU_HTML::Source::Endnotes.new(data,@md).scroll + end toc=SiSU_HTML::Source::Toc.new(@md,data).songsheet links_guide=SiSU_HTML::Source::LinksGuide.new(data,@md).toc data=tuned_file_array scr_toc=SiSU_HTML::Source::ScrollHeadAndSegToc.new(@md,toc,links_guide).in_common #watch - SiSU_HTML::Source::Seg.new(@md,data).songsheet + if @opt.act[:html_seg][:set]==:on + SiSU_HTML::Source::Seg.new(@md,data).songsheet + end data=tuned_file_array - scr=SiSU_HTML::Source::Scroll.new(@md,data,scr_endnotes).songsheet - scroll=SiSU_HTML::Source::ScrollOutput.new(scr_toc,scr[:body],scr[:metadata],scr[:owner_details],scr[:tails],@md).publish - SiSU_HTML::Source::Output.new(scroll,@md).scroll + if @opt.act[:html_scroll][:set]==:on + scr=SiSU_HTML::Source::Scroll.new(@md,data,scr_endnotes).songsheet + scroll=SiSU_HTML::Source::ScrollOutput.new(scr_toc,scr[:body],scr[:metadata],scr[:owner_details],scr[:tails],@md).publish + SiSU_HTML::Source::Output.new(scroll,@md).scroll + end rescue SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do __LINE__.to_s + ':' + __FILE__ @@ -541,14 +547,16 @@ WOK toc_shared << format_head_toc.scroll_head_title_banner_open @segtoc << format_head_toc.seg_head_title_banner_open tmp_head=nil - doc_title_endnote=@md.title.full.gsub(/(\*+)/,'<sup><a href="#endnotes">\1</a></sup>') + doc_title_endnote=@md.title.full.gsub(/(\*+)/, + '<sup><a href="#endnotes">\1</a></sup>') tmp_head=doc_title_endnote + "\n" txt_obj={ txt: tmp_head } format_txt_obj=SiSU_HTML_Format::FormatTextObject.new(@md,txt_obj) toc_shared << format_txt_obj.center_bold @segtoc << format_txt_obj.center_bold if defined? @md.creator.author - creator_endnote=@md.creator.author.gsub(/(\*+)/,%{ <sup><a href="#notes">\\1</a></sup>}) + creator_endnote=@md.creator.author.gsub(/(\*+)/, + %{ <sup><a href="#notes">\\1</a></sup>}) tmp_head=creator_endnote + "\n" txt_obj={ txt: tmp_head } format_txt_obj=SiSU_HTML_Format::FormatTextObject.new(@md,txt_obj) @@ -587,7 +595,9 @@ WOK ads=SiSU_HTML_Promo::Ad.new(@md) @segtoc << format_head_toc.seg_navigation_tail << ads.div.close << ads.display << format_head_toc.html_close @segtoc=@segtoc.flatten.compact #watch - SiSU_HTML::Source::Output.new(@segtoc,@md).segtoc + if @md.opt.act[:html_seg][:set]==:on + SiSU_HTML::Source::Output.new(@segtoc,@md).segtoc + end @segtoc=[] @toc[:scr],@toc[:seg]=[],[] toc_shared @@ -616,56 +626,58 @@ WOK @o_str ||=SiSU_Env::ProcessingSettings.new(md).output_dir_structure end def scroll - begin - @filename_html_scroll=@file.write_file.html_scroll - @data.each do |para| - para=para.strip. - gsub(/<:.+?>/,''). - gsub(Xx[:html_relative2],@file.path_rel_links.html_scroll_2). - gsub(Xx[:html_relative1],@file.path_rel_links.html_scroll_1). - #gsub(/#{Xx[:html_relative]}/,@file.path_rel_links.html_scroll). - gsub(/#{Rx[:mx_fa_clean]}/,'') - unless para =~/\A\s*\Z/ - @filename_html_scroll.puts para,"\n" + if @md.opt.act[:html_scroll][:set]==:on + begin + @filename_html_scroll=@file.write_file.html_scroll + @data.each do |para| + para=para.strip. + gsub(/<:.+?>/,''). + gsub(Xx[:html_relative2],@file.path_rel_links.html_scroll_2). + gsub(Xx[:html_relative1],@file.path_rel_links.html_scroll_1). + #gsub(/#{Xx[:html_relative]}/,@file.path_rel_links.html_scroll). + gsub(/#{Rx[:mx_fa_clean]}/,'') + unless para =~/\A\s*\Z/ + @filename_html_scroll.puts para,"\n" + end end + rescue + SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + __LINE__.to_s + ':' + __FILE__ + end + ensure + @filename_html_scroll.close end - rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do - __LINE__.to_s + ':' + __FILE__ - end - ensure - @filename_html_scroll.close end end def segtoc - begin - @filename_html_segtoc=@file.write_file.html_segtoc - @data.each do |para| - para=para.strip. - gsub(/<!.+?!>/,''). - gsub(Xx[:html_relative2],@file.path_rel_links.html_seg_2). - gsub(Xx[:html_relative1],@file.path_rel_links.html_seg_1) - unless para =~/\A\s*\Z/ - @filename_html_segtoc.puts para,"\n" + if @md.opt.act[:html_seg][:set]==:on + begin + @filename_html_segtoc=@file.write_file.html_segtoc + @data.each do |para| + para=para.strip. + gsub(/<!.+?!>/,''). + gsub(Xx[:html_relative2],@file.path_rel_links.html_seg_2). + gsub(Xx[:html_relative1],@file.path_rel_links.html_seg_1) + unless para =~/\A\s*\Z/ + @filename_html_segtoc.puts para,"\n" + end end + rescue + SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + __LINE__.to_s + ':' + __FILE__ + end + ensure + @filename_html_segtoc.close + pwd_set=Dir.pwd + idx_lnk=(@o_str.dump_or_redirect?) \ + ? @file.base_filename.manifest + : @file.base_filename.html_segtoc + mlnk=@file.base_filename.html_seg_index + Dir.chdir(@file.output_path.html_seg.dir) + FileUtils::rm_f(mlnk) + FileUtils::ln_s(idx_lnk,mlnk) + Dir.chdir(pwd_set) end - rescue - SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do - __LINE__.to_s + ':' + __FILE__ - end - ensure - @filename_html_segtoc.close - pwd_set=Dir.pwd - idx_lnk=if @o_str.dump_or_redirect? - @file.base_filename.manifest - else - @file.base_filename.html_segtoc - end - mlnk=@file.base_filename.html_seg_index - Dir.chdir(@file.output_path.html_seg.dir) - FileUtils::rm_f(mlnk) - FileUtils::ln_s(idx_lnk,mlnk) - Dir.chdir(pwd_set) end end end diff --git a/lib/sisu/v4/html_scroll.rb b/lib/sisu/v4/html_scroll.rb index f8d104bb..a8d84c9d 100644 --- a/lib/sisu/v4/html_scroll.rb +++ b/lib/sisu/v4/html_scroll.rb @@ -86,7 +86,8 @@ module SiSU_HTML_Scroll dob.obj=dob.obj.gsub(/#{@md.file.output_path.html_seg.rel_image}/m,@md.file.output_path.html_scroll.rel_image) if defined? dob.name and dob.name =~/^meta/ \ and dob.obj =~/Document Information/ - dob.obj=dob.obj.gsub(/(Document Information(?: \(metadata\))?)/,'\1<a name="docinfo"></a>') + dob.obj=dob.obj.gsub(/(Document Information(?: \(metadata\))?)/, + '\1<a name="docinfo"></a>') end if dob.obj =~/^Metadata$/ \ and dob.lv =='B' @@ -152,7 +153,8 @@ module SiSU_HTML_Scroll sto.heading_body4 book_idx=SiSU_Particulars::CombinedSingleton.instance.get_idx_html(@md.opt).html_idx book_idx.each do |x| #takes book index prepared for segments & strips segment identifying info - x=x.gsub(/<a href="\S+?\.html#(\d+)">(\1(?:-\d+)?)<\/a>/,'<a href="#\1">\2</a>') + x.gsub!(/<a href="\S+?\.html#(\d+)">(\1(?:-\d+)?)<\/a>/, + '<a href="#\1">\2</a>') end book_idx.join("\n") elsif dob.ln==5 @@ -170,11 +172,9 @@ module SiSU_HTML_Scroll and dob.indent =~/[0-9]/ \ and dob.hang =~/[0-9]/ if dob.bullet_ - if dob.indent =~/[1-9]/ - sto.format('li',"i#{dob.indent}") - else - sto.format('li','bullet') - end + (dob.indent =~/[1-9]/) \ + ? sto.format('li',"i#{dob.indent}") + : sto.format('li','bullet') elsif dob.indent == dob.hang sto.format('p',"i#{dob.indent}") elsif dob.indent != dob.hang diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb index a7b1a05a..2cfcee57 100644 --- a/lib/sisu/v4/hub.rb +++ b/lib/sisu/v4/hub.rb @@ -303,6 +303,15 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on if @opt.act[:html][:set]==:on #% --html, -h require_relative 'html' # -h -H html.rb SiSU_HTML::Source.new(@opt).read + else + if @opt.act[:html_seg][:set]==:on #% --html-seg + require_relative 'html' # -h -H html.rb + SiSU_HTML::Source.new(@opt).read + end + if @opt.act[:html_scroll][:set]==:on #% --html-scroll + require_relative 'html' # -h -H html.rb + SiSU_HTML::Source.new(@opt).read + end end if @opt.act[:concordance][:set]==:on #% --concordance, -w require_relative 'concordance' # -w concordance.rb @@ -628,10 +637,38 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on SiSU_Harvest::Source.new(@opt).read # -h -H html.rb elsif @opt.mod.inspect =~/--convert|--to|--from/ require_relative 'sst_convert_markup' # sst_convert_markup.rb - elsif @opt.cmd =~/([abCcDdeFGgHhIjikLMmNnoPpQqRrSsTtUuVvWwXxYyZ_0-9])/ \ - and @opt.cmd =~/^-/ \ - and @opt.mod.inspect !~/--(?:sitemaps|query|identify)/ \ - or @opt.mod.inspect =~/--(?:(?:sq)?lite|pg(?:sql)?)/ + elsif @opt.act[:dal][:set]==:on \ + or @opt.act[:manpage][:set]==:on \ + or @opt.act[:texinfo][:set]==:on \ + or @opt.act[:txt][:set]==:on \ + or @opt.act[:html][:set]==:on \ + or @opt.act[:html_scroll][:set]==:on \ + or @opt.act[:html_seg][:set]==:on \ + or @opt.act[:concordance][:set]==:on \ + or @opt.act[:xhtml][:set]==:on \ + or @opt.act[:epub][:set]==:on \ + or @opt.act[:odt][:set]==:on \ + or @opt.act[:xml_sax][:set]==:on \ + or @opt.act[:xml_dom][:set]==:on \ + or @opt.act[:pdf][:set]==:on \ + or @opt.act[:psql][:set]==:on \ + or @opt.act[:sqlite][:set]==:on \ + or @opt.act[:sqlite_discreet][:set]==:on \ + or @opt.act[:share_source][:set]==:on \ + or @opt.act[:sisupod][:set]==:on \ + or @opt.act[:qrcode][:set]==:on \ + or @opt.act[:hash_digests][:set]==:on \ + or @opt.act[:manifest][:set]==:on \ + or @opt.act[:rsync][:set]==:on \ + or @opt.act[:scp][:set]==:on \ + or @opt.act[:webrick][:set]==:on \ + or @opt.act[:zap][:set]==:on \ + or ( + @opt.cmd =~/^-/ \ + and @opt.cmd =~/([abCcDdeFGgHhIjikLMmNnoPpQqRrSsTtUuVvWwXxYyZ_0-9])/ \ + and @opt.mod.inspect !~/--(?:sitemaps|query|identify)/ \ + or @opt.mod.inspect =~/--(?:(?:sq)?lite|pg(?:sql)?)/ \ + ) do_initialization do_loops @msg,@msgs="\tsisu -W [to start ruby web-server on output directory]\n",nil unless @opt.act[:quiet][:set] ==:on diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb index e26fcfc2..fbdfc8f3 100644 --- a/lib/sisu/v4/options.rb +++ b/lib/sisu/v4/options.rb @@ -471,6 +471,8 @@ module SiSU_Commandline when /^--(?:dal?|machine|abstraction|abs)$/; c=c+'m' when /^--(?:txt|text|plaintext)$/; c=c+'t' when /^--(?:html)$/; c=c+'h' + when /^--(?:html-scroll|html-seg)$/; c=c+'H' + mod << m when /^--(?:epub)$/; c=c+'e' when /^--(?:od[ft])$/; c=c+'o' when /^--(?:pdf)$/; c=c+'p' @@ -757,10 +759,24 @@ module SiSU_Commandline || mod.inspect =~/"--dal"/) \ ? { bool: true, set: :on } : { bool: false, set: :na } - act[:html]=(cmd =~/h/ \ - || mod.inspect =~/"--html"/) \ - ? { bool: true, set: :on } - : { bool: false, set: :na } + act[:html]=if (cmd =~/h/ \ + || mod.inspect =~/"--html"/) + act[:html_scroll]={ bool: true, set: :on } + act[:html_seg]={ bool: true, set: :on } + { bool: true, set: :on } + else + act[:html_scroll]=if mod.inspect =~/"--html-scroll"/ + { bool: true, set: :on } + else + { bool: false, set: :na } + end + act[:html_seg]=if mod.inspect =~/"--html-seg"/ + { bool: true, set: :on } + else + { bool: false, set: :na } + end + { bool: false, set: :na } + end act[:concordance]=(cmd =~/w/ \ || mod.inspect =~/"--concordance"/) \ ? { bool: true, set: :on } diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index 2b36a222..d8b6f4fd 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -4208,7 +4208,8 @@ WOK end def html_segtoc pth=((by_filename?) \ - || (output_dir_structure.dump?)) \ + || (output_dir_structure.dump?) \ + || (output_dir_structure.redirect?)) \ ? "#{output_path.html.dir}" : "#{output_path.html.dir}/#{@md.fnb}" fn=base_filename.html_segtoc diff --git a/lib/sisu/v4/urls.rb b/lib/sisu/v4/urls.rb index a9a27bff..5e6bcc8a 100644 --- a/lib/sisu/v4/urls.rb +++ b/lib/sisu/v4/urls.rb @@ -316,11 +316,17 @@ module SiSU_Urls show.epub(x) end if x=~/--html\b/ \ - and @opt.act[:html][:set]==:on + and (@opt.act[:html][:set]==:on \ + or @opt.act[:html_scroll][:set]==:on \ + or @opt.act[:html_seg][:set]==:on) if x =~/scroll/ - show.html.scroll(x) + if @opt.act[:html_scroll][:set]==:on + show.html.scroll(x) + end else - show.html.toc(x) + if @opt.act[:html_seg][:set]==:on + show.html.toc(x) + end end end if x=~/--texinfo\b/ \ diff --git a/man/man1/sisu.1 b/man/man1/sisu.1 index b297f3e3..11c88a3d 100644 --- a/man/man1/sisu.1 +++ b/man/man1/sisu.1 @@ -1,4 +1,4 @@ -.TH "sisu" "1" "2012-10-03" "4.0.1" "SiSU" +.TH "sisu" "1" "2013-02-03" "4.0.5" "SiSU" .br .SH NAME .br @@ -331,7 +331,9 @@ see --zap .TP .B --dump[=directory_path] [filename/wildcard] places output in directory specified, if none is specified in the current -directory (pwd). Compare --redirect +directory (pwd). Unlike using default settings +.I HTML +files have embedded css. Compare --redirect .TP .B -e [filename/wildcard] see --epub @@ -402,8 +404,17 @@ headings, endnotes, tables, example, customise, skin, (dir)ectories, path, features, license. .TP .B --html [filename/wildcard] +produces html output, in two forms (i) segmented text with table of contents +(toc.html and index.html) and (ii) the document in a single file (scroll.html). +Alias -h +.TP +.B --html-scroll [filename/wildcard] +produces html output, the document in a single file (scroll.html) only. Compare +--html-seg and --html +.TP +.B --html-seg [filename/wildcard] produces html output, segmented text with table of contents (toc.html and -index.html) and the document in a single file (scroll.html). Alias -h +index.html). Compare --html-scroll and --html .TP .B -I [filename/wildcard] see --texinfo @@ -528,7 +539,9 @@ see --scp .B --redirect[=directory_path] [filename/wildcard] places output in subdirectory under specified directory, subdirectory uses the filename (without the suffix). If no output directory is specified places the -subdirectory under the current directory (pwd). Compare --dump +subdirectory under the current directory (pwd). Unlike using default settings +.I HTML +files have embedded css. Compare --dump .TP .B --rsync [filename/wildcard] copies sisu output files to remote host using rsync. This requires that |