From b76284d1506321eecf86aad5d40a59761f91db66 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 18 May 2014 08:27:40 -0400 Subject: v5 v6: version & changelog (& rakefile) --- data/doc/sisu/CHANGELOG_v5 | 7 +++++++ data/doc/sisu/CHANGELOG_v6 | 7 +++++++ data/sisu/v5/v/version.yml | 6 +++--- data/sisu/v6/v/version.yml | 6 +++--- rbuild | 4 ++-- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 8126efab..c9f2f2ea 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -31,6 +31,13 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: +%% 5.3.6.orig.tar.xz (2014-05-18:19/7) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.3.6 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.3.6-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_5.3.6.orig.tar.xz + sisu_5.3.6.orig.tar.xz + sisu_5.3.6-1.dsc + %% 5.3.5.orig.tar.xz (2014-05-12:19/1) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.3.5 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.3.5-1 diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index a103a9ed..d4d500cd 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -21,6 +21,13 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: +%% 6.0.6.orig.tar.xz (2014-05-18:19/7) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.6 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_6.0.6-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.6.orig.tar.xz + sisu_6.0.6.orig.tar.xz + sisu_6.0.6-1.dsc + %% 6.0.5.orig.tar.xz (2014-05-12:19/1) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.5 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_6.0.5-1 diff --git a/data/sisu/v5/v/version.yml b/data/sisu/v5/v/version.yml index cbe3f4e0..698bd43a 100644 --- a/data/sisu/v5/v/version.yml +++ b/data/sisu/v5/v/version.yml @@ -1,5 +1,5 @@ --- :project: SiSU -:version: 5.3.5 -:date_stamp: 2014w19/1 -:date: "2014-05-12" +:version: 5.3.6 +:date_stamp: 2014w19/7 +:date: "2014-05-18" diff --git a/data/sisu/v6/v/version.yml b/data/sisu/v6/v/version.yml index 8ce3ad41..bdb428f0 100644 --- a/data/sisu/v6/v/version.yml +++ b/data/sisu/v6/v/version.yml @@ -1,5 +1,5 @@ --- :project: SiSU -:version: 6.0.5 -:date_stamp: 2014w19/1 -:date: "2014-05-12" +:version: 6.0.6 +:date_stamp: 2014w19/7 +:date: "2014-05-18" diff --git a/rbuild b/rbuild index e5a776f1..7e17f554 100644 --- a/rbuild +++ b/rbuild @@ -37,8 +37,8 @@ #require 'mkmf' #create_makefile("sisu") #% manual settings, edit/update as required (note current default settings are obtained from sisu version yml file) -SiSU_version_next_stable = '5.3.5' -SiSU_version_next_unstable = '6.0.5' +SiSU_version_next_stable = '5.3.6' +SiSU_version_next_unstable = '6.0.6' #% rake file SiSU_version_generic_next_stable = '5.3.x' SiSU_version_generic_next_unstable = '6.0.x' -- cgit v1.2.3 From 569827db7fa44b1bd6b4069d458e2627bc6d658c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 18 May 2014 08:35:15 -0400 Subject: documentation updates * sisu.org info on ruby-dbi removal affecting sisu in debian * sisu.org moved to data/doc/sisu (softlinked from root dir) * CHANGELOG simplify maintenance * note version changes * misc --- CHANGELOG | 43 +- README | 64 +- .../markup-samples/manual/en/sisu_commands.sst | 8 +- .../sisu/markup-samples/manual/en/sisu_config.ssi | 12 +- .../sisu/markup-samples/manual/en/sisu_howto.sst | 20 +- .../markup-samples/manual/en/sisu_install_run.sst | 2 +- .../sisu/markup-samples/manual/en/sisu_markup.sst | 4 +- .../markup-samples/manual/en/sisu_synopsis.ssi | 6 +- data/doc/sisu/sisu.org | 2336 ++++++++++++++++++++ data/doc/sisu/sisu_output_overview.sst | 61 - man/man1/sisu.1 | 54 +- sisu.org | 2115 +----------------- 12 files changed, 2405 insertions(+), 2320 deletions(-) create mode 100644 data/doc/sisu/sisu.org delete mode 100644 data/doc/sisu/sisu_output_overview.sst mode change 100644 => 120000 sisu.org diff --git a/CHANGELOG b/CHANGELOG index 49c5462a..75002714 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,35 +1,16 @@ -%% SiSU versions 4 & 3 2012 -Homepage: -* README CHANGELOG CHANGELOG_v1 CHANGELOG_v2 CHANGELOG_v3 CHANGELOG_v4 +* for CHANGELOGS + * in program directory tree see ./CHANGELOGS/* (softlinks to:) + files in ./data/doc/sisu/ + ./data/doc/sisu/CHANGELOG_v* + * installed to /usr/share/doc/sisu/* -Herein (this package) reside SiSU versions 4 and 3. +* sisu source: + -Changelogs are to be found in the CHANGELOGS directory: +* ./debian/changelog (in debian/sid branch) -CHANGELOGS/CHANGELOG_v4 -CHANGELOGS/CHANGELOG_v3 -CHANGELOGS/CHANGELOG_v2 -CHANGELOGS/CHANGELOG_v1 +* README +* sisu.org -you might also look at the README file - -* v1 sisu pretty mature in operation and syntax -* v2 introduces new processing middle layer (document abstraction); - markup same except for minor changes to document headers; - epub output introduced -* v3 introduces alternative (configurable) output structures -* v4 retires what were referred to as sisu skins - -This tarball contains two versions of SiSU, version 4 and version 3 which it -replaced - -The input for sisu v2, v3 & v4, a SiSU marked-up document is unchanged apart -from document headers. - -* homepage at: -* -* -* -* data/doc/sisu/sisu_markup_samples/sisu_manual/sisu_manual.ssm -* data/doc/sisu/sisu_markup_samples/sisu_manual/sisu_download.ssi -* CHANGELOG CHANGELOG_v1 CHANGELOG_v2 README data/doc/sisu/ +* sisu-markup-samples source: + diff --git a/README b/README index ffa05093..bb410a5a 100644 --- a/README +++ b/README @@ -43,8 +43,7 @@ SOURCE TARBALL RUN OFF SOURCE PACKAGE DIRECTORY TREE (WITHOUT INSTALLING) .......................................................... -1. Download the latest source (information available) from: - +1. Download the latest source 2. Unpack the source @@ -570,7 +569,7 @@ see --qrcode see --quiet *--qrcode [filename/wildcard]* -generate QR code image of metadata (used in manifest). v3 only. +generate QR code image of metadata (used in manifest). *--quiet [filename/wildcard]* quiet less output to screen. @@ -864,8 +863,8 @@ together with the summary. This can be very convenient, if you offer different outputs of different files, and just want to do the same again. *-0 to -5 [filename or wildcard]* -Default shorthand mappings (for v3, note that the defaults can be -changed/configured in the sisurc.yml file): +Default shorthand mappings (note that the defaults can be changed/configured in +the sisurc.yml file): *-0* -NQhewpotbxXyYv [this is the default action run when no options are give, i.e. @@ -1106,8 +1105,8 @@ to this one: synopsis=sisu [-abcDdeFhIiMmNnopqRrSsTtUuVvwXxYyZz0-9] [filename/wildcard ] . sisu [-Ddcv] [instruction] . sisu [-CcFLSVvW] - . sisu --v4 [operations] - . sisu --v3 [operations] + . sisu --v5 [operations] + . sisu --v6 [operations] @links: { SiSU Homepage }http://www.sisudoc.org/ @@ -2208,10 +2207,6 @@ Configure substitution in _sisu/sisu_document_make ---------------------------------------- - ----------------------------------------- - - [1]: [2]: from the *Debian* control file @@ -2246,50 +2241,3 @@ Configure substitution in _sisu/sisu_document_make [10]: Table from the Wealth of Networks by Yochai Benkler - -============================================================================== - - Title: SiSU - README - - Creator: Ralph Amissah - - Rights: Copyright: Copyright (C) Ralph Amissah 2014 \\ License: GPL 3 - (part of SiSU documentation) - - Subject: ebook, epublishing, electronic book, electronic publishing, - electronic document, electronic citation, data structure, - citation systems, search - - Publisher: SiSU http://www.jus.uio.no/sisu (this copy) - - Date created: 2014-02-02 - - Date available: 2014-02-02 - - Date modified: 2014-02-02 - - Date: 2014-02-02 - - Sourcefile: README.ssm.sst - - Filetype: SiSU text insert 5.0, - - Source digest: SHA256(README.ssm.sst)= - e6badfab7c24f0b217e1ab3b2d8cebb70a7fa9f1a8af9f907f029aa19fca3e74 - - Generated by: Generated by: SiSU 6.0.5 of 2014w15/3 (2014-04-16) - - Ruby version: ruby 2.1.1p76 (2014-02-24) [i386-linux-gnu] - - Document (ao) last generated: 2014-05-08 16:40:57 -0400 - -============================================================================== - - -plaintext (plain text): - README - -* Generated by: SiSU 6.0.5 of 2014w15/3 (2014-04-16) -* Ruby version: ruby 2.1.1p76 (2014-02-24) [i386-linux-gnu] -* Last Generated on: 2014-05-08 16:40:59 -0400 -* SiSU http://www.sisudoc.org/ diff --git a/data/doc/sisu/markup-samples/manual/en/sisu_commands.sst b/data/doc/sisu/markup-samples/manual/en/sisu_commands.sst index 356f38e1..016ef7ea 100644 --- a/data/doc/sisu/markup-samples/manual/en/sisu_commands.sst +++ b/data/doc/sisu/markup-samples/manual/en/sisu_commands.sst @@ -286,7 +286,7 @@ see --qrcode see --quiet !_ --qrcode [filename/wildcard] \\ -generate QR code image of metadata (used in manifest). v3 only. +generate QR code image of metadata (used in manifest). !_ --quiet [filename/wildcard] \\ quiet less output to screen. @@ -315,8 +315,8 @@ see --sisupod !_ -s [filename/wildcard] \\ see --source -!_ --sample-search-form [--db=(pgsql|sqlite)] [--webserv=webrick] \\ -generate examples of (naive) cgi search form for SQLite or PgSQL depends on your already having used sisu to populate an SQLite or PgSQL database, (the SQLite version scans the output directories for existing sisu_sqlite databases, so it is first necessary to create them, before generating the search form) see --sqlite & --pg and the database section below. Optional additional parameters include: url location of webserver search form and db: --webserv-search='[url]'; location of webserver output: --webserv-output='[url]'; cgi search form link name: --cgi-search-form-name='[name.cgi]'; for pgsql, database user: --db-user='[username]'. 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 +!_ --sample-search-form [--db-(pg|sqlite)] \\ +generate examples of (naive) cgi search form for SQLite or PgSQL depends on your already having used sisu to populate an SQLite or PgSQL database, (the SQLite version scans the output directories for existing sisu_sqlite databases, so it is first necessary to create them, before generating the search form) see --sqlite & --pg and the database section below. Optional additional parameters: --db-user='www-data'. 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 !_ --scp [filename/wildcard] \\ 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 @@ -484,7 +484,7 @@ The -v is for verbose output. Checks existing file output and runs the flags required to update this output. This means that if only html and pdf output was requested on previous runs, only the -hp files will be applied, and only these will be generated this time, together with the summary. This can be very convenient, if you offer different outputs of different files, and just want to do the same again. !_ -0 to -5 [filename or wildcard] \\ -Default shorthand mappings (for v3, note that the defaults can be changed/configured in the sisurc.yml file): +Default shorthand mappings (note that the defaults can be changed/configured in the sisurc.yml file): !_ -0 \\ -NQhewpotbxXyYv [this is the default action run when no options are give, i.e. on 'sisu [filename]'] diff --git a/data/doc/sisu/markup-samples/manual/en/sisu_config.ssi b/data/doc/sisu/markup-samples/manual/en/sisu_config.ssi index 3c29f995..a53d5cc6 100644 --- a/data/doc/sisu/markup-samples/manual/en/sisu_config.ssi +++ b/data/doc/sisu/markup-samples/manual/en/sisu_config.ssi @@ -33,15 +33,15 @@ The SiSU configuration file is a yaml file, which means indentation is significa SiSU resource configuration is determined by looking at the following files if they exist: -_1 ./_sisu/v4/sisurc.yml +_1 ./_sisu/v5/sisurc.yml _1 ./_sisu/sisurc.yml -_1 ~/.sisu/v4/sisurc.yml +_1 ~/.sisu/v5/sisurc.yml _1 ~/.sisu/sisurc.yml -_1 /etc/sisu/v4/sisurc.yml +_1 /etc/sisu/v5/sisurc.yml _1 /etc/sisu/sisurc.yml @@ -59,15 +59,15 @@ Most sisu document headers relate to metadata, the exception is the @make: heade The search order is as for resource configuration: -_1 ./_sisu/v4/sisu_document_make +_1 ./_sisu/v5/sisu_document_make _1 ./_sisu/sisu_document_make -_1 ~/.sisu/v4/sisu_document_make +_1 ~/.sisu/v5/sisu_document_make _1 ~/.sisu/sisu_document_make -_1 /etc/sisu/v4/sisu_document_make +_1 /etc/sisu/v5/sisu_document_make _1 /etc/sisu/sisu_document_make diff --git a/data/doc/sisu/markup-samples/manual/en/sisu_howto.sst b/data/doc/sisu/markup-samples/manual/en/sisu_howto.sst index afba3e48..050c91b7 100644 --- a/data/doc/sisu/markup-samples/manual/en/sisu_howto.sst +++ b/data/doc/sisu/markup-samples/manual/en/sisu_howto.sst @@ -253,27 +253,27 @@ _1 sisu -vR[and processing flags] [filename/wildcard] Sample provided, on untarring the source tarball: -_1 conf/sisu/v4/sisurc.yml - _1 conf/sisu/v5/sisurc.yml -and on installation under: +_1 conf/sisu/v6/sisurc.yml -_1 /etc/sisu/v4/sisurc.yml +and on installation under: _1 /etc/sisu/v5/sisurc.yml +_1 /etc/sisu/v6/sisurc.yml + The following paths are searched: -_1 ./_sisu/v4/sisurc.yml or ./_sisu/v5/sisurc.yml +_1 ./_sisu/v5/sisurc.yml or ./_sisu/v6/sisurc.yml _1 ./_sisu/sisurc.yml -_1 ~/.sisu/v4/sisurc.yml or ~/.sisu/v5/sisurc.yml +_1 ~/.sisu/v5/sisurc.yml or ~/.sisu/v6/sisurc.yml _1 ~/.sisu/sisurc.yml -_1 /etc/sisu/v4/sisurc.yml /etc/sisu/v5/sisurc.yml +_1 /etc/sisu/v5/sisurc.yml /etc/sisu/v6/sisurc.yml _1 /etc/sisu/sisurc.yml @@ -564,7 +564,7 @@ To import another document, the master document or importing document should be 2~ Skins -"Skins" are gone in v4 replaced by @make: :header: within a document, and a common shared _sisu/sisu_document_make file (which uses identical parameters to the individual documents @make: :header:) +"Skins" are gone since v4 replaced by @make: :header: within a document, and a common shared _sisu/sisu_document_make file (which uses identical parameters to the individual documents @make: :header:) 2~ CSS @@ -1130,11 +1130,11 @@ _1 http://www.jus.uio.no/sisu/SiSU/examples.html There is syntax support for some editors provided (together with a README file) in -_1 ./data/sisu/v4/conf/editor-syntax-etc +_1 ./data/sisu/v5/conf/editor-syntax-etc usually installed to: -_1 /usr/share/sisu/v4/conf/editor-syntax-etc +_1 /usr/share/sisu/v5/conf/editor-syntax-etc 2~ License diff --git a/data/doc/sisu/markup-samples/manual/en/sisu_install_run.sst b/data/doc/sisu/markup-samples/manual/en/sisu_install_run.sst index cadcde61..667a6459 100644 --- a/data/doc/sisu/markup-samples/manual/en/sisu_install_run.sst +++ b/data/doc/sisu/markup-samples/manual/en/sisu_install_run.sst @@ -23,7 +23,7 @@ 2~ run off source package directory tree (without installing) -1. Download the latest source (information available) from: http://www.jus.uio.no/sisu/SiSU/download.html#current +1. Download the latest source 2. Unpack the source diff --git a/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst b/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst index e3eefbac..08128821 100644 --- a/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst +++ b/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst @@ -210,8 +210,8 @@ code{ synopsis=sisu [-abcDdeFhIiMmNnopqRrSsTtUuVvwXxYyZz0-9] [filename/wildcard ] . sisu [-Ddcv] [instruction] . sisu [-CcFLSVvW] - . sisu --v4 [operations] - . sisu --v3 [operations] + . sisu --v5 [operations] + . sisu --v6 [operations] @links: { SiSU Homepage }http://www.sisudoc.org/ diff --git a/data/doc/sisu/markup-samples/manual/en/sisu_synopsis.ssi b/data/doc/sisu/markup-samples/manual/en/sisu_synopsis.ssi index 98e5d4f3..81644d76 100644 --- a/data/doc/sisu/markup-samples/manual/en/sisu_synopsis.ssi +++ b/data/doc/sisu/markup-samples/manual/en/sisu_synopsis.ssi @@ -33,13 +33,13 @@ sisu [ -CcFLSVvW ] Note: commands should be issued from within the directory that contains the marked up files, cd to markup directory. -sisu is at version 2, version 3 is under development. To use sisu version 3 +sisu ships with version5 and version 6 (which is under development). -sisu --v3 [and options/operations as above] +sisu --v6 [and options/operations as above] or -sisu3 [and options/operations as above] +sisu6 [and options/operations as above] sisu version 1 has been discontinued. diff --git a/data/doc/sisu/sisu.org b/data/doc/sisu/sisu.org new file mode 100644 index 00000000..d87f8cc5 --- /dev/null +++ b/data/doc/sisu/sisu.org @@ -0,0 +1,2336 @@ +#+PRIORITIES: A F E +(emacs:evil mode gifts a "vim" of "alternative" powers! ;) + +* General +** Finding +*** source + +http://sources.sisudoc.org/gitweb/ + +sisu git repo: +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=summary + +sisu-markup-samples git repo: +http://sources.sisudoc.org/gitweb/?p=doc/sisu-markup-samples.git;a=summary + +*** mailing list +sisu at lists.sisudoc.org + +http://lists.sisudoc.org/listinfo/sisu + +** irc oftc sisu + +** home pages + * + * + * + +** Installing sisu + +*** where you take responsibility for having the correct dependencies + +Provided you have *Ruby*, *SiSU* can be run. + +SiSU should be run from the directory containing your sisu marked up document +set. + +This works fine so long as you already have sisu external dependencies in +place. For many operations such as html, epub, odt this is likely to be fine. +Note however, that additional external package dependencies, such as texlive +(for pdfs), sqlite3 or postgresql (for search) should you desire to use them +are not taken care of for you. + +**** run off the source tarball without installation + +RUN OFF SOURCE PACKAGE DIRECTORY TREE (WITHOUT INSTALLING) +.......................................................... + +1. Obtain the latest sisu source + +2. Unpack the source + +Provided you have *Ruby*, *SiSU* can be run without installation straight from +the source package directory tree. + +Run ruby against the full path to bin/sisu (in the unzipped source package +directory tree). SiSU should be run from the directory containing your sisu +marked up document set. + +This works fine so long as you already have sisu external dependencies in +place. For many operations such as html, epub, odt this is likely to be fine. +Note however, that additional external package dependencies, such as texlive +(for pdfs), sqlite3 or postgresql (for search) should you desire to use them +are not taken care of for you. + +**** gem install (with rake) + +(i) create the gemspec; (ii) build the gem (from the gemspec); (iii) install +the gem + +Provided you have ruby & rake, this can be done with the single command: + + rake gem_create_build_install + +to build and install sisu v5 & sisu v6, alias gemcbi + +separate gems are made/installed for sisu v5 & sisu v6 contained in source. + +to build and install sisu v5, alias gem5cbi: + + rake gem_create_build_install_stable + +to build and install sisu v6, alias gem6cbi: + + rake gem_create_build_install_unstable + +for individual steps (create, build, install) see rake options, rake -T to +specify sisu version for sisu installed via gem + + gem search sisu + + sisu _5.3.6_ --version + + sisu _6.0.6_ --version + +to uninstall sisu installed via gem + + sudo gem uninstall --verbose sisu + +For a list of alternative actions you may type: + + rake help + + rake -T + +Rake: + +**** installation with setup.rb + +this is a three step process, in the root directory of the unpacked *SiSU* as +root type: + +ruby setup.rb config +ruby setup.rb setup +#[as root:] +ruby setup.rb install + +further information: + + + + ruby setup.rb config && ruby setup.rb setup && sudo ruby setup.rb install + +*** Debian install + +*SiSU* is available off the *Debian* archives. It should necessary only to run +as root, Using apt-get: + + apt-get update + + apt get install sisu-complete + +(all sisu dependencies should be taken care of) + +If there are newer versions of *SiSU* upstream, they will be available by +adding the following to your sources list /etc/apt/sources.list + +#/etc/apt/sources.list + +deb http://www.jus.uio.no/sisu/archive unstable main non-free +deb-src http://www.jus.uio.no/sisu/archive unstable main non-free + +The non-free section is for sisu markup samples provided, which contain +authored works the substantive text of which cannot be changed, and which as a +result do not meet the debian free software guidelines. + +*SiSU* is developed on *Debian*, and packages are available for *Debian* that +take care of the dependencies encountered on installation. + +The package is divided into the following components: + + *sisu*, the base code, (the main package on which the others depend), without + any dependencies other than ruby (and for convenience the ruby webrick web + server), this generates a number of types of output on its own, other + packages provide additional functionality, and have their dependencies + + *sisu-complete*, a dummy package that installs the whole of greater sisu as + described below, apart from sisu -examples + + *sisu-pdf*, dependencies used by sisu to produce pdf from /LaTeX/ generated + + *sisu-postgresql*, dependencies used by sisu to populate postgresql database + (further configuration is necessary) + + *sisu-sqlite*, dependencies used by sisu to populate sqlite database + + *sisu-markup-samples*, sisu markup samples and other miscellany (under + *Debian* Free Software Guidelines non-free) + + *SiSU* is available off Debian Unstable and Testing [link: + ] + [^1] install it using apt-get, aptitude or alternative *Debian* install tools. + +* Markup :sisu:markup: + +** sisu + +#% structure - headings, levels + * headings (A-D, 1-3) + * inline + 'A~ ' NOTE title level + 'B~ ' NOTE optional + 'C~ ' NOTE optional + 'D~ ' NOTE optional + '1~ ' NOTE chapter level + '2~ ' NOTE optional + '3~ ' NOTE optional + '4~ ' NOTE optional :consider: + * node + * parent + * children + +#% font face NOTE open & close marks, inline within paragraph + * emphasize '*{ ... }*' NOTE configure whether bold italics or underscore, default bold + * bold '!{ ... }!' + * italics '/{ ... }/' + * underscore '_{ ... }_' + * superscript '^{ ... }^' + * subscript ',{ ... },' + * strike '-{ ... }-' + * add '+{ ... }+' + * monospace '#{ ... }#' +#% para NOTE paragraph controls are at the start of a paragraph + * a para is a block of text separated from others by an empty line + * indent + * default, all '_1 ' up to '_9 ' + * first line hang '_1_0 ' + * first line indent further '_0_1 ' + * bullet + [levels 1-6] + '_* ' + '_1* ' + '_2* ' + * numbered list + [levels 1-3] + '# ' + +#% blocks NOTE text blocks that are not to be treated in the way that ordinary paragraphs would be + * code + * [type of markup if any] + * poem + * group + * alt + * tables +#% boxes + NOTE grouped text with code block type color & possibly default image, warning, tip, red, blue etc. decide [NB N/A not implemented] + +#% notes NOTE inline within paragraph at the location where the note reference is to occur + * footnotes '~{ ... }~' + * [bibliography] [NB N/A not implemented] + +#% links, linking + * links - external, web, url + * links - internal + +#% images [multimedia?] + * images + * [base64 inline] [N/A not implemented] + +#% object numbers + * ocn (object numbers) + automatically attributed to substantive objects, paragraphs, tables, blocks, verse (unless exclude marker provided) + +#% contents + * toc (table of contents) + autogenerated from structure/headings information + * index (book index) + built from hints in newline text following a paragraph and starting with ={} has identifying rules for main and subsidiary text + +#% breaks + * line break ' \\ ' inline + * page break, column break ' -\\- ' start of line, breaks a column, starts a new column, if using columns, else breaks the page, starts a new page. + * page break, page new ' =\\= ' start of line, breaks the page, starts a new page. + * horizontal '-..-' start of line, rule page (break) line across page (dividing paragraphs) + +#% book type index + +#% comment + * comment + +#% misc + * term & definition + +** proposals/additions + +*** TODO [#B] markup syntax code block, indicate syntax of code :feature: + ``` code:ruby + +*** TODO [#C] colored boxes round text :feature:ponder: + ``` box:red (select color of box) + ``` box:warn ``` box:tip (some default boxes? decide) + ``` box:red:"Warn" (select color and lead text of box, else instead + select color box & use regular single line bold markup ^!_ Warn$) + +*** TODO [#D] bibliography :feature:ponder: + +*** TODO speaker, as e.g. play (irc?) :feature:ponder: + ``` Ophelia: + ::Ophelia + +*** TODO [#F] time stamp (e.g. for irc, video text?):feature:ponder: + ``` 04:03 + ``` 04:03 ... 07:12 + ``` 04:03 + 03:09 + ``` 12:04:03 + ``` 12:04:03 ... 12:07:12 + ``` 12:04:03 + 03:09 + probably not worth the effort, as time stamp is an alternative + identifying number (to ocn, and ∴ sisu objects not ideal) + +*** TODO book index, alternative based on search within text + +** syntax hilighting + +*** vim +data/sisu/conf/editor-syntax-etc/vim/ +data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim + +*** emacs +data/sisu/conf/editor-syntax-etc/emacs/ +data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el + +* Document Abstraction :sisu:doc_abstr: + +** TODO [#D] XML middle layer? + +*** XMLda sisu + consder alternative sisu layer in XML + +*** TODO [#D] RelaxNG sisu + +* Output :sisu:output: + +** New outputs to consider + +*** XML :xml: +%% xml, docbook.txt fictionbook.txt xldl.txt lml.txt tei.txt emacs.txt + + + + + + +xml editor vim emacs + +nXML plugin + + + + + +emacs.txt evil.txt + + + + +To validate a book.xml file using xmllint, run the following command: +$ xmllint --postvalid --xinclude --noout book.xml + +The default location where xmllint will look for the catalog file is +/etc/xml/catalog. Alternatively, you can set the environment variable +XML_CATALOG_FILES to define another default location for catalog +files. Once you’ve got the DTD and catalog set up locally, you can +validate as before: +$ xmllint --postvalid --xinclude --noout book.xml + +%% Docbook +docbook.txt + +%% Fictionbook +fictionbook.txt + +%% XLDL +xldl.txt + +%% Literature Markup Language +lml.txt + +%% Text Encoding Initiative +tei.txt + +**** TODO [#B] docbook :feature: + +***** urls +#% docbook book xml.txt + + + + + + + + + + + + + + + + + + + +***** rb file +lib/sisu/v6/xml_docbook5.rb + +***** transformations :transform:markup_docbook: +#% structure - headings, levels + [] sisu (A-C, 1-3) + [] collapsed (1-6) (decoration) + [] node (child, parent ...) + +#% font face + [] bold + [] italics + [] underscore + [] superscript + [] subscript + [] strike + [] add + +#% para + [] default + [] indent + [] default, all + [] first line hang or indent further + [] bullet + +#% blocks + + [] code + [] [type of markup if any] + [] poem + [] group + [] alt + [] tables + +#% notes + [] footnotes + [] [bibliography?] + +#% links, linking + [] links - external, web, url + [] links - internal + +#% images [multimedia?] + [] images + [] [base 64] + +#% object numbers + [] ocn (object numbers) + +#% contents + [] toc (table of contents) + + [] index (book index) + +#% misc + +**** TODO [#D] fictionbook :feature: + +***** urls +#% fictionbook xml.txt + + + + + + + + + + +***** rb file +lib/sisu/v6/xml_fictionbook2.rb + +***** transformations :transformations:markup_fictionbok: #% +#% structure - headings, levels + [] sisu (A-C, 1-3) + [] collapsed (1-6) (decoration) + [] node (child, parent ...) + +#% font face + [] bold + [] italics + [] underscore + [] superscript + [] subscript + [] strike + [] add + [] monospace + +#% para + [] default + [] indent + [] default, all + [] first line hang or indent further + [] bullet + +#% blocks + [] code + [] [type of markup if any] + [] poem + [] group + [] alt + [] tables + +#% notes + [] footnotes + [] [bibliography?] + +#% links, linking + [] links - external, web, url + [] links - internal + +#% images [multimedia?] + [] images + [] [base 64] + +#% object numbers + [] ocn (object numbers) + +#% contents + [] toc (table of contents) + [] index (book index) + +#% breaks + [] line break + [] horizontal rule + [] column break + [] page break + +#% comment + [] comment + +#% misc + + + + + + + + + + + + +**** TODO [#D] XLDL :feature: + +***** urls +%% xml.txt xldl - novels, stories, poems +Name: XLDL - an XML doctype for novels, stories, poems, playsName: XLDL - an XML doctype for novels, stories, poems, plays + + + + +**** TODO [#E] Literature Markup Language - :feature: + +***** urls +%% Literature Markup Language - + +"It is assumed, that there are three quite different techniques to provide text, +respectively three types of text, this is prose and poetry and code (for +example source code of computer programs or from markup languages)." +Suggestions and Ideas for Literature Markup Language - 1.1 + + +**** TODO [#E] TEI Lite (Text Encoding Initiative) :feature: + +***** urls +%% TEI Lite (Text Encoding Initiative) + + + +*** Text :txt: + +sisu_markup.txt asciidoc.txt markdown.txt textile.txt rst.txt + +**** TODO [#D] asciidoc :feature: + +***** urls +#% asciidoc + + + + + +cheatsheets + + + + + + + + + + +***** rb file +lib/sisu/v6/txt_asaciidoc.rb + +***** transformations :transformations:markup_asciidoc: #% +#% structure - headings, levels + [] sisu (A-C, 1-3) + [] collapsed (1-4) (decoration) + [] inline + '== ' + '=== ' + '==== ' + '===== ' + '' + '' + [] underscore + '-' + '~' + '^' + '+' + '' ['.' proposed] + '' ['.' proposed] + [] node (child, parent ...) + +#% font face + [open & close marks] + [] bold + '*' + [] italics + '_' + [] underscore + '' + [] superscript + '^' + [] subscript + '~' + [] strike + '-' + [] add + [] monospace + '+' + '`' pass markup through unchanged, monospace code + +#% para + [] default + [] indent + [] default, all + [] first line hang or indent further + [] bullet + [levels 1-6] + '*' + '**' + '***' + '****' + '*****' + '*******' + [] numbered list + [levels 1-3] + '. ' number + '.. ' lower alpha + '... ' lower roman + '.... ' upper alpha + '..... ' upper roman + +#% blocks + [] code + [source,perl] + ---- + code here + ---- + [] [type of markup if any] + [] poem + [] group + ---- + grouped text here, actually a listing block + ---- + [] alt + [] tables + +#% notes + [] footnotes + [] [bibliography?] + +#% links, linking + [] links - external, web, url + http://google.com[Google Search] + [] links - internal + +#% images [multimedia?] + [] images + [] [base 64] + +#% object numbers + [] ocn (object numbers) + +#% contents + [] toc (table of contents) + [] index (book index) + +#% breaks + [] line break + "+\n" + forced + + line break + [] horizontal rule + [] column break + [] page break + +#% comment + [] comment + // + +#% misc + + [] term & definition +Term 1:: Definition 1 +Term 2:: Definition 2 +[horizontal] + Term 2.1;; + Definition 2.1 + Term 2.2;; + Definition 2.2 + +**** TODO [#E] markdown :feature: + +***** urls +#% markdown + + + + + + + +Markdown supports two styles of headers, Setext and atx +Setext + + +atx + + + + + + + + + + + + + + +#% pandoc markdown + + + + + + + +#% multimarkdown + + +#% markdown pandoc v multimarkdown + + +#% rST v markdown + + +***** rb file +lib/sisu/v6/txt_markdown.rb + +***** transformations :transformations:markup_markdown: #% +#% structure - headings, levels + [] sisu (A-C, 1-3) + [] collapsed (1-6) (decoration) + [inline 1-5] + '#' + '##' + '###' + '####' + '#####' + '######' + [underscore 1-5] + '=' + '-' + #'~' + #'^' + #'+' + [] node (child, parent ...) + +#% font face + [open & close marks] + [] bold + '**' + [] italics + '*' + [] underscore + '' + [] superscript + '' + [] subscript + '' + [] strike + '' + [] add + [] monospace + '`' + +#% para + [] default + [] indent + [] default, all + [] first line hang or indent further + [] bullet + '*' + [] numbered list + '0.' + +#% blocks + [] code + ' ' #indent at least 4 spaces + [] [type of markup if any] + [] poem + [] group + [] alt + [] tables + +#% notes + [] footnotes + [] [bibliography?] + +#% links, linking + [] links - external, web, url + [] links - internal + +#% images [multimedia?] + [] images + [] [base 64] + +#% object numbers + [] ocn (object numbers) + +#% contents + [] toc (table of contents) + [] index (book index) + +#% breaks + [] line break + [] horizontal rule + (three or more asterisks hypens or underscores) + * * * + *** + ***** + - - - + ___ + [] column break + [] page break + +#% misc + +**** TODO [#F] rst :feature: + +***** urls +#% rST + + + + + + + + +#% rST v markdown + + +***** rb file +lib/sisu/v6/txt_rst.rb + +***** transformations :transformations:markup_rst: #% +#% structure - headings, levels + [] sisu (A-C, 1-3) + [] collapsed (1-6) (decoration) + [inline] + N/A + [underscore] + Titles are underlined (or over- and underlined) with a printing + nonalphanumeric 7-bit ASCII character. Recommended choices are + "= - ` : ' " ~ ^ _ * + # < >". The underline/overline must be at + least as long as the title text. + '=' + '-' + '`' + ':' + "'" + '"' + + [] node (child, parent ...) + +#% font face + [] bold + '**' + [] italics + '*' + [] underscore + '+' + [] superscript + '^' + [] subscript + [] strike + '-' + [] add + [] monospace + '``' + +#% para + [] default + [] indent + [] default, all + [] first line hang or indent further + [] bullet + "-", "*" or "+" + '-' + [] numbered list + '#.' + +#% blocks + [] code + [] [type of markup if any] + [] poem + [] group + [] alt + [] tables + +#% notes + [] footnotes + [binary] + Footnote references, like [5]_. + Note that footnotes may get + rearranged, e.g., to the bottom of + the "page". + .. [5] A numerical footnote. + -- + Autonumbered footnotes are + possible, like using [#]_ and [#]_. + .. [#] This is the first one. + .. [#] This is the second one. + + [] [bibliography?] + +#% links, linking + [] links - external, web, url + Typical result + External hyperlinks, like Python_. + .. _Python: + or + External hyperlinks, like `Python + `_. + [] links - internal + Internal crossreferences, like example_. + .. _example: + + This is an example crossreference target. + -- + Titles are targets, too + ======================= + Implict references, like `Titles are + targets, too`_. + +#% images [multimedia?] + [] images + [] [base 64] + +#% object numbers + [] ocn (object numbers) + +#% contents + [] toc (table of contents) + [] index (book index) + +#% breaks + [] line break + [] horizontal rule + [] column break + [] page break + +#% misc + +**** TODO [#F] textile :feature: + +***** urls +#% textile + +v2.4 + +v2 + + +***** rb file +lib/sisu/v6/txt_textile.rb + +***** transformations :transformations:markup_textile: #% +#% structure - headings, levels + [] sisu (A-C, 1-3) + [] collapsed (1-6) (decoration) + [inline] + h1(#id). An HTML first-level heading + h2. An HTML second-level heading + h3. An HTML third-level heading + h4. An HTML fourth-level heading + h5. An HTML fifth-level heading + h6. An HTML sixth-level heading + [underscore] + N/A + + [] node (child, parent ...) + +#% font face + [] bold + *bold text* + [] italics + _italic text_ + [] underscore + +underlined text+ + [] superscript + ^TM^ + [] subscript + ~subscript~ + [] strike + -strikethrough text- + [] add + +#% para + [] default + [] indent + [] default, all + [] first line hang or indent further + [] bullet + * bulleted list + ** 2-level + +#% blocks + [] code + [] [type of markup if any] + [] poem + [] group + [] alt + [] tables + |Table | with two columns | + |and two | rows | + +#% notes + [] footnotes + Text with a link to some reference[1] + fn1. Footnote explanation + [] [bibliography?] + +#% links, linking + [] links - external, web, url + "(classname)link text(title tooltip)":link_address + "Link to Wikipedia":http://www.wikipedia.org + [] links - internal + +#% images [multimedia?] + [] images + !http://commons.wikimedia.org/wiki/Special:Filepath/Wikipedia-logo-en.png! + !imageurl(alt text)! + [] [base 64] + +#% object numbers + [] ocn (object numbers) + +#% contents + [] toc (table of contents) + [] index (book index) + +#% breaks + [] line break + [] horizontal rule + [] column break + [] page break + +#% misc + [] *_bold italic text_* + [] *-bold strikethrough text-* + [] *_-bold italic strikethrough text-_* + [] *+bold underlined text+* + [] *_+italic underlined text+_ + [] *_+bold italic underlined text+_ + [] *_-+bold italic strikethrough underlined text+-_* + %{font-size:18pt}font size% + %{color:red}text in red% + # Chapter 1 + +#% notes +heading inline only +footnotes uses marker and endnote, check + +** Improvements + +*** HTML + +*** XML + +*** --strict mode (html w3c compliant ocn etc.) + +* Code (ruby) :sisu:code: + +** code enhancements :enhance: + +*** TODO [#D] directory & path, use ruby directory tools + +*** TODO [#D] document url shortcut, allow addition of alternative dir stub +(e.g. viral Spiral) + +** code refactoring :refactor: + +*** ruby 2.1 + +**** DONE make sure sisu works + +*** TODO [#C] refactor ruby :ongoing: + +** bugs :bug: + +*** misc, unclassified + +**** DONE (6.0.5) [#B] sisu should give warning when part of minimal essential structure is missing :processing:fix: + +work through testing for as many of these as possible + +minimal content/structure requirement: +[metadata] + @title: + @creator: +[levels] + A~ (level A [title]) + 1~ (at least one level 1 [segment/(chapter)]) +test what happens in the absence of each + +structure rules (document heirarchy, heading levels): + + there are two sets of heading levels ABCD (title & parts if any) and 123 (segment & subsegments if any) + sisu has the fllowing levels: + + A~ [title] . required (== 1) followed by B~ or 1~ + B~ [part] * followed by C~ or 1~ + C~ [subpart] * followed by D~ or 1~ + D~ [subsubpart] * followed by 1~ + 1~ [segment (chapter)] + required (>= 1) followed by text or 2~ + text * followed by more text or 1~, 2~ or relevant part *(B~ if none other used; if C~ is last used: C~ or B~; if D~ is used: D~, C~ or B~) + 2~ [subsegment] * followed by text or 3~ + text * followed by more text or 1~, 2~ or 3~ or relevant part, see *() + 3~ [subsubsegment] * followed by text + text * followed by more text or 1~, 2~ or 3~ or relevant part, see *() + + * level A~ is the tile and is mandatory + * there can only be one level A~ + * heading levels BCD, are optional and there may be several of each + (where all three are used corresponding to e.g. Book Part Section) + * sublevels that are used must follow each other sequentially (alphabetically), + * heading levels A~ B~ C~ D~ are followed by other heading levels rather than substantive text + which may be the subsequent sequential (alphabetic) heading part level + or a heading (segment) level 1~ + * there must be at least one heading (segment) level 1~ + (the level on which the text is segmented, in a book would correspond to the Chapter level) + * additional heading levels 1~ 2~ 3~ are optional and there may be several of each + * heading levels 1~ 2~ 3~ are followed by text (which may be followed by the same heading level) + and/or the next lower numeric heading level (followed by text) + or indeed return to the relevant part level + (as a corollary to the rules above substantive text/ content + must be preceded by a level 1~ (2~ or 3~) heading) + +there must be a title, level A +creator field absent: crash, no warnings given +title missing: +level A missing: +no level 1: + +***** NOTES/COMMENTS + +revisit, + * check logic, add to if possible + * tidy, inelegant solution + +**** DONE (5.3.5::6.0.5) [#B] victory chals discussed parsing problem caused by use of open-close markers around url + +**** TODO UNDERWAY (6.0.5) [#B] exclude heading where possible marker '-#' not distinguished from unnumbered heading '~#' + + * ~# is general & means no ocn (for any object to which it is applied) + * -# is relevant only for 1~ dummy headings & instructs that they should be + removed from output where possible + * where -# is used on any other objects, it is treated the same way as ~# + +**** TODO [#B] collapsed level work out logic where dummy lev1 heading + + * exclude heading where lev1 '-#' + * means subsequent headings & text belong to parent heading (of lev1 -#) 1 level up + * ponder + +*** DBT Outstanding bugs -- sisu caught by removal of ruby-dbi + +**** TODO [#B] sisu 5.3.4-1 marked for autoremoval from debian testing on 2014-06-10, for depending on ruby-dbi + +sisu 5.3.4-1 is marked for autoremoval from testing on 2014-06-10 +It (build-)depends on packages with these RC bugs: +746081: ruby-dbi: FTBFS: ERROR: Test "ruby2.1" failed: wrong number +of arguments (3 for 1..2) + +The current status of use of ruby-dbi in sisu. + +from: +http://lists.sisudoc.org/pipermail/sisu/2014-May/000818.html + +***** sisu + SiSU does not depend on an sql database to be useful and most users do + not use the database (population and resulting search) possibilities. + +***** TODO [#B] sisu-sqlite + 5.3.4 uses ruby-sqlite3 directly. There has been a + dependency within debian/control on ruby-dbi for sisu-sqlite, this can + safely be removed, without affecting its operation. + (it is used rather by the sample sqlite3 search form) + + >Solution Proposed: remove debian/control dependency on ruby-dbi + + Solution Implemented: + (pending) + +***** TODO [#B] sisu-postgresql + sisu-postgresql 5.3.4 uses ruby-pg through ruby-dbi. + + >Solution Proposed: + >* attempt now to fix by migrating to use ruby-pg directly + > * remove dependency on ruby-dbi in debian/control + > * rewrite code within sisu to work directly with ruby-pg + >failing to do this within the autoremoval time: + > * remove dependency on ruby-dbi in debian/control + > * replace ruby-dbi with ruby-pg + > this breaks the postgresql functionality of sisu + > * file a serious bug against sisu-postgresql (which is contained + > within sisu package) and take more time to repair. and/or * + > request an extension of time on auto-removal + + Solution Implemented: + (pending) + +***** TODO [#B] sample cgi search forms + there is a sample cgi search form facility within sisu that uses + ruby-dbi to query sqlite3 or pg databases. + + >Solution Proposed: + >* file a wishlist bug against sisu. No action needed immediately + > (other perhaps than to remove references to ruby-dbi). This offering + > in sisu would be classified as "wishlist" as these are samples only + > and need not be provided at all as populating the database (at an + > object level) in this case is the challenge (so you could say these + > documents meet your search criteria at these locations within them + > (relevant to almost all output formats html, epub, pdf etc.) (and + > may be looked up in these languages if they are available)) and is + > independent from search, once you have an sql database you can query + > it as you wish. (the cgi sample forms will be provided again + > eventually using ruby-sqlite3 and ruby-pg directly). + + Solution Implemented: + (pending) + +***** NOTES/COMMENTS + +debian/control, remove dependency on ruby-dbi, contained in sisu-postgresql and sisu-sqlite + +Current status + * sisu-sqlite works fine, depends on ruby-sqlite3 + * sisu-postgresql is broken till fixed to work with ruby-pg (or ruby-dbi fixed) + * sample cgi search froms (cgi database query forms) are broken till they work + off ruby-pg & ruby-sqlite3 respectively instead of ruby-dbi + +*** DBT Outstanding bugs -- Normal bugs; Unclassified (2 bugs) :debian:dbt:normal: + + +**** DONE (5.3.5::6.0.5) [#B] #744360 [n|u] sisu: includes do not work properly :processing:fix: + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: includes do not work properly +Date: Sun, 13 Apr 2014 12:38:59 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +using this in foo.ssm: + + :A~ foo + + :B~ bar + + << bar/baz.ssi + +and this in baz.ssi: + + 1~ foo bar baz + +then everything works. + +using the more natural foo.ssm: + + :A~ foo + + << bar/baz.ssi + +and baz.ssi: + + :B~ bar + + 1~ foo bar baz + +makes ':B~ bar' being ignored in the output (pdf) entirely. + +Regards, +Daniel + +***** NOTES/COMMENTS + +it appears both give faulty text, though in different ways + +fixed + +**** DONE (5.3.5::6.0.5) [#B] #744378 [n|u] sisu: --no-manifest not working anymore :check: + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: --no-manifest not working anymore +Date: Sun, 13 Apr 2014 16:12:13 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +when running sisu-pdf with --no-manifest, the output (pdf) still +contains the sisu manifest at the end of the document. + +Regards, +Daniel + +***** NOTES/COMMENTS + +fix, metadata page in pdf should not contain link to manifest where --no-manifest flag is used + +**** TODO ONGOING #746740 [n|u] manpages incomplete + +Date: Sat, 03 May 2014 08:45:49 +0200 +From: Daniel Baumann +Subject: manpages incomplete +Package: sisu +Version: 5.3.4-1 +Tag: upstream +Severity: normal + +sisu supports options like --verbose or --no-manifest, but they are not +listed in the sisu manpage. + +***** NOTES/COMMENTS + +documentation for sisu does lag a bit and has omissions, but I think you will +find that --verbose is documented, and --no-* options are listed under --exc-* +to which there is a pointer --no-manifest works but is actually +--no-links-to-manifest and is listed under aliases --exc-links-to-manifest and +--exc-manifest-links + +Will leave bug open as a reminder that updating is necessary and as there are +no doubt numerous issues for which this could be (re)opened + +**** TODO #746742 [n|u] please implement --no-metadata similar to --no-manifest + +Date: Sun, 13 Apr 2014 16:12:13 +0200 +From: Daniel Baumann +Subject: --no-manifest not working anymore +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +when running sisu-pdf with --no-manifest, the output (pdf) still +contains the sisu manifest at the end of the document. + +Regards, +Daniel + +*** DBT Outstanding bugs -- Wishlist items; Unclassified (24 bugs) :debian:dbt:wishlist: + +**** TODO [#D] #744352 [w|u] sisu output: aligning margin numbers when using 'code' + + +From: Daniel Baumann +To: 744352@bugs.debian.org +Subject: Re: sisu output: too many margin numbers +Date: Sun, 13 Apr 2014 17:27:10 +0200 +retitle 744352 sisu output: aligning margin numbers when using 'code' +severity 744352 wishlist +thanks + +sorry, i've looked wrongly at the output, the problem is simply an +aligning issue. it looks like that: + + foo bar. [1] + [2] + baz + + foo bar baz. [3] + +rather than: + + foo bar. [1] + + baz [2] + + foo bar baz. [3] + +Regards, +Daniel + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: too many margin numbers +Date: Sun, 13 Apr 2014 12:28:14 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +when using the following code: + +foo bar. + +code{ + + baz + +}code + +foo bar baz. + +the result in the output (pdf) is: + +foo bar. [1] + [2] +baz [3] + [4] +foo bar baz. [5] + +the '[n]' designates the margin number at the right site of the page. + +the problem is that sisu gives margin numbers to *empty* lines, which is +wrong. margin numbers should only be assigned to actual content. + +Regards, +Daniel + +***** NOTES/COMMENTS + +issue with pdf, look again, consider, this is cosmetic, a fix should be found, +but is not striaghtforward alignment issue for code blocks not so easy to fix +in some outputs, have so far ignored this is an issue with other types of text +block as well + +reason why this has not been addressed especially with code blocks: +the easiest fix would be to place the numbering at the end of the first line of +a code block however, as it is now, if you copy & paste a block of code you +should get the code if numbering is moved down to the first line, a copy of the +code block will inlcude the extraneous (to the code) object number which is to +my mind a bigger problem + +That said re pdf, LaTeX XeTeX are flexible, it may be possible to drop the ocn +at the start of a code block lower on its line so that it is closer to the code +that follows + +**** DONE (6.0.5) [#D] #744353 [w|u] sisu output: please do not use typewriter for urls :output:consider: + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: please do not use typewriter for urls +Date: Sun, 13 Apr 2014 12:28:27 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +when using urls in sisu like this: + + http://example.org + +sisu then creates in the output (pdf) links like this: + + + +where as '' is written in typewriter font +(monospace). please don't do that automagically since it's desturbing +the visual flow when reading. If the users wants that, he should be able +to configure it. + +Regards, +Daniel + +***** NOTES/COMMENTS + +monospace for url outputs in pdf + +this is default behavior of the latex url package (it uses tt typewriter font) +it is possible to modify the font to sf class or tm/rm class, & I now default to sf +this means when the sisu default sf is used there will be no difference in typeface, +but when times roman or other is used, urls will be in sf instead of that font, +(instead of the latex default typewriter) + +it provides a visual cue even when output is monochrome, without color +(and is in some way related to #744391 sisu output: no color on a4 portrait) +however, it is worth noting here that urls are printed in a smaller font so as +to fit more on a line of text + +**** TODO [#C] #744354 [w|u] sisu output: please do not add '<' and '>' around urls + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: please do not add '<' and '>' around links +Date: Sun, 13 Apr 2014 12:28:37 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +when using urls in sisu like this: + + http://example.org + +sisu then creates in the output (pdf) links like this: + + + +Please do not automagically add a '<' and '>' around urls. If the user +wants them, he would add one. + +Regards, +Daniel + +***** NOTES/COMMENTS + +is sisu default behavior, +would need to make configurable +url_visual_delimiters: '<>' +look into later + +**** DONE (5.3.5::6.0.5) [#C] #744355 [w|u] vim syntaxhighlighting: includes and directories :syntaxhi:fix: + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: vim syntaxhighlighting: includes and directories +Date: Sun, 13 Apr 2014 12:28:46 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +When using includes like this: + + << foo.ssi + +then vim correctly displays the line in blue. + +However, when using includes in a subdirectory like this: + + << bar/foo.ssi + +then vim doesn't use any colors at all. + +Regards, +Daniel + +***** NOTES/COMMENTS + +done + +**** DONE PASS [#C] #744356 [w|u] vim syntaxhighlighting: urls and tags :discuss:close: + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: vim syntaxhighlighting: urls and tags +Date: Sun, 13 Apr 2014 12:28:56 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +When using an URL at the end of a sentence like this: + + Foo bar baz http://example.org. + +then vim properly highlights the url in blue. + +this also works properly when a second sentence after it, like: + + Foo bar baz http://example.org. Foo bar baz http://example.org. + +it works with html tag as well, like this: + + Foo bar baz http://example.org.
Foo bar baz http://example.org. + +but it doesn't work if there's no space: + + Foo bar baz http://example.org.
Foo bar baz http://example.org. + +then, the string 'http://www.gnu.org/licenses/.<' is shown red. + +Regards, +Daniel + +***** NOTES/COMMENTS + +this is meant to be flagged as an error, +(red indicates error, and is an error will not parse correctly) +even if the sisu parser works in the flagged case there is no promise that it will in future + +use of angle bracket markers (html markers) in sisu markup is depreciated. +for line-break use \\ instead, +for which there should be surrounding spaces or a preceding space and end of line; +if
is still used there should be a space after the url - which sisu should remove in output. + +would like to close without further action +re-open if necessary + +**** DONE (6.0.5) [#C] #744357 [w|u] sisu output: please create mailto links automatically + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: please create mailto links automatically +Date: Sun, 13 Apr 2014 12:29:12 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +When using urls like: + + http://example.org + +in sisu, the output (pdf) contains a hyperlink to http://example.org +automatically, which is nice. + +please also create mailto links when using email adresses like: + + john.doe@example.org + +Regards, +Daniel + +***** NOTES/COMMENTS + +for pdf fix/implement mailto links +done but requires further testing & possibly refinement + +**** DONE (6.0.5) [#C] #744358 [w|u] sisu output: please do not add ';' after \:copyright: :output:fix: + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: please do not add ';' after :copyright: +Date: Sun, 13 Apr 2014 12:29:20 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +When using: + + :copyright: foo bar baz. + +sisu generates the following in the output format (pdf): + + foo bar baz.; + +Please do not automagically add a semicolon (;). If the user wants a +semicolon, he would add one. + +Regards, +Daniel + +***** NOTES/COMMENTS + +fix copyright, remove trailing semi-colon + +**** DONE (5.3.5::6.0.5) [#B] #744379 [w|u] sisu: missing includes doesn't give an error :processing:fix: + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: missing includes doesn't give an error +Date: Sun, 13 Apr 2014 16:14:46 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +When using includes (*.ssi) in a sisu master document (*.ssm) like: + + << foo.ssi + +and that to be included file foo.ssi (for whatever reason) doesn't +exist, sisu doesn't error out but include '<< foo.ssi' literally as a +string in the output (pdf). + +Regards, +Daniel + +***** NOTES/COMMENTS + +5.3.4-1 writes the following to the screen: +"ERROR test.ssm.sst requires invalid or non-existent file: foo.ssi" + +and unsatisfactorily within the text output it writes no error message but the include instruction: + +"<< foo.ssi" + +5.3.5, the current "fix"/ solution, is to add an error message within the text rather than to stop processing with an error. +In addition to (i) slightly modified (you could say corrected) to the following: + +"ERROR test.ssm requires an invalid or non-existent file: foo.ssi" + +the following is written within the text output: + +"<< foo.ssi [ERROR test.ssm requires an invalid or non-existent file: foo.ssi]" + +**** DONE (5.3.5::6.0.5) [#D] #744381 [w|u] sisu syntax: inconsistency \:copyright: and \:license: :metadata: + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: inconsistency between :copyright: and :license: +Date: Sun, 13 Apr 2014 16:26:55 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +when using ':copyright: foo', then the output contains 'foo'. + +when using ':license: foo', then the output contains 'License: foo'. + +this is inconsistent. either both should have a 'prefix' in the output, +or neither should have one (i'd prefere the latter). + +Regards, +Daniel + +***** NOTES/COMMENTS + +Under rights there are a series of sub-categories starting with copyright, that +need to be distinguished. Until now started distinguishing after after +Copyright. For consistency have add the prefix 'Copyright' to the output. +Preference to omit noted, but this solution is consistent with options +provided. Bug closed, re-open if necessary. + +**** DONE (6.0.5) [#B] #744383 [w|u] sisu syntax: :B and :C result in the same formatting :output:fix: (partial solution) + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu syntax: :B and :C result in the same formatting +Date: Sun, 13 Apr 2014 16:32:07 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +when using :A, :B, and :C in sisu, in the output (pdf) both :B and :C +are formatted identically. + +imho :C should be 'smaller' than :B. + +or, as an analogy with html: i would expect that :A equals

, :B +equals

, and :C equals

. currently, (in that analogy), :B and :C +both equal

. + +Regards, +Daniel + +***** NOTES/COMMENTS + +this is in part an artifact of LaTeX not having as many document heading levels +and trying to take advantage of the behavior of existing levels rather than +customizing further + +look for a solution, possibly overriding the default font sizes for each + +The current settings were chosen because, there are not enough levels and I +find too many different font sizes disconcerting, especially running sisu over +a wide variety of document types + +the following levels are available in LaTeX + +\part +\chapter +\section +\subsection +\subsubsection + +the levels in sisu are + +A [title] +B [part] +C [subpart] +D [subsubpart] +1 [segment (chapter)] +2 [subsegment] +3 [subsubsegment] + +sisu current mapping: + +level A [title] +level B C D \part (it is up to the user to make part levels visually distinguishable e.g. Book Part Section) +[skipped \chapter] +[skipped \section] +level 1 \subsection +level 2 \subsubsection +level 3 \subsubsection + +the reason for skipping section was the default configuration and resulting +fact that it made for a table of contents that takes more space + +sisu new mapping: + +level A [title] +level B C D \part (it is up to the user to make part levels visually distinguishable e.g. Book Part Section) +[skipped \chapter] +level 1 \section +level 2 \subsection +level 3 \subsubsection + +levels B C & D are the same size, + it is up to the user to make part levels visually distinguishable + e.g. Book Part Section +levels 1 2 & 3 are now distinguished + +(Closes #744386) sisu syntax: 1~ and 2~ result in the same formatting +(under consideration & yet to be done #744383) sisu syntax: :B and :C result in the same formatting +(touches ) +override part font size settings for different levels (B C D) + +**** TODO [#C] #744384 [w|u] sisu syntax: relies on empty lines + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu syntax: relies on empty lines +Date: Sun, 13 Apr 2014 16:34:46 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +the following snipped: + + :C~ foo bar + << foo-bar.ssi + +means that the include is ignored entirely. apparently sisu relies on +having an empty line in between like this: + + :C~ foo bar + + << foo-bar.ssi + +Regards, +Daniel + +***** NOTES/COMMENTS + +consider, + +(i) as a general observation, sisu relies on emptly lines to identify separate objects + such as headings, paragraphs (and indeed insertions) + +(ii) a heading need not be on a single line (so << would be part of that heading) +this means sisu should be able to work identifying headings in wrapped texts +(e.g. where the text is wrapped at 80 and the heading is longer than that) + +there has been no rule to the contrary (i.e. that headings should be on a single text line) + +consider, should there be such a rule? + +**** DONE (6.0.5) [#B] #744386 [w|u] sisu syntax: 1~ and 2~ result in the same formatting :output:pdf:fix: (see #744383) + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu syntax: 1~ and 2~ result in the same formatting +Date: Sun, 13 Apr 2014 16:43:51 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +similar as with #744383, the same also applies for 1~ and 2~ - they +should be different in the output format (pdf here). + +Regards, +Daniel + +***** NOTES/COMMENTS + +1~ 2~ 3~ are now differentiated + +deal with under #744383 + +**** TODO [#B] #744390 [w|u] sisu: empty sections are ignored + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu: empty sections are ignored +Date: Sun, 13 Apr 2014 17:09:32 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist + +if you have the following sisu syntax: + + :B~ foo + + 1~ foo1 + + foo1. + + 1~ foo2 + + foo2. + + :B~ bar + + 1~ bar1 + + 1~ bar2 + + :B~ baz + + 1~ baz1 + + 1~ baz2 + +then anything (including and) after ':B~ bar' is ignored entirely. + +***** NOTES/COMMENTS + +further info, have not yet been able to duplicate, +seemed to work (checked pdf & html (scroll & seg)) +was not able to reproduce +will look again + +**** DONE (6.0.5) [#C] #744391 [w|u] sisu output: no color on a4 portrait :output:pdf:contemplate: + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu output: please use (blue) color for links +Date: Sun, 13 Apr 2014 17:23:37 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist +Tags: upstream + +it would be nice if links (urls and emails) would be colored blue to +mark them visually as links. this behaviour is somewhat the lowest +common denominator in browsers (if you use html without any css that is). + +Regards, +Daniel + +From: Daniel Baumann +To: 744391@bugs.debian.org +Subject: Re: sisu output: please use (blue) color for links +Date: Sun, 13 Apr 2014 17:35:33 +0200 +retitle 744391 sisu output: no color on a4 portrait +thanks + +now this is strange.. turns out that (yes, i have colors enabled in +sisurc) the portrait a4 pdf has no colors at all, while the landscape a4 +pdf does indeed have colors (red for toc, blue for links). + +Regards, +Daniel + +***** NOTES/COMMENTS + +background: +portrait was provided for print/paper copy and is great for that in monochrome +(without grays for colored links), +landscape better matching a screen for visual presentations, color affecting the landscape only + +solution: +make configurable by cli & rc file +make both (portrait & landscape colors) configurable +either as hyperlinks monochrome or colored +overriding existing default which remains as described + +document +cli: +--pdf-hyperlinks-no-color or --pdf-hyperlinks-mono +--pdf-hyperlinks-color + +rc: + +default: + pdf_hyperlinks: *[possible values] + pdf_hyperlinks_portrait: *[possible values] + pdf_hyperlinks_landscape: *[possible values] + + * 'color' or ('mono' or 'no-color' or 'color-off') + +**** TODO [#D] #744395 [w|u] sisu output: half-page title page in landscape output + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu output: half-page title page in landscape output +Date: Sun, 13 Apr 2014 17:38:03 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist +Tags: upstream + +in a4 landscape output, there's always two pages on one page, which is +nice; except for the title page which spans over the whole page. + +it would be nice if the first page would be consistent to the same +scheme like the rest of the document - spanning only over the half of +the page. + +Regards, +Daniel + +***** NOTES/COMMENTS + +think about, should be fairly easily done, but am reluctant + +note the page numbering in landscape, the two landscape columns are given a single page number +it is really a landscape two column per-page text, provided primarily for screen viewing or +other convenience if found + +(many viewers provide two page per screen presentations, which would result in an effect similar to the one requested +the issue I guess might arise in that they are not printable on a single page? ... +but then the current settings are arguably justified) + +**** TODO [#C] #744396 [w|u] sisu output: "european" toc indenting + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu output: "european" toc indenting +Date: Sun, 13 Apr 2014 17:40:53 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist +Tags: upstream + +by default, latex uses the following indenting in the TOC: + + 1. foo + 1.1 bar1 + 1.1.1 baz + 1.2 bar2 + +there's a latex option that i don't remember off-hand to have the +indenting like it's common in europe: + + 1. foo + 1.1 bar1 + 1.1.1 baz + 1.2 bar2 + +it would be nice if sisu could let the used decide which indenting style +to use for TOCs. + +Regards, +Daniel + +***** NOTES/COMMENTS + +will look at: should be possible; requires a configuration option + +**** DONE (6.0.5) [#B] #744399 [w|u] sisu syntax: :A smaller formatted than :B :output:fix: (see #744383) (partial solution) + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu syntax: :A smaller formatted than :B +Date: Sun, 13 Apr 2014 17:49:26 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist +Tags: upstream + +in a document like this: + +:A~ foo + +:B~ bar + +the :A~ 'title' is formated 'smaller' (not bold, smaller font size) than +the :B~ 'title' on the first page of the actual document (means, first +page after TOC). + +Regards, +Daniel + +***** NOTES/COMMENTS + +for pdf + +now is same size see #744383 + +\part (level A B C D) +\chapter (skipped) +\section (level 1) +\subsection (level 2) +\subsubsection (level 3) + +**** DONE (6.0.5) [#C] #744402 [w|u] sisu: support sha512 :implement: + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu: support sha512 +Date: Sun, 13 Apr 2014 18:06:56 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist +Tags: upstream + +sisu uses sha256 when using sha as digest, please support sha512. + +it would be even nicer if you could specify the actual digest like +'sha512', 'sha256', etc. rather than just 'sha'. + +Regards, +Daniel + +***** NOTES/COMMENTS + +implemented +document command line option --sha512 + +**** DONE (6.0.5) [#C] #744405 [w|u] sisu: set default font size :configuration:pdf:implement: + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu: set default font size +Date: Sun, 13 Apr 2014 18:29:46 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist +Tags: upstream + +in sisurc, one can set the default fonts. it would be nice to be also +able to set the default font size. + +Regards, +Daniel + +***** NOTES/COMMENTS + +for pdf make configurable + +yaml.rc + +default: + texpdf_fontsize: 12 + +command-line + +--pdf-fontsize-12 +--pdf-fontsize-8 +etc. + +**** TODO [#C] #744407 [w|u] sisu: possibility to influence content/formating of the title page + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu: possibility to influence content/formating of the title page +Date: Sun, 13 Apr 2014 18:32:14 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist +Tags: upstream + +by default, the title page (in the pdf output) shows @title and @creator. + +it would be nice if there would be a possibility to influence the +formatting (e.g. to have the title written in bold), and to have +additional possibilities to influence the content on the title page +(like the date or version, an url, or other text strings). + +Regards, +Daniel + +***** NOTES/COMMENTS + +consider, work on possibly, later + +**** TODO [#C] #744408 [w|u] sisu: support more than one level of includes/nested includes + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu: support more than one level of includes/nested includes +Date: Sun, 13 Apr 2014 18:39:23 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist +Tags: upstream + +currently, it's possible to use only one ssm file which itself includes +one or more ssi files. + +it would be nice if the ssm could include an 'intermediate' ssi, which +then includes further ssi files. this is very handy for larger documents. + +Regards, +Daniel + +***** NOTES/COMMENTS + +consider, +I have to date deliberately tried to keep it easy to follow documents & not have too much depth ... +The idea of recursive includes is un-attractive (messy for a document) + +.ssm currently can contain .sst or .ssi +.sst files can be processed independently, +.ssi files are only insertions & cannot + +allowing .ssi to also include other .ssi or .sst could lead to recursive .ssi +allowing .ssm to also include other .ssm .ssi or .sst could lead to recursive .ssm + +stopping after an additional level of includes seems arbitrary, and possibly prone to error if you are dealing with many documents + +a possibility would be to have another file extension to flag the role of the file, +.ssmi (not very attractive) might do it +(providing visual cue signalling its role as both a master file and an insertion/included file that cannot be processed independently) +a .ssmi file must be included in a .ssm file +a .ssmi file (like .ssm) permits the inclusion only of .sst or .ssi files + +will work on eventually + +**** TODO [#C] #744409 [w|u] sisu output: urls in code blocks are not linkified + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu output: urls in code blocks are not linkified +Date: Sun, 13 Apr 2014 18:41:09 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist +Tags: upstream + +it would be nice if urls written withiin code{...}code blocks would also +be automatically transformed into a link within the output (html). + +Regards, +Daniel + +***** NOTES/COMMENTS + +consider, so far code blocks are pretty much untouched ... not tampered with, +this could be done though + +**** DONE (6.0.5) [#C] #744541 [w|u] sisu: urls in @creator broken + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu: urls in @creator broken +Date: Sun, 13 Apr 2014 18:45:35 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist +Tags: upstream + +first, if you have an url within @creator, like: + + @creator: foo bar http://example.org + +the generation fails (pdf output). + +as a workaround, i put the url into parenthesis, like: + + @creator: foo bar (http://example.org) + +but then, it would be nice if that url would be automatically +transformed into a link in the output format (pdf). + +Regards, +Daniel + +***** NOTES/COMMENTS + +pdf, fix + +**** TODO [#C] #744685 [w|u] sisu output: copy&past-able wrapped code blocks + + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu output: copy&past-able wrapped code blocks +Date: Sun, 13 Apr 2014 19:04:01 +0200 +Package: sisu +Version: 5.3.4-1 +Severity: wishlist +Tags: upstream + +if a line within a 'code{...}code' block is longer and needs to be +wrapped, sisu indicates the wrapping with an 'arrow' (←) symbol, which +is nice. + +it would be even nicer if the arrow would not 'selectable', so that when +you mark the line spanning over two lines with your mouse, the arrow is +not selected and thus not copy&pasted. + +i don't know how to do this, but it's possible within pdfs, as can be +seen in lots of pdfs in the internet. + +Regards, +Daniel + +***** NOTES/COMMENTS + +find out how and implement, further feedback on appropriate xetex tools welcome + +[Note: if can be applied to random characters, use may be of interest for +object numbers as well!] + +**** TODO [#C] #744734 [w|u] sisu output: replace all occurences of (C) rather than the first only + +From: Daniel Baumann +To: Debian Bug Tracking System +Subject: sisu output: replace all occurences of (C) rather than the first only +Date: Mon, 14 Apr 2014 06:11:13 +0200 + +Package: sisu +Version: 5.3.4-1 +Severity: wishlist +Tags: upstream + +if you have a '(C)' in :copyright:, it is automatically replaced with a +copyright symbol, which is nice, however, it sisu does that with the +first occurence only. + +so if you use: + + :copyright: (C) john doe
(C) jane doe + +then the second occurence is not replaced and that combination looks +very ugly. i suggest you replace all occurences of '(C)' to the +copyright symbol automatically. + +Regards, +Daniel diff --git a/data/doc/sisu/sisu_output_overview.sst b/data/doc/sisu/sisu_output_overview.sst deleted file mode 100644 index 1c895c40..00000000 --- a/data/doc/sisu/sisu_output_overview.sst +++ /dev/null @@ -1,61 +0,0 @@ -0~title SiSU overview of status of features available in various outputs - -0~date.created 2005-10-31 - -0~date.available 2006-10-31 - -0~date.modified 2006-01-23 - -0~date 2006-01-23 - -1~? SiSU overview of status of features available in various outputs - -4~ A Checklist of Output Features - -This table gives an indication of the features that are available -for various forms of output of SiSU.~{ updated for sisu-0.36.6 on 2006-01-23 }~ - -{t~h} -feature |txt|ltx/pdf|HTML|XHTML|XML/s|XML/d|ODF|SQLite|pgSQL -headings | * | * | * | * | * | * | * | * | * -footnotes | * | * | * | * | * | * | * | * | * -bold, underscore, italics | . | * | * | * | * | * | * | * | * -strikethrough | . | * | * | * | * | * | * | | -superscript, subscript | . | * | * | * | * | * | * | | -extended ascii set (utf-8)| * | * | * | * | * | * | * | | * -indents | * | * | * | * | * | * | * | | -bullets | . | * | * | * | * | * | . | | -groups | | | | | | | | | -* tables | | * | * | . | . | . | . | . | . -* poem | * | * | * | . | . | . | * | . | . -* code | * | * | * | . | . | . | * | . | . -url | * | * | * | * | * | * | * | . | . -links | * | * | * | * | * | * | * | . | . -images | - | * | * | T | T | T | * | T | T -image caption | - | * | * | | | | | | -table of contents | | * | * | * | * | * | . | | -page header/footer? | - | * | * | * | * | * | t | | -line break | * | * | * | * | * | * | * | | -page break | | * | | | | | * | | -segments | | | * | | | | | | -skins | * | * | * | * | * | * | | | -ocn | . | * | * | * | * | * | -?| * | * -auto-heading numbers | * | * | * | * | * | * | * | * | * -minor list numbering | * | * | * | * | * | * | * | * | * -special characters | . | . | . | | | | | | - -group{ - - Done - * yes/done - . partial - - - not available/appropriate - - Not Done - T task todo - t lesser task/todo - not done - -}group - diff --git a/man/man1/sisu.1 b/man/man1/sisu.1 index 3e85a9db..f6f4a943 100644 --- a/man/man1/sisu.1 +++ b/man/man1/sisu.1 @@ -1,4 +1,4 @@ -.TH "sisu" "1" "2014-05-12" "6.0.5" "SiSU" +.TH "sisu" "1" "2014-05-18" "6.0.6" "SiSU" .br .SH NAME .br @@ -470,7 +470,7 @@ see --qrcode see --quiet .TP .B --qrcode [filename/wildcard] -generate QR code image of metadata (used in manifest). v3 only. +generate QR code image of metadata (used in manifest). .TP .B --quiet [filename/wildcard] quiet less output to screen. @@ -508,7 +508,7 @@ see --sisupod .B -s [filename/wildcard] see --source .TP -.B --sample-search-form [--db=(pgsql|sqlite)] [--webserv=webrick] +.B --sample-search-form [--db-(pg|sqlite)] generate examples of (naive) cgi search form for .I SQLite or PgSQL depends on your already having used sisu to populate an @@ -517,17 +517,10 @@ or PgSQL database, (the .I SQLite version scans the output directories for existing sisu_sqlite databases, so it is first necessary to create them, before generating the search form) see ---sqlite & --pg and the database section below. Optional additional parameters -include: url location of webserver search form and db: ---webserv-search='[url]'; location of webserver output: ---webserv-output='[url]'; cgi search form link name: ---cgi-search-form-name='[name.cgi]'; for pgsql, database user: ---db-user='[username]'. 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 +--sqlite & --pg and the database section below. Optional additional parameters: +--db-user='www-data'. 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 .TP .B --scp [filename/wildcard] copies sisu output files to remote host using scp. This requires that @@ -813,8 +806,8 @@ together with the summary. This can be very convenient, if you offer different outputs of different files, and just want to do the same again. .TP .B -0 to -5 [filename or wildcard] -Default shorthand mappings (for v3, note that the defaults can be -changed/configured in the sisurc.yml file): +Default shorthand mappings (note that the defaults can be changed/configured in +the sisurc.yml file): .TP .B -0 -NQhewpotbxXyYv [this is the default action run when no options are give, i.e. @@ -1163,8 +1156,8 @@ to this one: synopsis=sisu [-abcDdeFhIiMmNnopqRrSsTtUuVvwXxYyZz0-9] [filename/wildcard ] . sisu [-Ddcv] [instruction] . sisu [-CcFLSVvW] - . sisu --v4 [operations] - . sisu --v3 [operations] + . sisu --v5 [operations] + . sisu --v6 [operations] @links: { SiSU Homepage }http://www.sisudoc.org/ @@ -2196,6 +2189,7 @@ group{ to death."' + .SH CODE @@ -2548,7 +2542,7 @@ locally or on a remote server for which a url is provided. source markup can be shared with the command: .BR -sisu -s [filename] + sisu -s [filename] .SH SISU TEXT - REGULAR FILES (.SST) @@ -2629,13 +2623,13 @@ documents. The command to create a sisupod is: .BR -sisu -S [filename] + sisu -S [filename] .BR Alternatively, make a pod of the contents of a whole directory: .BR -sisu -S + sisu -S .BR @@ -2675,19 +2669,19 @@ resource configuration is determined by looking at the following files if they exist: .BR - ./_sisu/v4/sisurc.yml + ./_sisu/v5/sisurc.yml .BR ./_sisu/sisurc.yml .BR - ~/.sisu/v4/sisurc.yml + ~/.sisu/v5/sisurc.yml .BR ~/.sisu/sisurc.yml .BR - /etc/sisu/v4/sisurc.yml + /etc/sisu/v5/sisurc.yml .BR /etc/sisu/sisurc.yml @@ -2719,19 +2713,19 @@ the @make header may be set by placing them in a file sisu_document_make. The search order is as for resource configuration: .BR - ./_sisu/v4/sisu_document_make + ./_sisu/v5/sisu_document_make .BR ./_sisu/sisu_document_make .BR - ~/.sisu/v4/sisu_document_make + ~/.sisu/v5/sisu_document_make .BR ~/.sisu/sisu_document_make .BR - /etc/sisu/v4/sisu_document_make + /etc/sisu/v5/sisu_document_make .BR /etc/sisu/sisu_document_make @@ -3443,10 +3437,10 @@ to populate an sqlite database, this being part of .BR -sisu -d [instruction] [filename/wildcard if required] + sisu -d [instruction] [filename/wildcard if required] .BR -sisu -d --(sqlite|pg) --[instruction] [filename/wildcard if required] + sisu -d --(sqlite|pg) --[instruction] [filename/wildcard if required] .SH COMMANDS @@ -3587,7 +3581,7 @@ The following is feedback on the setup on a machine provided by the help command: .BR -sisu --help sql + sisu --help sql .nf Postgresql user: ralph diff --git a/sisu.org b/sisu.org deleted file mode 100644 index 0ddb2d2d..00000000 --- a/sisu.org +++ /dev/null @@ -1,2114 +0,0 @@ -#+PRIORITIES: A F E -(emacs:evil mode gifts a "vim" of "alternative" powers! ;) - -* Markup :sisu:markup: - -** sisu - -#% structure - headings, levels - * headings (A-D, 1-3) - * inline - 'A~ ' NOTE title level - 'B~ ' NOTE optional - 'C~ ' NOTE optional - 'D~ ' NOTE optional - '1~ ' NOTE chapter level - '2~ ' NOTE optional - '3~ ' NOTE optional - '4~ ' NOTE optional :consider: - * node - * parent - * children - -#% font face NOTE open & close marks, inline within paragraph - * emphasize '*{ ... }*' NOTE configure whether bold italics or underscore, default bold - * bold '!{ ... }!' - * italics '/{ ... }/' - * underscore '_{ ... }_' - * superscript '^{ ... }^' - * subscript ',{ ... },' - * strike '-{ ... }-' - * add '+{ ... }+' - * monospace '#{ ... }#' -#% para NOTE paragraph controls are at the start of a paragraph - * a para is a block of text separated from others by an empty line - * indent - * default, all '_1 ' up to '_9 ' - * first line hang '_1_0 ' - * first line indent further '_0_1 ' - * bullet - [levels 1-6] - '_* ' - '_1* ' - '_2* ' - * numbered list - [levels 1-3] - '# ' - -#% blocks NOTE text blocks that are not to be treated in the way that ordinary paragraphs would be - * code - * [type of markup if any] - * poem - * group - * alt - * tables -#% boxes - NOTE grouped text with code block type color & possibly default image, warning, tip, red, blue etc. decide [NB N/A not implemented] - -#% notes NOTE inline within paragraph at the location where the note reference is to occur - * footnotes '~{ ... }~' - * [bibliography] [NB N/A not implemented] - -#% links, linking - * links - external, web, url - * links - internal - -#% images [multimedia?] - * images - * [base64 inline] [N/A not implemented] - -#% object numbers - * ocn (object numbers) - automatically attributed to substantive objects, paragraphs, tables, blocks, verse (unless exclude marker provided) - -#% contents - * toc (table of contents) - autogenerated from structure/headings information - * index (book index) - built from hints in newline text following a paragraph and starting with ={} has identifying rules for main and subsidiary text - -#% breaks - * line break ' \\ ' inline - * page break, column break ' -\\- ' start of line, breaks a column, starts a new column, if using columns, else breaks the page, starts a new page. - * page break, page new ' =\\= ' start of line, breaks the page, starts a new page. - * horizontal '-..-' start of line, rule page (break) line across page (dividing paragraphs) - -#% book type index - -#% comment - * comment - -#% misc - * term & definition - -** proposals/additions - -*** TODO [#B] markup syntax code block, indicate syntax of code :feature: - ``` code:ruby - -*** TODO [#C] colored boxes round text :feature:ponder: - ``` box:red (select color of box) - ``` box:warn ``` box:tip (some default boxes? decide) - ``` box:red:"Warn" (select color and lead text of box, else instead - select color box & use regular single line bold markup ^!_ Warn$) - -*** TODO [#D] bibliography :feature:ponder: - -*** TODO speaker, as e.g. play (irc?) :feature:ponder: - ``` Ophelia: - ::Ophelia - -*** TODO [#F] time stamp (e.g. for irc, video text?):feature:ponder: - ``` 04:03 - ``` 04:03 ... 07:12 - ``` 04:03 + 03:09 - ``` 12:04:03 - ``` 12:04:03 ... 12:07:12 - ``` 12:04:03 + 03:09 - probably not worth the effort, as time stamp is an alternative - identifying number (to ocn, and ∴ sisu objects not ideal) - -*** TODO book index, alternative based on search within text - -** syntax hilighting - -*** vim -data/sisu/conf/editor-syntax-etc/vim/ -data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim - -*** emacs -data/sisu/conf/editor-syntax-etc/emacs/ -data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el - -* Document Abstraction :sisu:doc_abstr: - -** TODO [#D] XML middle layer? - -*** XMLda sisu - consder alternative sisu layer in XML - -*** TODO [#D] RelaxNG sisu - -* Output :sisu:output: - -** New outputs - -*** XML :xml: -%% xml, docbook.txt fictionbook.txt xldl.txt lml.txt tei.txt emacs.txt - - - - - - -xml editor vim emacs - -nXML plugin - - - - - -emacs.txt evil.txt - - - - -To validate a book.xml file using xmllint, run the following command: -$ xmllint --postvalid --xinclude --noout book.xml - -The default location where xmllint will look for the catalog file is -/etc/xml/catalog. Alternatively, you can set the environment variable -XML_CATALOG_FILES to define another default location for catalog -files. Once you’ve got the DTD and catalog set up locally, you can -validate as before: -$ xmllint --postvalid --xinclude --noout book.xml - -%% Docbook -docbook.txt - -%% Fictionbook -fictionbook.txt - -%% XLDL -xldl.txt - -%% Literature Markup Language -lml.txt - -%% Text Encoding Initiative -tei.txt - -**** TODO [#B] docbook :feature: - -***** urls -#% docbook book xml.txt - - - - - - - - - - - - - - - - - - - -***** rb file -lib/sisu/v6/xml_docbook5.rb - -***** transformations :transform:markup_docbook: -#% structure - headings, levels - [] sisu (A-C, 1-3) - [] collapsed (1-6) (decoration) - [] node (child, parent ...) - -#% font face - [] bold - [] italics - [] underscore - [] superscript - [] subscript - [] strike - [] add - -#% para - [] default - [] indent - [] default, all - [] first line hang or indent further - [] bullet - -#% blocks - - [] code - [] [type of markup if any] - [] poem - [] group - [] alt - [] tables - -#% notes - [] footnotes - [] [bibliography?] - -#% links, linking - [] links - external, web, url - [] links - internal - -#% images [multimedia?] - [] images - [] [base 64] - -#% object numbers - [] ocn (object numbers) - -#% contents - [] toc (table of contents) - - [] index (book index) - -#% misc - -**** TODO [#D] fictionbook :feature: - -***** urls -#% fictionbook xml.txt - - - - - - - - - - -***** rb file -lib/sisu/v6/xml_fictionbook2.rb - -***** transformations :transformations:markup_fictionbok: #% -#% structure - headings, levels - [] sisu (A-C, 1-3) - [] collapsed (1-6) (decoration) - [] node (child, parent ...) - -#% font face - [] bold - [] italics - [] underscore - [] superscript - [] subscript - [] strike - [] add - [] monospace - -#% para - [] default - [] indent - [] default, all - [] first line hang or indent further - [] bullet - -#% blocks - [] code - [] [type of markup if any] - [] poem - [] group - [] alt - [] tables - -#% notes - [] footnotes - [] [bibliography?] - -#% links, linking - [] links - external, web, url - [] links - internal - -#% images [multimedia?] - [] images - [] [base 64] - -#% object numbers - [] ocn (object numbers) - -#% contents - [] toc (table of contents) - [] index (book index) - -#% breaks - [] line break - [] horizontal rule - [] column break - [] page break - -#% comment - [] comment - -#% misc - - - - - - - - - - - - -**** TODO [#D] XLDL :feature: - -***** urls -%% xml.txt xldl - novels, stories, poems -Name: XLDL - an XML doctype for novels, stories, poems, playsName: XLDL - an XML doctype for novels, stories, poems, plays - - - - -**** TODO [#E] Literature Markup Language - :feature: - -***** urls -%% Literature Markup Language - - -"It is assumed, that there are three quite different techniques to provide text, -respectively three types of text, this is prose and poetry and code (for -example source code of computer programs or from markup languages)." -Suggestions and Ideas for Literature Markup Language - 1.1 - - -**** TODO [#E] TEI Lite (Text Encoding Initiative) :feature: - -***** urls -%% TEI Lite (Text Encoding Initiative) - - - -*** Text :txt: - -sisu_markup.txt asciidoc.txt markdown.txt textile.txt rst.txt - -**** TODO [#D] asciidoc :feature: - -***** urls -#% asciidoc - - - - - -cheatsheets - - - - - - - - - - -***** rb file -lib/sisu/v6/txt_asaciidoc.rb - -***** transformations :transformations:markup_asciidoc: #% -#% structure - headings, levels - [] sisu (A-C, 1-3) - [] collapsed (1-4) (decoration) - [] inline - '== ' - '=== ' - '==== ' - '===== ' - '' - '' - [] underscore - '-' - '~' - '^' - '+' - '' ['.' proposed] - '' ['.' proposed] - [] node (child, parent ...) - -#% font face - [open & close marks] - [] bold - '*' - [] italics - '_' - [] underscore - '' - [] superscript - '^' - [] subscript - '~' - [] strike - '-' - [] add - [] monospace - '+' - '`' pass markup through unchanged, monospace code - -#% para - [] default - [] indent - [] default, all - [] first line hang or indent further - [] bullet - [levels 1-6] - '*' - '**' - '***' - '****' - '*****' - '*******' - [] numbered list - [levels 1-3] - '. ' number - '.. ' lower alpha - '... ' lower roman - '.... ' upper alpha - '..... ' upper roman - -#% blocks - [] code - [source,perl] - ---- - code here - ---- - [] [type of markup if any] - [] poem - [] group - ---- - grouped text here, actually a listing block - ---- - [] alt - [] tables - -#% notes - [] footnotes - [] [bibliography?] - -#% links, linking - [] links - external, web, url - http://google.com[Google Search] - [] links - internal - -#% images [multimedia?] - [] images - [] [base 64] - -#% object numbers - [] ocn (object numbers) - -#% contents - [] toc (table of contents) - [] index (book index) - -#% breaks - [] line break - "+\n" - forced + - line break - [] horizontal rule - [] column break - [] page break - -#% comment - [] comment - // - -#% misc - - [] term & definition -Term 1:: Definition 1 -Term 2:: Definition 2 -[horizontal] - Term 2.1;; - Definition 2.1 - Term 2.2;; - Definition 2.2 - -**** TODO [#E] markdown :feature: - -***** urls -#% markdown - - - - - - - -Markdown supports two styles of headers, Setext and atx -Setext - - -atx - - - - - - - - - - - - - - -#% pandoc markdown - - - - - - - -#% multimarkdown - - -#% markdown pandoc v multimarkdown - - -#% rST v markdown - - -***** rb file -lib/sisu/v6/txt_markdown.rb - -***** transformations :transformations:markup_markdown: #% -#% structure - headings, levels - [] sisu (A-C, 1-3) - [] collapsed (1-6) (decoration) - [inline 1-5] - '#' - '##' - '###' - '####' - '#####' - '######' - [underscore 1-5] - '=' - '-' - #'~' - #'^' - #'+' - [] node (child, parent ...) - -#% font face - [open & close marks] - [] bold - '**' - [] italics - '*' - [] underscore - '' - [] superscript - '' - [] subscript - '' - [] strike - '' - [] add - [] monospace - '`' - -#% para - [] default - [] indent - [] default, all - [] first line hang or indent further - [] bullet - '*' - [] numbered list - '0.' - -#% blocks - [] code - ' ' #indent at least 4 spaces - [] [type of markup if any] - [] poem - [] group - [] alt - [] tables - -#% notes - [] footnotes - [] [bibliography?] - -#% links, linking - [] links - external, web, url - [] links - internal - -#% images [multimedia?] - [] images - [] [base 64] - -#% object numbers - [] ocn (object numbers) - -#% contents - [] toc (table of contents) - [] index (book index) - -#% breaks - [] line break - [] horizontal rule - (three or more asterisks hypens or underscores) - * * * - *** - ***** - - - - - ___ - [] column break - [] page break - -#% misc - -**** TODO [#F] rst :feature: - -***** urls -#% rST - - - - - - - - -#% rST v markdown - - -***** rb file -lib/sisu/v6/txt_rst.rb - -***** transformations :transformations:markup_rst: #% -#% structure - headings, levels - [] sisu (A-C, 1-3) - [] collapsed (1-6) (decoration) - [inline] - N/A - [underscore] - Titles are underlined (or over- and underlined) with a printing - nonalphanumeric 7-bit ASCII character. Recommended choices are - "= - ` : ' " ~ ^ _ * + # < >". The underline/overline must be at - least as long as the title text. - '=' - '-' - '`' - ':' - "'" - '"' - - [] node (child, parent ...) - -#% font face - [] bold - '**' - [] italics - '*' - [] underscore - '+' - [] superscript - '^' - [] subscript - [] strike - '-' - [] add - [] monospace - '``' - -#% para - [] default - [] indent - [] default, all - [] first line hang or indent further - [] bullet - "-", "*" or "+" - '-' - [] numbered list - '#.' - -#% blocks - [] code - [] [type of markup if any] - [] poem - [] group - [] alt - [] tables - -#% notes - [] footnotes - [binary] - Footnote references, like [5]_. - Note that footnotes may get - rearranged, e.g., to the bottom of - the "page". - .. [5] A numerical footnote. - -- - Autonumbered footnotes are - possible, like using [#]_ and [#]_. - .. [#] This is the first one. - .. [#] This is the second one. - - [] [bibliography?] - -#% links, linking - [] links - external, web, url - Typical result - External hyperlinks, like Python_. - .. _Python: - or - External hyperlinks, like `Python - `_. - [] links - internal - Internal crossreferences, like example_. - .. _example: - - This is an example crossreference target. - -- - Titles are targets, too - ======================= - Implict references, like `Titles are - targets, too`_. - -#% images [multimedia?] - [] images - [] [base 64] - -#% object numbers - [] ocn (object numbers) - -#% contents - [] toc (table of contents) - [] index (book index) - -#% breaks - [] line break - [] horizontal rule - [] column break - [] page break - -#% misc - -**** TODO [#F] textile :feature: - -***** urls -#% textile - -v2.4 - -v2 - - -***** rb file -lib/sisu/v6/txt_textile.rb - -***** transformations :transformations:markup_textile: #% -#% structure - headings, levels - [] sisu (A-C, 1-3) - [] collapsed (1-6) (decoration) - [inline] - h1(#id). An HTML first-level heading - h2. An HTML second-level heading - h3. An HTML third-level heading - h4. An HTML fourth-level heading - h5. An HTML fifth-level heading - h6. An HTML sixth-level heading - [underscore] - N/A - - [] node (child, parent ...) - -#% font face - [] bold - *bold text* - [] italics - _italic text_ - [] underscore - +underlined text+ - [] superscript - ^TM^ - [] subscript - ~subscript~ - [] strike - -strikethrough text- - [] add - -#% para - [] default - [] indent - [] default, all - [] first line hang or indent further - [] bullet - * bulleted list - ** 2-level - -#% blocks - [] code - [] [type of markup if any] - [] poem - [] group - [] alt - [] tables - |Table | with two columns | - |and two | rows | - -#% notes - [] footnotes - Text with a link to some reference[1] - fn1. Footnote explanation - [] [bibliography?] - -#% links, linking - [] links - external, web, url - "(classname)link text(title tooltip)":link_address - "Link to Wikipedia":http://www.wikipedia.org - [] links - internal - -#% images [multimedia?] - [] images - !http://commons.wikimedia.org/wiki/Special:Filepath/Wikipedia-logo-en.png! - !imageurl(alt text)! - [] [base 64] - -#% object numbers - [] ocn (object numbers) - -#% contents - [] toc (table of contents) - [] index (book index) - -#% breaks - [] line break - [] horizontal rule - [] column break - [] page break - -#% misc - [] *_bold italic text_* - [] *-bold strikethrough text-* - [] *_-bold italic strikethrough text-_* - [] *+bold underlined text+* - [] *_+italic underlined text+_ - [] *_+bold italic underlined text+_ - [] *_-+bold italic strikethrough underlined text+-_* - %{font-size:18pt}font size% - %{color:red}text in red% - # Chapter 1 - -#% notes -heading inline only -footnotes uses marker and endnote, check - -** Improvements - -*** HTML - -*** XML - -*** --strict mode (html w3c compliant ocn etc.) - -* Code (ruby) :sisu:code: - -** code enhancements :enhance: - -*** TODO [#D] directory & path, use ruby directory tools - -*** TODO [#D] document url shortcut, allow addition of alternative dir stub -(e.g. viral Spiral) - -** code refactoring :refactor: - -*** ruby 2.1 - -**** DONE make sure sisu works - -*** TODO [#C] refactor ruby :ongoing: - -** bugs :bug: - -*** misc, unclassified - -**** DONE (6.0.5) [#B] sisu should give warning when part of minimal essential structure is missing :processing:fix: - -work through testing for as many of these as possible - -minimal content/structure requirement: -[metadata] - @title: - @creator: -[levels] - A~ (level A [title]) - 1~ (at least one level 1 [segment/(chapter)]) -test what happens in the absence of each - -structure rules (document heirarchy, heading levels): - - there are two sets of heading levels ABCD (title & parts if any) and 123 (segment & subsegments if any) - sisu has the fllowing levels: - - A~ [title] . required (== 1) followed by B~ or 1~ - B~ [part] * followed by C~ or 1~ - C~ [subpart] * followed by D~ or 1~ - D~ [subsubpart] * followed by 1~ - 1~ [segment (chapter)] + required (>= 1) followed by text or 2~ - text * followed by more text or 1~, 2~ or relevant part *(B~ if none other used; if C~ is last used: C~ or B~; if D~ is used: D~, C~ or B~) - 2~ [subsegment] * followed by text or 3~ - text * followed by more text or 1~, 2~ or 3~ or relevant part, see *() - 3~ [subsubsegment] * followed by text - text * followed by more text or 1~, 2~ or 3~ or relevant part, see *() - - * level A~ is the tile and is mandatory - * there can only be one level A~ - * heading levels BCD, are optional and there may be several of each - (where all three are used corresponding to e.g. Book Part Section) - * sublevels that are used must follow each other sequentially (alphabetically), - * heading levels A~ B~ C~ D~ are followed by other heading levels rather than substantive text - which may be the subsequent sequential (alphabetic) heading part level - or a heading (segment) level 1~ - * there must be at least one heading (segment) level 1~ - (the level on which the text is segmented, in a book would correspond to the Chapter level) - * additional heading levels 1~ 2~ 3~ are optional and there may be several of each - * heading levels 1~ 2~ 3~ are followed by text (which may be followed by the same heading level) - and/or the next lower numeric heading level (followed by text) - or indeed return to the relevant part level - (as a corollary to the rules above substantive text/ content - must be preceded by a level 1~ (2~ or 3~) heading) - -there must be a title, level A -creator field absent: crash, no warnings given -title missing: -level A missing: -no level 1: - -***** NOTES/COMMENTS - -revisit, - * check logic, add to if possible - * tidy, inelegant solution - -**** DONE (5.3.5::6.0.5) [#B] victory chals discussed parsing problem caused by use of open-close markers around url - -**** TODO UNDERWAY (6.0.5) [#B] exclude heading where possible marker '-#' not distinguished from unnumbered heading '~#' - - * ~# is general & means no ocn (for any object to which it is applied) - * -# is relevant only for 1~ dummy headings & instructs that they should be - removed from output where possible - * where -# is used on any other objects, it is treated the same way as ~# - -**** TODO [#B] collapsed level work out logic where dummy lev1 heading - - * exclude heading where lev1 '-#' - * means subsequent headings & text belong to parent heading (of lev1 -#) 1 level up - * ponder - - -**** TODO [#B] sisu 5.3.4-1 marked for autoremoval from debian testing on 2014-06-10, for depending on ruby-dbi - -sisu 5.3.4-1 is marked for autoremoval from testing on 2014-06-10 -It (build-)depends on packages with these RC bugs: -746081: ruby-dbi: FTBFS: ERROR: Test "ruby2.1" failed: wrong number of arguments (3 for 1..2) - -***** NOTES/COMMENTS - -debian/control, remove dependency on ruby-dbi, contained in sisu-postgresql and sisu-sqlite - -Result, status of next sisu release - * sisu-sqlite works fine, depends on ruby-sqlite3 - * sisu-postgresql is broken till fixed to work with ruby-pg (or ruby-dbi fixed) - * sample cgi search froms (cgi database query forms) are broken till - -**** TODO [#B] sisu-postgresql, fix - - * fix to work with ruby-pg (or if issue resolved reinstate ruby-dbi) - -**** TODO [#B] sisu sample cgi database query forms, fix - - * fix for sqlite3 & pg (as they currently depend on ruby-dbi) - -*** DBT Outstanding bugs -- Normal bugs; Unclassified (2 bugs) :debian:dbt:normal: - - -**** DONE (5.3.5::6.0.5) [#B] #744360 [n|u] sisu: includes do not work properly :processing:fix: - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: includes do not work properly -Date: Sun, 13 Apr 2014 12:38:59 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -using this in foo.ssm: - - :A~ foo - - :B~ bar - - << bar/baz.ssi - -and this in baz.ssi: - - 1~ foo bar baz - -then everything works. - -using the more natural foo.ssm: - - :A~ foo - - << bar/baz.ssi - -and baz.ssi: - - :B~ bar - - 1~ foo bar baz - -makes ':B~ bar' being ignored in the output (pdf) entirely. - -Regards, -Daniel - -***** NOTES/COMMENTS - -it appears both give faulty text, though in different ways - -fixed - -**** DONE (5.3.5::6.0.5) [#B] #744378 [n|u] sisu: --no-manifest not working anymore :check: - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: --no-manifest not working anymore -Date: Sun, 13 Apr 2014 16:12:13 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -when running sisu-pdf with --no-manifest, the output (pdf) still -contains the sisu manifest at the end of the document. - -Regards, -Daniel - -***** NOTES/COMMENTS - -fix, metadata page in pdf should not contain link to manifest where --no-manifest flag is used - -**** TODO ONGOING #746740 [n|u] manpages incomplete - -Date: Sat, 03 May 2014 08:45:49 +0200 -From: Daniel Baumann -Subject: manpages incomplete -Package: sisu -Version: 5.3.4-1 -Tag: upstream -Severity: normal - -sisu supports options like --verbose or --no-manifest, but they are not -listed in the sisu manpage. - -***** NOTES/COMMENTS - -documentation for sisu does lag a bit and has omissions, but I think you will -find that --verbose is documented, and --no-* options are listed under --exc-* -to which there is a pointer --no-manifest works but is actually ---no-links-to-manifest and is listed under aliases --exc-links-to-manifest and ---exc-manifest-links - -Will leave bug open as a reminder that updating is necessary and as there are -no doubt numerous issues for which this could be (re)opened - -**** TODO #746742 [n|u] please implement --no-metadata similar to --no-manifest - -Date: Sun, 13 Apr 2014 16:12:13 +0200 -From: Daniel Baumann -Subject: --no-manifest not working anymore -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -when running sisu-pdf with --no-manifest, the output (pdf) still -contains the sisu manifest at the end of the document. - -Regards, -Daniel - -*** DBT Outstanding bugs -- Wishlist items; Unclassified (24 bugs) :debian:dbt:wishlist: - -**** TODO [#D] #744352 [w|u] sisu output: aligning margin numbers when using 'code' - - -From: Daniel Baumann -To: 744352@bugs.debian.org -Subject: Re: sisu output: too many margin numbers -Date: Sun, 13 Apr 2014 17:27:10 +0200 -retitle 744352 sisu output: aligning margin numbers when using 'code' -severity 744352 wishlist -thanks - -sorry, i've looked wrongly at the output, the problem is simply an -aligning issue. it looks like that: - - foo bar. [1] - [2] - baz - - foo bar baz. [3] - -rather than: - - foo bar. [1] - - baz [2] - - foo bar baz. [3] - -Regards, -Daniel - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: too many margin numbers -Date: Sun, 13 Apr 2014 12:28:14 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -when using the following code: - -foo bar. - -code{ - - baz - -}code - -foo bar baz. - -the result in the output (pdf) is: - -foo bar. [1] - [2] -baz [3] - [4] -foo bar baz. [5] - -the '[n]' designates the margin number at the right site of the page. - -the problem is that sisu gives margin numbers to *empty* lines, which is -wrong. margin numbers should only be assigned to actual content. - -Regards, -Daniel - -***** NOTES/COMMENTS - -issue with pdf, look again, consider, -this is cosmetic, a fix should be found, but is not striaghtforward -alignment issue for code blocks not so easy to fix in some outputs, have so far ignored -this is an issue with other types of text block as well - -reason why this has not been addressed especially with code blocks: -the easiest fix would be to place the numbering at the end of the first line of a code block -however, as it is now, if you copy & paste a block of code you should get the code -if numbering is moved down to the first line, a copy of the code block will inlcude the -extraneous (to the code) object number -which is to my mind a bigger problem - -That said re pdf, LaTeX XeTeX are flexible, it may be possible to drop the ocn -at the start of a code block lower on its line so that it is closer to the code -that follows - -**** DONE (6.0.5) [#D] #744353 [w|u] sisu output: please do not use typewriter for urls :output:consider: - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: please do not use typewriter for urls -Date: Sun, 13 Apr 2014 12:28:27 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -when using urls in sisu like this: - - http://example.org - -sisu then creates in the output (pdf) links like this: - - - -where as '' is written in typewriter font -(monospace). please don't do that automagically since it's desturbing -the visual flow when reading. If the users wants that, he should be able -to configure it. - -Regards, -Daniel - -***** NOTES/COMMENTS - -monospace for url outputs in pdf - -this is default behavior of the latex url package (it uses tt typewriter font) -it is possible to modify the font to sf class or tm/rm class, & I now default to sf -this means when the sisu default sf is used there will be no difference in typeface, -but when times roman or other is used, urls will be in sf instead of that font, -(instead of the latex default typewriter) - -it provides a visual cue even when output is monochrome, without color -(and is in some way related to #744391 sisu output: no color on a4 portrait) -however, it is worth noting here that urls are printed in a smaller font so as -to fit more on a line of text - -**** TODO [#C] #744354 [w|u] sisu output: please do not add '<' and '>' around urls - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: please do not add '<' and '>' around links -Date: Sun, 13 Apr 2014 12:28:37 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -when using urls in sisu like this: - - http://example.org - -sisu then creates in the output (pdf) links like this: - - - -Please do not automagically add a '<' and '>' around urls. If the user -wants them, he would add one. - -Regards, -Daniel - -***** NOTES/COMMENTS - -is sisu default behavior, -would need to make configurable -url_visual_delimiters: '<>' -look into later - -**** DONE (5.3.5::6.0.5) [#C] #744355 [w|u] vim syntaxhighlighting: includes and directories :syntaxhi:fix: - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: vim syntaxhighlighting: includes and directories -Date: Sun, 13 Apr 2014 12:28:46 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -When using includes like this: - - << foo.ssi - -then vim correctly displays the line in blue. - -However, when using includes in a subdirectory like this: - - << bar/foo.ssi - -then vim doesn't use any colors at all. - -Regards, -Daniel - -***** NOTES/COMMENTS - -done - -**** DONE PASS [#C] #744356 [w|u] vim syntaxhighlighting: urls and tags :discuss:close: - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: vim syntaxhighlighting: urls and tags -Date: Sun, 13 Apr 2014 12:28:56 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -When using an URL at the end of a sentence like this: - - Foo bar baz http://example.org. - -then vim properly highlights the url in blue. - -this also works properly when a second sentence after it, like: - - Foo bar baz http://example.org. Foo bar baz http://example.org. - -it works with html tag as well, like this: - - Foo bar baz http://example.org.
Foo bar baz http://example.org. - -but it doesn't work if there's no space: - - Foo bar baz http://example.org.
Foo bar baz http://example.org. - -then, the string 'http://www.gnu.org/licenses/.<' is shown red. - -Regards, -Daniel - -***** NOTES/COMMENTS - -this is meant to be flagged as an error, -(red indicates error, and is an error will not parse correctly) -even if the sisu parser works in the flagged case there is no promise that it will in future - -use of angle bracket markers (html markers) in sisu markup is depreciated. -for line-break use \\ instead, -for which there should be surrounding spaces or a preceding space and end of line; -if
is still used there should be a space after the url - which sisu should remove in output. - -would like to close without further action -re-open if necessary - -**** DONE (6.0.5) [#C] #744357 [w|u] sisu output: please create mailto links automatically - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: please create mailto links automatically -Date: Sun, 13 Apr 2014 12:29:12 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -When using urls like: - - http://example.org - -in sisu, the output (pdf) contains a hyperlink to http://example.org -automatically, which is nice. - -please also create mailto links when using email adresses like: - - john.doe@example.org - -Regards, -Daniel - -***** NOTES/COMMENTS - -for pdf fix/implement mailto links -done but requires further testing & possibly refinement - -**** DONE (6.0.5) [#C] #744358 [w|u] sisu output: please do not add ';' after \:copyright: :output:fix: - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: please do not add ';' after :copyright: -Date: Sun, 13 Apr 2014 12:29:20 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -When using: - - :copyright: foo bar baz. - -sisu generates the following in the output format (pdf): - - foo bar baz.; - -Please do not automagically add a semicolon (;). If the user wants a -semicolon, he would add one. - -Regards, -Daniel - -***** NOTES/COMMENTS - -fix copyright, remove trailing semi-colon - -**** DONE (5.3.5::6.0.5) [#B] #744379 [w|u] sisu: missing includes doesn't give an error :processing:fix: - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: missing includes doesn't give an error -Date: Sun, 13 Apr 2014 16:14:46 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -When using includes (*.ssi) in a sisu master document (*.ssm) like: - - << foo.ssi - -and that to be included file foo.ssi (for whatever reason) doesn't -exist, sisu doesn't error out but include '<< foo.ssi' literally as a -string in the output (pdf). - -Regards, -Daniel - -***** NOTES/COMMENTS - -5.3.4-1 writes the following to the screen: -"ERROR test.ssm.sst requires invalid or non-existent file: foo.ssi" - -and unsatisfactorily within the text output it writes no error message but the include instruction: - -"<< foo.ssi" - -5.3.5, the current "fix"/ solution, is to add an error message within the text rather than to stop processing with an error. -In addition to (i) slightly modified (you could say corrected) to the following: - -"ERROR test.ssm requires an invalid or non-existent file: foo.ssi" - -the following is written within the text output: - -"<< foo.ssi [ERROR test.ssm requires an invalid or non-existent file: foo.ssi]" - -**** DONE (5.3.5::6.0.5) [#D] #744381 [w|u] sisu syntax: inconsistency \:copyright: and \:license: :metadata: - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: inconsistency between :copyright: and :license: -Date: Sun, 13 Apr 2014 16:26:55 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -when using ':copyright: foo', then the output contains 'foo'. - -when using ':license: foo', then the output contains 'License: foo'. - -this is inconsistent. either both should have a 'prefix' in the output, -or neither should have one (i'd prefere the latter). - -Regards, -Daniel - -***** NOTES/COMMENTS - -Under rights there are a series of sub-categories starting with copyright, that -need to be distinguished. Until now started distinguishing after after -Copyright. For consistency have add the prefix 'Copyright' to the output. -Preference to omit noted, but this solution is consistent with options -provided. Bug closed, re-open if necessary. - -**** DONE (6.0.5) [#B] #744383 [w|u] sisu syntax: :B and :C result in the same formatting :output:fix: (partial solution) - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu syntax: :B and :C result in the same formatting -Date: Sun, 13 Apr 2014 16:32:07 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -when using :A, :B, and :C in sisu, in the output (pdf) both :B and :C -are formatted identically. - -imho :C should be 'smaller' than :B. - -or, as an analogy with html: i would expect that :A equals

, :B -equals

, and :C equals

. currently, (in that analogy), :B and :C -both equal

. - -Regards, -Daniel - -***** NOTES/COMMENTS - -this is in part an artifact of LaTeX not having as many document heading levels -and trying to take advantage of the behavior of existing levels rather than -customizing further - -look for a solution, possibly overriding the default font sizes for each - -The current settings were chosen because, there are not enough levels and I -find too many different font sizes disconcerting, especially running sisu over -a wide variety of document types - -the following levels are available in LaTeX - -\part -\chapter -\section -\subsection -\subsubsection - -the levels in sisu are - -A [title] -B [part] -C [subpart] -D [subsubpart] -1 [segment (chapter)] -2 [subsegment] -3 [subsubsegment] - -sisu current mapping: - -level A [title] -level B C D \part (it is up to the user to make part levels visually distinguishable e.g. Book Part Section) -[skipped \chapter] -[skipped \section] -level 1 \subsection -level 2 \subsubsection -level 3 \subsubsection - -the reason for skipping section was the default configuration and resulting -fact that it made for a table of contents that takes more space - -sisu new mapping: - -level A [title] -level B C D \part (it is up to the user to make part levels visually distinguishable e.g. Book Part Section) -[skipped \chapter] -level 1 \section -level 2 \subsection -level 3 \subsubsection - -levels B C & D are the same size, - it is up to the user to make part levels visually distinguishable - e.g. Book Part Section -levels 1 2 & 3 are now distinguished - -(Closes #744386) sisu syntax: 1~ and 2~ result in the same formatting -(under consideration & yet to be done #744383) sisu syntax: :B and :C result in the same formatting -(touches ) -override part font size settings for different levels (B C D) - -**** TODO [#C] #744384 [w|u] sisu syntax: relies on empty lines - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu syntax: relies on empty lines -Date: Sun, 13 Apr 2014 16:34:46 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -the following snipped: - - :C~ foo bar - << foo-bar.ssi - -means that the include is ignored entirely. apparently sisu relies on -having an empty line in between like this: - - :C~ foo bar - - << foo-bar.ssi - -Regards, -Daniel - -***** NOTES/COMMENTS - -consider, - -(i) as a general observation, sisu relies on emptly lines to identify separate objects - such as headings, paragraphs (and indeed insertions) - -(ii) a heading need not be on a single line (so << would be part of that heading) -this means sisu should be able to work identifying headings in wrapped texts -(e.g. where the text is wrapped at 80 and the heading is longer than that) - -there has been no rule to the contrary (i.e. that headings should be on a single text line) - -consider, should there be such a rule? - -**** DONE (6.0.5) [#B] #744386 [w|u] sisu syntax: 1~ and 2~ result in the same formatting :output:pdf:fix: (see #744383) - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu syntax: 1~ and 2~ result in the same formatting -Date: Sun, 13 Apr 2014 16:43:51 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -similar as with #744383, the same also applies for 1~ and 2~ - they -should be different in the output format (pdf here). - -Regards, -Daniel - -***** NOTES/COMMENTS - -1~ 2~ 3~ are now differentiated - -deal with under #744383 - -**** TODO [#B] #744390 [w|u] sisu: empty sections are ignored - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu: empty sections are ignored -Date: Sun, 13 Apr 2014 17:09:32 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist - -if you have the following sisu syntax: - - :B~ foo - - 1~ foo1 - - foo1. - - 1~ foo2 - - foo2. - - :B~ bar - - 1~ bar1 - - 1~ bar2 - - :B~ baz - - 1~ baz1 - - 1~ baz2 - -then anything (including and) after ':B~ bar' is ignored entirely. - -***** NOTES/COMMENTS - -further info, have not yet been able to duplicate, -seemed to work (checked pdf & html (scroll & seg)) -was not able to reproduce -will look again - -**** DONE (6.0.5) [#C] #744391 [w|u] sisu output: no color on a4 portrait :output:pdf:contemplate: - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu output: please use (blue) color for links -Date: Sun, 13 Apr 2014 17:23:37 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist -Tags: upstream - -it would be nice if links (urls and emails) would be colored blue to -mark them visually as links. this behaviour is somewhat the lowest -common denominator in browsers (if you use html without any css that is). - -Regards, -Daniel - -From: Daniel Baumann -To: 744391@bugs.debian.org -Subject: Re: sisu output: please use (blue) color for links -Date: Sun, 13 Apr 2014 17:35:33 +0200 -retitle 744391 sisu output: no color on a4 portrait -thanks - -now this is strange.. turns out that (yes, i have colors enabled in -sisurc) the portrait a4 pdf has no colors at all, while the landscape a4 -pdf does indeed have colors (red for toc, blue for links). - -Regards, -Daniel - -***** NOTES/COMMENTS - -background: -portrait was provided for print/paper copy and is great for that in monochrome -(without grays for colored links), -landscape better matching a screen for visual presentations, color affecting the landscape only - -solution: -make configurable by cli & rc file -make both (portrait & landscape colors) configurable -either as hyperlinks monochrome or colored -overriding existing default which remains as described - -document -cli: ---pdf-hyperlinks-no-color or --pdf-hyperlinks-mono ---pdf-hyperlinks-color - -rc: - -default: - pdf_hyperlinks: *[possible values] - pdf_hyperlinks_portrait: *[possible values] - pdf_hyperlinks_landscape: *[possible values] - - * 'color' or ('mono' or 'no-color' or 'color-off') - -**** TODO [#D] #744395 [w|u] sisu output: half-page title page in landscape output - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu output: half-page title page in landscape output -Date: Sun, 13 Apr 2014 17:38:03 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist -Tags: upstream - -in a4 landscape output, there's always two pages on one page, which is -nice; except for the title page which spans over the whole page. - -it would be nice if the first page would be consistent to the same -scheme like the rest of the document - spanning only over the half of -the page. - -Regards, -Daniel - -***** NOTES/COMMENTS - -think about, should be fairly easily done, but am reluctant - -note the page numbering in landscape, the two landscape columns are given a single page number -it is really a landscape two column per-page text, provided primarily for screen viewing or -other convenience if found - -(many viewers provide two page per screen presentations, which would result in an effect similar to the one requested -the issue I guess might arise in that they are not printable on a single page? ... -but then the current settings are arguably justified) - -**** TODO [#C] #744396 [w|u] sisu output: "european" toc indenting - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu output: "european" toc indenting -Date: Sun, 13 Apr 2014 17:40:53 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist -Tags: upstream - -by default, latex uses the following indenting in the TOC: - - 1. foo - 1.1 bar1 - 1.1.1 baz - 1.2 bar2 - -there's a latex option that i don't remember off-hand to have the -indenting like it's common in europe: - - 1. foo - 1.1 bar1 - 1.1.1 baz - 1.2 bar2 - -it would be nice if sisu could let the used decide which indenting style -to use for TOCs. - -Regards, -Daniel - -***** NOTES/COMMENTS - -will look at: should be possible; requires a configuration option - -**** DONE (6.0.5) [#B] #744399 [w|u] sisu syntax: :A smaller formatted than :B :output:fix: (see #744383) (partial solution) - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu syntax: :A smaller formatted than :B -Date: Sun, 13 Apr 2014 17:49:26 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist -Tags: upstream - -in a document like this: - -:A~ foo - -:B~ bar - -the :A~ 'title' is formated 'smaller' (not bold, smaller font size) than -the :B~ 'title' on the first page of the actual document (means, first -page after TOC). - -Regards, -Daniel - -***** NOTES/COMMENTS - -for pdf - -now is same size see #744383 - -\part (level A B C D) -\chapter (skipped) -\section (level 1) -\subsection (level 2) -\subsubsection (level 3) - -**** DONE (6.0.5) [#C] #744402 [w|u] sisu: support sha512 :implement: - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu: support sha512 -Date: Sun, 13 Apr 2014 18:06:56 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist -Tags: upstream - -sisu uses sha256 when using sha as digest, please support sha512. - -it would be even nicer if you could specify the actual digest like -'sha512', 'sha256', etc. rather than just 'sha'. - -Regards, -Daniel - -***** NOTES/COMMENTS - -implemented -document command line option --sha512 - -**** DONE (6.0.5) [#C] #744405 [w|u] sisu: set default font size :configuration:pdf:implement: - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu: set default font size -Date: Sun, 13 Apr 2014 18:29:46 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist -Tags: upstream - -in sisurc, one can set the default fonts. it would be nice to be also -able to set the default font size. - -Regards, -Daniel - -***** NOTES/COMMENTS - -for pdf make configurable - -yaml.rc - -default: - texpdf_fontsize: 12 - -command-line - ---pdf-fontsize-12 ---pdf-fontsize-8 -etc. - -**** TODO [#C] #744407 [w|u] sisu: possibility to influence content/formating of the title page - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu: possibility to influence content/formating of the title page -Date: Sun, 13 Apr 2014 18:32:14 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist -Tags: upstream - -by default, the title page (in the pdf output) shows @title and @creator. - -it would be nice if there would be a possibility to influence the -formatting (e.g. to have the title written in bold), and to have -additional possibilities to influence the content on the title page -(like the date or version, an url, or other text strings). - -Regards, -Daniel - -***** NOTES/COMMENTS - -consider, work on possibly, later - -**** TODO [#C] #744408 [w|u] sisu: support more than one level of includes/nested includes - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu: support more than one level of includes/nested includes -Date: Sun, 13 Apr 2014 18:39:23 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist -Tags: upstream - -currently, it's possible to use only one ssm file which itself includes -one or more ssi files. - -it would be nice if the ssm could include an 'intermediate' ssi, which -then includes further ssi files. this is very handy for larger documents. - -Regards, -Daniel - -***** NOTES/COMMENTS - -consider, -I have to date deliberately tried to keep it easy to follow documents & not have too much depth ... -The idea of recursive includes is un-attractive (messy for a document) - -.ssm currently can contain .sst or .ssi -.sst files can be processed independently, -.ssi files are only insertions & cannot - -allowing .ssi to also include other .ssi or .sst could lead to recursive .ssi -allowing .ssm to also include other .ssm .ssi or .sst could lead to recursive .ssm - -stopping after an additional level of includes seems arbitrary, and possibly prone to error if you are dealing with many documents - -a possibility would be to have another file extension to flag the role of the file, -.ssmi (not very attractive) might do it -(providing visual cue signalling its role as both a master file and an insertion/included file that cannot be processed independently) -a .ssmi file must be included in a .ssm file -a .ssmi file (like .ssm) permits the inclusion only of .sst or .ssi files - -will work on eventually - -**** TODO [#C] #744409 [w|u] sisu output: urls in code blocks are not linkified - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu output: urls in code blocks are not linkified -Date: Sun, 13 Apr 2014 18:41:09 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist -Tags: upstream - -it would be nice if urls written withiin code{...}code blocks would also -be automatically transformed into a link within the output (html). - -Regards, -Daniel - -***** NOTES/COMMENTS - -consider, so far code blocks are pretty much untouched ... not tampered with, -this could be done though - -**** DONE (6.0.5) [#C] #744541 [w|u] sisu: urls in @creator broken - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu: urls in @creator broken -Date: Sun, 13 Apr 2014 18:45:35 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist -Tags: upstream - -first, if you have an url within @creator, like: - - @creator: foo bar http://example.org - -the generation fails (pdf output). - -as a workaround, i put the url into parenthesis, like: - - @creator: foo bar (http://example.org) - -but then, it would be nice if that url would be automatically -transformed into a link in the output format (pdf). - -Regards, -Daniel - -***** NOTES/COMMENTS - -pdf, fix - -**** TODO [#C] #744685 [w|u] sisu output: copy&past-able wrapped code blocks - - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu output: copy&past-able wrapped code blocks -Date: Sun, 13 Apr 2014 19:04:01 +0200 -Package: sisu -Version: 5.3.4-1 -Severity: wishlist -Tags: upstream - -if a line within a 'code{...}code' block is longer and needs to be -wrapped, sisu indicates the wrapping with an 'arrow' (←) symbol, which -is nice. - -it would be even nicer if the arrow would not 'selectable', so that when -you mark the line spanning over two lines with your mouse, the arrow is -not selected and thus not copy&pasted. - -i don't know how to do this, but it's possible within pdfs, as can be -seen in lots of pdfs in the internet. - -Regards, -Daniel - -***** NOTES/COMMENTS - -find out how and implement, further feedback on appropriate xetex tools welcome - -[Note: if can be applied to random characters, use may be of interest for -object numbers as well!] - -**** TODO [#C] #744734 [w|u] sisu output: replace all occurences of (C) rather than the first only - -From: Daniel Baumann -To: Debian Bug Tracking System -Subject: sisu output: replace all occurences of (C) rather than the first only -Date: Mon, 14 Apr 2014 06:11:13 +0200 - -Package: sisu -Version: 5.3.4-1 -Severity: wishlist -Tags: upstream - -if you have a '(C)' in :copyright:, it is automatically replaced with a -copyright symbol, which is nice, however, it sisu does that with the -first occurence only. - -so if you use: - - :copyright: (C) john doe
(C) jane doe - -then the second occurence is not replaced and that combination looks -very ugly. i suggest you replace all occurences of '(C)' to the -copyright symbol automatically. - -Regards, -Daniel diff --git a/sisu.org b/sisu.org new file mode 120000 index 00000000..cdc01b2b --- /dev/null +++ b/sisu.org @@ -0,0 +1 @@ +data/doc/sisu/sisu.org \ No newline at end of file -- cgit v1.2.3 From b17d90bcdc2450de037a7f160dcb83b67cafe9fa Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 18 May 2014 08:40:33 -0400 Subject: v6: utils, add ok code marker --- lib/sisu/v6/utils.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/sisu/v6/utils.rb b/lib/sisu/v6/utils.rb index 8f9e17b8..5879db27 100644 --- a/lib/sisu/v6/utils.rb +++ b/lib/sisu/v6/utils.rb @@ -133,6 +133,18 @@ module SiSU_Utils def mark(v=nil,x=nil) puts set(v,x) end + def ok(v=nil,x=nil) + if (v.is_a?(Symbol) \ + and x.is_a?(String)) + x= '*OK* ' + x + elsif v.is_a?(String) + v='*OK* ' + v + x=nil + else + v,x='*OK*',nil + end + puts set(v,x) + end def warn(v=nil,x=nil) if (v.is_a?(Symbol) \ and x.is_a?(String)) @@ -143,7 +155,7 @@ module SiSU_Utils else v,x='*WARN*',nil end - STDERR.puts set(v,x) + puts set(v,x) end def error(v=nil,x=nil) if (v.is_a?(Symbol) \ -- cgit v1.2.3 From 307ecb4df591aa675b71839014debf6e81d462e1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 18 May 2014 08:49:03 -0400 Subject: v5 v6: db, use symbols to identify sql engine --- data/doc/sisu/CHANGELOG_v5 | 3 +++ data/doc/sisu/CHANGELOG_v6 | 3 +++ lib/sisu/v5/db_create.rb | 16 ++++++++-------- lib/sisu/v5/db_drop.rb | 8 ++++---- lib/sisu/v5/db_import.rb | 10 +++++----- lib/sisu/v5/db_indexes.rb | 4 ++-- lib/sisu/v5/db_remove.rb | 2 +- lib/sisu/v5/db_select.rb | 16 ++++++++-------- lib/sisu/v5/dbi.rb | 16 ++++++++-------- lib/sisu/v5/dbi_discrete.rb | 10 +++++----- lib/sisu/v6/db_create.rb | 16 ++++++++-------- lib/sisu/v6/db_drop.rb | 8 ++++---- lib/sisu/v6/db_import.rb | 10 +++++----- lib/sisu/v6/db_indexes.rb | 4 ++-- lib/sisu/v6/db_remove.rb | 2 +- lib/sisu/v6/db_select.rb | 16 ++++++++-------- lib/sisu/v6/dbi.rb | 16 ++++++++-------- lib/sisu/v6/dbi_discrete.rb | 12 ++++++------ 18 files changed, 89 insertions(+), 83 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index c9f2f2ea..55f6d35c 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -38,6 +38,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.3.6.orig.tar.xz sisu_5.3.6.orig.tar.xz sisu_5.3.6-1.dsc +* db, + * use symbols to identify sql engine + %% 5.3.5.orig.tar.xz (2014-05-12:19/1) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.3.5 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.3.5-1 diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index d4d500cd..75e63335 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -28,6 +28,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.6.orig.tar.xz sisu_6.0.6.orig.tar.xz sisu_6.0.6-1.dsc +* db, + * use symbols to identify sql engine + %% 6.0.5.orig.tar.xz (2014-05-12:19/1) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.5 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_6.0.5-1 diff --git a/lib/sisu/v5/db_create.rb b/lib/sisu/v5/db_create.rb index 4de362c5..d558aacd 100644 --- a/lib/sisu/v5/db_create.rb +++ b/lib/sisu/v5/db_create.rb @@ -66,10 +66,10 @@ module SiSU_DbCreate class Create < SiSU_DbColumns::Columns require_relative 'sysenv' # sysenv.rb @@dl=nil - def initialize(opt,conn,file,sql_type='pg') + def initialize(opt,conn,file,sql_type=:pg) @opt,@conn,@file,@sql_type=opt,conn,file,sql_type @cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX - @comment=(@sql_type=='pg') \ + @comment=(@sql_type==:pg) \ ? (SiSU_DbCreate::Comment.new(@conn,@sql_type)) : nil @@dl ||=SiSU_Env::InfoEnv.new.digest.length @@ -84,7 +84,7 @@ module SiSU_DbCreate end def create_db @env=SiSU_Env::InfoEnv.new(@opt.fns) - tell=(@sql_type=='sqlite') \ + tell=(@sql_type==:sqlite) \ ? SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Create SQLite db tables in:',%{"#{@file}"}) : SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Create pgSQL db tables in:',%{"#{Db[:name_prefix]}#{@env.path.stub_pwd}"}) if (@opt.act[:verbose][:set]==:on \ @@ -92,7 +92,7 @@ module SiSU_DbCreate || @opt.act[:maintenance][:set]==:on) tell.dark_grey_title_hi end - SiSU_Env::SystemCall.new.create_pg_db(@env.path.stub_pwd) if @sql_type=='pg' #watch use of path.stub_pwd instead of stub + SiSU_Env::SystemCall.new.create_pg_db(@env.path.stub_pwd) if @sql_type==:pg #watch use of path.stub_pwd instead of stub end def output_dir? dir=SiSU_Env::InfoEnv.new('') @@ -105,7 +105,7 @@ module SiSU_DbCreate if (@opt.act[:verbose_plus][:set]==:on \ or @opt.act[:maintenance][:set]==:on) print %{ - currently using sisu dbi module + currently using sisu_dbi module to be populated from document files create tables metadata_and_text data import through ruby transfer @@ -343,7 +343,7 @@ module SiSU_DbCreate if (@opt.act[:verbose_plus][:set]==:on \ or @opt.act[:maintenance][:set]==:on) print %{ - currently using sisu dbi module + currently using sisu_dbi module to be populated from doc_objects files create tables urls data import through ruby transfer @@ -377,9 +377,9 @@ module SiSU_DbCreate end end class Comment < SiSU_DbColumns::Columns - def initialize(conn,sql_type='pg') + def initialize(conn,sql_type=:pg) @conn=conn - if sql_type =~ /pg/; psql + if sql_type == :pg then psql end end def psql diff --git a/lib/sisu/v5/db_drop.rb b/lib/sisu/v5/db_drop.rb index b1ff634e..1a76eff9 100644 --- a/lib/sisu/v5/db_drop.rb +++ b/lib/sisu/v5/db_drop.rb @@ -64,11 +64,11 @@ module SiSU_DbDrop class Drop require_relative 'response' # response.rb - def initialize(opt,conn,db_info,sql_type='') + def initialize(opt,conn,db_info,sql_type) @opt,@conn,@db_info,@sql_type=opt,conn,db_info,sql_type @ans=SiSU_Response::Response.new case @sql_type - when /sqlite/ + when :sqlite cascade='' else cascade='CASCADE' @@ -87,7 +87,7 @@ module SiSU_DbDrop begin msg_sqlite="as not all disk space is recovered after dropping the database << #{@db_info.sqlite.db} >>, you may be better off deleting the file, and recreating it as necessary" case @sql_type - when /sqlite/ + when :sqlite puts msg_sqlite ans=@ans.response?('remove sql database?') if ans \ @@ -129,7 +129,7 @@ module SiSU_DbDrop end rescue case @sql_type - when /sqlite/ + when :sqlite ans=@ans.response?('remove sql database?') if ans and File.exist?(@db_info.sqlite.db); File.unlink(@db_info.sqlite.db) end diff --git a/lib/sisu/v5/db_import.rb b/lib/sisu/v5/db_import.rb index 0dc5a29b..3d0b7f8c 100644 --- a/lib/sisu/v5/db_import.rb +++ b/lib/sisu/v5/db_import.rb @@ -72,7 +72,7 @@ module SiSU_DbImport @@dl=nil @@hname=nil attr_accessor :tp - def initialize(opt,conn,file_maint,sql_type='pg') + def initialize(opt,conn,file_maint,sql_type=:pg) @opt,@conn,@file_maint,@sql_type=opt,conn,file_maint,sql_type @cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX @env=SiSU_Env::InfoEnv.new(@opt.fns) @@ -90,7 +90,7 @@ module SiSU_DbImport @col[:ocn]='' @counter={} @db=SiSU_Env::InfoDb.new - if @sql_type=='sqlite' + if @sql_type==:sqlite @driver_sqlite3=(@conn.inspect.match(/^(.{10})/)[1]==@db.sqlite.conn_sqlite3.inspect.match(/^(.{10})/)[1]) \ ? true : false @@ -136,7 +136,7 @@ module SiSU_DbImport WHERE metadata_and_text.src_filename = '#{@md.fns}' AND metadata_and_text.language_document_char = '#{@opt.lng}' ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns - file_exist=@sql_type=~/sqlite/ \ + file_exist=@sql_type==:sqlite \ ? @conn.get_first_value(select_first_match) : @conn.select_one(select_first_match) if not file_exist @@ -152,7 +152,7 @@ module SiSU_DbImport puts @conn.driver if defined? @conn.driver end begin #% sql - if @sql_type=~/sqlite/ + if @sql_type==:sqlite @conn.transaction do |conn| t_d.each do |sql| conn.execute(sql) @@ -497,7 +497,7 @@ module SiSU_DbImport @env=SiSU_Env::InfoEnv.new(@md.fns) @base_url="#{@env.url.root}/#{@md.fnb}/#{@hname}.html" txt=endnotes(txt).extract_any - if @sql_type=~/pg/ \ + if @sql_type==:pg \ and txt.size > (SiSU_DbColumns::ColumnSize.new.document_clean - 1) # examine pg build & remove limitation puts "\n\nTOO LARGE (TXT - see error log)\n\n" open("#{Dir.pwd}/pg_documents_error_log",'a') do |error| diff --git a/lib/sisu/v5/db_indexes.rb b/lib/sisu/v5/db_indexes.rb index 0fa51b3f..8a269a4c 100644 --- a/lib/sisu/v5/db_indexes.rb +++ b/lib/sisu/v5/db_indexes.rb @@ -62,8 +62,8 @@ =end module SiSU_DbIndex - class Index # create documents Indexes def initialize(opt,conn='',sql_type='') - def initialize(opt,conn,file,sql_type='') + class Index # create documents Indexes def initialize(opt,conn='',sql_type) + def initialize(opt,conn,file,sql_type) @opt,@conn,@file,@sql_type=opt,conn,file,sql_type end def create_indexes # check added from pg not tested diff --git a/lib/sisu/v5/db_remove.rb b/lib/sisu/v5/db_remove.rb index 9ffba024..9a7ea8ea 100644 --- a/lib/sisu/v5/db_remove.rb +++ b/lib/sisu/v5/db_remove.rb @@ -70,7 +70,7 @@ module SiSU_DbRemove @db=SiSU_Env::InfoDb.new end def remove - driver_sqlite3=if @sql_type=='sqlite' + driver_sqlite3=if @sql_type==:sqlite (@conn.inspect.match(/^(.{10})/)[1]==@db.sqlite.conn_sqlite3.inspect.match(/^(.{10})/)[1]) \ ? true : false diff --git a/lib/sisu/v5/db_select.rb b/lib/sisu/v5/db_select.rb index 06d8c429..3aebe828 100644 --- a/lib/sisu/v5/db_select.rb +++ b/lib/sisu/v5/db_select.rb @@ -63,7 +63,7 @@ =end module SiSU_DbSelect class Case - def initialize(opt,conn='',sql_type='pg') + def initialize(opt,conn='',sql_type=:pg) @opt,@conn,@sql_type=opt,conn,sql_type @db=SiSU_Env::InfoDb.new @file_maint=sql_maintenance_file @@ -78,13 +78,13 @@ module SiSU_DbSelect end end def db_exist? - if @sql_type=='sqlite' \ + if @sql_type==:sqlite \ and (not (FileTest.file?(@db.sqlite.db)) or FileTest.zero?(@db.sqlite.db)) puts %{no connection with #{@sql_type} database established, createdb "#{@db.sqlite.db}"?} exit end if @conn.is_a?(NilClass) - db=@sql_type=='sqlite' \ + db=@sql_type==:sqlite \ ? @db.sqlite.db : @db.psql.db puts %{no connection with #{@sql_type} database established, createdb "#{db}"?} @@ -95,7 +95,7 @@ module SiSU_DbSelect file=if @opt.inspect =~/M/ if @opt.fns and not @opt.fns.empty? @env=SiSU_Env::InfoEnv.new(@opt.fns) if @opt.fns - puts "\n#{@env.processing_path.sqlite}/#{@opt.fns}.sql" if @sql_type =~/sqlite/ and @opt.act[:maintenance][:set]==:on + puts "\n#{@env.processing_path.sqlite}/#{@opt.fns}.sql" if @sql_type ==:sqlite and @opt.act[:maintenance][:set]==:on @db=SiSU_Env::InfoDb.new @job="sqlite3 #{@db.sqlite.db} < #{@env.processing_path.sqlite}/#{@opt.fns}.sql" File.new("#{@env.processing_path.sqlite}/#{@opt.fns}.sql",'w+') @@ -173,8 +173,8 @@ module SiSU_DbSelect db_exist? @sdb_import.marshal_load tell=case @sql_type - when /sqlite/ then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"sqlite3 #{@db.sqlite.db} database?") - when /pg/ then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"pgaccess or psql #{@db.psql.db} database?") + when :sqlite then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"sqlite3 #{@db.sqlite.db} database?") + when :pg then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"pgaccess or psql #{@db.psql.db} database?") else '???' end tell.puts_grey if @opt.act[:verbose][:set]==:on @@ -183,8 +183,8 @@ module SiSU_DbSelect @sdb_remove_doc.remove @sdb_import.marshal_load tell=case @sql_type - when /sqlite/ then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"sqlite3 #{@db.sqlite.db} database?") - when /pg/ then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"pgaccess or psql #{@db.psql.db} database?") + when :sqlite then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"sqlite3 #{@db.sqlite.db} database?") + when :pg then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"pgaccess or psql #{@db.psql.db} database?") else '???' end tell.puts_grey if @opt.act[:verbose][:set]==:on diff --git a/lib/sisu/v5/dbi.rb b/lib/sisu/v5/dbi.rb index 1ab9bc9c..737f02fd 100644 --- a/lib/sisu/v5/dbi.rb +++ b/lib/sisu/v5/dbi.rb @@ -79,22 +79,22 @@ module SiSU_DBI @sql_type=if @opt.cmd=~/D/ \ or @opt.mod.inspect =~/--pg(?:sql)?/ maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on - 'pg' + :pg elsif @opt.cmd =~/d/ \ and @opt.mod.inspect =~/--(?:db[=-])?pg(?:sql)?/ maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on - 'pg' + :pg elsif @opt.cmd=~/d/ \ or @opt.mod.inspect =~/--(?:sq)?lite/ maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on - 'sqlite' + :sqlite elsif @opt.cmd =~/d/ \ and @opt.mod.inspect =~/--(?:db[=-])?(?:sq)?lite/ maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on - 'sqlite' + :sqlite else maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on - 'sqlite' + :sqlite end end end @@ -107,7 +107,7 @@ module SiSU_DBI begin @conn=@db.psql.conn_dbi rescue - if @opt.mod.inspect=~/--(createall|create)/ + if @opt.mod.inspect=~/--(?:createall|create)/ cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX puts <<-WOK manually create the database: "#{cX.green}#{@db.db}#{cX.off}" if it does not yet exist @@ -130,8 +130,8 @@ manually create the database: "#{cX.green}#{@db.db}#{cX.off}" if it does not yet end def connect case @sql_type - when /pg/ then read_psql - when /sqlite/ then read_sqlite + when :pg then read_psql #read_pg + when :sqlite then read_sqlite end SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"DBI (#{@sql_type}) #{@opt.mod}",@opt.fno).dbi_title unless @opt.act[:quiet][:set]==:on begin diff --git a/lib/sisu/v5/dbi_discrete.rb b/lib/sisu/v5/dbi_discrete.rb index cd8c7de1..b0468e8d 100644 --- a/lib/sisu/v5/dbi_discrete.rb +++ b/lib/sisu/v5/dbi_discrete.rb @@ -83,7 +83,7 @@ module SiSU_DBI_Discrete #% database building @md=@particulars.md if @opt.cmd =~/[d]/ \ or @opt.mod.inspect =~/--((?:sq)?lite)/ - @sql_type='sqlite' + @sql_type=:sqlite maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on end @output_path=@md.file.output_path.sqlite_discrete.dir @@ -122,8 +122,8 @@ module SiSU_DBI_Discrete #% database building def create_and_populate db=SiSU_Env::DbOp.new(@md) conn=db.sqlite_discrete.conn_sqlite3 - sdb=SiSU_DbDBI::Create.new(@opt,conn,@file,'sqlite') - sdb_index=SiSU_DbDBI::Index.new(@opt,conn,@file,'sqlite') + sdb=SiSU_DbDBI::Create.new(@opt,conn,@file,:sqlite) + sdb_index=SiSU_DbDBI::Index.new(@opt,conn,@file,:sqlite) sdb.output_dir? begin SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'SQLite',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").green_title_hi unless @opt.act[:quiet][:set]==:on @@ -136,7 +136,7 @@ module SiSU_DBI_Discrete #% database building sdb.create_table.urls sdb_index.create_indexes db_exist?(db,conn) - sdb_import=SiSU_DbDBI::Import.new(@opt,conn,@file_maint,'sqlite') + sdb_import=SiSU_DbDBI::Import.new(@opt,conn,@file_maint,:sqlite) sdb_import.marshal_load tell=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"sqlite3 #{db.sqlite.db} database?") tell.puts_grey if @opt.act[:verbose][:set]==:on @@ -174,7 +174,7 @@ module SiSU_DBI_Discrete #% database building file=if @opt.inspect =~/M/ if @opt.fns and not @opt.fns.empty? @env=SiSU_Env::InfoEnv.new(@opt.fns) if @opt.fns - puts "\n#{@env.processing_path.sqlite}/#{@opt.fns}.sql" if @sql_type =~/sqlite/ and @opt.act[:maintenance][:set]==:on + puts "\n#{@env.processing_path.sqlite}/#{@opt.fns}.sql" if @sql_type ==:sqlite and @opt.act[:maintenance][:set]==:on @db=SiSU_Env::InfoDb.new @job="sqlite3 #{@db.sqlite.db} < #{@env.processing_path.sqlite}/#{@opt.fns}.sql" File.new("#{@env.processing_path.sqlite}/#{@opt.fns}.sql",'w+') diff --git a/lib/sisu/v6/db_create.rb b/lib/sisu/v6/db_create.rb index 661059a1..105f089c 100644 --- a/lib/sisu/v6/db_create.rb +++ b/lib/sisu/v6/db_create.rb @@ -66,10 +66,10 @@ module SiSU_DbCreate class Create < SiSU_DbColumns::Columns require_relative 'sysenv' # sysenv.rb @@dl=nil - def initialize(opt,conn,file,sql_type='pg') + def initialize(opt,conn,file,sql_type=:pg) @opt,@conn,@file,@sql_type=opt,conn,file,sql_type @cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX - @comment=(@sql_type=='pg') \ + @comment=(@sql_type==:pg) \ ? (SiSU_DbCreate::Comment.new(@conn,@sql_type)) : nil @@dl ||=SiSU_Env::InfoEnv.new.digest.length @@ -84,7 +84,7 @@ module SiSU_DbCreate end def create_db @env=SiSU_Env::InfoEnv.new(@opt.fns) - tell=(@sql_type=='sqlite') \ + tell=(@sql_type==:sqlite) \ ? SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Create SQLite db tables in:',%{"#{@file}"}) : SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Create pgSQL db tables in:',%{"#{Db[:name_prefix]}#{@env.path.stub_pwd}"}) if (@opt.act[:verbose][:set]==:on \ @@ -92,7 +92,7 @@ module SiSU_DbCreate || @opt.act[:maintenance][:set]==:on) tell.dark_grey_title_hi end - SiSU_Env::SystemCall.new.create_pg_db(@env.path.stub_pwd) if @sql_type=='pg' #watch use of path.stub_pwd instead of stub + SiSU_Env::SystemCall.new.create_pg_db(@env.path.stub_pwd) if @sql_type==:pg #watch use of path.stub_pwd instead of stub end def output_dir? dir=SiSU_Env::InfoEnv.new('') @@ -105,7 +105,7 @@ module SiSU_DbCreate if (@opt.act[:verbose_plus][:set]==:on \ or @opt.act[:maintenance][:set]==:on) print %{ - currently using sisu dbi module + currently using sisu_dbi module to be populated from document files create tables metadata_and_text data import through ruby transfer @@ -343,7 +343,7 @@ module SiSU_DbCreate if (@opt.act[:verbose_plus][:set]==:on \ or @opt.act[:maintenance][:set]==:on) print %{ - currently using sisu dbi module + currently using sisu_dbi module to be populated from doc_objects files create tables urls data import through ruby transfer @@ -377,9 +377,9 @@ module SiSU_DbCreate end end class Comment < SiSU_DbColumns::Columns - def initialize(conn,sql_type='pg') + def initialize(conn,sql_type=:pg) @conn=conn - if sql_type =~ /pg/; psql + if sql_type == :pg then psql end end def psql diff --git a/lib/sisu/v6/db_drop.rb b/lib/sisu/v6/db_drop.rb index 94fc5e99..9ab73186 100644 --- a/lib/sisu/v6/db_drop.rb +++ b/lib/sisu/v6/db_drop.rb @@ -64,11 +64,11 @@ module SiSU_DbDrop class Drop require_relative 'response' # response.rb - def initialize(opt,conn,db_info,sql_type='') + def initialize(opt,conn,db_info,sql_type) @opt,@conn,@db_info,@sql_type=opt,conn,db_info,sql_type @ans=SiSU_Response::Response.new case @sql_type - when /sqlite/ + when :sqlite cascade='' else cascade='CASCADE' @@ -87,7 +87,7 @@ module SiSU_DbDrop begin msg_sqlite="as not all disk space is recovered after dropping the database << #{@db_info.sqlite.db} >>, you may be better off deleting the file, and recreating it as necessary" case @sql_type - when /sqlite/ + when :sqlite puts msg_sqlite ans=@ans.response?('remove sql database?') if ans \ @@ -129,7 +129,7 @@ module SiSU_DbDrop end rescue case @sql_type - when /sqlite/ + when :sqlite ans=@ans.response?('remove sql database?') if ans and File.exist?(@db_info.sqlite.db); File.unlink(@db_info.sqlite.db) end diff --git a/lib/sisu/v6/db_import.rb b/lib/sisu/v6/db_import.rb index e1342b1d..dd9dfe84 100644 --- a/lib/sisu/v6/db_import.rb +++ b/lib/sisu/v6/db_import.rb @@ -72,7 +72,7 @@ module SiSU_DbImport @@dl=nil @@hname=nil attr_accessor :tp - def initialize(opt,conn,file_maint,sql_type='pg') + def initialize(opt,conn,file_maint,sql_type=:pg) @opt,@conn,@file_maint,@sql_type=opt,conn,file_maint,sql_type @cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX @env=SiSU_Env::InfoEnv.new(@opt.fns) @@ -90,7 +90,7 @@ module SiSU_DbImport @col[:ocn]='' @counter={} @db=SiSU_Env::InfoDb.new - if @sql_type=='sqlite' + if @sql_type==:sqlite @driver_sqlite3=(@conn.inspect.match(/^(.{10})/)[1]==@db.sqlite.conn_sqlite3.inspect.match(/^(.{10})/)[1]) \ ? true : false @@ -136,7 +136,7 @@ module SiSU_DbImport WHERE metadata_and_text.src_filename = '#{@md.fns}' AND metadata_and_text.language_document_char = '#{@opt.lng}' ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns - file_exist=@sql_type=~/sqlite/ \ + file_exist=@sql_type==:sqlite \ ? @conn.get_first_value(select_first_match) : @conn.select_one(select_first_match) if not file_exist @@ -152,7 +152,7 @@ module SiSU_DbImport puts @conn.driver if defined? @conn.driver end begin #% sql - if @sql_type=~/sqlite/ + if @sql_type==:sqlite @conn.transaction do |conn| t_d.each do |sql| conn.execute(sql) @@ -497,7 +497,7 @@ module SiSU_DbImport @env=SiSU_Env::InfoEnv.new(@md.fns) @base_url="#{@env.url.root}/#{@md.fnb}/#{@hname}.html" txt=endnotes(txt).extract_any - if @sql_type=~/pg/ \ + if @sql_type==:pg \ and txt.size > (SiSU_DbColumns::ColumnSize.new.document_clean - 1) # examine pg build & remove limitation puts "\n\nTOO LARGE (TXT - see error log)\n\n" open("#{Dir.pwd}/pg_documents_error_log",'a') do |error| diff --git a/lib/sisu/v6/db_indexes.rb b/lib/sisu/v6/db_indexes.rb index f293012f..6550fe51 100644 --- a/lib/sisu/v6/db_indexes.rb +++ b/lib/sisu/v6/db_indexes.rb @@ -62,8 +62,8 @@ =end module SiSU_DbIndex - class Index # create documents Indexes def initialize(opt,conn='',sql_type='') - def initialize(opt,conn,file,sql_type='') + class Index # create documents Indexes def initialize(opt,conn='',sql_type) + def initialize(opt,conn,file,sql_type) @opt,@conn,@file,@sql_type=opt,conn,file,sql_type end def create_indexes # check added from pg not tested diff --git a/lib/sisu/v6/db_remove.rb b/lib/sisu/v6/db_remove.rb index 650c84a2..5a392649 100644 --- a/lib/sisu/v6/db_remove.rb +++ b/lib/sisu/v6/db_remove.rb @@ -70,7 +70,7 @@ module SiSU_DbRemove @db=SiSU_Env::InfoDb.new end def remove - driver_sqlite3=if @sql_type=='sqlite' + driver_sqlite3=if @sql_type==:sqlite (@conn.inspect.match(/^(.{10})/)[1]==@db.sqlite.conn_sqlite3.inspect.match(/^(.{10})/)[1]) \ ? true : false diff --git a/lib/sisu/v6/db_select.rb b/lib/sisu/v6/db_select.rb index 56b424d7..9a2c2eb0 100644 --- a/lib/sisu/v6/db_select.rb +++ b/lib/sisu/v6/db_select.rb @@ -63,7 +63,7 @@ =end module SiSU_DbSelect class Case - def initialize(opt,conn='',sql_type='pg') + def initialize(opt,conn='',sql_type=:pg) @opt,@conn,@sql_type=opt,conn,sql_type @db=SiSU_Env::InfoDb.new @file_maint=sql_maintenance_file @@ -78,13 +78,13 @@ module SiSU_DbSelect end end def db_exist? - if @sql_type=='sqlite' \ + if @sql_type==:sqlite \ and (not (FileTest.file?(@db.sqlite.db)) or FileTest.zero?(@db.sqlite.db)) puts %{no connection with #{@sql_type} database established, createdb "#{@db.sqlite.db}"?} exit end if @conn.is_a?(NilClass) - db=@sql_type=='sqlite' \ + db=@sql_type==:sqlite \ ? @db.sqlite.db : @db.psql.db puts %{no connection with #{@sql_type} database established, createdb "#{db}"?} @@ -95,7 +95,7 @@ module SiSU_DbSelect file=if @opt.inspect =~/M/ if @opt.fns and not @opt.fns.empty? @env=SiSU_Env::InfoEnv.new(@opt.fns) if @opt.fns - puts "\n#{@env.processing_path.sqlite}/#{@opt.fns}.sql" if @sql_type =~/sqlite/ and @opt.act[:maintenance][:set]==:on + puts "\n#{@env.processing_path.sqlite}/#{@opt.fns}.sql" if @sql_type ==:sqlite and @opt.act[:maintenance][:set]==:on @db=SiSU_Env::InfoDb.new @job="sqlite3 #{@db.sqlite.db} < #{@env.processing_path.sqlite}/#{@opt.fns}.sql" File.new("#{@env.processing_path.sqlite}/#{@opt.fns}.sql",'w+') @@ -173,8 +173,8 @@ module SiSU_DbSelect db_exist? @sdb_import.marshal_load tell=case @sql_type - when /sqlite/ then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"sqlite3 #{@db.sqlite.db} database?") - when /pg/ then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"pgaccess or psql #{@db.psql.db} database?") + when :sqlite then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"sqlite3 #{@db.sqlite.db} database?") + when :pg then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"pgaccess or psql #{@db.psql.db} database?") else '???' end tell.puts_grey if @opt.act[:verbose][:set]==:on @@ -183,8 +183,8 @@ module SiSU_DbSelect @sdb_remove_doc.remove @sdb_import.marshal_load tell=case @sql_type - when /sqlite/ then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"sqlite3 #{@db.sqlite.db} database?") - when /pg/ then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"pgaccess or psql #{@db.psql.db} database?") + when :sqlite then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"sqlite3 #{@db.sqlite.db} database?") + when :pg then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"pgaccess or psql #{@db.psql.db} database?") else '???' end tell.puts_grey if @opt.act[:verbose][:set]==:on diff --git a/lib/sisu/v6/dbi.rb b/lib/sisu/v6/dbi.rb index acb75e0f..5bd98b8a 100644 --- a/lib/sisu/v6/dbi.rb +++ b/lib/sisu/v6/dbi.rb @@ -79,22 +79,22 @@ module SiSU_DBI @sql_type=if @opt.cmd=~/D/ \ or @opt.mod.inspect =~/--pg(?:sql)?/ maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on - 'pg' + :pg elsif @opt.cmd =~/d/ \ and @opt.mod.inspect =~/--(?:db[=-])?pg(?:sql)?/ maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on - 'pg' + :pg elsif @opt.cmd=~/d/ \ or @opt.mod.inspect =~/--(?:sq)?lite/ maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on - 'sqlite' + :sqlite elsif @opt.cmd =~/d/ \ and @opt.mod.inspect =~/--(?:db[=-])?(?:sq)?lite/ maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on - 'sqlite' + :sqlite else maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on - 'sqlite' + :sqlite end end end @@ -107,7 +107,7 @@ module SiSU_DBI begin @conn=@db.psql.conn_dbi rescue - if @opt.mod.inspect=~/--(createall|create)/ + if @opt.mod.inspect=~/--(?:createall|create)/ cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX puts <<-WOK manually create the database: "#{cX.green}#{@db.db}#{cX.off}" if it does not yet exist @@ -130,8 +130,8 @@ manually create the database: "#{cX.green}#{@db.db}#{cX.off}" if it does not yet end def connect case @sql_type - when /pg/ then read_psql - when /sqlite/ then read_sqlite + when :pg then read_psql #read_pg + when :sqlite then read_sqlite end SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"DBI (#{@sql_type}) #{@opt.mod}",@opt.fno).dbi_title unless @opt.act[:quiet][:set]==:on begin diff --git a/lib/sisu/v6/dbi_discrete.rb b/lib/sisu/v6/dbi_discrete.rb index 0ac84db4..0f534e42 100644 --- a/lib/sisu/v6/dbi_discrete.rb +++ b/lib/sisu/v6/dbi_discrete.rb @@ -77,13 +77,13 @@ module SiSU_DBI_Discrete #% database building end class SQL def initialize(opt) - SiSU_Env::Load.new('dbi',true).prog + SiSU_Env::Load.new('sqlite3',true).prog @opt=opt @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) @md=@particulars.md if @opt.cmd =~/[d]/ \ or @opt.mod.inspect =~/--((?:sq)?lite)/ - @sql_type='sqlite' + @sql_type=:sqlite maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on end @output_path=@md.file.output_path.sqlite_discrete.dir @@ -122,8 +122,8 @@ module SiSU_DBI_Discrete #% database building def create_and_populate db=SiSU_Env::DbOp.new(@md) conn=db.sqlite_discrete.conn_sqlite3 - sdb=SiSU_DbDBI::Create.new(@opt,conn,@file,'sqlite') - sdb_index=SiSU_DbDBI::Index.new(@opt,conn,@file,'sqlite') + sdb=SiSU_DbDBI::Create.new(@opt,conn,@file,:sqlite) + sdb_index=SiSU_DbDBI::Index.new(@opt,conn,@file,:sqlite) sdb.output_dir? begin SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'SQLite',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").green_title_hi unless @opt.act[:quiet][:set]==:on @@ -136,7 +136,7 @@ module SiSU_DBI_Discrete #% database building sdb.create_table.urls sdb_index.create_indexes db_exist?(db,conn) - sdb_import=SiSU_DbDBI::Import.new(@opt,conn,@file_maint,'sqlite') + sdb_import=SiSU_DbDBI::Import.new(@opt,conn,@file_maint,:sqlite) sdb_import.marshal_load tell=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"sqlite3 #{db.sqlite.db} database?") tell.puts_grey if @opt.act[:verbose][:set]==:on @@ -174,7 +174,7 @@ module SiSU_DBI_Discrete #% database building file=if @opt.inspect =~/M/ if @opt.fns and not @opt.fns.empty? @env=SiSU_Env::InfoEnv.new(@opt.fns) if @opt.fns - puts "\n#{@env.processing_path.sqlite}/#{@opt.fns}.sql" if @sql_type =~/sqlite/ and @opt.act[:maintenance][:set]==:on + puts "\n#{@env.processing_path.sqlite}/#{@opt.fns}.sql" if @sql_type ==:sqlite and @opt.act[:maintenance][:set]==:on @db=SiSU_Env::InfoDb.new @job="sqlite3 #{@db.sqlite.db} < #{@env.processing_path.sqlite}/#{@opt.fns}.sql" File.new("#{@env.processing_path.sqlite}/#{@opt.fns}.sql",'w+') -- cgit v1.2.3 From 7bfd567154b9fd468e5df53901c3d8c383cc25f8 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 18 May 2014 08:53:33 -0400 Subject: v5 v6: db, remove ruby-dbi, for: pg ruby-pg, sqlite ruby-sqlite3 (already uses) * ruby-pg require for postgresql * ruby-sqlite3 require for sqlite3 (done previously: already using ruby-sqlite3 rather than ruby-dbi) * ruby-dbi remove calls (in any common files & sisu pg and sisu sqlite3) * separate pg and sqlite db actions --- data/doc/sisu/CHANGELOG_v5 | 3 +++ data/doc/sisu/CHANGELOG_v6 | 3 +++ data/doc/sisu/sisu.org | 23 ++++++++++------------- lib/sisu/v5/db_create.rb | 27 ++++++++++++++++++++------- lib/sisu/v5/db_drop.rb | 30 ++++++++++++++++++++++++------ lib/sisu/v5/db_import.rb | 12 ++++++------ lib/sisu/v5/db_indexes.rb | 16 +++++++++++++++- lib/sisu/v5/db_remove.rb | 16 ++++++++++++---- lib/sisu/v5/dbi_discrete.rb | 2 +- lib/sisu/v6/db_create.rb | 27 ++++++++++++++++++++------- lib/sisu/v6/db_drop.rb | 30 ++++++++++++++++++++++++------ lib/sisu/v6/db_import.rb | 12 ++++++------ lib/sisu/v6/db_indexes.rb | 16 +++++++++++++++- lib/sisu/v6/db_remove.rb | 16 ++++++++++++---- lib/sisu/v6/dbi.rb | 7 +++++-- lib/sisu/v6/sysenv.rb | 21 +++++++++------------ 16 files changed, 185 insertions(+), 76 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 55f6d35c..1e958203 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -40,6 +40,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.3.6.orig.tar.xz * db, * use symbols to identify sql engine + * remove require 'dbi' (ruby-dbi) + * for pg: require 'pg' (use ruby-pg directly) + * for sqlite: require 'sqlite3' (use ruby-sqlite3 directly) [already the case] %% 5.3.5.orig.tar.xz (2014-05-12:19/1) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.3.5 diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index 75e63335..0c533432 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -30,6 +30,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.6.orig.tar.xz * db, * use symbols to identify sql engine + * remove require 'dbi' (ruby-dbi) + * for pg: require 'pg' (use ruby-pg directly) + * for sqlite: require 'sqlite3' (use ruby-sqlite3 directly) [already the case] %% 6.0.5.orig.tar.xz (2014-05-12:19/1) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.5 diff --git a/data/doc/sisu/sisu.org b/data/doc/sisu/sisu.org index d87f8cc5..0e4b0bf6 100644 --- a/data/doc/sisu/sisu.org +++ b/data/doc/sisu/sisu.org @@ -1195,7 +1195,7 @@ http://lists.sisudoc.org/pipermail/sisu/2014-May/000818.html SiSU does not depend on an sql database to be useful and most users do not use the database (population and resulting search) possibilities. -***** TODO [#B] sisu-sqlite +***** DONE [#B] sisu-sqlite 5.3.4 uses ruby-sqlite3 directly. There has been a dependency within debian/control on ruby-dbi for sisu-sqlite, this can safely be removed, without affecting its operation. @@ -1204,25 +1204,22 @@ http://lists.sisudoc.org/pipermail/sisu/2014-May/000818.html >Solution Proposed: remove debian/control dependency on ruby-dbi Solution Implemented: - (pending) + * sisu-sqlite uses 'sqlite3' ruby-sqlite3 (any superflous dbi loading dropped) + * code tests passed (create tables, populate db etc. work fine) + (closes) -***** TODO [#B] sisu-postgresql +***** DONE [#B] sisu-postgresql sisu-postgresql 5.3.4 uses ruby-pg through ruby-dbi. >Solution Proposed: >* attempt now to fix by migrating to use ruby-pg directly > * remove dependency on ruby-dbi in debian/control > * rewrite code within sisu to work directly with ruby-pg - >failing to do this within the autoremoval time: - > * remove dependency on ruby-dbi in debian/control - > * replace ruby-dbi with ruby-pg - > this breaks the postgresql functionality of sisu - > * file a serious bug against sisu-postgresql (which is contained - > within sisu package) and take more time to repair. and/or * - > request an extension of time on auto-removal Solution Implemented: - (pending) + * sisu-postgresql uses 'pg' ruby-pg (ruby-dbi dropped) + * code tests passed (create tables, populate db etc. work fine) + (closes) ***** TODO [#B] sample cgi search forms there is a sample cgi search form facility within sisu that uses @@ -1249,8 +1246,8 @@ http://lists.sisudoc.org/pipermail/sisu/2014-May/000818.html debian/control, remove dependency on ruby-dbi, contained in sisu-postgresql and sisu-sqlite Current status - * sisu-sqlite works fine, depends on ruby-sqlite3 - * sisu-postgresql is broken till fixed to work with ruby-pg (or ruby-dbi fixed) + * sisu-sqlite ok, uses 'sqlite3' (superflous dbi loading dropped) + * sisu-postgresql ok, uses 'pg' (dbi dropped) * sample cgi search froms (cgi database query forms) are broken till they work off ruby-pg & ruby-sqlite3 respectively instead of ruby-dbi diff --git a/lib/sisu/v5/db_create.rb b/lib/sisu/v5/db_create.rb index d558aacd..451a0a34 100644 --- a/lib/sisu/v5/db_create.rb +++ b/lib/sisu/v5/db_create.rb @@ -101,6 +101,19 @@ module SiSU_DbCreate end end def create_table + def conn_exec(sql) + if @sql_type==:pg + conn_exec_pg(sql) + elsif @sql_type==:sqlite + conn_exec_sqlite(sql) + end + end + def conn_exec_pg(sql) + @conn.exec_params(sql) + end + def conn_exec_sqlite(sql) + @conn.execute(sql) + end def metadata_and_text if (@opt.act[:verbose_plus][:set]==:on \ or @opt.act[:maintenance][:set]==:on) @@ -211,7 +224,7 @@ module SiSU_DbCreate /* writing_focus_nationality VARCHAR(100) NULL, */ ); } - @conn.execute(create_metadata_and_text) + conn_exec(create_metadata_and_text) @comment.psql.metadata_and_text if @comment end def doc_objects # create doc_objects base @@ -258,7 +271,7 @@ module SiSU_DbCreate types CHAR(1) NULL ); } - @conn.execute(create_doc_objects) + conn_exec(create_doc_objects) @comment.psql.doc_objects if @comment end def endnotes @@ -284,7 +297,7 @@ module SiSU_DbCreate metadata_tid BIGINT REFERENCES metadata_and_text ); } - @conn.execute(create_endnotes) + conn_exec(create_endnotes) @comment.psql.endnotes if @comment end def endnotes_asterisk @@ -310,7 +323,7 @@ module SiSU_DbCreate metadata_tid BIGINT REFERENCES metadata_and_text ); } - @conn.execute(create_endnotes_asterisk) + conn_exec(create_endnotes_asterisk) @comment.psql.endnotes_asterisk if @comment end def endnotes_plus @@ -336,7 +349,7 @@ module SiSU_DbCreate metadata_tid BIGINT REFERENCES metadata_and_text ); } - @conn.execute(create_endnotes_plus) + conn_exec(create_endnotes_plus) @comment.psql.endnotes_plus if @comment end def urls # create doc_objects file links mapping @@ -370,7 +383,7 @@ module SiSU_DbCreate sisupod varchar(512) ); } - @conn.execute(create_urls) + conn_exec(create_urls) @comment.psql.urls if @comment end self @@ -386,7 +399,7 @@ module SiSU_DbCreate def conn_execute_array(sql_arr) @conn.transaction do |conn| sql_arr.each do |sql| - conn.execute(sql) + conn.exec_params(sql) end end end diff --git a/lib/sisu/v5/db_drop.rb b/lib/sisu/v5/db_drop.rb index 1a76eff9..75e98faa 100644 --- a/lib/sisu/v5/db_drop.rb +++ b/lib/sisu/v5/db_drop.rb @@ -118,14 +118,24 @@ module SiSU_DbDrop else @conn.transaction @drop_table.each do |d| - @conn.execute(d) - end + begin + @conn.exec_params(d) + rescue + next + end + end @conn.commit end - else + when :pg + @conn.transaction @drop_table.each do |d| - @conn.execute(d) + begin + @conn.exec_params(d) + rescue + next + end end + @conn.commit end rescue case @sql_type @@ -135,7 +145,11 @@ module SiSU_DbDrop end else @drop_table.each do |d| - @conn.execute(d) + begin + @conn.exec_params(d) + rescue + next + end end end ensure @@ -145,7 +159,11 @@ module SiSU_DbDrop def conn_execute_array(sql_arr) @conn.transaction do |conn| sql_arr.each do |sql| - conn.execute(sql) + begin + conn.exec_params(sql) + rescue + next + end end end end diff --git a/lib/sisu/v5/db_import.rb b/lib/sisu/v5/db_import.rb index 3d0b7f8c..9e88e7ee 100644 --- a/lib/sisu/v5/db_import.rb +++ b/lib/sisu/v5/db_import.rb @@ -109,7 +109,7 @@ module SiSU_DbImport begin @id_n=@driver_sqlite3 \ ? @conn.execute( sql ).join.to_i - : @id_n=@conn.execute( sql ) { |x| x.fetch_all.flatten[0] } + : @id_n=@conn.exec( sql ).getvalue(0,0).to_i @id_n ||=0 rescue puts "#{__FILE__}:#{__LINE__}" if @opt.act[:maintenance][:set]==:on @@ -138,7 +138,7 @@ module SiSU_DbImport ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns file_exist=@sql_type==:sqlite \ ? @conn.get_first_value(select_first_match) - : @conn.select_one(select_first_match) + : @conn.exec(select_first_match).field_values("tid")[0] if not file_exist t_d=[] # transaction_data t_d << db_import_metadata @@ -166,11 +166,11 @@ module SiSU_DbImport #@conn.execute("COMMIT") else #'do' works for postgresql - @conn.do("BEGIN") + @conn.exec("BEGIN") t_d.each do |sql| - @conn.do(sql) + @conn.exec(sql) end - @conn.do("COMMIT") + @conn.exec("COMMIT") end rescue DBI::DatabaseError => e STDERR.puts "Error code: #{e.err}" @@ -206,7 +206,7 @@ module SiSU_DbImport else if file_exist @db=SiSU_Env::InfoDb.new - puts "\n#{@cX.grey}file #{@cX.off} #{@cX.blue}#{@opt.fns}#{@cX.off} in language code #{cX.blue}#{@opt.lng}#{cX.off} #{@cX.grey}already exists in database#{@cX.off} #{@cX.blue}#{@db.psql.db}#{@cX.off} #{@cX.brown}update instead?#{@cX.off}" + puts "\nfile #{@opt.fns} in language code #{@opt.lng} already exists in database #{@db.psql.db} update instead?" end end end diff --git a/lib/sisu/v5/db_indexes.rb b/lib/sisu/v5/db_indexes.rb index 8a269a4c..7e1164ab 100644 --- a/lib/sisu/v5/db_indexes.rb +++ b/lib/sisu/v5/db_indexes.rb @@ -67,10 +67,24 @@ module SiSU_DbIndex @opt,@conn,@file,@sql_type=opt,conn,file,sql_type end def create_indexes # check added from pg not tested + def conn_execute_sql_pg(conn,sql) + conn.exec_params(sql) + end + def conn_execute_sql_sqlite(conn,sql) + conn.execute(sql) + end + def conn_execute_sql(conn,sql) + if @sql_type==:pg + conn_execute_sql_pg(conn,sql) + elsif @sql_type==:sqlite + conn_execute_sql_sqlite(conn,sql) + else + end + end def conn_execute_array(sql_arr) @conn.transaction do |conn| sql_arr.each do |sql| - conn.execute(sql) + conn_execute_sql(conn,sql) end end end diff --git a/lib/sisu/v5/db_remove.rb b/lib/sisu/v5/db_remove.rb index 9a7ea8ea..2dea65f2 100644 --- a/lib/sisu/v5/db_remove.rb +++ b/lib/sisu/v5/db_remove.rb @@ -90,8 +90,8 @@ module SiSU_DbRemove WHERE metadata_and_text.src_filename = '#{@md.fns}' AND metadata_and_text.language_document_char = '#{@opt.lng}' ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns - x=@conn.select_one(remove_selected) - x ? (x.join.to_i) : nil + x=@conn.exec(remove_selected) + x.field_values("tid")[0] end if del_id sql_entry=[ @@ -105,12 +105,20 @@ module SiSU_DbRemove if driver_sqlite3 @conn.transaction sql_entry.each do |s| - @conn.execute(s) + begin + @conn.execute(s) + rescue + next + end end @conn.commit if driver_sqlite3 else sql_entry.each do |s| - @conn.execute(s) + begin + @conn.exec_params(s) + rescue + next + end end end if @opt.act[:maintenance][:set]==:on diff --git a/lib/sisu/v5/dbi_discrete.rb b/lib/sisu/v5/dbi_discrete.rb index b0468e8d..0b42c50e 100644 --- a/lib/sisu/v5/dbi_discrete.rb +++ b/lib/sisu/v5/dbi_discrete.rb @@ -77,7 +77,7 @@ module SiSU_DBI_Discrete #% database building end class SQL def initialize(opt) - SiSU_Env::Load.new('dbi',true).prog + SiSU_Env::Load.new('sqlite3',true).prog @opt=opt @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) @md=@particulars.md diff --git a/lib/sisu/v6/db_create.rb b/lib/sisu/v6/db_create.rb index 105f089c..01fc1935 100644 --- a/lib/sisu/v6/db_create.rb +++ b/lib/sisu/v6/db_create.rb @@ -101,6 +101,19 @@ module SiSU_DbCreate end end def create_table + def conn_exec(sql) + if @sql_type==:pg + conn_exec_pg(sql) + elsif @sql_type==:sqlite + conn_exec_sqlite(sql) + end + end + def conn_exec_pg(sql) + @conn.exec_params(sql) + end + def conn_exec_sqlite(sql) + @conn.execute(sql) + end def metadata_and_text if (@opt.act[:verbose_plus][:set]==:on \ or @opt.act[:maintenance][:set]==:on) @@ -211,7 +224,7 @@ module SiSU_DbCreate /* writing_focus_nationality VARCHAR(100) NULL, */ ); } - @conn.execute(create_metadata_and_text) + conn_exec(create_metadata_and_text) @comment.psql.metadata_and_text if @comment end def doc_objects # create doc_objects base @@ -258,7 +271,7 @@ module SiSU_DbCreate types CHAR(1) NULL ); } - @conn.execute(create_doc_objects) + conn_exec(create_doc_objects) @comment.psql.doc_objects if @comment end def endnotes @@ -284,7 +297,7 @@ module SiSU_DbCreate metadata_tid BIGINT REFERENCES metadata_and_text ); } - @conn.execute(create_endnotes) + conn_exec(create_endnotes) @comment.psql.endnotes if @comment end def endnotes_asterisk @@ -310,7 +323,7 @@ module SiSU_DbCreate metadata_tid BIGINT REFERENCES metadata_and_text ); } - @conn.execute(create_endnotes_asterisk) + conn_exec(create_endnotes_asterisk) @comment.psql.endnotes_asterisk if @comment end def endnotes_plus @@ -336,7 +349,7 @@ module SiSU_DbCreate metadata_tid BIGINT REFERENCES metadata_and_text ); } - @conn.execute(create_endnotes_plus) + conn_exec(create_endnotes_plus) @comment.psql.endnotes_plus if @comment end def urls # create doc_objects file links mapping @@ -370,7 +383,7 @@ module SiSU_DbCreate sisupod varchar(512) ); } - @conn.execute(create_urls) + conn_exec(create_urls) @comment.psql.urls if @comment end self @@ -386,7 +399,7 @@ module SiSU_DbCreate def conn_execute_array(sql_arr) @conn.transaction do |conn| sql_arr.each do |sql| - conn.execute(sql) + conn.exec_params(sql) end end end diff --git a/lib/sisu/v6/db_drop.rb b/lib/sisu/v6/db_drop.rb index 9ab73186..926da47f 100644 --- a/lib/sisu/v6/db_drop.rb +++ b/lib/sisu/v6/db_drop.rb @@ -118,14 +118,24 @@ module SiSU_DbDrop else @conn.transaction @drop_table.each do |d| - @conn.execute(d) - end + begin + @conn.exec_params(d) + rescue + next + end + end @conn.commit end - else + when :pg + @conn.transaction @drop_table.each do |d| - @conn.execute(d) + begin + @conn.exec_params(d) + rescue + next + end end + @conn.commit end rescue case @sql_type @@ -135,7 +145,11 @@ module SiSU_DbDrop end else @drop_table.each do |d| - @conn.execute(d) + begin + @conn.exec_params(d) + rescue + next + end end end ensure @@ -145,7 +159,11 @@ module SiSU_DbDrop def conn_execute_array(sql_arr) @conn.transaction do |conn| sql_arr.each do |sql| - conn.execute(sql) + begin + conn.exec_params(sql) + rescue + next + end end end end diff --git a/lib/sisu/v6/db_import.rb b/lib/sisu/v6/db_import.rb index dd9dfe84..35fb631a 100644 --- a/lib/sisu/v6/db_import.rb +++ b/lib/sisu/v6/db_import.rb @@ -109,7 +109,7 @@ module SiSU_DbImport begin @id_n=@driver_sqlite3 \ ? @conn.execute( sql ).join.to_i - : @id_n=@conn.execute( sql ) { |x| x.fetch_all.flatten[0] } + : @id_n=@conn.exec( sql ).getvalue(0,0).to_i @id_n ||=0 rescue puts "#{__FILE__}:#{__LINE__}" if @opt.act[:maintenance][:set]==:on @@ -138,7 +138,7 @@ module SiSU_DbImport ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns file_exist=@sql_type==:sqlite \ ? @conn.get_first_value(select_first_match) - : @conn.select_one(select_first_match) + : @conn.exec(select_first_match).field_values("tid")[0] if not file_exist t_d=[] # transaction_data t_d << db_import_metadata @@ -166,11 +166,11 @@ module SiSU_DbImport #@conn.execute("COMMIT") else #'do' works for postgresql - @conn.do("BEGIN") + @conn.exec("BEGIN") t_d.each do |sql| - @conn.do(sql) + @conn.exec(sql) end - @conn.do("COMMIT") + @conn.exec("COMMIT") end rescue DBI::DatabaseError => e STDERR.puts "Error code: #{e.err}" @@ -206,7 +206,7 @@ module SiSU_DbImport else if file_exist @db=SiSU_Env::InfoDb.new - puts "\n#{@cX.grey}file #{@cX.off} #{@cX.blue}#{@opt.fns}#{@cX.off} in language code #{cX.blue}#{@opt.lng}#{cX.off} #{@cX.grey}already exists in database#{@cX.off} #{@cX.blue}#{@db.psql.db}#{@cX.off} #{@cX.brown}update instead?#{@cX.off}" + puts "\nfile #{@opt.fns} in language code #{@opt.lng} already exists in database #{@db.psql.db} update instead?" end end end diff --git a/lib/sisu/v6/db_indexes.rb b/lib/sisu/v6/db_indexes.rb index 6550fe51..7df20889 100644 --- a/lib/sisu/v6/db_indexes.rb +++ b/lib/sisu/v6/db_indexes.rb @@ -67,10 +67,24 @@ module SiSU_DbIndex @opt,@conn,@file,@sql_type=opt,conn,file,sql_type end def create_indexes # check added from pg not tested + def conn_execute_sql_pg(conn,sql) + conn.exec_params(sql) + end + def conn_execute_sql_sqlite(conn,sql) + conn.execute(sql) + end + def conn_execute_sql(conn,sql) + if @sql_type==:pg + conn_execute_sql_pg(conn,sql) + elsif @sql_type==:sqlite + conn_execute_sql_sqlite(conn,sql) + else + end + end def conn_execute_array(sql_arr) @conn.transaction do |conn| sql_arr.each do |sql| - conn.execute(sql) + conn_execute_sql(conn,sql) end end end diff --git a/lib/sisu/v6/db_remove.rb b/lib/sisu/v6/db_remove.rb index 5a392649..b1628030 100644 --- a/lib/sisu/v6/db_remove.rb +++ b/lib/sisu/v6/db_remove.rb @@ -90,8 +90,8 @@ module SiSU_DbRemove WHERE metadata_and_text.src_filename = '#{@md.fns}' AND metadata_and_text.language_document_char = '#{@opt.lng}' ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns - x=@conn.select_one(remove_selected) - x ? (x.join.to_i) : nil + x=@conn.exec(remove_selected) + x.field_values("tid")[0] end if del_id sql_entry=[ @@ -105,12 +105,20 @@ module SiSU_DbRemove if driver_sqlite3 @conn.transaction sql_entry.each do |s| - @conn.execute(s) + begin + @conn.execute(s) + rescue + next + end end @conn.commit if driver_sqlite3 else sql_entry.each do |s| - @conn.execute(s) + begin + @conn.exec_params(s) + rescue + next + end end end if @opt.act[:maintenance][:set]==:on diff --git a/lib/sisu/v6/dbi.rb b/lib/sisu/v6/dbi.rb index 5bd98b8a..7432f2f3 100644 --- a/lib/sisu/v6/dbi.rb +++ b/lib/sisu/v6/dbi.rb @@ -71,7 +71,6 @@ module SiSU_DBI include SiSU_FormatShared class SQL def initialize(opt) - SiSU_Env::Load.new('dbi',true).prog @opt=opt @db=SiSU_Env::InfoDb.new if @opt.cmd =~/[Dd]/ \ @@ -96,6 +95,9 @@ module SiSU_DBI maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on :sqlite end + if @sql_type==:pg then SiSU_Env::Load.new('pg',true).prog + elsif @sql_type==:sqlite then SiSU_Env::Load.new('sqlite3',true).prog + end end end def maintenance_check(opt,file,line) @@ -105,7 +107,8 @@ module SiSU_DBI end def read_psql begin - @conn=@db.psql.conn_dbi + require 'pg' + @conn=@db.psql.conn_pg rescue if @opt.mod.inspect=~/--(?:createall|create)/ cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX diff --git a/lib/sisu/v6/sysenv.rb b/lib/sisu/v6/sysenv.rb index 8c819d9b..a8879e7a 100644 --- a/lib/sisu/v6/sysenv.rb +++ b/lib/sisu/v6/sysenv.rb @@ -249,7 +249,9 @@ module SiSU_Env $:.each do |reqpath| if FileTest.exist?("#{reqpath}/#{@prog}.rb") load_prog=true + #SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).ok("#{reqpath}/#{@prog}.rb loaded") break + #else SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).warn("#{reqpath}/#{@prog}.rb not found") end end if load_prog \ @@ -4428,6 +4430,9 @@ WOK : '' end def dbi + PG::Connection.open(:dbname => psql.db) + end + def dbi_ (psql.host =~/(?:\S{1,3}\.){3}\S{1,3}|\S+?\.\S+/) \ ? "DBI:Pg:database=#{psql.db};host=#{psql.host};port=#{psql.port}" : "DBI:Pg:database=#{psql.db};port=#{psql.port}" @@ -4435,19 +4440,11 @@ WOK def conn_dbi DBI.connect(psql.dbi,psql.user,psql.db) end - self - end - def mysql - def db - #"#{Db[:name_prefix]}#{@pwd_stub}" - end - def port - '**' + def conn_pg + require 'pg' + PG::Connection.new(dbname: psql.db, port: psql.port) end - def dbi - "dbi:Mysql:database=#{mysql.db};port=#{mysql.port}" - end - self + self end def sqlite def db -- cgit v1.2.3 From bcb074af136731ff36e479090447f21dd13aa218 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 18 May 2014 08:57:10 -0400 Subject: v5 v6: cgi, sample search forms: use ruby-pg & ruby-sqlite3; remove ruby-dbi --- data/doc/sisu/CHANGELOG_v5 | 5 +++++ data/doc/sisu/CHANGELOG_v6 | 5 +++++ data/doc/sisu/sisu.org | 16 +++++++++----- data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi | 19 ++++++++-------- data/sisu/conf/cgi-bin/sisu_search_sqlite.cgi | 32 +++++++++++++-------------- lib/sisu/v5/cgi_pgsql.rb | 22 ++++++++---------- lib/sisu/v5/cgi_sqlite.rb | 12 +++++----- lib/sisu/v5/sysenv.rb | 2 +- lib/sisu/v6/cgi_pgsql.rb | 29 +++++++++--------------- lib/sisu/v6/cgi_sqlite.rb | 12 +++++----- lib/sisu/v6/sysenv.rb | 2 +- 11 files changed, 79 insertions(+), 77 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 1e958203..08796bbe 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -44,6 +44,11 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.3.6.orig.tar.xz * for pg: require 'pg' (use ruby-pg directly) * for sqlite: require 'sqlite3' (use ruby-sqlite3 directly) [already the case] +* cgi, sample search form generator + * remove require 'dbi' (ruby-dbi) + * for pg: require 'pg' (use ruby-pg directly) + * for sqlite: require 'sqlite3' (use ruby-sqlite3 directly) + %% 5.3.5.orig.tar.xz (2014-05-12:19/1) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.3.5 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.3.5-1 diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index 0c533432..b39da757 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -34,6 +34,11 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.6.orig.tar.xz * for pg: require 'pg' (use ruby-pg directly) * for sqlite: require 'sqlite3' (use ruby-sqlite3 directly) [already the case] +* cgi, sample search form generator + * remove require 'dbi' (ruby-dbi) + * for pg: require 'pg' (use ruby-pg directly) + * for sqlite: require 'sqlite3' (use ruby-sqlite3 directly) + %% 6.0.5.orig.tar.xz (2014-05-12:19/1) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_6.0.5 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_6.0.5-1 diff --git a/data/doc/sisu/sisu.org b/data/doc/sisu/sisu.org index 0e4b0bf6..f8817e68 100644 --- a/data/doc/sisu/sisu.org +++ b/data/doc/sisu/sisu.org @@ -1179,7 +1179,7 @@ revisit, *** DBT Outstanding bugs -- sisu caught by removal of ruby-dbi -**** TODO [#B] sisu 5.3.4-1 marked for autoremoval from debian testing on 2014-06-10, for depending on ruby-dbi +**** DONE (pending acceptance) [#B] sisu 5.3.4-1 marked for autoremoval from debian testing on 2014-06-10, for depending on ruby-dbi sisu 5.3.4-1 is marked for autoremoval from testing on 2014-06-10 It (build-)depends on packages with these RC bugs: @@ -1221,7 +1221,7 @@ http://lists.sisudoc.org/pipermail/sisu/2014-May/000818.html * code tests passed (create tables, populate db etc. work fine) (closes) -***** TODO [#B] sample cgi search forms +***** DONE [#B] sample cgi search forms there is a sample cgi search form facility within sisu that uses ruby-dbi to query sqlite3 or pg databases. @@ -1239,7 +1239,12 @@ http://lists.sisudoc.org/pipermail/sisu/2014-May/000818.html > eventually using ruby-sqlite3 and ruby-pg directly). Solution Implemented: - (pending) + * sample cgi search froms (cgi database query forms) fixed :) + * pg sample uses 'pg' (dbi dropped) + generate sample form using: sisu --sample-search-form --db-pg + * sqlite sample uses 'sqlite3' (dbi dropped) + generate sample form using: sisu --sample-search-form --db-sqlite + (closes) ***** NOTES/COMMENTS @@ -1248,8 +1253,9 @@ debian/control, remove dependency on ruby-dbi, contained in sisu-postgresql and Current status * sisu-sqlite ok, uses 'sqlite3' (superflous dbi loading dropped) * sisu-postgresql ok, uses 'pg' (dbi dropped) - * sample cgi search froms (cgi database query forms) are broken till they work - off ruby-pg & ruby-sqlite3 respectively instead of ruby-dbi + * sample cgi search froms (cgi database query forms) ok :) + * pg sample uses 'pg' (dbi dropped) + * sqlite sample uses 'sqlite3' (dbi dropped) *** DBT Outstanding bugs -- Normal bugs; Unclassified (2 bugs) :debian:dbt:normal: diff --git a/data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi b/data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi index 2f6f93e4..704ea154 100644 --- a/data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi +++ b/data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi @@ -60,7 +60,7 @@ begin require 'cgi' require 'fcgi' - require 'dbi' + require 'pg' rescue LoadError puts 'cgi, fcgi or dbi NOT FOUND (LoadError)' end @@ -71,7 +71,7 @@ @output_dir_structure_by='language' @lingual='multi' @port='5432' - @db_name_prefix='SiSUv6a_' + @db_name_prefix='SiSUv6b_' @user='ralph' # check user name for access to pg database: e.g. www-data or 'ralph' @base="http://#{ENV['HTTP_HOST']}#{ENV['PATH_INFO']}#{ENV['SCRIPT_NAME']}" #Common TOP @@ -141,9 +141,9 @@
index @@ -520,10 +520,10 @@ %{#{sql_select_endnotes}} end def contents - @conn.select_all(sql_select_body) + @conn.exec(sql_select_body) end def endnotes - @conn.select_all(sql_select_endnotes) + @conn.exec(sql_select_endnotes) end end def tail @@ -547,7 +547,7 @@

Generated by - SiSU 6.0.3 2014-02-06 (2014w05/4) + SiSU 6.0.6 2014-05-18 (2014w19/7)
SiSU © Ralph Amissah @@ -679,8 +679,7 @@ checked_searched=checked_tip=checked_case=checked_sql='' end selected_db=%{} - dbi="dbi:Pg:database=#{@db};port=#{@port}" - @conn=DBI.connect(dbi,@user) + @conn=PG::Connection.open(dbname: @db, port: @port, user: @user) search_field=cgi['find'] if cgi['find'] # =~/\S+/ @search_for=SearchRequest.new(search_field,q) #.analyze #% search_for #% searches diff --git a/data/sisu/conf/cgi-bin/sisu_search_sqlite.cgi b/data/sisu/conf/cgi-bin/sisu_search_sqlite.cgi index 2bd9c09a..526ac974 100644 --- a/data/sisu/conf/cgi-bin/sisu_search_sqlite.cgi +++ b/data/sisu/conf/cgi-bin/sisu_search_sqlite.cgi @@ -60,9 +60,9 @@ begin require 'cgi' require 'fcgi' - require 'dbi' + require 'sqlite3' rescue LoadError - puts 'cgi, fcgi or dbi NOT FOUND (LoadError)' + puts 'cgi, fcgi or sqlite3 NOT FOUND (LoadError)' end @stub_default='sisu_sqlite' @image_src="http://#{ENV['HTTP_HOST']}/_sisu/image_sys" @@ -70,7 +70,7 @@ @hosturl_files="http://#{ENV['HTTP_HOST']}" @output_dir_structure_by='language' @lingual='multi' - @db_name_prefix='SiSUv6a_' + @db_name_prefix='SiSUv6b_' @base="http://#{ENV['HTTP_HOST']}#{ENV['PATH_INFO']}#{ENV['SCRIPT_NAME']}" #Common TOP @@offset=0 @@ -118,7 +118,7 @@ - +

@@ -139,8 +139,8 @@
index @@ -511,10 +511,10 @@ %{#{sql_select_endnotes}} end def contents - @conn.select_all(sql_select_body) + @conn.execute(sql_select_body) end def endnotes - @conn.select_all(sql_select_endnotes) + @conn.execute(sql_select_endnotes) end end def tail @@ -538,7 +538,7 @@

Generated by - SiSU 6.0.3 2014-02-06 (2014w05/4) + SiSU 6.0.6 2014-05-18 (2014w19/7)
SiSU © Ralph Amissah @@ -670,17 +670,17 @@ checked_searched=checked_tip=checked_case=checked_sql='' end selected_db=case cgi['db'] - when /SiSUv6a_manual/ then '' - when /SiSUv6a_sisu/ then '' + when /SiSUv6b_manual/ then '' + when /SiSUv6b_sisu/ then '' end db_name='sisu_sqlite.db' db_sqlite=case cgi['db'] - when /SiSUv6a_manual/ then "/srv/www/manual/#{db_name}" - when /SiSUv6a_sisu/ then "/srv/www/sisu/#{db_name}" - else '/srv/www/manual/#{db_name}' + when /SiSUv6b_manual/ then "/srv/www/manual/#{db_name}" + when /SiSUv6b_sisu/ then "/srv/www/sisu/#{db_name}" + else '/srv/www/sisu/#{db_name}' end - @dbi="DBI:SQLite3:#{db_sqlite}" #sqlite3 ? - @conn=DBI.connect(@dbi) + @conn=SQLite3::Database.new(db_sqlite) + @conn.results_as_hash=true search_field=cgi['find'] if cgi['find'] # =~/\S+/ @search_for=SearchRequest.new(search_field,q) #.analyze #% search_for #% searches diff --git a/lib/sisu/v5/cgi_pgsql.rb b/lib/sisu/v5/cgi_pgsql.rb index 53c73c8d..6c4385e4 100644 --- a/lib/sisu/v5/cgi_pgsql.rb +++ b/lib/sisu/v5/cgi_pgsql.rb @@ -128,12 +128,9 @@ module SiSU_CGI_PgSQL default database name: #{@cX.green}#{Db[:name_prefix]}#{@name_of[:db]}#{@cX.off} (#{@name_of[:db]}) db user: #{@cX.green}#{@name_of[:user]}#{@cX.off} to modify use: #{@cX.brown}sisu --db-pg --db-user='#{@name_of[:user]}'#{@cX.off} - cgi & db host on: #{@cX.blue}#{@name_of[:host_url_cgi]}#{@cX.off} - to modify use: #{@cX.brown}sisu --db-pg --webserv-search='#{@name_of[:host_url_cgi]}'#{@cX.off} - sisu output on: #{@cX.blue}#{@name_of[:host_url_docs]}#{@cX.off} - to modify use: #{@cX.brown}sisu --db-pg --webserv-output='#{@name_of[:host_url_docs]}'#{@cX.off} - cgi search form link name: #{@cX.green}#{@name_of[:cgi_script]}#{@cX.off} - to modify use: #{@cX.brown}sisu --db-pg --cgi-search-form-name='#{@name_of[:cgi_script]}'#{@cX.off} + to create static cgi & db host use: #{@cX.brown}sisu --db-pg --webserv-search='#{@name_of[:host_url_cgi]}'#{@cX.off} + for static location for sisu output use: #{@cX.brown}sisu --db-pg --webserv-output='#{@name_of[:host_url_docs]}'#{@cX.off} + for static cgi search form link name use: #{@cX.brown}sisu --db-pg --cgi-search-form-name='#{@name_of[:cgi_script]}'#{@cX.off} #{@cX.fuchsia}(settings priority: command line; sisurc.yml; else defaults)#{@cX.off} #{@cX.fuchsia}BASED ON ALREADY EXISTING databases#{@cX.off} (default database name: #{@db.psql.db}) @@ -151,7 +148,7 @@ module SiSU_CGI_PgSQL #{@cX.brown}createdb #{@db.psql.db}#{@cX.off} [for a list of existing databases try 'psql --list']" - now you can use sisu to create the database tables and populate the database with documents + you can use sisu to create the database tables and populate the database with documents sisu --pg --dropall # removes existing postgresql db & tables sisu --pg --createall -v # creates postgresql db & tables @@ -195,9 +192,9 @@ module SiSU_CGI_PgSQL begin require 'cgi' require 'fcgi' - require 'dbi' + require 'pg' rescue LoadError - puts 'cgi, fcgi or dbi NOT FOUND (LoadError)' + puts 'cgi, fcgi or pg NOT FOUND (LoadError)' end @stub_default='#{@name_of[:db]}' @image_src="#{@image_src}" @@ -277,10 +274,10 @@ module SiSU_CGI_PgSQL %{#{sql_select_endnotes}} end def contents - @conn.select_all(sql_select_body) + @conn.exec(sql_select_body) end def endnotes - @conn.select_all(sql_select_endnotes) + @conn.exec(sql_select_endnotes) end end WOK_SQL @@ -292,8 +289,7 @@ module SiSU_CGI_PgSQL end def dbi_connect <<-'WOK_SQL' - dbi="dbi:Pg:database=#{@db};port=#{@port}" - @conn=DBI.connect(dbi,@user) + @conn=PG::Connection.open(dbname: @db, port: @port, user: @user) WOK_SQL end end diff --git a/lib/sisu/v5/cgi_sqlite.rb b/lib/sisu/v5/cgi_sqlite.rb index 4351a64c..2d185f20 100644 --- a/lib/sisu/v5/cgi_sqlite.rb +++ b/lib/sisu/v5/cgi_sqlite.rb @@ -172,9 +172,9 @@ module SiSU_CGI_SQLite begin require 'cgi' require 'fcgi' - require 'dbi' + require 'sqlite3' rescue LoadError - puts 'cgi, fcgi or dbi NOT FOUND (LoadError)' + puts 'cgi, fcgi or sqlite3 NOT FOUND (LoadError)' end @stub_default='sisu_sqlite' @image_src="#{@image_src}" @@ -247,18 +247,18 @@ module SiSU_CGI_SQLite %{#{sql_select_endnotes}} end def contents - @conn.select_all(sql_select_body) + @conn.execute(sql_select_body) end def endnotes - @conn.select_all(sql_select_endnotes) + @conn.execute(sql_select_endnotes) end end WOK_SQL end def dbi_connect <<-'WOK_SQL' - @dbi="DBI:SQLite3:#{db_sqlite}" #sqlite3 ? - @conn=DBI.connect(@dbi) + @conn=SQLite3::Database.new(db_sqlite) + @conn.results_as_hash=true WOK_SQL end end diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index 491ca94f..4b94003c 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -2594,7 +2594,7 @@ WOK else (opt.mod.inspect =~/--db[=-]["']?sqlite/) \ ? "#{Db[:name_prefix_db]}sqlite.cgi" \ - : "#{Db[:name_prefix_db]}pgsql.cgi" + : "#{Db[:name_prefix_db]}pg.cgi" end end def sample_search_form_title(organised_by=:language) diff --git a/lib/sisu/v6/cgi_pgsql.rb b/lib/sisu/v6/cgi_pgsql.rb index a52b62e3..8372bb70 100644 --- a/lib/sisu/v6/cgi_pgsql.rb +++ b/lib/sisu/v6/cgi_pgsql.rb @@ -82,16 +82,15 @@ module SiSU_CGI_PgSQL opt.lingual.to_s else 'multi' end - if defined? @rc['search'] \ + @name_of[:db]=if defined? @rc['search'] \ and defined? @rc['search']['sisu'] \ and defined? @rc['search']['sisu']['action'] \ and @rc['search']['sisu']['action'] =~/https?:\/\/\S+?\.cgi/ \ and defined? @rc['search']['sisu']['db'] \ and @rc['search']['sisu']['db'] =~/\S+/ - @name_of[:db]=@rc['search']['sisu']['db'] + @rc['search']['sisu']['db'] else - @name_of[:db]=@env.path.stub_pwd #'sisu' #breaks if not present - false + @env.path.stub_pwd #'sisu' #breaks if not present end @name_of[:host_url_cgi]=%q{http://#{ENV['HTTP_HOST']}#{ENV['PATH_INFO']}} @name_of[:host_url_docs]=%q{http://#{ENV['HTTP_HOST']}} @@ -128,13 +127,6 @@ module SiSU_CGI_PgSQL default database name: #{@cX.green}#{Db[:name_prefix]}#{@name_of[:db]}#{@cX.off} (#{@name_of[:db]}) db user: #{@cX.green}#{@name_of[:user]}#{@cX.off} to modify use: #{@cX.brown}sisu --db-pg --db-user='#{@name_of[:user]}'#{@cX.off} - cgi & db host on: #{@cX.blue}#{@name_of[:host_url_cgi]}#{@cX.off} - to modify use: #{@cX.brown}sisu --db-pg --webserv-search='#{@name_of[:host_url_cgi]}'#{@cX.off} - sisu output on: #{@cX.blue}#{@name_of[:host_url_docs]}#{@cX.off} - to modify use: #{@cX.brown}sisu --db-pg --webserv-output='#{@name_of[:host_url_docs]}'#{@cX.off} - cgi search form link name: #{@cX.green}#{@name_of[:cgi_script]}#{@cX.off} - to modify use: #{@cX.brown}sisu --db-pg --cgi-search-form-name='#{@name_of[:cgi_script]}'#{@cX.off} - #{@cX.fuchsia}(settings priority: command line; sisurc.yml; else defaults)#{@cX.off} #{@cX.fuchsia}BASED ON ALREADY EXISTING databases#{@cX.off} (default database name: #{@db.psql.db}) NOTE it is first necessary to createdb, @@ -151,12 +143,12 @@ module SiSU_CGI_PgSQL #{@cX.brown}createdb #{@db.psql.db}#{@cX.off} [for a list of existing databases try 'psql --list']" - now you can use sisu to create the database tables and populate the database with documents + you can use sisu to create the database tables and populate the database with documents sisu --pg --dropall # removes existing postgresql db & tables sisu --pg --createall -v # creates postgresql db & tables sisu --pg --update -v *.sst *.ssm # populate the db - sisu --sample-search-form --pg # creates the postgresql search form + sisu --sample-search-form --db-pg # creates the postgresql search form # this should be done after creating the db # to be searched sisu --webrick & # starts ruby webrick web server @@ -195,9 +187,9 @@ module SiSU_CGI_PgSQL begin require 'cgi' require 'fcgi' - require 'dbi' + require 'pg' rescue LoadError - puts 'cgi, fcgi or dbi NOT FOUND (LoadError)' + puts 'cgi, fcgi or pg NOT FOUND (LoadError)' end @stub_default='#{@name_of[:db]}' @image_src="#{@image_src}" @@ -277,10 +269,10 @@ module SiSU_CGI_PgSQL %{#{sql_select_endnotes}} end def contents - @conn.select_all(sql_select_body) + @conn.exec(sql_select_body) end def endnotes - @conn.select_all(sql_select_endnotes) + @conn.exec(sql_select_endnotes) end end WOK_SQL @@ -292,8 +284,7 @@ module SiSU_CGI_PgSQL end def dbi_connect <<-'WOK_SQL' - dbi="dbi:Pg:database=#{@db};port=#{@port}" - @conn=DBI.connect(dbi,@user) + @conn=PG::Connection.open(dbname: @db, port: @port, user: @user) WOK_SQL end end diff --git a/lib/sisu/v6/cgi_sqlite.rb b/lib/sisu/v6/cgi_sqlite.rb index 696b6817..f64c3cf6 100644 --- a/lib/sisu/v6/cgi_sqlite.rb +++ b/lib/sisu/v6/cgi_sqlite.rb @@ -172,9 +172,9 @@ module SiSU_CGI_SQLite begin require 'cgi' require 'fcgi' - require 'dbi' + require 'sqlite3' rescue LoadError - puts 'cgi, fcgi or dbi NOT FOUND (LoadError)' + puts 'cgi, fcgi or sqlite3 NOT FOUND (LoadError)' end @stub_default='sisu_sqlite' @image_src="#{@image_src}" @@ -247,18 +247,18 @@ module SiSU_CGI_SQLite %{#{sql_select_endnotes}} end def contents - @conn.select_all(sql_select_body) + @conn.execute(sql_select_body) end def endnotes - @conn.select_all(sql_select_endnotes) + @conn.execute(sql_select_endnotes) end end WOK_SQL end def dbi_connect <<-'WOK_SQL' - @dbi="DBI:SQLite3:#{db_sqlite}" #sqlite3 ? - @conn=DBI.connect(@dbi) + @conn=SQLite3::Database.new(db_sqlite) + @conn.results_as_hash=true WOK_SQL end end diff --git a/lib/sisu/v6/sysenv.rb b/lib/sisu/v6/sysenv.rb index a8879e7a..2c2a8c10 100644 --- a/lib/sisu/v6/sysenv.rb +++ b/lib/sisu/v6/sysenv.rb @@ -2675,7 +2675,7 @@ WOK else (opt.mod.inspect =~/--db[=-]["']?sqlite/) \ ? "#{Db[:name_prefix_db]}sqlite.cgi" \ - : "#{Db[:name_prefix_db]}pgsql.cgi" + : "#{Db[:name_prefix_db]}pg.cgi" end end def sample_search_form_title(organised_by=:language) -- cgit v1.2.3