From 4c11eebf5ea1ce4abaeb8dc555ec1bf2cb27947e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 14 Jun 2007 10:16:51 +0100 Subject: sisu-0.54.0 (minor additions to syntax, indent range extended) * indent levels (1-9) added [previously two levels] done for plaintext, html, xml, odf, latex/pdf [minor syntax addition (_3 - _9), version number change] * bullet indent levels (1-9) added [previously two levels] done for plaintext, html, odf, latex/pdf [minor syntax addition (_3* - _9*), version number change] * url decoration, open close, default angle brackets * fixes, some line-breaking for plaintext (and text groups for) odf and xml * css, modifications for extended indents in html and xml [sisu -CC (for update)] * vim syntax highlighter updated to take account of extended indent range * rant installer minor changes for future ruby * conversion script in data/sisu/conf/convert/sisu_convert --- CHANGELOG | 35 +- Rantfile | 34 +- conf/sisu/version.yml | 6 +- data/doc/sisu/CHANGELOG | 813 +++++++++++++++--------------- data/sisu/conf/convert/sisu_convert | 395 ++++++++++----- data/sisu/conf/vim/addons/syntax/sisu.vim | 8 +- lib/sisu/v0/css.rb | 141 ++++++ lib/sisu/v0/dal_syntax.rb | 37 +- lib/sisu/v0/db_import.rb | 3 +- lib/sisu/v0/defaults.rb | 21 + lib/sisu/v0/html.rb | 6 +- lib/sisu/v0/html_format.rb | 38 +- lib/sisu/v0/html_scroll.rb | 172 ++----- lib/sisu/v0/html_segments.rb | 15 +- lib/sisu/v0/html_tune.rb | 98 ++-- lib/sisu/v0/odf.rb | 81 +-- lib/sisu/v0/plaintext.rb | 44 +- lib/sisu/v0/shared_html_lite.rb | 68 +++ lib/sisu/v0/shared_xml.rb | 20 +- lib/sisu/v0/texpdf.rb | 3 +- lib/sisu/v0/texpdf_format.rb | 22 +- lib/sisu/v0/xhtml.rb | 26 +- lib/sisu/v0/xml.rb | 22 +- lib/sisu/v0/xml_dom.rb | 26 +- 24 files changed, 1227 insertions(+), 907 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 81193a07..2808c231 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,11 +6,38 @@ Reverse Chronological: %% STABLE MANIFEST +%% sisu_0.54.0.orig.tar.gz (2007-06-14::24/4) +http://www.jus.uio.no/sisu/pkg/src/sisu_0.54.0.orig.tar.gz + sisu_0.54.0.orig.tar.gz + sisu_0.54.0-1.dsc + sisu_0.54.0-1.diff.gz + + * indent levels (1-9) added [previously two levels] done for plaintext, html, + xml, odf, latex/pdf [minor syntax addition (_3 - _9), version number + change] + + * bullet indent levels (1-9) added [previously two levels] done for + plaintext, html, odf, latex/pdf [minor syntax addition (_3* - _9*), version + number change] + + * url decoration, open close, default angle brackets + + * fixes, some line-breaking for plaintext (and text groups for) odf and xml + + * css, modifications for extended indents in html and xml [sisu -CC (for + update)] + + * vim syntax highlighter updated to take account of extended indent range + + * rant installer minor changes for future ruby + + * conversion script in data/sisu/conf/convert/sisu_convert + %% sisu_0.53.0.orig.tar.gz (2007-06-02::22/6) http://www.jus.uio.no/sisu/pkg/src/sisu_0.53.0.orig.tar.gz - sisu_0.53.0.orig.tar.gz - sisu_0.53.0-1.dsc - sisu_0.53.0-1.diff.gz + b8f28c2cade1f95956f5cdaef7af7fbd 1254059 sisu_0.53.0.orig.tar.gz + 2a741d1fbe95f25a06b6d10ee709514a 606 sisu_0.53.0-1.dsc + 65b8d4638cb0df8a8d8bcd33e20482b4 182847 sisu_0.53.0-1.diff.gz * housekeeping, internal program adjustments (i.e. unrelated to output) * lib, moved lib base to v0 branch (major version preceded by a v), [from @@ -23,7 +50,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.53.0.orig.tar.gz * Note: dcc, several hash values change. - * moved to git for scm including git-buildpackage + * moved to git for scm including git-buildpackage (from a combination of mercurial and dars + darcs-buildpackage, [don't ask, it served me quite well though]) diff --git a/Rantfile b/Rantfile index ff64da3f..66567653 100644 --- a/Rantfile +++ b/Rantfile @@ -11,8 +11,8 @@ raise 'Please, use ruby1.8.4 or later.' if RUBY_VERSION < '1.8.4' Rant is a Ruby 'ant' by Stefan Lang For Setup/Installation SiSU uses either: - * Minero Aoki's setup.rb, provided along with SiSU, or - * Rant which may be downloaded and installed from: + * Minero Aoki's setup.rb, provided along with SiSU, or + * Rant which may be downloaded and installed from: http://make.rubyforge.org/ * Name: Rant install/setup file for SiSU - Simple information Structuring Universe, Serialised information Structured Units @@ -110,10 +110,10 @@ def answer?(ask) print ask + " ['yes', 'no' or 'quit']: " resp=File.new('/dev/tty').gets.strip #resp=gets.strip - ans=if resp == 'yes': true - elsif resp == 'no': false - elsif resp =~/^quit|exit$/: exit - else puts "[please type: 'yes', 'no' or 'quit']" + ans=if resp == 'yes'; true + elsif resp == 'no'; false + elsif resp =~/^quit|exit$/; exit + else puts "[please type: 'yes', 'no' or 'quit']" answer?(ask) end end @@ -129,17 +129,17 @@ def get_username gets.strip end def chmod_file(place) - if place =~/\/bin/: File.chmod(0755,place) + if place =~/\/bin/; File.chmod(0755,place) else File.chmod(0644,place) end end def chmod_util(place) - if place =~/\/bin/: chmod(0755,place) - else chmod(0644,place) + if place =~/\/bin/; chmod(0755,place) + else chmod(0644,place) end end #%% using a directory and its mapping -def setup_find_create(dir_get,dir_put) #primary, +def setup_find_create(dir_get,dir_put) #primary, Find.find("#@pwd/#{dir_get}") do |f| stub=f.scan(/#@pwd\/#{dir_get}\/(\S+)/).join place="#{dir_put}/#{stub}" @@ -223,7 +223,7 @@ def rant_system_info host: #@host arch: #{@dir[:arch]} sitearch: #{@dir[:sitearch]} - + Directories for installation bin: #{@dir[:bin]} lib (site-ruby): #{@dir[:lib]}/#{@dir[:proj]}/#{Version} @@ -252,15 +252,15 @@ Commands quick start list #{@proj[:name]} Rant Help: (This Rantfile uses the same directory structure as setup.rb) rant -T # a task list, (generated by Rant) for more complete and up to date help rant system # system info used - + Quick start install and remove project #{@proj[:name]} as root: rant # install #{@proj[:name]} - + rant setup # install #{@proj[:name]} (without additonal configuration and generating of test file) - + rant reinstall # reinstall #{@proj[:name]} - + rant remove # clobber/remove #{@proj[:name]}, current version: #{Version} rant remove_package # clobber/remove #{@proj[:name]}, all versions @@ -465,7 +465,7 @@ end task :setup_vim do #man setup_find_create('data/vim',@dir[:vim]) if File.directory?('data/vim') #man pages end - #%% post install + #%% post install #%% clobber/remove tasks task :remove_bin do rm_r "#{@dir[:bin]}/#{@dir[:proj]}" if FileTest.file?("#{@dir[:bin]}/#{@dir[:proj]}") @@ -494,7 +494,7 @@ task :remove_package do rm_r "#{@dir[:conf]}/#{@dir[:proj]}" if FileTest.directory?("#{@dir[:conf]}/#{@dir[:proj]}") end task :post_install_note do - puts <=1.8.3) - + * sisu_0.31.3-2 debian:control: Depends: ruby (>=1.8.2) %% sisu_0.31.2.orig.tar.gz (2005w47/6 | 2005-11-26) @@ -3029,7 +3050,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.31.1.orig.tar.gz * odf, minor fix url match - * [sample documents urls to amazon and barnes and noble + * [sample documents urls to amazon and barnes and noble added as courtesy to authors] * [Note: change to automated debian package build procedure] @@ -3039,7 +3060,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.31.0.orig.tar.gz e6beae75cda1d00c68dc0d97c67cb540 3244304 sisu_0.31.0.orig.tar.gz 8785cf622dee3fe07eed841b8cfbf8e1 10626 sisu_0.31.0-1.diff.gz - * metaverse, header, italicise and bold lists, + * metaverse, header, italicise and bold lists, results in significant changes markup change use regex directly [results in odf (openoffice) repair of 0.30.9] @@ -3049,9 +3070,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.30.10.orig.tar.gz ed89acbe1f406f2f55052651d12f1b78 3242816 sisu_0.30.10.orig.tar.gz 6495690d1611efd7c9a8145a8b0ca73e 10589 sisu_0.30.10-1.diff.gz - * rollback to 0.30.8 header, italicise and bold lists, - use of semi-colon delimited list, - [new version number 0.31 opened for header use of regex + * rollback to 0.30.8 header, italicise and bold lists, + use of semi-colon delimited list, + [new version number 0.31 opened for header use of regex to italicise and bold] %% sisu_0.30.9.orig.tar.gz (2005w47/2 | 2005-11-22) @@ -3063,7 +3084,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.30.9.orig.tar.gz * package directory structure modified to comply with setup.rb default data/man moved to man as setup.rb, affects debian - + * header, italicise and bold lists, markup change use regex directly [instead of converting semi-colon delimited list] @@ -3108,12 +3129,12 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.30.5.orig.tar.gz e3e08897e4d7c3373c5898f31926c094 3228219 sisu_0.30.5.orig.tar.gz 583723571b8df2aa7717a7872b143227 10497 sisu_0.30.5-1.diff.gz - * conf, homepage, skin path precedence, fix + * conf, homepage, skin path precedence, fix (related to finding ./_sisu/conf/skin/doc/skin_sisu.rb) * summary, suggested links, cosmetic: fix to static url - * sisu_doc, drop making of directory _sisu/config + * sisu_doc, drop making of directory _sisu/config (using _sisu/conf) %% sisu_0.30.4.orig.tar.gz (2005w46/6 | 2005-11-19) @@ -3136,7 +3157,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.30.3.orig.tar.gz 444a194aae38120f13fd3bf2f9ae505a 3227547 sisu_0.30.3.orig.tar.gz 1d1b49a957cb118a3110574d26bb9304 10413 sisu_0.30.3-1.diff.gz - * configuration, change, use ./_sisu/conf + * configuration, change, use ./_sisu/conf [WARNING ./_sisu/config is depreciated and will be removed] * db:pgsql, bugfix FROM required in a select statement @@ -3145,7 +3166,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.30.3.orig.tar.gz * zap, delete, -Z disable by default, to use must enable in sisurc.yaml - * rmagick, disable load/require by default, sisurc.yaml + * rmagick, disable load/require by default, sisurc.yaml problem with some local installs of ruby * pdfetex, call with -fmt=pdflatex @@ -3153,7 +3174,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.30.3.orig.tar.gz * summary, metadata suggested links added * xml,xhtml,html tidy only run with -V or -M - rexml only with -M, primary reason a considerable speedup + rexml only with -M, primary reason a considerable speedup in skipping step unless specifically requested for testing * sisu control file, changes a bit arbitrary, but a bit easier @@ -3193,8 +3214,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.30.0.orig.tar.gz * sisudoc, only -V and -M show verbose tgz of what goes in to sisudoc (previously -v did) - * name correction: SiSU is a recursive acronym, and has other - alternative possible expansions, one of which i got wrong, + * name correction: SiSU is a recursive acronym, and has other + alternative possible expansions, one of which i got wrong, under the influenced of the other ! * SiSU information Structuring Universe * Simple information Structuring Universe @@ -3250,17 +3271,17 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.29.3.orig.tar.gz * rsync use added for remote puts -R (scp is -r) - * summary bug fix, variable scope reduced + * summary bug fix, variable scope reduced (incorrectly retained information from previous files in batch runs) * introduced -K which deletes output files prior to processing of files of same type * -s sisu markup source copied to output directory, (placed remotely with -sr) - + * -S sisudoc made and copied to output directory, (placed remotely with -Sr) [renamed from -Z] - + * --update updates previous output, with same filetype output only, useful * [-F renaming from -S naive cgi search form sample] @@ -3271,12 +3292,12 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.29.3.orig.tar.gz http://www.jus.uio.no/sisu/pkg/src/sisu_0.29.2.orig.tar.gz b8ecd141040e1ffa0820cdf9382304a7 3220476 sisu_0.29.2.orig.tar.gz 3d42aeb8d9648fed4baf837c59cff7a5 9899 sisu_0.29.2-1.diff.gz - + * sql table metadata created, replaces table titles [breaks former table structure] * sql urls replaces links table - + * pgsql comments * cgi scripts use table:metadata instead of table:tiles @@ -3311,7 +3332,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.29.1.orig.tar.gz [as alternative to 0~cvs equivalent, metaverse and downstream adjusted accordingly] - * debian/control added suggests lv and rcs as alternative to cvs + * debian/control added suggests lv and rcs as alternative to cvs [to which it is personally preferred for document control (as making more sense working with favoured used development distributed source control management systems, mercurial and darcs)] @@ -3321,7 +3342,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.29.0.orig.tar.gz a1658902d929eee564c77f061568a677 3214113 sisu_0.29.0.orig.tar.gz fc3c5c566c307636d23467476d38b5bf 9732 sisu_0.29.0-1.diff.gz - * metaverse autonumbering changed, + * metaverse autonumbering changed, affecting default html segment naming [change to metaverse affects downstream processing] @@ -3357,7 +3378,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.28.2.orig.tar.gz ae92bc6a14600a15f4bfbe5512bf9af2 3213202 sisu_0.28.2.orig.tar.gz ee23f7ac2122521fe4d802e023921a7f 9644 sisu_0.28.2-1.diff.gz - * texpdf character encoding bugfix, (removed iconv) however, + * texpdf character encoding bugfix, (removed iconv) however, sisu requires utf-8 input for extended character sets * character encoding touches, e.g. sample files saved as utf-8 @@ -3380,16 +3401,16 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.28.0.orig.tar.gz 12064bd92864441ab8b103f094412c2f 3210000 sisu_0.28.0.orig.tar.gz 22c5452ca4a060ddbb4bcb768a4bd119 9600 sisu_0.28.0-1.diff.gz - Release (and version number bump) primarily to put ruby sisu segfault + Release (and version number bump) primarily to put ruby sisu segfault bug behind us, Debian ruby-1.8.3-2 released and fixes this - [an emergency build to work around the problem was made available as + [an emergency build to work around the problem was made available as 0.27.0 see note there for details] * remote placement of open document files added (odt) * added open document format to several default shortcuts sisu -2 etc. - * made note of opendocument format output on sisu home page + * made note of opendocument format output on sisu home page [feature not complete] * synced skin_sisu.rb files, (there are a bit too many of them, most would normally be syslinks) @@ -3404,7 +3425,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.26.4.orig.tar.gz * sisu -Z without [filename/wildcard] makes gzip of sisu directory of marked up files, including sisu markup source files, local configuration file, images and skins. - + * sisu -Z [filename/wildcard] makes gzip of individual sisu file specified including sisu markup source file and related images and skin @@ -3421,7 +3442,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.26.4.orig.tar.gz tables poem code - + todo: groups tables @@ -3447,13 +3468,13 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.26.3.orig.tar.gz its images and its skins, opens as sisu_ball directory, which once unipped sisu may be run within, - (sisu does not at present automatically unpack and run on these files, + (sisu does not at present automatically unpack and run on these files, but is a convenient way of packing the contents of a file for sending) [early days] * man1/sisu.1 upadated and html on -B sisu file format (sisu help not yet done) - * cosmetic firefox taken from list of lightweight browsers, + * cosmetic firefox taken from list of lightweight browsers, remains very much amongst the heavies * cosmetic correction on info related to librmagick-ruby contained within @@ -3473,16 +3494,16 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.26.2.orig.tar.gz for the editors: * nano http://www.nano-editor.org/ * diakonos http://purepistos.net/diakonos/ - + NOT REALLY DONE, but intitial attempt included anyway: * nedit http://www.nedit.org/ * gedit http://www.gnome.org/projects/gedit * kate http://kate.kde.org * emacs http://www.gnu.org/software/emacs/emacs.html - [vim-sisu still provides the most comprehensive sisu markup + [vim-sisu still provides the most comprehensive sisu markup editor environment] - + * evince becomes the default pdf in maintenance urls etc. (previous was xpdf) * document samples image dimensions manually provided, affected document @@ -3493,13 +3514,13 @@ WARNING ruby 1.8.3 (2005-09-21) [i486-linux] segfaults SiSU FIXED in 1.8.3 (2005-09-29) [i486-linux] thank you TS/Guy Decoux the new ruby build is not as yet uploaded to Debian unstale -%% sisu_0.27.0.orig.tar.gz (2005w39/1 | 2005-09-26) %% Emergency Release: +%% sisu_0.27.0.orig.tar.gz (2005w39/1 | 2005-09-26) %% Emergency Release: NOTE: this is an emergency version of SiSU that does not segfault with problem versions of ruby, see note follwing. It is prepared without Syck/Yaml Problem ruby versions: -* ruby 1.8.3 (2005-09-21) and was removed by TS:Guy in ruby 1.8.3 (2005-09-29), +* ruby 1.8.3 (2005-09-21) and was removed by TS:Guy in ruby 1.8.3 (2005-09-29), released as Debian unstable ruby-1.8.2-1, and in * ruby 1.8.3 (2005-10-12) and was again removed by TS:Guy in ruby 1.8.3 (2005-10-13). @@ -3512,7 +3533,7 @@ Problem ruby versions: ignoring yaml user config files as such this emergency release: - * only uses sisu default configuration settings, + * only uses sisu default configuration settings, ignoring yaml user config files * does not provide sisu version information @@ -3525,7 +3546,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.26.1.orig.tar.gz * wmap & vocabulary, minor modifications, and runs metaverse - * minor pruning and renaming, small changes + * minor pruning and renaming, small changes %% sisu_0.26.0.orig.tar.gz (2005w37/7 | 2005-09-18) http://www.jus.uio.no/sisu/pkg/src/sisu_0.26.0.orig.tar.gz @@ -3552,7 +3573,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.25.11.orig.tar.gz bdd533301ed392ec7c27f1e364dc8388 sisu_0.25.11-1.diff.gz * cgi, cgi sql search form sample generator, link suffixes added - + * cgi, cgi sql search form sample generator, -S takes additional parameter webrick to provide port links that webrick server will use. @@ -3562,10 +3583,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.25.11.orig.tar.gz * html output (tune), fix image, no link where non provided, i.e. where the { imagename.png }image notation is used - + * html output (css & tune), image caption, smaller font - * configure, (-C & -CC) absence of trang is only reported + * configure, (-C & -CC) absence of trang is only reported if -V (extra verbose) flag is used * processing remote urls, (-C & -CC) absence of external_images is only @@ -3594,7 +3615,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.25.9.orig.tar.gz that require the librmagick library. [librmagick-ruby is not "required" as provided documents are marked up accordingly, it is never needed. As an example first image markup form requires the library, the second does not: - { freeculture01.png }http://www.free-culture.cc/ + { freeculture01.png }http://www.free-culture.cc/ {freeculture01.png 350x350 }http://www.free-culture.cc/ * man pages additions, mostly "man 8 sisu" @@ -3604,10 +3625,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.25.8.orig.tar.gz bd8edf228360f3f3795812c93edfee19 3159743 sisu_0.25.8.orig.tar.gz 17b662d3d2e7f1881c7eebecb6dca192 9232 sisu_0.25.8-1.diff.gz - * metaverse, default is to run metaverse wherever it may be required, + * metaverse, default is to run metaverse wherever it may be required, i.e. when any of - abDdeHhINptXxz - * plaintext, endnotes version (-e) sorted, + * plaintext, endnotes version (-e) sorted, -a (footnotes following paragraphs) is ok [however is currently an either or, both output plain.txt] @@ -3669,7 +3690,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.25.5.orig.tar.gz dadf9ffb77c629189be5f08345f451cf 3154083 sisu_0.25.5.orig.tar.gz 7749d8a2a4ed73e9f0d85e5fae5d9027 9178 sisu_0.25.5-1.diff.gz - * latex/pdf cosmetic reduced size of font related to document + * latex/pdf cosmetic reduced size of font related to document processing information. %% sisu_0.25.4.orig.tar.gz (2005w37/1 | 2005-09-12) @@ -3688,7 +3709,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.25.3.orig.tar.gz * metaverse, subtle correction todo with interaction between operation of bold lines and bold words selected in header. - * changes to text accompanying latex/pdfs, toning down of language, + * changes to text accompanying latex/pdfs, toning down of language, correction of gpl2 url to fsf.org rather than gnu.org %% sisu_0.25.2.orig.tar.gz (2005w36/6 | 2005-09-10) @@ -3735,7 +3756,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.24.2.orig.tar.gz cbbfdde8fd261b1bfdd47f633c895222 9093 sisu_0.24.2-1.diff.gz * character encoding, existing table hash replaced with a KirbyBase table - character encoding lib is not currently used by sisu, + character encoding lib is not currently used by sisu, (& KirbyBase is not included with sisu), for what it is see http://www.netpromi.com/kirbybase_ruby.html ) hoever, this is a possible way forward should such a table be needed @@ -3748,7 +3769,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.24.1.orig.tar.gz * latex/pdf fix: tilde may be printed if marked up as escaped character has been a problem, (revisit, refactor what is done with tilde) - * escaping sisu special characters a bit of work done, html latex/pdf + * escaping sisu special characters a bit of work done, html latex/pdf done { } ~ < > _ - / # | : ! ^ examine need for others such as * * latex/pdf, also html, bugfix, a bit of work on escaping of sisu special @@ -3817,20 +3838,20 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.24.0.orig.tar.gz * texpdf, utf8 added properly by way of ucs package (now requires latex-ucs) breaks some things but in the long run is hopefully an improvement currently supported encodings utf8 and iso8859. - + Resulting in out of the box improved Iñtërnâtiônàlizætiøn a slightly more extended character set, using utf-8, [ tested so far on LaTeX / pdf output, line-breaking is not perfect ] ! # $ % & \ () * + , - . / ' 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] … † ‡ < - ~ t ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ' µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å - æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ + æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ * character encoding, utf-8 improved basic table, not yet utilised though, [and even as a small utf-8 table is on the large side] * minor code play with output (webserve) path - + * sqlite db output mapped to webserve path, current directory stub [instead of being deposited in pwd] @@ -3841,7 +3862,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.24.0.orig.tar.gz with level 4 in doc version consider implications [easy to attach somthing to level 5 & 6 names] - * document digest in document information by default + * document digest in document information by default (previously only when cvs info also selected) * loading of skins for inserts @@ -3865,7 +3886,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.22.0.orig.tar.gz dependency on other packages, introduced for rmagick and now used also for dbi. - * rmagick if installed can be used to calculate image dimensions, so these + * rmagick if installed can be used to calculate image dimensions, so these need not be provided in markup. * sql database operations only attempted if dbi is loaded(/available for @@ -3902,18 +3923,18 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.21.0.orig.tar.gz * changes to file structure for processing and provided images now placed under the markup directory in _sisu - ./_sisu/processing [built by sisu] unless ./ is not writable + ./_sisu/processing [built by sisu] unless ./ is not writable then /tmp/sisu_processing ./_sisu/image [added to manually] ./_sisu/config [precedence: ./_sisu/config ~/.sisu /etc/sisu] - * skin fix reading and precedence + * skin fix reading and precedence [uses ./_sisu/config/skin ~/.sisu/skin /etc/sisu/skin ./_sisu/processing/external_document/skin] * external documents, provide similar logic placed in ./_sisu/processing/external_document/{image,config} - this should mean that along external documents are downloaded + this should mean that along external documents are downloaded together with their skins and images and processed as a unit * changed a couple of search path statements (skin,sisurc) to use blocks. @@ -3937,7 +3958,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.20.8.orig.tar.gz 2fee766bb3079d7f955dbeb8c7e1c9dd 3089931 sisu_0.20.8.orig.tar.gz 6505b8ad8e6ccdc73676a61b25a466a2 8815 sisu_0.20.8-1.diff.gz - * minor database rationalisation, + * minor database rationalisation, postgresql & sqlite logic in same files [additional testing required] @@ -3957,7 +3978,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.20.7.orig.tar.gz UNIX ASCII * vim auto-conversion to UNIX ASCII for sisu markup files - (sisu parses unix ascii, not dos ascii ... consider further, + (sisu parses unix ascii, not dos ascii ... consider further, an issue for example with many(most/all?) Project Gutenberg texts) %% sisu_0.20.6.orig.tar.gz (2005w34/1 | 2005-08-22) @@ -3965,7 +3986,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.20.6.orig.tar.gz 8e50493f947b6c1e0ed77bb1fb4e8ede 3096291 sisu_0.20.6.orig.tar.gz 0636fedf8a38e0cb62dbdf7c0ad9397f 8778 sisu_0.20.6-1.diff.gz - * (composite) fix for new header links where linbreak used + * (composite) fix for new header links where linbreak used and imported into composite document, result in .t? suffix * (sisu_search.cgi) sample search form, minor fixes & @@ -3984,21 +4005,21 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.20.4.orig.tar.gz c65c974dbdef638014c578c8a06d4560 3095378 sisu_0.20.4.orig.tar.gz bca68a13d322deee67a4e20730c55acb 8741 sisu_0.20.4-1.diff.gz - * (param) header links notation made similar to links within text + * (param) header links notation made similar to links within text old markup syntax remains possible, (i.e. backward compatibility kept) [should possibly force version number change to 0.21 but is minor change] * small touch to sisu vim syntax file, remove false positive error highlighting for alternative links markup - * touch to remove relevance of whitespace in image markup + * touch to remove relevance of whitespace in image markup (previously a problem in composite texts for latex/pdf output) * (metaverse for html) touch, whitespace reintroduced where name is given to an object as easy solution to interference that may otherwise arise with urls - * html touch whitespace reintroduced where name is given to an object + * html touch whitespace reintroduced where name is given to an object as easy solution to interference that may otherwise arise with urls * ruby-libyaml removed from debian control, @@ -4018,7 +4039,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.20.3.orig.tar.gz http://www.jus.uio.no/sisu/pkg/src/sisu_0.20.2.orig.tar.gz 56c7a77c9a78f12cd132e06234ded543 3094356 sisu_0.20.2.orig.tar.gz 774b095fc376f4decde435fd6d32fbc2 8631 sisu_0.20.2-1.diff.gz - + * sisu_vim manpage * latex/pdf monospace font (ttfamily) where code{ }code is used @@ -4035,13 +4056,13 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.20.2.orig.tar.gz http://www.jus.uio.no/sisu/pkg/src/sisu_0.20.1.orig.tar.gz 1cdbe3739722c877af1095135a7a6f9e 3089912 sisu_0.20.1.orig.tar.gz 90e8a6ac6a1c868d8f7138c8974b2611 8588 sisu_0.20.1-1.diff.gz - - * console output XML clutter reduced, + + * console output XML clutter reduced, REXML parsed headers now only produced for -V not -v * debian package, started signing dsc and changes file both email addresses ralph@amissah.com and ralph.amissah@gmail.com - on ring, singing ended up being done against latter, + on ring, singing ended up being done against latter, the former being what debian knows me as, correct on next signing Key fingerprint = F899 5A87 C648 3F38 5107 79F1 B97B 7C4D BD76 E77F @@ -4078,14 +4099,14 @@ OhNer8Yu7SSyBCIO/8V71UhkgyUdG7fMl0BzqPmITwQYEQIADwUCQvx+2QIbDAUJ A8JnAAAKCRC5e3xNvXbnfzpwAJ0ZKPoWuWrx8K/zGSIRRj7ZRbf6KgCgji13BXoF tJaIUHauen7hNIoUQXo= =6US6 ------END PGP PUBLIC KEY BLOCK----- +-----END PGP PUBLIC KEY BLOCK----- %% sisu_0.20.0.orig.tar.gz (2005w32/4 | 2005-08-11) http://www.jus.uio.no/sisu/pkg/src/sisu_0.20.0.orig.tar.gz 0c0c5ef53a3dd85fcaf5912a971c3b26 3089497 sisu_0.20.0.orig.tar.gz 741731b3d842820cb2b427fdf1197e4a 8517 sisu_0.20.0-1.diff.gz 0b1ea809280f45b293cb5a9ea9453b49 8551 sisu_0.20.0-2.diff.gz - + * remap sisu psql database names to SiSU_[directory name stub] instead of just [directory name stub] as this will make name collisions (and accidents) with other databases, when using SiSU to creating, deleting @@ -4107,13 +4128,13 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.20.0.orig.tar.gz http://www.jus.uio.no/sisu/pkg/src/sisu_0.18.8.orig.tar.gz aa7e128202d4e60dfa9b328888406a3d 3087797 sisu_0.18.8.orig.tar.gz 262edbc6bcd7b29cf70d8f3b0fd1a9cf 8404 sisu_0.18.8-1.diff.gz - + * (webrick url) console display of output text default to webrick url - (can be switched off in sisurc.yaml, by setting + (can be switched off in sisurc.yaml, by setting webserve,webrick_url: false) however this assumes people know to start sisu_webrick - (it is a toss-up between advertising webrick's availability, - and sticking with filesystem paths as default, may have + (it is a toss-up between advertising webrick's availability, + and sticking with filesystem paths as default, may have to revert) have thought of tying webrick url output to starting sisu_webrick automatically, would need to look at log files and get logging off the console, else would disturb @@ -4142,7 +4163,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.18.8.orig.tar.gz http://www.jus.uio.no/sisu/pkg/src/sisu_0.18.7.orig.tar.gz ace9eb421e31f7d3f1d12ba29b00baaf 3086170 sisu_0.18.7.orig.tar.gz 3530196ebba2260a60bfe885ee536731 8393 sisu_0.18.7-1.diff.gz - + * some license clean up, gpl2 or later (appearing in pdf text output), removed sentences referring to alternative, somehow missed in previous grand cleanup sisu_0.16.24 where all document headers were cleaned, and the @@ -4155,7 +4176,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.18.7.orig.tar.gz * sequence digests if requested follow on directly after metaverse -mN... - * html and latex/pdf so far, continue tradition of assuming that a comma (,) + * html and latex/pdf so far, continue tradition of assuming that a comma (,) or full stop (.) following a url is part of a sentence, i.e. if a url actually is terminated by a comma or a dot are not parsed correctly, is extremely convenient, consider implications though, may need to change. @@ -4174,7 +4195,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.18.6.orig.tar.gz * fixed digest tree where image not found * defaults for shortcut flags (-1v -3v etc.) set to - create the digest tree (-N) + create the digest tree (-N) and to include filetype suffix (-H) as this works with webrick (sisu_webrick) @@ -4182,7 +4203,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.18.6.orig.tar.gz consistently removed as on cursory glance does not appear to be supported by tetex, trivial to add later - man page and help mention of verbose screen output of digest tree + man page and help mention of verbose screen output of digest tree %% sisu_0.18.5.orig.tar.gz (2005w31/6 | 2005-08-06) http://www.jus.uio.no/sisu/pkg/src/sisu_0.18.5.orig.tar.gz @@ -4205,13 +4226,13 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.18.4.orig.tar.gz * detailed document md5 digest output as digest.txt generated with -N flag [decide whether to: - keep multiple document digest versions; and + keep multiple document digest versions; and whether to link to html or databse (at some stage add digest names to html generated)] * added -N flag (document digests) to man pages and help - * replaced uses of include? with plain regex (some vague recollection of + * replaced uses of include? with plain regex (some vague recollection of rumours of depreciation in future ruby)... no rush, perhaps should have waited @@ -4246,10 +4267,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.18.1.orig.tar.gz 030ba198b242541bd261ec5fb0776b0a 3086052 sisu_0.18.1.orig.tar.gz 6cd8c2b571c485edbe77946fe7245a14 8301 sisu_0.18.1-1.diff.gz - * latex/pdf, tmp bugfix, substitute & with 'and' in toc, + * latex/pdf, tmp bugfix, substitute & with 'and' in toc, needed e.g. for AT&T, see ffa, REVISIT - * a bit of play with texinfo module, but (still) broken + * a bit of play with texinfo module, but (still) broken (in 0.18) until tested * some writing in man pages @@ -4259,84 +4280,84 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.18.0.orig.tar.gz ff45f2bca98b6e8fbae0714684576571 3086151 sisu_0.18.0.orig.tar.gz 9f0cf2ca1b6e02aea52f9dd22e51c32d 8268 sisu_0.18.0-1.diff.gz - Development branch 0.17 (opened 2005-07-14) + Development branch 0.17 (opened 2005-07-14) rolled back into main as 0.18: sisu_0.17.5.orig.tar.gz (2005w29/5 | 2005-07-22) http://www.jus.uio.no/sisu/pkg/src/sisu_0.17.5.orig.tar.gz 23e3b01175d55e815933881fcfe415c5 3085611 sisu_0.17.5.orig.tar.gz 41e800763be26bb37a8f1901a05bff08 8570 sisu_0.17.5-1.diff.gz - + * plaintext linebreaks in endnotes
- + * xml series, branch-fix todo with tables (common_xml) - + * html endnote section branch-fix - + sisu_0.17.4.orig.tar.gz (2005w29/4 | 2005-07-21) http://www.jus.uio.no/sisu/pkg/src/sisu_0.17.4.orig.tar.gz 23bef7ae21ac0b65cb7b27c049f3ea15 3085478 sisu_0.17.4.orig.tar.gz 6542bc3d7f65440f02834de6141e74dd 8553 sisu_0.17.4-1.diff.gz - + * url maintenance mode, minor fix - + * small fixes to latex pdf mostly todo with & character - + sisu_0.17.3.orig.tar.gz (2005w29/3 | 2005-07-20) http://www.jus.uio.no/sisu/pkg/src/sisu_0.17.3.orig.tar.gz 086b054dba3ee8837406157c74062252 3084736 sisu_0.17.3.orig.tar.gz 3029bdb8375586b57cec9997578d8f98 8535 sisu_0.17.3-1.diff.gz - + * md5 into postgresql and sqlite modules, (including endnotes clean md5 digest) - + * Implemented, but need to be consistent about content of paragraphs on which md5 digest is made: - + 1. clean/stripped text without any markup, paragraph, headings etc. without endnotes - + 2. endnotes clean/stripped text digest only (there may be several endnotes within a paragraph) - + 3. whole object, text with markup and any endnotes, (question: with or without the endnote digests??? presumption better without, [however may be easier to check with?]) - + * some renaming in db modules - + [deleted accidentally and rebuilt] - + sisu_0.17.2.orig.tar.gz (2005w28/5 | 2005-07-15) http://www.jus.uio.no/sisu/pkg/src/sisu_0.17.2.orig.tar.gz dab5f72a55e525e3f2bac4053db57c6a 3083022 sisu_0.17.2.orig.tar.gz 4fad5f499da1d26d89070ce1cb26ad8d 8512 sisu_0.17.2-1.diff.gz - + * change in metaverse representation of md5 hashes - + * cleaning up of output after introduction of md5 digests - + sisu_0.17.1.orig.tar.gz (2005w28/5 | 2005-07-15) http://www.jus.uio.no/sisu/pkg/src/sisu_0.17.1.orig.tar.gz ed3301693f3a86535b6d7c1595c1afdf 3082665 sisu_0.17.1.orig.tar.gz a3bf9b7198544ae341e0c4b397b185fd 8467 sisu_0.17.1-1.diff.gz - + * arrangement of md5s - + sisu_0.17.1.orig.tar.gz (2005w28/5 | 2005-07-15) http://www.jus.uio.no/sisu/pkg/src/sisu_0.17.1.orig.tar.gz *** sisu_0.17.1.orig.tar.gz *** sisu_0.17.1-1.diff.gz - + * todo with use of dev branch and being 0.17 rather than 0.16 - + sisu_0.17.0.orig.tar.gz (2005w28/4 | 2005-07-14) http://www.jus.uio.no/sisu/pkg/src/sisu_0.17.0.orig.tar.gz MD5(sisu_0.17.0.orig.tar.gz)= 46d56d54e6040170cbaad77f6764e2ca - + * incorporated two md5 digests for each object, available for use downstream as desired - + %% sisu_0.16.26.orig.tar.gz (2005w28/6 | 2005-07-16) http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.26.orig.tar.gz *** sisu_0.16.26.orig.tar.gz @@ -4371,7 +4392,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.23.orig.tar.gz * some changes in use of ocn for segment naming in html output * a couple of postgresql fileds changed to text - + * using Rant 4.0 for package build and install(er) * cosmetic rearrangement of code @@ -4381,11 +4402,11 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.22.orig.tar.gz 4c290986eb68607420a602c3fae4baaf 3087090 sisu_0.16.22.orig.tar.gz c925bddaee01bb7b5d5a2c241f3f75e0 8089 sisu_0.16.22-1.diff.gz - * metaverse fix for alternative endnote markup marker + * metaverse fix for alternative endnote markup marker at end of line~^ * texpdf fix for images, (where dimensions not - provided) not final, may need to pass through + provided) not final, may need to pass through imagemagick at metaverse stage * fix to cgi sample sisu_search.cgi @@ -4426,8 +4447,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.17.orig.tar.gz 410f1c01c261e2cf2bb25ff782b4c0b8 3105488 sisu_0.16.17.orig.tar.gz 649cbe59bf940d93a74cdac46e59123c 7774 sisu_0.16.17-1.diff.gz - * separated color file out from ftplugin ... called dusk (or slate) by - me for several years i now call it sisu... perhaps i should stick + * separated color file out from ftplugin ... called dusk (or slate) by + me for several years i now call it sisu... perhaps i should stick with slate as it is pretty appropriate... hmmm, slate %% sisu_0.16.16.orig.tar.gz (2005w26/3 | 2005-06-29) @@ -4435,8 +4456,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.16.orig.tar.gz f5ce8002e6876feba22c276d4e49d3f5 3105731 sisu_0.16.16.orig.tar.gz 251af2096015e193888a429cd69a328d 7576 sisu_0.16.16-1.diff.gz - * small touches to offer vim config files working the way i am used to - with Debian install... needs testing by someone with different + * small touches to offer vim config files working the way i am used to + with Debian install... needs testing by someone with different habits though. %% sisu_0.16.15.orig.tar.gz (2005w26/3 | 2005-06-29) @@ -4452,9 +4473,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.15.orig.tar.gz http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.14.orig.tar.gz 18e0cfcac265ecb03e9af5f958aad0f7 3105239 sisu_0.16.14.orig.tar.gz 493c64b453dc43ff36565aacacbc0b8c 7441 sisu_0.16.14-1.diff.gz - + * sisu vim ftplugin ... for folds, syntax, colors, markup - auto installed in debian, + auto installed in debian, (but uses shared filetype in /usr/share/vim/addons check how that is supposed to work) else (non-debian install) @@ -4464,13 +4485,13 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.14.orig.tar.gz http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.13.orig.tar.gz 775c33a1e6f0140f5552cb3f2784b00a 3124785 sisu_0.16.13.orig.tar.gz 04242b7e8fec91a0b4f69bd 7328 sisu_0.16.13-1.diff.gz - + * debian setup of vim syntax ok... however much vim setup still to automate, immediately noticeable: folds for sisu not sorted; and permitting cursor movement up and down without following long lines with screen wrap; (and no clever way yet to contribute colors other than through sisu-examples, but they being user preference should be contributed with care). - + * on_markup.txt quick check & minor update %% sisu_0.16.12.orig.tar.gz (2005w26/1 | 2005-06-27) @@ -4482,7 +4503,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.12.orig.tar.gz ~/.sisu/skin/doc /etc/sisu/skin/doc defaults - and content is interchangeable (so future latent break + and content is interchangeable (so future latent break is less likely) * touch to Rantfile. @@ -4493,12 +4514,12 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.11.orig.tar.gz 742089f905479231a32fb6b4fc62824f 7024 sisu_0.16.11-1.diff.gz * bugfix a default variable, in defaults version should be @ver - introduced by cuts and pastes between different files, - with recent default home page updates; make less likely to - happen in future, for now quick fix, revisit: + introduced by cuts and pastes between different files, + with recent default home page updates; make less likely to + happen in future, for now quick fix, revisit: currently index.html taken from - ~/.sisu/skin/doc if it exists else defaults, - /etc/sisu/skin/doc is ignored, breaking expected + ~/.sisu/skin/doc if it exists else defaults, + /etc/sisu/skin/doc is ignored, breaking expected search precedence %% sisu_0.16.10.orig.tar.gz (2005w25/0 | 2005-06-26) @@ -4579,9 +4600,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.3.orig.tar.gz 7dc657a1299e3ff831c932eb3975293f 3124710 sisu_0.16.3.orig.tar.gz 93210116080bed4f22356e8ac1bba570 6324 sisu_0.16.3-1.diff.gz - * tables fixed, much latent breakage sorted + * tables fixed, much latent breakage sorted html segments fixed (scroll was ok) - xml sax and dom sorted + xml sax and dom sorted xml css naive but done latex/pdf done @@ -4591,11 +4612,11 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.2.orig.tar.gz e82cc99b1a8a62cb1d590aa3dc65a4eb 6227 sisu_0.16.2-1.diff.gz * conditional heading reinstated /^[12]~\?\s/ - (may be used when it is expected that a document may be - imported into another, and the controlling documents level + (may be used when it is expected that a document may be + imported into another, and the controlling documents level 1 and/or 2 headings should be used instead (take precedence)) - * rant install options, force specification of root if wish to + * rant install options, force specification of root if wish to proceed as root, (previously was default on ok or continue) %% sisu_0.16.1.orig.tar.gz (2005w25/3 | 2005-06-22) @@ -4642,7 +4663,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.0.orig.tar.gz * to mark headers and heading levels: [0-6]~ replaces [0-6]\{ and [0-6]\{~ [at the start of a line] header and headings marked by digit tilde at the start of the line - tilde replacing unclosed curly brace occurring after digit at + tilde replacing unclosed curly brace occurring after digit at beginning of line vim: :%s/\([0-6]\){\~\?/\1\~/c @@ -4669,13 +4690,13 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.0.orig.tar.gz http://www.jus.uio.no/sisu/pkg/src/sisu_0.15.1.orig.tar.gz MD5(sisu_0.15.1.orig.tar.gz)= d00ff37b438fe38732d887d8555dddb5 - * Syntax Changes, WARNING breaks old syntax, + * Syntax Changes, WARNING breaks old syntax, - * endnotes where not embedded within text, + * endnotes where not embedded within text, i.e. endnote following paragraph with endnote marker ~^ replaces ~e as marker within text ^~ for endnote content instead of -{{ or ~{{ [at the start of a line] - {~^ shortcut for making link with url as endnote }http://url + {~^ shortcut for making link with url as endnote }http://url instead of {~e previous shortcut}http://url vim: :%s/\~e/\~^/c @@ -4685,11 +4706,11 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.0.orig.tar.gz http://www.jus.uio.no/sisu/pkg/src/sisu_0.15.2.orig.tar.gz MD5(sisu_0.15.2.orig.tar.gz)= c28a58664d9a5f1726ed4c5f875e8f12 - * bugfix for composite documents, place newline - and mark end of import + * bugfix for composite documents, place newline + and mark end of import (bug also in current stable 0.14.6) - * bugfix for [html] endnotes introduced (in param) + * bugfix for [html] endnotes introduced (in param) in development branch * number paragraph in given heading sequence @@ -4699,13 +4720,13 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.16.0.orig.tar.gz sisu -t * fix webrick port settings sysenv - + * html subtoc touch required * help files updated on syntax changes - + * document markup samples updated - + * vim syntax files updated * extensive testing required @@ -4767,8 +4788,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.14.2.orig.tar.gz 90ab342311461a0c7b752df78e43d3b5 3121884 sisu_0.14.2.orig.tar.gz 257f8716e88e0a29aa6853d73520821d 3414 sisu_0.14.2-1.diff.gz - * -g option taken out, unused and forgotten - -h and -H currently do what -g used to by default + * -g option taken out, unused and forgotten + -h and -H currently do what -g used to by default (will revisit) %% sisu_0.14.1.orig.tar.gz (2005w23/2 | 2005-06-14) @@ -4783,12 +4804,12 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.14.0.orig.tar.gz a7ba5eeedad74ba6231f13c3a39535ec 3121235 sisu_0.14.0.orig.tar.gz fd74f52531699370664657064aed8578 3406 sisu_0.14.0-1.diff.gz - * Flattened directory structure for ./conf/sisu which maps to /etc/sisu - or equivalent i.e. removed the additional version number which is - not supported by debian packaging, and unnecessary anyway. + * Flattened directory structure for ./conf/sisu which maps to /etc/sisu + or equivalent i.e. removed the additional version number which is + not supported by debian packaging, and unnecessary anyway. (this change is the reason for version the hop to 0.14.0) - * Changed name of ./conf/sisu/sisurc.yaml.sample_disabled, + * Changed name of ./conf/sisu/sisurc.yaml.sample_disabled, is now ./conf/sisu/sisurc.yaml and enabled with some parts commented out @@ -4798,16 +4819,16 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.14.0.orig.tar.gz * Added man page summary of sisu-examples (and a README for directory which refers you to man page) -%% sisu_0.12.7.tar.gz (2005w22/3 | 2005-06-01 ) -http://www.jus.uio.no/sisu/pkg/src/sisu_0.12.7.tar.gz - MD5(sisu_0.12.7.tar.gz)= 080a45e3e94ed744cca9d0222aa0ae9b +%% sisu_0.12.7.tar.gz (2005w22/3 | 2005-06-01 ) +http://www.jus.uio.no/sisu/pkg/src/sisu_0.12.7.tar.gz + MD5(sisu_0.12.7.tar.gz)= 080a45e3e94ed744cca9d0222aa0ae9b [(self inflicted) glitch with Debian build, not released together with source tarball.] * Make SiSU convenient to use to produce other formats (including LaTeX) without the software necessary to produce pdf, i.e. pdflatex http://www.tug.org/applications/pdftex/ all this does really is recognise when pdflatex is absent - and pdfs cannot be generated in html generated output + and pdfs cannot be generated in html generated output (i.e. no links to pdf are produced, as was previously the case where pdf output was assumed) @@ -4829,7 +4850,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.12.6.orig.tar.gz * removed sisu-[version number] executable, is not necessary, (resulted in skip from 0.12.6 from 0.12.4) [0.12.6] -%% sisu_0.12.5.orig.tar.gz +%% sisu_0.12.5.orig.tar.gz skipped, synced tarball and deb in 0.12.6 %% sisu_0.12.4.orig.tar.gz (2005w21/4 | 2005-05-26 ): @@ -4843,18 +4864,18 @@ skipped, synced tarball and deb in 0.12.6 db7b4401a63dea7b9f47b6ead5cf9d4a 3272 sisu_0.12.3-1.diff.gz * updated man 8 sisu - + * updated part of interactive help in line with 'man 1 sisu' and 'man 8 sisu' - + * debian package added as required in current ubuntu at least: libyaml-ruby - + * touch to sisu_termsheet, colour fix %% sisu_0.12.2.orig.tar.gz (2005w21/1 | 2005-05-23 ): 65d8cc8021579e307f8c2cce31cc988 3119888 sisu_0.12.2.orig.tar.gz 6a13bc64be600e96366ccff0fac66344 3208 sisu_0.12.2-1.diff.gz - * changes with packaging methods (rather than sisu), and redone from + * changes with packaging methods (rather than sisu), and redone from scratch with new origional source * switch from using the sha digest to md5 @@ -4863,7 +4884,7 @@ skipped, synced tarball and deb in 0.12.6 2c877136005c5052921e619d435f0c91 3119846 sisu_0.12.1.orig.tar.gz 28e4022ff40fcfc0c5d8f6d64279ede7 3146 sisu_0.12.0-1.diff.gz - * changes with packaging methods (rather than sisu), and redone from + * changes with packaging methods (rather than sisu), and redone from scratch with new original source * switch from using the sha digest to md5 @@ -4888,7 +4909,7 @@ skipped, synced tarball and deb in 0.12.6 689f92bce4d1a9390d0c62726410d47b 3128684 sisu_0.10.9.orig.tar.gz 2775d317627ca5902b5c430defb39421 235 sisu_0.10.9-1.diff.gz - * default generic install of sisu is to type as root + * default generic install of sisu is to type as root (in the root directory of the unpacked tarball): ruby install @@ -4896,22 +4917,22 @@ skipped, synced tarball and deb in 0.12.6 For additional options: ruby install help - + or - + ruby install -T - + Thanks to rant. - * rant install file (used by sisu) has been made fairly - generic, and mirrors the directory structure used by + * rant install file (used by sisu) has been made fairly + generic, and mirrors the directory structure used by setup.rb - sisu specific post setup instructions are included + sisu specific post setup instructions are included in rant/plugin directory. - * removed Rakefile, I do like rake, but do find - rant more flexible and remove the duplication of + * removed Rakefile, I do like rake, but do find + rant more flexible and remove the duplication of effort. The Rantfile, or rather install works without the separate installation of rant. @@ -4939,7 +4960,7 @@ skipped, synced tarball and deb in 0.12.6 SHA1(sisu_0.10.7.tar.gz)= e18a47f07c1627f353bfc3a7c1e9d647c3265cf3 Debian sisu_0.10.7-1.dsc: d5978970a1e5891e5e9b0b406f503f79 3094556 sisu_0.10.7-1.tar.gz - * Rantfile for installation, (Stefan Lang's rant) + * Rantfile for installation, (Stefan Lang's rant) to install SiSU, in the root directory of the unpacked SiSU as root type: ruby install @@ -4955,30 +4976,30 @@ skipped, synced tarball and deb in 0.12.6 %% SiSU version 0.10.5 of 2005w18/0 (2005-05-08): sisu_0.10.5.tar.gz SHA1(sisu_0.10.5.tar.gz)= 274be3ca806288d7cce5607707c4fd35fe1ecc6c - + * version detail [synchronising packaging] %% SiSU version 0.10.4 of 2005w18/0 (2005-05-08): sisu_0.10.4.tar.gz SHA1(sisu_0.10.4.tar.gz)= 3adfc0400055fa45200158c34523486fdede895a - + * small fix on reporting, generated by information, metaverse %% SiSU version 0.10.3 of 2005w18/0 (2005-05-08): sisu_0.10.3.tar.gz SHA1(sisu_0.10.3.tar.gz)= ad95cbe339115437f1605e4aa7d7cd4519bb34cb - + * cleaning in packages %% SiSU version 0.10.2 of 2005w18/0 (2005-05-08): sisu_0.10.2.tar.gz SHA1(sisu_0.10.2.tar.gz)= 6e02af05df9b32ed3565b2058bb15ab19482c893 - + * rebuilt to correct debian package paths .deb installation paths should be correct * work-nickname Sabaki dropped from naming convention, will for - the time being stick to just sisu + the time being stick to just sisu (previous work-names/nick-names included scribbler, and scribe) %% SiSU version 0.10.1 of 2005w18/5 (2005-05-06): @@ -4987,7 +5008,7 @@ skipped, synced tarball and deb in 0.12.6 Contains development-branch, version 0.11.1 of 2005w18/5 0.11.1 of 2005w18/5 - * debian packaging, + * debian packaging, all architectures, use debian sub_version numbers 0.11.1-1 @@ -4995,14 +5016,14 @@ skipped, synced tarball and deb in 0.12.6 with tarball created by debuild (remove sabaki and date stamp) the sha provided here is for the darcs tarball, - will have to consider what to do when also providing debuild - source tarball with it's own sha, and in any event to reduce + will have to consider what to do when also providing debuild + source tarball with it's own sha, and in any event to reduce duplication - * deb package provided together with debian source package + * deb package provided together with debian source package and ***, which contains debian package sha. - * tinkering in database lib, minor renaming edits, + * tinkering in database lib, minor renaming edits, (tuple instead of loadline) * fix to cgi sample: sisu_search.cgi @@ -5015,8 +5036,8 @@ skipped, synced tarball and deb in 0.12.6 Contains development-branch, version 0.11.0 of 2005w18/2 0.11.0 of 2005w18/2 (0.9.10 - 0.11.0) - * debian packaging re-visited, - (based on help from wookey earlier in the year, + * debian packaging re-visited, + (based on help from wookey earlier in the year, thanks also to geoff for testing, ... more to be done, but progress.) @@ -5038,7 +5059,7 @@ skipped, synced tarball and deb in 0.12.6 SHA1(sisu-sabaki_0.8.3_2005w17-5.tar.gz)= 5603a862909c24eaec7a65b91f376e581fc76362 Contains development-branch, version 0.9.6 of 2005w17/5 - + 0.9.5 - 6 2005w17/5 * xml series tables @@ -5047,13 +5068,13 @@ skipped, synced tarball and deb in 0.12.6 SHA1(sisu-sabaki_0.8.2_2005w17-5.tar.gz)= 6564d4babe9a04520699bdeaac0f13c0bd723fa3 Contains development-branch, version 0.9.4 of 2005w17/5 - + 0.9.4 2005w17/5 * fixes: * html table of contents, use of ocn * xml series, (metaverse & xml_common) - tables not created at present, and removed + tables not created at present, and removed revisit, (previous version inserted non-"tidy" xml markup) %% SiSU Sabaki, version 0.8.1 of 2005w17/4 (2005-04-28): @@ -5061,7 +5082,7 @@ skipped, synced tarball and deb in 0.12.6 SHA1(sisu-sabaki_0.8.1_2005w17-4.tar.gz)= c3508979690aad04834238354b259ae0c2588bfb Contains development-branch, version 0.9.3 of 2005w17/4 - + 0.9.3 2005w17/4 (contains rad of 2005w17/4) * hot on the heels of 0.8.0 some fixes, and more likely to follow. @@ -5071,13 +5092,13 @@ skipped, synced tarball and deb in 0.12.6 SHA1(sisu-sabaki_0.8.0_2005w17-4.tar.gz)= 8fcfc3f8d7661a0b3110a3206491581a93e0e920 Contains development-branch, version 0.9.2 of 2005w17/4 (rad - 0.9.2) - - Summary, an old idea reinstated, to permit alternative text - presentations downstream: + + Summary, an old idea reinstated, to permit alternative text + presentations downstream: rad of 2005w17/3 - * old idea reinstated: + * old idea reinstated: metaverse now carries three ocn (numbering) schemes for each document * ocn as before all substantive objects numbered sequentially @@ -5088,7 +5109,7 @@ skipped, synced tarball and deb in 0.12.6 some bugs remain rad of 2005w17/4 - * changes to plaintext, xml series, and wmap to take account of ocn + * changes to plaintext, xml series, and wmap to take account of ocn changes 0.9.0 2005w17/4 (contains rad of 2005w17/3-4) @@ -5096,7 +5117,7 @@ skipped, synced tarball and deb in 0.12.6 * fixes needed in libraries using altered ocn/metaverse (more to follow) - * cgi-bin search form sample + * cgi-bin search form sample 0.9/data/sisu/sample/cgi-bin/sisu_search.cgi break fix (table structure had been changed) @@ -5112,15 +5133,15 @@ skipped, synced tarball and deb in 0.12.6 0.5.10 of 2005w16/2 - * default shortuct flags -1 to -5 (what they do) can be modified in + * default shortuct flags -1 to -5 (what they do) can be modified in sisurc.yaml (by changing the default flags they call) - * screen output ansi colour default can be set to true or false in + * screen output ansi colour default can be set to true or false in sisu.rc with -c acting as a toggle to turn screen output colour on or off as appropriate against the default set. 0.7.0 of 2005w16/3 - + * Remove old markup syntax, simplifies description of SiSU markup, without any loss of functionality (the newer markup style is already a superset of the old). Removal of old markup syntax necessitates branch/ version change. @@ -5141,12 +5162,12 @@ skipped, synced tarball and deb in 0.12.6 * remote file operations and file letter naming conventions, now composite, requesting, requiring files have filename with extension .r when processed a temporary file is created with the extension .t - + when a url is provided to request the processing of a remote file, the file is downloaded saved and processed with the .u extension - 0.7.2 of 2005w16/6 - + 0.7.2 of 2005w16/6 + * Work with the downloading of images where remote documents are requested either by use of a url on the command line or within a composite document images if not found there are downloaded to a subdirectory of the working @@ -5210,21 +5231,21 @@ skipped, synced tarball and deb in 0.12.6 * sysenv ansi colors, revisit later - * wordmaps, revisit later... problem introduced (a loop removed, + * wordmaps, revisit later... problem introduced (a loop removed, double counting removed) * rescue single line syntax rescue: ... 0.5.8 of 2005w15/0 - * introduce -c ansi color flag for screen output, (perhaps should be - color off instead), and + * introduce -c ansi color flag for screen output, (perhaps should be + color off instead), and -q quiet mode, no screen output - there is some scope for breakage here, continue to examine the + there is some scope for breakage here, continue to examine the plumbing * man page updated - + 0.5.9 of 2005w16/1 * dbi fixes from 0.5.8 changes (ansi) @@ -5240,7 +5261,7 @@ skipped, synced tarball and deb in 0.12.6 * sqlite default file name created to sisu_sqlite.db (was lex.db) * plaintext some cleaning of output - + * xml, minor touch, image tag, version/revision control info optional %% SiSU Sabaki, version 0.4.1 of 2005w15/3 (2005-04-13): @@ -5251,17 +5272,17 @@ skipped, synced tarball and deb in 0.12.6 0.5.1 of 2005w15/3 - * dbi sqlite re-introduced, though not tested. some things moved to + * dbi sqlite re-introduced, though not tested. some things moved to common_db 0.5.2 of 2005w15/3 - * common_db, dbi, pg and sqlite most logic is common and moved to + * common_db, dbi, pg and sqlite most logic is common and moved to common_db 0.5.3 of 2005w15/3 - - * dbi increased field size for text contents again, + + * dbi increased field size for text contents again, (to 12,000 for now from inadequate 2712) both postgresql and sqlite appear to support this @@ -5269,12 +5290,12 @@ skipped, synced tarball and deb in 0.12.6 sisu-sabaki_0.4.0_2005w15-2.tar.gz SHA1(sisu-sabaki_0.4.0_2005w15-2.tar.gz)= 832f47c37910dfbac05c401f26865b5f53dea358 - Contains development-branch, version + Contains development-branch, version 0.5.0 == 0.3.0 of 2005w15/2 0.3.1 of 2005w15/2 - * image representation changed dimensions now represented as + * image representation changed dimensions now represented as width x height i.e. \d+x\d+ e.g. 480x640 (as in imagemagick) previously was explicit w=480 h=640 (this change causes breakage in sample text with images) @@ -5284,33 +5305,33 @@ skipped, synced tarball and deb in 0.12.6 0.5.0 of 2005w15/2 * sorry for the quick version number turn around, and for its being applied - to pretty minor changes. - + to pretty minor changes. + The version numbering rule applied is that a second digit version number change will be made when potential breakage is caused by code changes. - + This has happened now with the decision to alter representation of image dimensions. Backward compatibility, though easily provided is not thought to be necessary (or desirable) in this instance, based on current user base, and modest use of images in text. 0.4.0 is on it's way. This type of event is fairly rare, though it has occurred occasionally in subtle ways. For example Tainaron marked up in 1997-1998 markup style still builds. - - For description of change see 0.3.1 + + For description of change see 0.3.1 %% SiSU Sabaki, version 0.2.0 of 2005w14/0 (2005-04-10): sisu-sabaki_0.2.0_2005w14-0.tar.gz SHA1(sisu-sabaki_0.2.0_2005w14-0.tar.gz)= 36986ffa6a17651a0d52646c9c91032af33bb32a From stable 0.1.4-11 - Contains development-branch, version + Contains development-branch, version 0.3 == 0.1.5-58 of 2005w13/6 * version number changes: stable branch is 0.2 development branch is 0.3 - * replaced config_environment.rb file which had dropped out of stable + * replaced config_environment.rb file which had dropped out of stable tarball. [lesson, test future setup/installs from clean slate] %% STABLE MANIFEST (@ 0.1.4 branch) @@ -5319,32 +5340,32 @@ skipped, synced tarball and deb in 0.12.6 sisu-sabaki-stable_0.1.4-10_2005w14-6.tar.gz SHA1(sisu-sabaki-stable_0.1.4-11_2005w14-6.tar.gz)= bdb2b09d467804a6d3a4bd92abb13c015c57d897 - Contains development-branch, version + Contains development-branch, version 0.1.5-58 of 2005w13/6 (56-58) 0.1.5-56 of 2005w14/3 - * html endnote segment, (introduced bug fixed) linkback to + * html endnote segment, (introduced bug fixed) linkback to main text broken, url was split on more than one line, resulting in error - * special characters escaping for use within text + * special characters escaping for use within text looked at, (mostly there previously but not documented) - ~ { } < > - _ / also used : ^ ! # - note added to man pages + ~ { } < > - _ / also used : ^ ! # + note added to man pages (more to be done) 0.1.5-57 of 2005w14/5 - * distinguish text poem from other text groupings by giving an + * distinguish text poem from other text groupings by giving an object citation number to each verse - * cosmetic html default colors for navigation band and home button + * cosmetic html default colors for navigation band and home button surround made neutral (white) 0.1.5-58 of 2005w14/6 - * distinguish text poem from other text groupings by giving an + * distinguish text poem from other text groupings by giving an object citation number to each verse * alt and group text groupings bugfix @@ -5353,12 +5374,12 @@ skipped, synced tarball and deb in 0.12.6 sisu-sabaki-stable_0.1.4-10_2005w13-6.tar.gz SHA1(sisu-sabaki-stable_0.1.4-10_2005w13-6.tar.gz)= bdd91b004c456251d6e7074439f6e9b571ae5316 - Contains development-branch, version + Contains development-branch, version 0.1.5-55 of 2005w13/6 (47-55) 0.1.5-47 of 2005w13/3 - * texpdf suggested urls at end of document problems with latex special + * texpdf suggested urls at end of document problems with latex special characters, not fully looked into, or passed through the appropriate filter, but some ad hoc corrections made @@ -5382,23 +5403,23 @@ skipped, synced tarball and deb in 0.12.6 0.1.5-51 of 2005w13/4 - * initial xml table logic is in place (logic taken from html unit) [still using + * initial xml table logic is in place (logic taken from html unit) [still using html type tags but logic is in place] 0.1.5-52 of 2005w13/6 * object character numbering of special blocks "code", "poem", "group" - and "alt" finally corrected, in line with "tables". (may introduce a subtle + and "alt" finally corrected, in line with "tables". (may introduce a subtle variation, between poem and code, or alt and others, numbering the equivalent - of each verse, but need a bit of time to consider) numbering correct, some - cosmetic adjustments to follow, e.g. in pdfs, more work necessary in xml + of each verse, but need a bit of time to consider) numbering correct, some + cosmetic adjustments to follow, e.g. in pdfs, more work necessary in xml series. 0.1.5-53 of 2005w13/6 * dbi a bit of cleaning of search column, and touch to data - 0.1.5-54 of 2005w13/6 + 0.1.5-54 of 2005w13/6 * texpdf adjustment to position of ocn in special text blocks @@ -5414,8 +5435,8 @@ skipped, synced tarball and deb in 0.12.6 sisu-sabaki-stable_0.1.4-9_2005w13-2.tar.gz SHA1(sisu-sabaki-stable_0.1.4-9_2005w13-2.tar.gz)= 743b912beddc235ec96456e97fe9350b2a275370 - Contains development-branch, version - 0.1.5-46 of 2005w13/1 (44-46) + Contains development-branch, version + 0.1.5-46 of 2005w13/1 (44-46) * small updates to man page @@ -5423,8 +5444,8 @@ skipped, synced tarball and deb in 0.12.6 sisu-sabaki-stable_0.1.4-8_2005w13-1.tar.gz SHA1(sisu-sabaki-stable_0.1.4-8_2005w13-1.tar.gz)= f8a7760bbd583e5d8637420d153c178ffafcbf68 - Contains development-branch, version - 0.1.5-43 of 2005w13/1 (34-43) + Contains development-branch, version + 0.1.5-43 of 2005w13/1 (34-43) Quick summary (context sisu markup): @@ -5438,7 +5459,7 @@ skipped, synced tarball and deb in 0.12.6 * various small fixes -- detail from development branch - + 0.1.5-44 of 2005w13/2: * documentation updates @@ -5464,7 +5485,7 @@ skipped, synced tarball and deb in 0.12.6 #using thlnk require r{ req #for vim folds - + with thlnk is attractive if you use vim because it recognises and permits the plain-text hyperlinking to the remote file, which can be called in for viewing. @@ -5478,7 +5499,7 @@ skipped, synced tarball and deb in 0.12.6 .s[1-3] ordinary sisu marked up documents .si sisu marked up snippets for incorporation into other documents .r[1-3] documents using require - (like a master document) - .t[1-3] temporary marked up files, usually created by sisu for processing, + .t[1-3] temporary marked up files, usually created by sisu for processing, e.g. from building the master file, or on having downloaded a remote sisu markup file for local processing. @@ -5489,33 +5510,33 @@ skipped, synced tarball and deb in 0.12.6 and peace); and .s3 requesting both the scroll and segments. 0.1.5-41 of 2005w12/0: - + * more alpha code: remote source a sisu markup file using url (http://) for - local processing. - + local processing. + For example, assuming sisu is installed, you could generate the text of the GPL in plain-text, html, xhtml, XML, pdf and a wordmap of its contents using the following string: - sisu -mhpabxXwv http://www.jus.uio.no/sisu/sample/markup/gpl2.fsf.s3 + sisu -mhpabxXwv http://www.jus.uio.no/sisu/sample/markup/gpl2.fsf.s3 - or to just do html and pdf files from one remote source to the default + or to just do html and pdf files from one remote source to the default remote destination (assuming you have one setup): - - sisu -mhpr http://www.jus.uio.no/sisu/sample/markup/gpl2.fsf.s3 - + + sisu -mhpr http://www.jus.uio.no/sisu/sample/markup/gpl2.fsf.s3 + [this works for texts without embedded images, unless you already have the images stored locally - it will be a relatively easy matter to get the program to search relative parts on the remote server and download them for processing with the document... no doubt it will happen one day, but is not a priority in the near future, also; will be a small step to permit remote (and local files) to be stored in zip format and unzipped prior to - processing if desired, to reduce bandwidth and time] - + processing if desired, to reduce bandwidth and time] + Nice from a flexibility perspective, though I expect SiSU's use to be primarily on locally stored marked up document sets. - * vim updates (small touches) to sisu: syntax highlighting; folds, and; + * vim updates (small touches) to sisu: syntax highlighting; folds, and; recognised filetypes (included .si .[rst][0-3] already being recognised) 0.1.5-40 of 2005w12/0: @@ -5539,18 +5560,18 @@ skipped, synced tarball and deb in 0.12.6 require r{ req #for vim folds - the value of the textlink and thlnk style is they are live hyperlinks to - the constituent parts of the document, which can be brought up at a + the value of the textlink and thlnk style is they are live hyperlinks to + the constituent parts of the document, which can be brought up at a keystroke for viewing or editing. - + [An interesting possibility to consider, is to permit sisu to get the composite parts of a document from a remote url source via http, using thlnk syntax which permits this - - NOTE: implemented in 0.1.5-42] - + - NOTE: implemented in 0.1.5-42] + 0.1.5-39 of 2005w12/6: - - * *alpha* code: assemble source document for processing from a document + + * *alpha* code: assemble source document for processing from a document requesting additional parts ... i.e. a master document, or a document with regular markup plus external insertions. Requesting documents currently with named suffix .r[1-3] documents requested may be complete valid sisu @@ -5568,11 +5589,11 @@ skipped, synced tarball and deb in 0.12.6 { name_of_file_to_load.s3 }require 0.1.5-38 of 2005w12/6: - + * xml sax and dom, pass data through... development-branch, version 0.1.5-37 of 2005w12/6 - + * document generator information added as comment to head of xml & xhtml output @@ -5583,7 +5604,7 @@ skipped, synced tarball and deb in 0.12.6 * cosmetic, (still with screen output on doing remote sending) - * [ratchet fix so yyyymmdd date info displayed correctly, was dropping + * [ratchet fix so yyyymmdd date info displayed correctly, was dropping the 0 before month and day where less than 10] * css and default home page modified @@ -5608,8 +5629,8 @@ skipped, synced tarball and deb in 0.12.6 sisu-sabaki-stable_0.1.4-7_2005w12-3.tar.gz SHA1(sisu-sabaki-stable_0.1.4-7_2005w12-3.tar.gz)= 929875de0658f1adeabd837fa09aca3ae48197e0 - Contains development-branch, version - 0.1.5-33 of 2005w12/3 (30-33) + Contains development-branch, version + 0.1.5-33 of 2005w12/3 (30-33) 0.1.5-33 of 2005w12/3: @@ -5640,12 +5661,12 @@ skipped, synced tarball and deb in 0.12.6 sisu-sabaki-stable_0.1.4-6_2005w12-1.tar.gz SHA1(sisu-sabaki-stable_0.1.4-6_2005w12-1.tar.gz)= 3f8ded60f1f43e3ba3e745d9bbc045bb0ab43ffb - Contains development-branch, version - 0.1.5-29 of 2005w11/6 (22-29) + Contains development-branch, version + 0.1.5-29 of 2005w11/6 (22-29) from development-branch, version 0.1.5-26 to 0.1.5-29 of 2005w11/6 - * -h0 turns off object character number display in html ouput + * -h0 turns off object character number display in html ouput (-p0 to turn of object character number display in pdf, already exists) [this is the digit 0 not upercase o] @@ -5662,7 +5683,7 @@ skipped, synced tarball and deb in 0.12.6 0.1.5-25 of 2005w11/5: * on table of contents page (for segmented text), new arrow navigation - button linked to first segment. + button linked to first segment. * -ru forces use of scp so as to build remote file structure and for input files selected for processing, to copy all output files in their @@ -5678,7 +5699,7 @@ skipped, synced tarball and deb in 0.12.6 0.1.5-24 of 2005w11/3: * [decided how to represent blockquotes, propagte] - + * provided sisu home site urls (not a code change) 0.1.5-23 of 2005w11/3: @@ -5687,7 +5708,7 @@ skipped, synced tarball and deb in 0.12.6 (e.g. all pdf files for the following files to be processed - previously copied all files from output directory of file for which processing was requested) has a drawback though, as rely on scp -r to build the directory - structure, the first sending of any file must be done by calling the + structure, the first sending of any file must be done by calling the -r flag alone, ie without other sisu instructions. 0.1.5-22 of 2005w11/2: @@ -5705,27 +5726,27 @@ skipped, synced tarball and deb in 0.12.6 sisu-sabaki-stable_0.1.4-5_2005w11-2.tar.gz SHA1(sisu-sabaki-stable_0.1.4-5_2005w11-2.tar.gz)= 25e35edc2f932269d21b17c29890ad72c54510a5 - Contains development-branch, version - 0.1.5-21 of 2005w11/2 + Contains development-branch, version + 0.1.5-21 of 2005w11/2 * html, css, indented bullet fixed - + * [see 0.1.4-4 for recent changes] %% SiSU Sabaki, version 0.1.4-4 of 2005w11/1 (2005-03-14): sisu-sabaki-stable_0.1.4-4_2005w11-1.tar.gz SHA1(sisu-sabaki-stable_0.1.4-4_2005w11-1.tar.gz)= 2ab9fa0a45275ca65a23e5199ef13851f00042f2 - Contains development-branch, version - 0.1.5-16 to 0.1.5-20 of 2005w11/1 + Contains development-branch, version + 0.1.5-16 to 0.1.5-20 of 2005w11/1 * html markup, a quick glance at & nod (anew) towards css changes to ruby html code & to markup arranging & pruning (also get rid of some line noise) from 0.1.5-16 to 0.1.5-20 (an ongoing longer term sort of thing) quite a few changes, more to be done though - + * line wrap visited - + * ascii touched * some code files moved and renamed @@ -5734,8 +5755,8 @@ skipped, synced tarball and deb in 0.12.6 sisu-sabaki-stable_0.1.4-3_2005w10-5.tar.gz SHA1(sisu-sabaki-stable_0.1.4-3_2005w10-5.tar.gz)= 7e06a3b37e85eaebc74892244f6626ee4f2fcc8a - Contains development-branch, version - 0.1.5-15 of 2005w10/5 + Contains development-branch, version + 0.1.5-15 of 2005w10/5 * remote host secure copy: adjustments, and flagged in help as EXPERIMENTAL and as requiring configuration. Checks provided - no action taken if @@ -5750,11 +5771,11 @@ skipped, synced tarball and deb in 0.12.6 sisu-sabaki-stable_0.1.4-2_2005w10-5.tar.gz SHA1(sisu-sabaki-stable_0.1.4-2_2005w10-5.tar.gz)= 46ad3b254b5e9293610dccd6274e039e49c5b9a2 - Contains development-branch, version - 0.1.5-12 of 2005w10/5 + Contains development-branch, version + 0.1.5-12 of 2005w10/5 * forgot to update Rakefile along with rest of last stable relese (this is - excuse for current update) + excuse for current update) * [A potentially useful feature, released prematurely] remote host secure copy using system call, -r flag introduced, hostname and user must be @@ -5765,10 +5786,10 @@ skipped, synced tarball and deb in 0.12.6 (note is faster i am sure to send a compressed tarball)) [could do same for ftp etc.] Note also would be more efficiently implemented as a threaded, will consider later, for now the output of this implementation is - appreciated. + appreciated. * ascii.rb minor touch, (repeated require removed) - + * an email address update for author %% SiSU Sabaki, version 0.1.4-1 of 2005w10/3 (2005-03-09): @@ -5776,8 +5797,8 @@ skipped, synced tarball and deb in 0.12.6 http://www.jus.uio.no/sisu/download/sisu-sabaki-stable_0.1.4-0_2005w10-3.tar.gz SHA1(sisu-sabaki-stable_0.1.4-1_2005w10-3.tar.gz)= 8ab95e942f7dd2449e1c92ec94f15a938d01edce - Contains development-branch, version - 0.1.5-1 (post 2005w06/4) - 0.1.5-11 of 2005w10/2 + Contains development-branch, version + 0.1.5-1 (post 2005w06/4) - 0.1.5-11 of 2005w10/2 0.1.5-11 of 2005w10/1: @@ -5801,7 +5822,7 @@ skipped, synced tarball and deb in 0.12.6 0.1.5-7 of 2005w09/0: * utf8 xml - + * utf8 related transforms in one file, (but should profile), so far latexpdf and html, (xml to follow) @@ -5834,12 +5855,12 @@ skipped, synced tarball and deb in 0.12.6 Changed computer environment to utf8 (locale, postgresql, vim etc.), and run SiSU to see what breaks... * issues detected with LaTeX/pdf and sorted - + * hooks for paper size used by latex/pdf in place currently only default a4 set for all available types, sort out LaTeX settings later. - + * text version of version manifest included start to provide 2004-02-27 - + * small changes to rakefile * small changes to dates in sysenv @@ -5850,7 +5871,7 @@ skipped, synced tarball and deb in 0.12.6 detail as to how this works... this is left out for now, as having so many appendages is a distraction and make sisu look more complicated than it need be, or rather than it is for its' ordinary functions. - + * included Debian directory, first attempt at making a deb. [still only in development directory] @@ -5859,7 +5880,7 @@ skipped, synced tarball and deb in 0.12.6 http://www.jus.uio.no/sisu/download/sisu-sabaki-stable_0.1.4-0_2005w07-2.tar.gz SHA1(sisu-sabaki-stable_0.1.4-0_2005w07-2.tar.gz)= 0867a884c6741751e73e664c6fe485ec7161dcdb - + * substantively the same as 0.1.5-0 (development branch) * tables get object citation numbers @@ -5906,7 +5927,7 @@ skipped, synced tarball and deb in 0.12.6 sisu-sabaki_0.1.2-24_2005w05-5.tar.gz http://www.jus.uio.no/sisu/download/sisu-sabaki_0.1.2-24_2005w05-5.tar.gz SHA1(sisu-sabaki_0.1.2-24_2005w05-5.tar.gz)= - d93c2b510d3784dc7b396541734bcdaf198c0c9b + d93c2b510d3784dc7b396541734bcdaf198c0c9b * if you have ruby1.8.2, rake and sudo install and setup should be automated - small adjustments to Rakefile, if sudo is used on machine, will request @@ -5990,7 +6011,7 @@ skipped, synced tarball and deb in 0.12.6 sisu-sabaki_0.1.2-20_2005w05-2.tar.gz http://www.jus.uio.no/sisu/download/sisu-sabaki_0.1.2-20_2005w05-2.tar.gz SHA1(sisu-sabaki_0.1.2-20_2005w05-2.tar.gz)= - 1e28dde239c96b82acfced1a37615ca7255d102a + 1e28dde239c96b82acfced1a37615ca7255d102a * Most remaining system calls moved to single location, and binaries checked for before use, will be very easy to have alternative calls for different @@ -6010,7 +6031,7 @@ skipped, synced tarball and deb in 0.12.6 %% SiSU Sabaki, version 0.1.2-19 of 2005w05/1 (2005-01-31): sisu-sabaki_0.1.2-19_2005w05-1.tar.gz http://www.jus.uio.no/sisu/download/sisu-sabaki_0.1.2-19_2005w05-1.tar.gz - SHA1(sisu-sabaki_0.1.2-19_2005w05-1.tar.gz)= eb7ef826f2fa69c4ef8eaf33ff297f3141c1217e + SHA1(sisu-sabaki_0.1.2-19_2005w05-1.tar.gz)= eb7ef826f2fa69c4ef8eaf33ff297f3141c1217e * Rakefile modified, same result ... a few more options @@ -6069,7 +6090,7 @@ skipped, synced tarball and deb in 0.12.6 http://www.jus.uio.no/sisu/download/sisu-sabaki_0.1.2-17_2005w04-4.tar.gz SHA1(sisu-sabaki_0.1.2-17_2005w04-4.tar.gz)= e61952bcde4b7cd936fdcd35835287d50af83814 - + * Test documents regenerated. * Bugfix release, fixing bug intruduced by longtime planned nifty new feature @@ -6266,7 +6287,7 @@ SHA1(sisu-sabaki_0.1.2-5_2005w03-2.tar.gz)= non-duplication of such names. There is a remote possibility it breaks something. An example of such a link: http://www.jus.uio.no/sisu/SiSU/2004#ibm - http://www.jus.uio.no/sisu/SiSU/2004#2004-06-17 + http://www.jus.uio.no/sisu/SiSU/2004#2004-06-17 * endnotes were missing from the html full length, scroll outputs, and are now back. @@ -6279,7 +6300,7 @@ SHA1(sisu-sabaki_0.1.2-5_2005w03-2.tar.gz)= http://www.jus.uio.no/sisu/download/sisu-sabaki_0.1.2-1_2005w02-1.tar.gz SHA1(sisu-sabaki_0.1.2-1_2005w02-1_sha1)= 6afa36b152359da215df84244cb156c2ee61d61f - + * previous bundle not quite complete (skins missing) - [still missing were marked incorrectly for darcs revision control exclusion] @@ -6330,7 +6351,7 @@ SHA1(sisu-sabaki_0.1.2-5_2005w03-2.tar.gz)= %% *Withdrawn* - SiSU Sabaki, version 0.1.1-2 of 2005w01/6 (2005-01-08): SHA1(sisu-sabaki_0.1.1-2_2005w01-6.tar.gz)= 6acb02f98d100ff9a7f7a01ad71b88c215488009 - + * Few lines of code changed from 0.1.1-2, which is withdrawn. %% SiSU Sabaki, version 0.1.1-1 of 2005w01/5 (2005-01-07): @@ -6369,7 +6390,7 @@ SHA1(sisu-sabaki_0.1.2-5_2005w03-2.tar.gz)= First release of SiSU - sisu_0.1.0-9_2005w01-2.tgz http://www.jus.uio.no/sisu/download/sisu_0.1.0-9_2005w01-2.tgz SHA1(sisu_0.1.0-9_2005w01-2.tgz)= - 14b230ba5a4c8f1c7264b38cd2d9c95a97477f3a + 14b230ba5a4c8f1c7264b38cd2d9c95a97477f3a SiSU Sabaki, version 0.1.0-9 of 2005w01/2 (2005-01-04) was released to the public on January 4th 2005. It may be downloaded from: @@ -6398,29 +6419,29 @@ SiSU Sabaki development-branch, version 0.1.5-46 of 2005w13/2 * substantively the same as 0.1.4-9 SiSU Sabaki development-branch, version 0.1.5-44 of 2005w13/2 -* substantively the same as 0.1.4-8 +* substantively the same as 0.1.4-8 SiSU Sabaki development-branch, version 0.1.5-33 of 2005w12/3 -* substantively the same as 0.1.4-7 +* substantively the same as 0.1.4-7 SiSU Sabaki development-branch, version 0.1.5-29 of 2005w12/1 -* substantively the same as 0.1.4-6 +* substantively the same as 0.1.4-6 SiSU Sabaki development-branch, version 0.1.5-21 of 2005w11/2 -* substantively the same as 0.1.4-5 +* substantively the same as 0.1.4-5 SiSU Sabaki development-branch, version 0.1.5-20 of 2005w11/1 -* substantively the same as 0.1.4-4 +* substantively the same as 0.1.4-4 -SiSU Sabaki development-branch, version 0.1.5-15 of 2005w10/4 -* substantively the same as 0.1.4-3 +SiSU Sabaki development-branch, version 0.1.5-15 of 2005w10/4 +* substantively the same as 0.1.4-3 -SiSU Sabaki development-branch, version 0.1.5-12 of 2005w10/4 -* substantively the same as 0.1.4-2 +SiSU Sabaki development-branch, version 0.1.5-12 of 2005w10/4 +* substantively the same as 0.1.4-2 -SiSU Sabaki development-branch, version 0.1.5-11 of 2005w10/2 -* substantively the same as 0.1.4-1 +SiSU Sabaki development-branch, version 0.1.5-11 of 2005w10/2 +* substantively the same as 0.1.4-1 -SiSU Sabaki development-branch, version 0.1.5-0 of 2005w06/4 -* substantively the same as 0.1.4-0 +SiSU Sabaki development-branch, version 0.1.5-0 of 2005w06/4 +* substantively the same as 0.1.4-0 diff --git a/data/sisu/conf/convert/sisu_convert b/data/sisu/conf/convert/sisu_convert index d7876083..9a734678 100644 --- a/data/sisu/conf/convert/sisu_convert +++ b/data/sisu/conf/convert/sisu_convert @@ -27,47 +27,47 @@ module CONVERT end def headerBasic <\n" #: <<#{@@html_title}>> - data=WareWord97.new(data.collect, @filename, @instruct).strip - data=WareWord97.new(data.collect, @filename, @instruct).strip - data=WareWord97.new(data.collect, @filename, @instruct).markup_rules - data=MyOutput.new(data.collect, @filename, @instruct).hardOutput + print "Convert to SiSU file from Word97 << gvim ,,#{@filename}.sst >\n" #: <<#{@@html_title}>> + data=WareWord97.new(data.collect,@filename,@instruct).strip + data=WareWord97.new(data.collect,@filename,@instruct).strip + data=WareWord97.new(data.collect,@filename,@instruct).markup_rules + data=MyOutput.new(data.collect,@filename,@instruct).hardOutput end def strip data=@data @@ -110,12 +110,12 @@ WOK endnote_no=1 data.each do |para| para.strip! - para.gsub!(/\s*<\/u>/, '') - para.gsub!(/<\/u>\s*/, '') - para.gsub!(/\s*<\/b>/, '') - para.gsub!(/<\/b>\s*/, '') - para.gsub!(/\s*<\/i>/, '') - para.gsub!(/<\/i>\s*/, '') + para.gsub!(/\s*<\/u>/,'') + para.gsub!(/<\/u>\s*/,'') + para.gsub!(/\s*<\/b>/,'') + para.gsub!(/<\/b>\s*/,'') + para.gsub!(/\s*<\/i>/,'') + para.gsub!(/<\/i>\s*/,'') tuned_file << para unless para == nil end tuned_file @@ -126,15 +126,16 @@ WOK endnote_no=1 data.each do |para| para.strip! - para.gsub!(/\s+/, ' ') - para.gsub!(/^(Chapter|Article)(.+?)<\/b>/i, "4{ \\1 \\2") #watch case insensitivity - para.gsub!(/^(Part|Section|Book)(.+?)<\/b>/i, "3{ \\1 \\2") #watch case insensitivity - para.gsub!(/^(\d+\.\d+\.\d+)(.+?)<\/b>/i, "6{ \\1 \\2") #numeric, decide what to do, can be different - para.gsub!(/^(\d+\.\d+)(.+?)<\/b>/i, "5{ \\1 \\2") #numeric, decide what to do, can be different - para.gsub!(/^(\d+)(.+?)<\/b>/i, "4{ \\1 \\2") #numeric, decide what to do, can be different - para.gsub!(/(.+?)<\/u>/, "_{\\1}_") - para.gsub!(/(.+?)<\/b>/, "*{\\1}*") - para.gsub!(/(.+?)<\/i>/, "/{\\1}/") + para.gsub!(/\s+/,' ') + para.gsub!(/^(Chapter|Article)(.+?)<\/b>/i,'4~ \1 \2') #watch case insensitivity + para.gsub!(/^(Part|Section|Book)(.+?)<\/b>/i,'3~ \1 \2') #watch case insensitivity + para.gsub!(/^(\d+\.\d+\.\d+\.?)(.+?)<\/b>/i,'6~ \1 \2') #numeric, decide what to do, can be different + para.gsub!(/^(\d+\.\d+\.?)(.+?)<\/b>/i,'5~ \1 \2') #numeric, decide what to do, can be different + para.gsub!(/^(\d.+?)<\/b>/i,'4~ \1 \2') #numeric, decide what to do, can be different + #para.gsub!(/^([\d.]+?)<\/b>/i,'4~ \1 \2') #numeric, decide what to do, can be different + para.gsub!(/(.+?)<\/u>/,'_{\1}_') + para.gsub!(/(.+?)<\/b>/,'*{\1}*') + para.gsub!(/(.+?)<\/i>/,'/{\1}/') tuned_file << para unless para == nil end tuned_file @@ -148,10 +149,11 @@ WOK end def songsheet data=@data - print "Convert to SiSU file from #{@filename}.html << gvim ,,#{@filename}.er9 >\n" #: <<#{@@html_title}>> + print "Convert to SiSU file from #{@filename}.html << gvim ,,#{@filename}.sst >\n" #: <<#{@@html_title}>> #data=Html.new(data.collect, @filename, @instruct).space_paragraphs #data=Html.new(data.split(''), @filename, @instruct).space_paragraphs - data=Html.new(data.split("\n"), @filename, @instruct).space_paragraphs + data=Html.new(data.join.split(/\n\n+/), @filename, @instruct).space_paragraphs + #data=Html.new(data.split("\n"), @filename, @instruct).space_paragraphs #data=Html.new(data.collect.join.split("\n"), @filename, @instruct).space_paragraphs data=Html.new(data.collect, @filename, @instruct).multiline data=Html.new(data.collect.join.split("\n\n"), @filename, @instruct).markup_rules @@ -164,18 +166,18 @@ WOK tuned_file=Array.new data.each do |para| para.strip! - para.gsub!(/\r/, '') + para.gsub!(/\r/,'') #para.gsub!(/\n/, ' ') #PROBLEM, serious time issues on a few files also for \n (or multiline matches which is less surprising), edit out if necessary - para.gsub!(/<\/?p>/i, 'zZz') - para.gsub!(/<\/?\s*p(?:\s+ALIGN=.+?)?>/i, "zZz") #all manner of

para.gsub!(/<\/?p>/i, "\n\n") - para.gsub!(//i, "zZz") # - para.gsub!(/<\/p>/i, "zZz") # repeat actually - para.gsub!(/<(?:dir|tr|br)>/i, "zZz") # + para.gsub!(/<\/?p>/i,'zZz') + para.gsub!(/<\/?\s*p(?:\s+ALIGN=.+?)?>/i,'zZz') #all manner of

para.gsub!(/<\/?p>/i, "\n\n") + para.gsub!(//i,'zZz') # + para.gsub!(/<\/p>/i,'zZz') # repeat actually + para.gsub!(/<(?:dir|tr|br)>/i,'zZz') # #para.gsub!(/<(?:\/\s*)?(?:dir|tr|br)>/i, "zZz") # - para.gsub!(/(<\/center>)/i, "\\1zZz") - para.gsub!(/(<\/h[1-6]>)/i, "\\1zZz") - para.gsub!(/ \s+/i, ' ') - para.gsub!(/(?:\s*zZz\s*)+/i, "zZz") # + para.gsub!(/(<\/center>)/i,'\1zZz') + para.gsub!(/(<\/h[1-6]>)/i,'\1zZz') + para.gsub!(/ \s+/i,' ') + para.gsub!(/(?:\s*zZz\s*)+/i,'zZz') # tuned_file << para unless para == nil end tuned_file @@ -185,10 +187,10 @@ WOK sub.each do |x| if x=~/(<\/blockquote>)/i m = $1 - res << x[/(.+?)#{m}/mi, 1].gsub!(/zZz/,"zZz_1 ") if x =~/.+?#{m}/mi - res << x[/#{m}(.+)/mi, 1] + res << x[/(.+?)#{m}/mi,1].gsub!(/zZz/,'zZz_1 ') if x =~/.+?#{m}/mi + res << x[/#{m}(.+)/mi,1] else - res << x #[/(.+)/mi, 1] + res << x #[/(.+)/mi,1] end end res.join @@ -197,26 +199,27 @@ WOK data=@data tuned_file=Array.new data.each do |para| - para.gsub!(/\n/, ' ') - para.gsub!(/ \s+/mi, ' ') + para.gsub!(/\n/,' ') + para.gsub!(/ \s+/mi,' ') #ALL HERE could be very time EXPENSIVE but tamed? compromise ... /mi - para.gsub!(/<([biu]|h[1-6])>(?:zZz)?([^<]+)?zZz(.+?)<\/\1>/i, "zZz<\\1>\\2 \\3") - para.gsub!(/<([biu]|h[1-6])>(?:

|zZz)+(.+?)(?:<\/center>)?zZz(.+?)?<\/\1>/i, "zZz<\\1>\\2 \\3") - #para.gsub!(/<([biu]|h[1-6])>(?:
|zZz)+(.+?)<\/center>zZz(.+?)?<\/\1>/i, "zZz<\\1>\\2 \\3") - para.gsub!(/<([biu]|h[1-6])>(?:
|zZz)+(.+?)<\/\1>/i, "zZz<\\1>\\2") - para.gsub!(/<(h[1-6])>(.+?)(?:
|zZz)+<\/\1>/i, "zZz<\\1>\\2zZz") #does catch some h1, h2 etc, too expensive to have biu - #para.gsub!(/<([biu]|h[1-6])>(.+?)(?:
|zZz)+<\/\1>/i, "zZz<\\1>\\2 \\3") #may go too far? useful for h1 h2 etc, remove biu? - #para.gsub!(/<([biu]|h[1-6])>([^<]+)?zZz(.+?)<\/\1>/i, "zZz<\\1>\\2 \\3") - #para.gsub!(/<([biu]|h[1-6])>([^<]+)?zZz(.+?)<\/\1>/i, "zZz<\\1>\\2 \\3") + para.gsub!(/<([biu]|h[1-6])>(?:zZz)?([^<]+)?zZz(.+?)<\/\1>/i,'zZz<\1>\2 \3') + para.gsub!(/<([biu]|h[1-6])>(?:
|zZz)+(.+?)(?:<\/center>)?zZz(.+?)?<\/\1>/i,'zZz<\1>\2 \3') + #para.gsub!(/<([biu]|h[1-6])>(?:
|zZz)+(.+?)<\/center>zZz(.+?)?<\/\1>/i,'zZz<\1>\2 \3') + para.gsub!(/<([biu]|h[1-6])>(?:
|zZz)+(.+?)<\/\1>/i,'zZz<\1>\2') + para.gsub!(/<(h[1-6])>(.+?)(?:
|zZz)+<\/\1>/i,'zZz<\1>\2zZz') #does catch some h1, h2 etc, too expensive to have biu + #para.gsub!(/<([biu]|h[1-6])>(.+?)(?:
|zZz)+<\/\1>/i,'zZz<\1>\2 \3') #may go too far? useful for h1 h2 etc, remove biu? + #para.gsub!(/<([biu]|h[1-6])>([^<]+)?zZz(.+?)<\/\1>/i,'zZz<\1>\2 \3') + #para.gsub!(/<([biu]|h[1-6])>([^<]+)?zZz(.+?)<\/\1>/i,'zZz<\1>\2 \3') ### SERIOUS PROBLEM INTRODUCED # sub = para.split(/
/i) # para = blockquotes(sub) if sub.length > 0 #check was on >1 could have serious repercussions 2004w29 - para.gsub!(/zZz(\s*zZz)*/, "\n\n") + para.gsub!(/zZz(\s*zZz)*/,"\n\n") tuned_file << para << "\n\n" unless para == nil end tuned_file end def markup_rules + @@flag_blockquote=false data=@data tuned_file=Array.new data.each do |para| @@ -224,65 +227,186 @@ WOK #p para.grep(//i) #m=$1 #para.gsub!(/(?:<\s*)?#{m}<\/a>(?:\s*>)?\.?/i, "#{m}") - para.gsub!(/(?:<\s*)?http:\/\/.+?<\/a>(?:\s*>)?\.?/i, "\\1") #risk that url & url are not to match + para.gsub!(/(?:<\s*)?http:\/\/.+?<\/a>(?:\s*>)?\.?/i,'\1') #risk that url & url are not to match #para.gsub!(/(?:<\s*)?(http:\/\/.+?\/\1)<\/a>(?:\s*>)?\.?/i, "\\2") #does not match end + if para=~/
/i + @@flag_blockquote=true + end + if @@flag_blockquote + para.gsub!(/^/,'_1 ') unless para.empty? or para =~/^\s*<\/?blockquote?>\s*$/i + end + if para=~/<\/BLOCKQUOTE>/i + @@flag_blockquote=false + end + para.gsub!(/<\/?blockquote?>/i,'') ### clean - para.gsub!(/^\s+/i, '') - para.gsub!(/<([bui]|em|su[pb])>\s*<\/\1>/i, '') - para.gsub!(/<\/?center>/i, '') - para.gsub!(/\s*<\/dir>/i, '') - para.gsub!(/
/i, '') - para.gsub!(/\s*
\[(\*+)\]<\/a>/i, "^{[\\1]}^ ") #other endnote marker - para.gsub!(/\[[a-z]?\d+\](?:<\/[bi]>)?<\/a>/i, '~e ') #endnote marker - para.gsub!(/\[[a-z]?\d+\](?:<\/[bi]>)?<\/a>/i, '~e ') #endnote marker - para.gsub!(/\s*(<\/a>)?\s*\d+\.?\s*(<\/a>)?\s*/i, '~{{ ') #endnote - #para.gsub!(/\s*(.+?)\s*<\/h\1>\s*/i, "\\1{ \\2") # - para.gsub!(/\s*(.+?)\s*<\/h\1>\s*/i, "\\1{ \\2") # - para.gsub!(/^(Chapter|Article)(.+?)<\/b>/i, "4{ \\1 \\2") #watch case insensitivity - para.gsub!(/^(Part|Section|Book)(.+?)<\/b>/i, "3{ \\1 \\2") #watch case insensitivity - para.gsub!(/^(\d+\.\d+\.\d+)(.+?)<\/b>/i, "6{ \\1 \\2") #numeric, decide what to do, can be different - para.gsub!(/^(\d+\.\d+)(.+?)<\/b>/i, "5{ \\1 \\2") #numeric, decide what to do, can be different - para.gsub!(/^(\d+)(.+?)<\/b>/i, "4{ \\1 \\2") #numeric, decide what to do, can be different + para.gsub!(/^\s+/i,'') + para.gsub!(/<([bui]|em|su[pb])>\s*<\/\1>/i,'') + para.gsub!(/<\/?center>/i,'') + para.gsub!(/\s*<\/dir>/i,'') + para.gsub!(/
/i,'') + para.gsub!(/\s*
\[(\*+)\]<\/a>/i,'^{[\1]}^ ') #other endnote marker + para.gsub!(/\[[a-z]?\d+\](?:<\/[bi]>)?<\/a>/i,'~^ ') #endnote marker + para.gsub!(/\[[a-z]?\d+\](?:<\/[bi]>)?<\/a>/i,'~^ ') #endnote marker + para.gsub!(/\s*(<\/a>)?\s*\d+\.?\s*(<\/a>)?\s*/i,'^~ ') #endnote + #para.gsub!(/\s*(.+?)\s*<\/h\1>\s*/i,'\1~ \2') # + para.gsub!(/\s*(.+?)\s*<\/h\1>\s*/i,'\1~ \2') # + para.gsub!(/^(Chapter|Article)(.+?)<\/b>/i,'4~ \1 \2') #watch case insensitivity + para.gsub!(/^(Part|Section|Book)(.+?)<\/b>/i,'3~ \1 \2') #watch case insensitivity + para.gsub!(/^(\d+\.\d+\.\d+\.?)(.+?)<\/b>/i,'6~ \1 \2') #numeric, decide what to do, can be different + para.gsub!(/^(\d+\.\d+\.?)(.+?)<\/b>/i,'5~ \1 \2') #numeric, decide what to do, can be different + para.gsub!(/^(\d+\.?)(.+?)<\/b>/i,'4~ \1 \2') #numeric, decide what to do, can be different # - para.gsub!(/^()(?:)?<(?:b|strong)>\s*(.+?)\s*<\/(?:b|strong)>/i, "5{ \\2 \\1") #watch - para.gsub!(/^(<(a name|A NAME)=".+?">)(\s*|<\/[aA]>)?([A-Z][A-Z])+/, "5{ \\2 \\1") #watch - para.gsub!(/^(\s+|

)?()(\s*|<\/a>)?/i, "5{ \\2 \\1") #watch - para.gsub!(/\s*(.+?)\s*<\/h\1>\s*/i, "\\1{ \\2") # - para.gsub!(/^\s*(.+?)<\/b>\s*(<\/i>\s*)?$/i, "4{ \\1\\2") # wish it all were less messy - para.gsub!(/^\s*([^"(].+?)<\/i>\s*(<\/b>\s*)?$/i, "5{ \\1\\2") # wish it all were less messy - para.gsub!(/<\/?[biu]>/i, '') if para =~/[1-6]\{/ - para.gsub!(/\s*(.+?)\s*<\/u>/i, "_{\\1}_") - para.gsub!(/<(b|strong)>\s*(.+?)\s*<\/\1>/i, "*{\\2}*") - para.gsub!(/<(i|em)>\s*(.+?)\s*<\/\1>/i, "/{\\2}/") - para.gsub!(/\s*(.+?)\s*<\/sup>/i, "^{\\1}^") - para.gsub!(/(([\/\*!_])\{.+?\}\2)\s\s+/i, "\\1 ") - para.gsub!(/(([\/\*!_])\{.+?\}\2)\s+([.,;?\)])\s+/i, "\\1\\3 ") - para.gsub!(/(([\/\*!_])\{.+?\}\2)(["'])\s+/i, "\\1\\3 ") - para.gsub!(/(([\/\*!_])\{.+?\}\2)\s*([a-z0-9])/i, "\\1 \\3") - para.gsub!(/(([\/\*_])\{.+?\}\2)\s*([a-z0-9])/i, "\\1 \\3") - para.gsub!(/([a-z0-9])(([\/\*_])\{.+?\}\3)/i, " \\1 \\2") #eg this/{problem}/ - para.gsub!(/([\/\*_])\{([,.;; ]+)\}\1/i, "\\2") #eg /{,}/ or *{ }* etc. - para.gsub!(/ \s+/i, ' ') + para.gsub!(/^()(?:)?<(?:b|strong)>\s*(.+?)\s*<\/(?:b|strong)>/i,'5~ \2 \1') #watch + para.gsub!(/^(<(a name|A NAME)=".+?">)(\s*|<\/[aA]>)?([A-Z][A-Z])+/,'5~ \2 \1') #watch + para.gsub!(/^(\s+|

)?()(\s*|<\/a>)?/i,'5~ \2 \1') #watch + para.gsub!(/\s*(.+?)\s*<\/h\1>\s*/i,'\1~ \2') # + para.gsub!(/^\s*(.+?)<\/b>\s*(<\/i>\s*)?$/i,'4~ \1\2') # wish it all were less messy + para.gsub!(/^\s*([^"(].+?)<\/i>\s*(<\/b>\s*)?$/i,'5~ \1\2') # wish it all were less messy + para.gsub!(/<\/?[biu]>/i,'') if para =~/[1-6]\{/ + para.gsub!(/\s*(.+?)\s*<\/u>/i,'_{\1}_') + para.gsub!(/<(b|strong)>\s*(.+?)\s*<\/\1>/i,'*{\2}*') + para.gsub!(/<(i|em)>\s*(.+?)\s*<\/\1>/i,'/{\2}/') + para.gsub!(/\s*(.+?)\s*<\/sup>/i,'^{\1}^') + para.gsub!(/(([\/\*!_])\{.+?\}\2)\s\s+/i,'\1 ') + para.gsub!(/(([\/\*!_])\{.+?\}\2)\s+([.,;?\)])\s+/i,'\1\3 ') + para.gsub!(/(([\/\*!_])\{.+?\}\2)(["'])\s+/i,'\1\3 ') + para.gsub!(/(([\/\*!_])\{.+?\}\2)\s*([a-z0-9])/i,'\1 \3') + para.gsub!(/(([\/\*_])\{.+?\}\2)\s*([a-z0-9])/i,'\1 \3') + para.gsub!(/([a-z0-9])(([\/\*_])\{.+?\}\3)/i,' \1 \2') #eg this/{problem}/ + para.gsub!(/([\/\*_])\{([,.;; ]+)\}\1/i,'\2') #eg /{,}/ or *{ }* etc. + para.gsub!(/ \s+/i,' ') #para.gsub!(/\/\{\*\{/i, '*{/{') #para.gsub!(/\}\*\}\//i, '}/}*') - para.gsub!(/"/i, '"') - para.gsub!(/&/i, 'and') - para.gsub!(//i, '') - para.gsub!(/<\/(?:title)>/i, '') - para.gsub!(//i, '#{~title? ') - para.gsub!(/<blockquote>(.+?)<\/blockquote>/mi, "\n\n_1 \\1\n\n") - para.gsub!(/<div align=.+?>|<\/div>|<font size=.+?>|<\/a><\/em><\/strong>/i, '') - para.gsub!(/~e\s+\.\s*/i, ".~e ") #check vim equiv # %s/\~e\s\+\.\s*/.\~e /c - para.gsub!(/\s+~e\s+/i, "~e ") - para.gsub!(/ \s+/i, ' ') - para.gsub!(/\s+$/i, '') - para.gsub!(/^(?:<\/[bi]>)+$/i, '') - para.gsub!(/^(?:(?:<i>)+<b>|(?:<b>)+<i>)\s*([^"(].+?)/i, "5{ \\1\\2") # wish it all were less messy - para.gsub!(/^(?:<\/?(?:[ib]|em)>\s*)+$/i, '') # cleaning up left over <i> etc. - para.gsub!(/<(?:i|em)>\s*(.+)/i, "/{\\1}/") # using up left over <i> - para.gsub!(/<b>\s*(.+)/i, "*{\\1}*") # using up left over <b> + para.gsub!(/"/i,'"') + para.gsub!(/&/i,'and') + para.gsub!(/<!doctype html public .+/i,'') + para.gsub!(/<\/?(?:html|head|body|font|small)>/i,'') + para.gsub!(/<\/(?:title)>/i,'') + para.gsub!(/<title>/i,'#{~title? ') + para.gsub!(/<blockquote>(.+?)<\/blockquote>/mi,"\n\n_1 \\1\n\n") + para.gsub!(/<div align=.+?>|<\/div>|<font size=.+?>|<\/a><\/em><\/strong>/i,'') + para.gsub!(/~^\s+\.\s*/i,'.~^ ') #check vim equiv # %s/\~e\s\+\.\s*/.\~e /c + para.gsub!(/\s+~^\s+/i,'~^ ') + para.gsub!(/ \s+/i,' ') + para.gsub!(/\s+$/i,'') + para.gsub!(/^(?:<\/[bi]>)+$/i,'') + para.gsub!(/^(?:(?:<i>)+<b>|(?:<b>)+<i>)\s*([^"(].+?)/i,'5~ \1\2') # wish it all were less messy + para.gsub!(/^(?:<\/?(?:[ib]|em)>\s*)+$/i,'') # cleaning up left over <i> etc. + para.gsub!(/<(?:i|em)>\s*(.+)/i,'/{\1}/') # using up left over <i> + para.gsub!(/<b>\s*(.+)/i,'*{\1}*') # using up left over <b> + para.gsub!(/<dd>([\d.]+)/i,'5~ \1') + para.gsub!(/<dd>(?: )+([\d.]+)/i,'6~ \1') + para.gsub!(/<dd>(\([a-z]\))/i,'7~ \1') + para.gsub!(/^([1-9]~)( .+?)<a name="(\S+?)">(.+?)(<\/a>)/i,'\1\3\2\4') + para.gsub!(/^([1-9]~)( .+?)<a name="(\S+?)">/i,'\1\3\2') + para.gsub!(/http\/\/(\S+)/i,'http:\/\/\1') + para.gsub!(/\s*<a href="\S+?">(http:\/\/\S+?)<\/a>\s*/i,' \1 ') + para.gsub!(/([a-zA-Z.,!?;:])([*\/_-]\{)/,'\1 \2') + para.gsub!(/^\s*( ){10,12}/i,'_2 ') + para.gsub!(/^\s*( ){4,5}/i,'_1 ') + para.gsub!(/ /,' ') #check + ## glyphs & tildes + para.gsub!(/¡/, '¡') #'Inverted exclamation + para.gsub!(/¢/, '¢') #'Cent sign ¢ + para.gsub!(/£/, '£') #'Pound sign £ + para.gsub!(/¤/, '¤') #'General currency sign + para.gsub!(/¥/, '¥') #'Yen sign ¥ + para.gsub!(/¦/, '¦') #'Broken vertical bar + para.gsub!(/§/, '§') #'Section sign § + para.gsub!(/¨/, '¨') #'Umlaut + para.gsub!(/©/, '©') #'Copyright © + para.gsub!(/ª/, 'ª') #'Feminine ordinal ª + para.gsub!(/«/, '«') #'Left angle quote « + para.gsub!(/¬/, '¬') #'Not sign + para.gsub!(/­/, '­') #'Soft hyphen + para.gsub!(/®/, '®') #'Registered trademark ® + para.gsub!(/¯/, '¯') #'Macron accent + para.gsub!(/°/, '°') #'Degree sign ° + para.gsub!(/&plusmin;/,'±') #'Plus or minus ± + para.gsub!(/²/, '²') #'Superscript 2 ² + para.gsub!(/³/, '³') #'Superscript 3 ³ + para.gsub!(/´/, '') #'Acute accent + para.gsub!(/µ/, 'µ') #'Micro sign (Greek mu) µ + para.gsub!(/¶/, '¶') #'Paragraph sign ¶ + para.gsub!(/·/, '·') #'Middle dot + para.gsub!(/¸/, '¸') #'Cedilla + para.gsub!(/¹/, '¹') #'Superscript 1 ¹ + para.gsub!(/º/, 'º') #'Masculine ordinal º + para.gsub!(/»/, '»') #'Right angle quote + para.gsub!(/¼/, '¼') #'Fraction one quarter ¼ + para.gsub!(/½/, '½') #'Fraction on half ½ + para.gsub!(/¾/, '¾') #'Fraction three quarters ¾ + para.gsub!(/¿/, '¿') #'Inverted question mark ¿ + para.gsub!(/À/, 'À') #'Capital A, grave accent À + para.gsub!(/Á/, 'Á') #'Capital A, acute accent Á + para.gsub!(/Â/, 'Â') #'Capital A, circumflex accent  + para.gsub!(/Ã/, 'Ã') #'Capital A, tilde à + para.gsub!(/Ä/, 'Ä') #'Capital A, umlaut Ä + para.gsub!(/Å/, 'Å') #'Capital A, ring Å + para.gsub!(/Æ/, 'Æ') #'Capital AE ligature Æ + para.gsub!(/Ç/, 'Ç') #'Capital C, cedilla Ç + para.gsub!(/È/, 'È') #'Capital E, grave accent È + para.gsub!(/É/, 'É') #'Capital E, acute accent É + para.gsub!(/Ê/, 'Ê') #'Capital E, circumflex accent Ê + para.gsub!(/Ë/, 'Ë') #'Capital E, umlaut Ë + para.gsub!(/Ì/, 'Ì') #'Capital I, grave accent Ì + para.gsub!(/Í/, 'Í') #'Capital I, acute accent Í + para.gsub!(/Î/, 'Î') #'Capital I, circumflex accent Î + para.gsub!(/Ï/, 'Ï') #'Capital I, umlaut Ï + para.gsub!(/Ð/, 'Ð') #'Capital eth, Icelandic + para.gsub!(/Ñ/, 'Ñ') #'Capital N, tilde Ñ + para.gsub!(/Ò/, 'Ò') #'Capital O, grave accent Ò + para.gsub!(/Ó/, 'Ó') #'Capital O, acute accent Ó + para.gsub!(/Ô/, 'Ô') #'Capital O, circumflex accent Ô + para.gsub!(/Õ/, 'Õ') #'Capital O, tilde Õ + para.gsub!(/Ö/, 'Ö') #'Capital O, umlaut Ö + para.gsub!(/×/, '×') #'Multiply sign × + para.gsub!(/Ø/, 'Ø') #'Capital O, slash Ø + para.gsub!(/Ù/, 'Ù') #'Capital U, grave accent Ù + para.gsub!(/Ú/, 'Ú') #'Capital U, acute accent Ú + para.gsub!(/Û/, 'Û') #'Capital U, circumflex accent Û + para.gsub!(/Ü/, 'Ü') #'Capital U, umlaut Ü + para.gsub!(/Ý/, 'Ý') #'Capital Y, acute accent Ý + para.gsub!(/Þ/, 'Þ') #'Capital thorn, Icelandic Þ + para.gsub!(/ß/, 'ß') #'Small sz ligature, German ß + para.gsub!(/à/, 'à') #'Small a, grave accent à + para.gsub!(/á/, 'á') #'Small a, acute accent á + para.gsub!(/â/, 'â') #'Small a, circumflex accent â + para.gsub!(/ã/, 'ã') #'Small a, tilde ã + para.gsub!(/ä/, 'ä') #'Small a, umlaut ä + para.gsub!(/å/, 'å') #'Small a, ring å + para.gsub!(/æ/, 'æ') #'Small ae ligature æ + para.gsub!(/ç/, 'ç') #'Small c, cedilla ç + para.gsub!(/è/, 'è') #'Small e, grave accent è + para.gsub!(/é/, 'é') #'Small e, acute accent é + para.gsub!(/ê/, 'ê') #'Small e, circumflex accent ê + para.gsub!(/ë/, 'ë') #'Small e, umlaut ë + para.gsub!(/ì/, 'ì') #'Small i, grave accent ì + para.gsub!(/í/, 'í') #'Small i, acute accent í + para.gsub!(/î/, 'î') #'Small i, circumflex accent î + para.gsub!(/ï/, 'ï') #'Small i, umlaut ï + para.gsub!(/ð/, 'ð') #'Small eth, Icelandic ð + para.gsub!(/ñ/, 'ñ') #'Small n, tilde ñ + para.gsub!(/ò/, 'ò') #'Small o, grave accent ò + para.gsub!(/ó/, 'ó') #'Small o, acute accent ó + para.gsub!(/ô/, 'ô') #'Small o, circumflex accent ô + para.gsub!(/õ/, 'õ') #'Small o, tilde õ + para.gsub!(/ö/, 'ö') #'Small o, umlaut ö + para.gsub!(/÷/, '÷') #'Divide sign ÷ + para.gsub!(/ø/, 'ø') #'Small o, slash ø + para.gsub!(/ù/, 'ù') #'Small u, grave accent ù + para.gsub!(/ú/, 'ú') #'Small u, acute accent ú + para.gsub!(/û/, 'û') #'Small u, circumflex accent û + para.gsub!(/ü/, 'ü') #'Small u, umlaut ü + para.gsub!(/ý/, 'ý') #'Small y, acute accent ý + para.gsub!(/þ/, 'þ') #'Small thorn, Icelandic þ + para.gsub!(/ÿ/, 'ÿ') #'Smally y, umlaut ÿ + ## + para.gsub!(/\s\s+/,' ') + para.gsub!(/\t+/,' ') + #para.gsub!(/ +/,' ') #para.gsub!(/^(?:<(?:\/)?[bi]>)+$/i, '') tuned_file << para unless para == nil end @@ -297,7 +421,7 @@ WOK end def songsheet data=@data - print "Convert to SiSU file from #{@filename}.html << gvim ,,#{@filename}.er9 >\n" #: <<#{@@html_title}>> + print "Convert to SiSU file from #{@filename}.html << gvim ,,#{@filename}.sst >\n" #: <<#{@@html_title}>> data=Default.new(data.collect, @filename, @instruct).space_paragraphs data=Default.new(data.collect, @filename, @instruct).multiline data=Default.new(data.collect.join.split("\n\n"), @filename, @instruct).markup_rules @@ -308,9 +432,9 @@ WOK data=@data tuned_file=Array.new data.each do |para| - para.gsub!(/<i>(Id\.?)(\s|$)/i, "/\{\\1\}\\2/") - para.gsub!(/^(~\{\{ .+?)(<\/LI>\s*|<\/OL>\s*)+$/i, "\\1") - para.gsub!(/\/\{Id\.\s*<\/LI>\s*\}\//i, '/{Id.}/') + para.gsub!(/<i>(Id\.?)(\s|$)/i,'/\{\1\}\2/') + para.gsub!(/^(~\{\{ .+?)(<\/LI>\s*|<\/OL>\s*)+$/i,'\1') + para.gsub!(/\/\{Id\.\s*<\/LI>\s*\}\//i,'/{Id.}/') tuned_file << para unless para == nil end tuned_file @@ -328,7 +452,7 @@ initial SiSU markup from other file formats WOK end -def doWord(argv, instruct) +def do_word(argv, instruct) argv.each do |f| if f =~/.+?\.doc$/ @argv << f[/(.+?)\.doc$/, 1] @@ -337,12 +461,12 @@ def doWord(argv, instruct) end end @argv.each do |filename| - system(%{wvWare -x #{@dir.home}/.sisu/convert/wvSiSU.xml #{filename}.doc > #{filename}.wv}) + system(%{wvWare -x #{@dir.path.home}/.sisu/convert/wvSiSU.xml #{filename}.doc > #{filename}.wv}) file_array=IO.readlines("#{filename}.wv", "") CONVERT::WareWord97.new(file_array, filename, instruct).songsheet # metaverse created here end end -def doHtml(argv, instruct) +def do_html(argv, instruct) argv.each do |f| if f =~/.+?\.html$/ @argv << f[/(.+?)\.html$/, 1] @@ -351,11 +475,11 @@ def doHtml(argv, instruct) end end @argv.each do |filename| - file_array=IO.readlines("#{filename}.html", "\n\r") - CONVERT::Html.new(file_array, filename, instruct).songsheet # metaverse created here + file_array=IO.readlines("#{filename}.html","\n\r") + CONVERT::Html.new(file_array,filename,instruct).songsheet # metaverse created here end end -def doDefault(argv, instruct) +def do_default(argv, instruct) argv.each do |f| if f =~/.+?\.html$/ @argv << f[/(.+?)\.html$/, 1] @@ -371,18 +495,21 @@ end def cases(argv, instruct) case instruct when/^--(word(97)?|doc)$/i #creates minimal sisu_small.gz package to send - doWord(argv, instruct) + do_word(argv, instruct) when/^--(html)$/i #creates sisu.gz package to send - doHtml(argv, instruct) + do_html(argv, instruct) when/^--(default)$/i #creates sisu.gz package to send - doDefault(argv, instruct) + do_default(argv, instruct) else help end end -require 'zxy_sysenv.rb' +$KCODE='u' +branch='v0' +SiSU_lib="sisu/#{branch}" +require "#{SiSU_lib}/sysenv" include SiSU_Env -@dir=SiSU_Env::Info_dir.new +@dir=SiSU_Env::Info_env.new @argv=Array.new argv=$* instruct = "#{argv[0].to_s}" diff --git a/data/sisu/conf/vim/addons/syntax/sisu.vim b/data/sisu/conf/vim/addons/syntax/sisu.vim index 13d22bb1..8a114b64 100644 --- a/data/sisu/conf/vim/addons/syntax/sisu.vim +++ b/data/sisu/conf/vim/addons/syntax/sisu.vim @@ -10,7 +10,7 @@ else endif "% 11 Errors? syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>" -"% 10 Markers: Endnote Identifiers, Pagebreaks etc.: +"% 10 Markers: Endnote Identifiers, Pagebreaks etc.: if !exists("sisu_no_identifiers") syn match sisu_mark_endnote "\~^" syn match sisu_contain contains=@NoSpell "</\?sub>" @@ -26,7 +26,7 @@ if !exists("sisu_no_identifiers") "metaverse specific syn match sisu_ocn contains=@NoSpell "<\~\d\+;\w\d\+;\w\d\+>" syn match sisu_marktail "<\~#>" - syn match sisu_markpara contains=@NoSpell "<:i[12]>" + syn match sisu_markpara contains=@NoSpell "<:i[1-9]>" syn match sisu_link " \*\~\S\+" syn match sisu_action "^<:insert\d\+>" syn match sisu_contain "<:e>" @@ -63,7 +63,7 @@ syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_co syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline "% some line operations syn region sisu_control contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_control start="\(\(^\| \)!_ \|<:b>\)" end="$" -syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([12*]\|[12]\*\) " end="$" +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" syn region sisu_comment matchgroup=sisu_comment start="^%\{1,2\} " end="$" "% font face curly brackets @@ -74,7 +74,7 @@ syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," -syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" syn region sisu_html contains=sisu_error contains=sisu_strikeout matchgroup=sisu_contain start="<a href=\".\{-}\">" end="</a>" oneline "% single words bold italicise etc. "workon syn region sisu_control contains=sisu_error matchgroup=sisu_control start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline diff --git a/lib/sisu/v0/css.rb b/lib/sisu/v0/css.rb index f8c7d25b..e2035d95 100644 --- a/lib/sisu/v0/css.rb +++ b/lib/sisu/v0/css.rb @@ -387,6 +387,9 @@ WOK p.i4 {margin-left: 35mm;} p.i5 {margin-left: 40mm;} p.i6 {margin-left: 45mm;} + p.i7 {margin-left: 50mm;} + p.i8 {margin-left: 55mm;} + p.i9 {margin-left: 60mm;} table { } tr { } @@ -452,11 +455,53 @@ WOK margin-bottom: 3px; } li.i2 { + margin-left: 25mm; + line-height: 150%; + margin-top: 3px; + margin-bottom: 3px; + } + li.i3 { margin-left: 30mm; line-height: 150%; margin-top: 3px; margin-bottom: 3px; } + li.i4 { + margin-left: 35mm; + line-height: 150%; + margin-top: 3px; + margin-bottom: 3px; + } + li.i5 { + margin-left: 40mm; + line-height: 150%; + margin-top: 3px; + margin-bottom: 3px; + } + li.i6 { + margin-left: 45mm; + line-height: 150%; + margin-top: 3px; + margin-bottom: 3px; + } + li.i7 { + margin-left: 50mm; + line-height: 150%; + margin-top: 3px; + margin-bottom: 3px; + } + li.i8 { + margin-left: 55mm; + line-height: 150%; + margin-top: 3px; + margin-bottom: 3px; + } + li.i9 { + margin-left: 60mm; + line-height: 150%; + margin-top: 3px; + margin-bottom: 3px; + } #horizontal_links { background: #eeeeee; margin-left: 5%; @@ -1338,6 +1383,54 @@ WOK text[class|="indent2"] { margin-left: 15%; } + text[class|="indent3"] { + margin-left: 20%; + } + text[class|="indent4"] { + margin-left: 25%; + } + text[class|="indent5"] { + margin-left: 30%; + } + text[class|="indent6"] { + margin-left: 35%; + } + text[class|="indent7"] { + margin-left: 40%; + } + text[class|="indent8"] { + margin-left: 45%; + } + text[class|="indent9"] { + margin-left: 50%; + } + text[class|="indent_bullet1"] { + margin-left: 10%; + } + text[class|="indent_bullet2"] { + margin-left: 15%; + } + text[class|="indent_bullet3"] { + margin-left: 20%; + } + text[class|="indent_bullet4"] { + margin-left: 25%; + } + text[class|="indent_bullet5"] { + margin-left: 30%; + } + text[class|="indent_bullet6"] { + margin-left: 35%; + } + text[class|="indent_bullet7"] { + margin-left: 40%; + } + text[class|="indent_bullet8"] { + margin-left: 45%; + } + text[class|="indent_bullet9"] { + margin-left: 50%; + } text[class|="verse"], text[class|="group"], text[class|="code"] { text-align: left; } @@ -1550,6 +1643,54 @@ WOK text[class|="indent2"] { margin-left: 15%; } + text[class|="indent3"] { + margin-left: 20%; + } + text[class|="indent4"] { + margin-left: 25%; + } + text[class|="indent5"] { + margin-left: 30%; + } + text[class|="indent6"] { + margin-left: 35%; + } + text[class|="indent7"] { + margin-left: 40%; + } + text[class|="indent8"] { + margin-left: 45%; + } + text[class|="indent9"] { + margin-left: 50%; + } + text[class|="indent_bullet1"] { + margin-left: 10%; + } + text[class|="indent_bullet2"] { + margin-left: 15%; + } + text[class|="indent_bullet3"] { + margin-left: 20%; + } + text[class|="indent_bullet4"] { + margin-left: 25%; + } + text[class|="indent_bullet5"] { + margin-left: 30%; + } + text[class|="indent_bullet6"] { + margin-left: 35%; + } + text[class|="indent_bullet7"] { + margin-left: 40%; + } + text[class|="indent_bullet8"] { + margin-left: 45%; + } + text[class|="indent_bullet9"] { + margin-left: 50%; + } text[class|="verse"], text[class|="group"], text[class|="code"] { text-align: left; } diff --git a/lib/sisu/v0/dal_syntax.rb b/lib/sisu/v0/dal_syntax.rb index 513dc721..d0014ad6 100644 --- a/lib/sisu/v0/dal_syntax.rb +++ b/lib/sisu/v0/dal_syntax.rb @@ -61,7 +61,7 @@ module Syntax @manmkp_ital='[i/]\\{.+?\\}[i/]' tail_m_ital=%q{(?:\s|[.,;:?!'")]|~\^|~\\\{\s|$)} tail_m_bold=%q{(?:(?:<\/i>)?(?:\s|[.,;:?!'")]|~\^|~\\\{\s|$))?} - bold_line=%q{^!_\s.+?(?:\n|$)} + bold_line=%q{^!_\s.+?(?:<br>|\n|$)} @line_scan_ital=if defined? @md.make_italic[:str] and defined? @vz.markup_make_italic[:str] /#@http_m|#{bold_line}|#@manmkp_ital#{tail_m_ital}|(?:#{@md.make_italic[:str]}|#{@vz.markup_make_italic[:str]})#{tail_m_ital}|\S+|\n/ elsif defined? @md.make_italic[:str] @@ -120,9 +120,10 @@ module Syntax line end def embolden(given) - given.gsub!(/(?:^!_|^[789]~)\s+(.+?)\s+((?:[*]~\S+\s*)+)/,'<b>\1</b> \2') - given.gsub!(/(?:^!_|^[789]~)\s+(.+?)\s*([~-]#)$/,'<b>\1</b> \2') - given.gsub!(/(?:^!_\s+|^[789]~\s+)(.*)?\s*$/,'<b>\1</b>') + given.gsub!(/(?:^!_|^[7-9]~)\s+(.+?)(<br>)/,'<b>\1</b>\2') + given.gsub!(/(?:^!_|^[7-9]~)\s+(.+?)\s+((?:[*]~\S+\s*)+)/,'<b>\1</b> \2') + given.gsub!(/(?:^!_|^[7-9]~)\s+(.+?)\s*([~-]#)$/,'<b>\1</b> \2') + given.gsub!(/(?:^!_\s+|^[7-9]~\s+)(.*)?\s*$/,'<b>\1</b>') end def wordlist_bold(line) line=line.dup @@ -140,7 +141,7 @@ module Syntax w.gsub!(@vz.markup_make_bold,'<b>\1</b>') end else - if w =~ /(?:^!_|^[789]~)\s+/; embolden(w) #bold paragraph/emphasize #may wish to remove think about 7{ 8{ conversion not satisfactory, as information is lost! + if w =~ /(?:^!_|^[7-9]~)\s+/; embolden(w) #bold paragraph/emphasize #may wish to remove think about 7{ 8{ conversion not satisfactory, as information is lost! end end line_array << w @@ -149,7 +150,7 @@ module Syntax else line end else - if line !~/^(?:[0-9]~|%+\s)/ and line =~ /(?:^!_|^[789]~)\s+/; embolden(line) + if line !~/^(?:[0-9]~|%+\s)/ and line =~ /(?:^!_|^[7-9]~)\s+/; embolden(line) end end line @@ -172,8 +173,10 @@ module Syntax # ~{endnote}~ <!e endnote !> # !_ #bold/emphasise paragraph # _" #blockquote paragraph - # _1 <!i1!> #indent paragraph 1 step - # _2 <!i2!> #indent paragraph 2 steps + # _1 <:i1> #indent paragraph 1 step + # _2 <:i2> #indent paragraph 2 steps + # _3 <:i3> #indent paragraph 3 steps + # _4 <:i4> #indent paragraph 4 steps # _* #bullet (list) # _1* #bullet (list) indented # _1* #bullet (list) indented @@ -255,17 +258,15 @@ module Syntax line.gsub!(/(^|\s+)-([^{]\S+?)-( |$)/,'\1<del>\2</del>\3') #underscore single word, watch line.gsub!(/(^|\s+|['"]| |\(|\>|\d+)\^(\S+?)\^/,'\1<sup>\2</sup>') #superscript single word, watch digit added line.gsub!(/<[:e]\s+(.+?)!?>/,'~{ \1 }~') # not tested - line.gsub!(/^\s*_([12])(\*+)\s*/,'<:i\1> _* ') #bullets, shortcut - line.gsub!(/^\s*_([12])\s+/,'<:i\1> ') #indent + line.gsub!(/^\s*_([1-9])(\*+)\s*/,'<:i\1> _* ') #bullets, shortcut + line.gsub!(/^\s*_([1-9])\s+/,'<:i\1> ') #indent line.gsub!(/(?:<br>|<br \/>)\s*_[12]\s+/,'<br> ') #indent used in endnotes, not implemented, replace when ready with: line.gsub!(/(?:<br>|<br \/>)\s*_([12])\s+/,'<br><:i\1> ') - #line.gsub!(/^\s*_([12])\s+/,"<:i\\1> ") - #line.gsu!b!(/^\s*_([12])\s+/,"<!i\\1!> ") #indent line line.gsub!(/<:?br>/,'<br />') #adjustment 2004w41, from # line.gsub!(/<br>/,'<br />') ##added - #line.gsub!(/(?:^!_\s+|^[78]~\s+|<:b>)(.*)?([~-]#)$/i,"<b>\\1</b> \\2") #bold paragraph/emphasize #may wish to remove think about 7{ 8{ conversion not satisfactory, as information is lost! - #line.gsub!(/(?:^!_\s+|^[78]~\s+|<:b>)(.*)?\s*$/i,"<b>\\1</b>") #bold paragraph/emphasize #may wish to remove think about 7{ 8{ conversion not satisfactory, as information is lost! - #line.gsub!(/(?:(?:^| )!_ |^[78]~ |<:b>)(.*)\n/mi,"<b>\\1</b> ") #bold paragraph/emphasize #may wish to remove think about 7{ 8{ conversion not satisfactory, as information is lost! - #line.gsub!(/^_" (.*)\n/i,"<blockquote>\\1</blockquote> ") #blockquotes #introduce KEEP + #line.gsub!(/(?:^!_\s+|^[7-9]~\s+|<:b>)(.*)?([~-]#)$/i,'<b>\1</b> \2') #bold paragraph/emphasize #may wish to remove think about 7{ 8{ conversion not satisfactory, as information is lost! + #line.gsub!(/(?:^!_\s+|^[7-9]~\s+|<:b>)(.*)?\s*$/i,'<b>\1</b>') #bold paragraph/emphasize #may wish to remove think about 7{ 8{ conversion not satisfactory, as information is lost! + #line.gsub!(/(?:(?:^| )!_ |^[7-9]~ |<:b>)(.*)\n/mi,'<b>\1</b> ') #bold paragraph/emphasize #may wish to remove think about 7{ 8{ conversion not satisfactory, as information is lost! + #line.gsub!(/^_" (.*)\n/i,'<blockquote>\1</blockquote> ') #blockquotes #introduce KEEP line.gsub!(/<:hi>/,'<span style="background-color: rgb(255,240,196)">') # bright yellow rgb(255,255,0) pale yellow rgb(255,255,200) line.gsub!(/<:\/hi>/,'</span>') line.gsub!(/(<:verse>.+)/m,"\\1\n") @@ -319,8 +320,8 @@ module Syntax line.gsub!(/(^|\s+|['"]|\(|\>)\/([\(\)a-zA-Z0-9']+?)\/([ ,.;:'"~$]|[^a-zA-Z0-9])/,'\1<i>\2</i>\3') #italics single word, watch line.gsub!(/(^|\s+|['"]|\(|\>)_(\S+?)_/,'\1<u>\2</u>') #underscore single word, watch line.gsub!(/(^|\s+|['"]|\(|\>|\d+)\^(\S+?)\^/,'\1<sup>\2</sup>') #superscript single word, watch digit added - line.gsub!(/^\s*_([12])(\*+)\s*/,"<:i\\1> _* ") # bullets, shortcut - line.gsub!(/^\s*_([12])\s+/,'<:i\1> ') + line.gsub!(/^\s*_([1-9])(\*+)\s*/,'<:i\1> _* ') # bullets, shortcut + line.gsub!(/^\s*_([1-9])\s+/,'<:i\1> ') line.gsub!(/<:?br>/,'<br />') end @data diff --git a/lib/sisu/v0/db_import.rb b/lib/sisu/v0/db_import.rb index 3e1c72cc..459cb806 100644 --- a/lib/sisu/v0/db_import.rb +++ b/lib/sisu/v0/db_import.rb @@ -85,7 +85,6 @@ module SiSU_DB_import def marshal_load require "#{SiSU_lib}/dal" @dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here - #@dal_array.each { |x| puts x.inspect; sleep 1 } tell=SiSU_Screen::Ansi.new(@opt.cmd,"#{@db.db_psql}::#{@opt.fns}") tell.puts_blue unless @opt.cmd =~/q/ tell=SiSU_Screen::Ansi.new(@opt.cmd,'Marshal Load',@fnm) @@ -111,7 +110,7 @@ module SiSU_DB_import end end def special_character_escape(string) - string.gsub!(/'/,"''") + string.gsub!(/'/,"''") #string.gsub!(/'/,"\047") #string.gsub!(/'/,"\\'") string.gsub!(/<:br>/,"<br />\n") string.gsub!(/<:(?:code|alt|group|verse)(?:-end)?>/,'') string.gsub!(/<:name#\S+?>/,'') diff --git a/lib/sisu/v0/defaults.rb b/lib/sisu/v0/defaults.rb index c81b91d2..3713acae 100644 --- a/lib/sisu/v0/defaults.rb +++ b/lib/sisu/v0/defaults.rb @@ -206,6 +206,27 @@ module SiSU_Viz def url_promo_home '' end + def url_decoration + def tex_open + '{\UseTextSymbol{OML}{<}}' + end + def tex_close + '{\UseTextSymbol{OML}{>}}' + end + def xml_open + '<' + end + def xml_close + '>' + end + def txt_open + '<' + end + def txt_close + '>' + end + self + end #% color def color_shadow '"4"' diff --git a/lib/sisu/v0/html.rb b/lib/sisu/v0/html.rb index 1d9491dd..9af0f758 100644 --- a/lib/sisu/v0/html.rb +++ b/lib/sisu/v0/html.rb @@ -199,11 +199,11 @@ module SiSU_HTML @format,@text,@ocn=$1,$2,$3 end else - if @para[/^(?:_1\*|<:i[12]>\s*_\*)\s+(.+?)<~(\d+);(?:[ohu]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/m] - @format,@text,@ocn='_1*',$1,$2,$3 + if @para[/^(?:<:i([1-9])>\s*_\*)\s+(.+?)<~(\d+);(?:[ohu]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/m] + @format,@text,@ocn="_#{$1}\*",$2,$3,$4 elsif @para[/^(_\*)\s+(.+?)<~(\d+);(?:[ohu]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/m] @format,@text,@ocn=$1,$2,$3 - elsif @para[/<:(i[12])>\s*(.+?)<~(\d+);(?:[ohu]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/m] + elsif @para[/<:(i[1-9])>\s*(.+?)<~(\d+);(?:[ohu]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/m] @format,@text,@ocn=$1,$2,$3 elsif @para[/<:(code|alt|verse|group)>(.+?)<~(\d+);(?:[ohu]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/m] @format,@text,@ocn=$1,$2,$3 diff --git a/lib/sisu/v0/html_format.rb b/lib/sisu/v0/html_format.rb index 73c97358..0899447e 100644 --- a/lib/sisu/v0/html_format.rb +++ b/lib/sisu/v0/html_format.rb @@ -917,7 +917,6 @@ WOK @@dp=nil attr_accessor :md,:one,:two,:three,:parablock,:table,:link,:linkname,:format,:paranum,:p_num,:para_id,:headname,:margin,:paragraph,:table,:banner,:url,:icon,:font,:one_stripped def initialize(md='',*txt) - #txt[0].gsub!(/\.(html|pdf|php)/,'') if txt[0] =~/\.\.\/\S+/ @md,@one,@two,@three=md,txt[0],txt[1],txt[2] rgx=/^[1-6-]~/ @one_stripped=@one.gsub(rgx,'') if @one =~rgx @@ -927,7 +926,7 @@ WOK @link,@linkname=txt[0],txt[1] @format,parablock=txt[0],txt[1] @parablock=parablock - ##speed hit does not justify action: + ##performance hit does not justify action: #@parablock=if parablock=~/\S+/ and parablock !~/<!Th?¡ /m # wrap=SiSU_text_utils::Wrap.new(parablock,70,4) # wrap.line_wrap @@ -979,20 +978,8 @@ WOK @tag,@class='li','bullet' para_form end - def bullet_indent1 - @tag,@class='li','i1' - para_form - end - def bullet_indent2 - @tag,@class='li','i2' - para_form - end - def indent1 - @tag,@class='p','i1' - para_form - end - def indent2 - @tag,@class='p','i2' + def format(tag,atrib) + @tag,@class=tag,atrib para_form end def dl @@ -1013,12 +1000,12 @@ WOK end def gsub_body case @one - when /^(?:<:i[12]>\s*)?\((i+|iv|v|vi+|ix|x|xi+)\)/ + when /^(?:<:i[1-9]>\s*)?\((i+|iv|v|vi+|ix|x|xi+)\)/ @one.gsub!(/^\((i+|iv|v|vi+|ix|x|xi+)\)/,'<b>(\1)</b>') - @one.gsub!(/^(<:i[12]>)\s*\((i+|iv|v|vi+|ix|x|xi+)\)/,'\1<b>(\2)</b>') - when /^(?:<:i[12]>\s*)?\(?(\d|[a-z])+\)/ + @one.gsub!(/^(<:i[1-9]>)\s*\((i+|iv|v|vi+|ix|x|xi+)\)/,'\1<b>(\2)</b>') + when /^(?:<:i[1-9]>\s*)?\(?(\d|[a-z])+\)/ @one.gsub!(/^\((\d+|[a-z])+\)/,'<b>(\1)</b>') - @one.gsub!(/^(<:i[12]>)\s*\((\d+|[a-z])+\)/,'\1<b>(\2)</b>') + @one.gsub!(/^(<:i[1-9]>)\s*\((\d+|[a-z])+\)/,'\1<b>(\2)</b>') when /^\s*\d{1,3}\.\s/ @one.gsub!(/^\s*(\d+\.)/,'<b>\1</b>') when /^\s*[A-Z]\.\s/ @@ -1032,6 +1019,17 @@ WOK </p> #{@vz.margin_num_css}     +#{@vz.table_close}} + end + def bold_header + @one.gsub!(/[1-9]~(\S+)/,'<a name="\1"></a>') + @one.gsub!(/[1-9]~/,'') + @one.gsub!(/<~0;[um]\d+;[um]\d+><#@dp:#@dp>\s*$/i,'') #watch & do differently + %{<p class="bold"> + #@one + </p> +#{@vz.margin_num_css} +     #{@vz.table_close}} end def toc_head_copy_at diff --git a/lib/sisu/v0/html_scroll.rb b/lib/sisu/v0/html_scroll.rb index bc03fc7d..1774fb3f 100644 --- a/lib/sisu/v0/html_scroll.rb +++ b/lib/sisu/v0/html_scroll.rb @@ -86,136 +86,68 @@ module SiSU_HTML_scroll @p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,paranum) end @sto=SiSU_HTML::Source::Split_text_object.new(@md,para).lev_segname_para_ocn - unless @rcdc - m=/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ - if para =~m - format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,@sto.text) if @sto.format =~/[12]|_1?\*|<!i[12]!>\s*_\*|null/ - case @sto.format - when /^1~\S*/; para=@sto.scroll_lev_para_ocn.heading_body1 - when /^2~\S*/; para=@sto.scroll_lev_para_ocn.heading_body2 - when /^3~\S*/; para=@sto.scroll_lev_para_ocn.heading_body3 - when /^4~\S+/; para=@sto.scroll_lev_para_ocn.heading_body4 # work on see Split_text_object4 - when /^5~\S*/; para=@sto.scroll_lev_para_ocn.heading_body5 - when /^6~\S*/; para=@sto.scroll_lev_para_ocn.heading_body6 - when /^_\*$/; para=@sto.scroll_lev_para_ocn.bullet - when /^_1\*$/ + m=/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ + if para =~m + format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,@sto.text) if @sto.format =~/i[1-9]|_[1-9]?\*|<:i[1-9]>\s*_\*|null/ + case @sto.format + when /^1~\S*/; para=@sto.scroll_lev_para_ocn.heading_body1 + when /^2~\S*/; para=@sto.scroll_lev_para_ocn.heading_body2 + when /^3~\S*/; para=@sto.scroll_lev_para_ocn.heading_body3 + when /^4~\S+/; para=@sto.scroll_lev_para_ocn.heading_body4 # work on see Split_text_object4 + when /^5~\S*/; para=@sto.scroll_lev_para_ocn.heading_body5 + when /^6~\S*/; para=@sto.scroll_lev_para_ocn.heading_body6 + when /^_\*$/; para=@sto.scroll_lev_para_ocn.bullet + when /^_([1-9])\*$/ #indent with bullet + format_txt_obj.gsub_body + para=@sto.scroll_lev_para_ocn.format('li',"i#{$1}") + when /^i([1-9])$/ #indent + format_txt_obj.gsub_body + para=@sto.scroll_lev_para_ocn.format('p',"i#{$1}") + when /^center$/; para=@sto.scroll_lev_para_ocn.center + when /^(?:b|bold)$/; para=@sto.scroll_lev_para_ocn.bold + when /^(?:verse|group|alt)$/; para=@sto.scroll_lev_para_ocn.para + when /^code$/; para=@sto.scroll_lev_para_ocn.code + when /null/ # see whether u can improve + if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ format_txt_obj.gsub_body - para=@sto.scroll_lev_para_ocn.bullet_indent1 - when /^_2\*$/ - format_txt_obj.gsub_body - para=@sto.scroll_lev_para_ocn.bullet_indent2 - when /^i1$/ - format_txt_obj.gsub_body - para=@sto.scroll_lev_para_ocn.indent1 - when /^i2$/ - format_txt_obj.gsub_body - para=@sto.scroll_lev_para_ocn.indent2 - when /^center$/; para=@sto.scroll_lev_para_ocn.center - when /^(?:b|bold)$/; para=@sto.scroll_lev_para_ocn.bold - when /^(?:verse|group|alt)$/; para=@sto.scroll_lev_para_ocn.para - when /^code$/; para=@sto.scroll_lev_para_ocn.code - when /null/ # see whether u can improve - if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ - format_txt_obj.gsub_body - para=@sto.scroll_lev_para_ocn.para - if para =~/<!Th?.+/ # tables come as single block - table=SiSU_HTML_shared::Table.new(para) - para=table.table_split - end - end - end - elsif para =~/Endnotes?/ and para !~/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ - format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,'<br /><a name="notes">Note</a>') - para=format_txt_obj.bold_para - elsif para =~/Owner Details/ and para !~/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ - format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,'<br /><a name="owner.details">Owner Details</a>') - @scr[:owner_details]=format_txt_obj.bold_para - para='' - elsif para =~/(.*)<~0;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>(.*)/ #watch - one,two=$1,$2 - format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,one,two) - para=format_seg.no_paranum - end - #para=para.gsub(/ [2-6]~\S+ /,'') #and @md.cmd =~/[VM]/ #arbitrary, watch problematic as too general - para='' if (para =~/<a name="n\d+">/ and para =~/^(?:\^~\d+\s|<!e[:_]\d+!>)/) # hmmm re-adjusted 200507, for alt endnote which should again be matched ^~ ... not in response to problem though - if para =~/<:center>/ #rules changed now a <p class="center" problems may arise 2005w11 ! - one,two=/(.*)<:center>(.*)/.match(para).captures - format_scroll=SiSU_HTML_Format_type::Format_scroll.new(@md,one,two) - end - else # this is crazy rethink and redo later with some form of inject - m=/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ - if para =~m - format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,@sto.text) if @sto.format =~/[12]|null/ - meta=case @sto.format - when /^1~/; @sto.scroll_lev_para_ocn.heading_body1 - when /^2~/; @sto.scroll_lev_para_ocn.heading_body2 - when /^3~/; @sto.scroll_lev_para_ocn.heading_body3 - when /^4~\S+/; @sto.scroll_lev_para_ocn.heading_body4 # work on see Split_text_object - when /^5~/; @sto.scroll_lev_para_ocn.heading_body5 - when /^6~/; @sto.scroll_lev_para_ocn.heading_body6 - when /^i1$/ - format_txt_obj.gsub_body - @sto.scroll_lev_para_ocn.indent1 - when /^i2$/ - format_txt_obj.gsub_body - @sto.scroll_lev_para_ocn.indent2 - when /^center$/; @sto.scroll_lev_para_ocn.center - when /^(b|bold)$/; @sto.scroll_lev_para_ocn.bold - when /null/ # see whether u can improve - if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ - format_txt_obj.gsub_body - @sto.scroll_lev_para_ocn.para - if para =~/<!Th?.+/ # tables come as single block - table=Table.new(para) - para=table.table_split - end + para=@sto.scroll_lev_para_ocn.para + if para =~/<!Th?.+/ # tables come as single block + table=SiSU_HTML_shared::Table.new(para) + para=table.table_split end end - elsif para =~/(Endnotes?)/ and para !~/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ - format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,'<br /><a name="notes">Note</a>') - meta=format_txt_obj.bold_para - elsif para =~/MetaData/ and para =~/<~0;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ #debug 2003w46 add rc info - format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,'<br /><a name="metadata">MetaData</a>') - meta=format_txt_obj.bold_para - elsif para =~/Owner Details/ and para !~/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ - format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,'<br /><a name="owner.details">Owner Details</a>') - @scr[:owner_details]=format_txt_obj.bold_para - meta='' - elsif para =~/(¡|<!Th?)/ - table=Table.new(para) - para=table.table - elsif para =~/(.*)<~0;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>(.*)/ #ok - bug in equiv for seg 2004w46 - one,two=$1,$2 - format_scroll=SiSU_HTML_Format_type::Format_scroll.new(@md,one,two) #watch #fix - meta=format_scroll.no_paranum - end - meta='' if para =~/<a name="n\d+">/ and para =~/^(\^~\d+ |<!e[:_]\d+!>)/ # -endnote - if para =~/<~0;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ - case para - when /<:i1>/ - gsub(/<:i1>/,'') - format_scroll=SiSU_HTML_Format_type::Format_scroll.new(@md,para) - meta=format_scroll.indent_one_no_paranum - when /<:i2>/ - gsub(/<:i2>/,'') - format_scroll=SiSU_HTML_Format_type::Format_scroll.new(@md,para) - meta=format_scroll.indent_one_no_paranum - end - end - if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ - end - if para =~/<:center>/ - one,two=/(.*)<:center>(.*)/.match(para).captures - format_scroll=SiSU_HTML_Format_type::Format_scroll.new(@md,one,two) end + elsif para =~/^[1-9]~\S*/ and para !~/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ + format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,para) + para=format_txt_obj.bold_header + elsif para =~/Endnotes?/ and para !~/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ + format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,'<br /><a name="notes">Note</a>') + para=format_txt_obj.bold_para + elsif para =~/Owner Details/ and para !~/<~\d+;(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ + format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,'<br /><a name="owner.details">Owner Details</a>') + @scr[:owner_details]=format_txt_obj.bold_para + para='' + elsif para =~/(.*)<~0;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>(.*)/ #watch + one,two=$1,$2 + format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,one,two) + para=format_seg.no_paranum + end + #para=para.gsub(/ [2-6]~\S+ /,'') #and @md.cmd =~/[VM]/ #arbitrary, watch problematic as too general + para='' if (para =~/<a name="n\d+">/ and para =~/^(?:\^~\d+\s|<!e[:_]\d+!>)/) # hmmm re-adjusted 200507, for alt endnote which should again be matched ^~ ... not in response to problem though + if para =~/<:center>/ #rules changed now a <p class="center" problems may arise 2005w11 ! + one,two=/(.*)<:center>(.*)/.match(para).captures + format_scroll=SiSU_HTML_Format_type::Format_scroll.new(@md,one,two) end para.gsub!(/<!.+!>/,' ') para.gsub!(/^<:\S?>/,'') para.gsub!(/<:\S?>/,' ') para.strip! - unless meta; @scr[:body] << para unless para =~/\A\s*\Z/ - else @scr[:metadata] << meta + unless @rcdc; @scr[:body] << para unless para =~/\A\s*\Z/ + else @scr[:metadata] << para end + #unless meta; @scr[:body] << para unless para =~/\A\s*\Z/ + #else @scr[:metadata] << meta + #end end end @scr diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb index 96b9a970..8f8f7b53 100644 --- a/lib/sisu/v0/html_segments.rb +++ b/lib/sisu/v0/html_segments.rb @@ -279,21 +279,18 @@ module SiSU_HTML_seg end if para[/<~(\d+;(?:[ohmu]|[0-6]:)\d+;\w\d+><#@dp:#@dp)>$/] @sto=SiSU_HTML::Source::Split_text_object.new(@md,para).lev_segname_para_ocn - format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,@sto.text) if @sto.format =~/i[12]|_1?\*|<:i[12]>\s*_\*|null/ + format_txt_obj=SiSU_HTML_Format_type::Format_text_object.new(@md,@sto.text) if @sto.format =~/i[1-9]|_[1-9]?\*|<:i[1-9]>\s*_\*|null/ para=case @sto.format # work area 2003w29 ||@|def lev_segname_para_ocn| when /^4~\S+/; @sto.seg_lev_para_ocn.header4 # work on see Split_text_object when /^5~(?:~\S+)?/; @sto.seg_lev_para_ocn.header5 when /^6~(?:~\S+)?/; @sto.seg_lev_para_ocn.header6 when /^_\*$/; @sto.seg_lev_para_ocn.bullet - when /^_1\*$/ + when /^_([1-9])\*$/ #indent levels 1-9 with bullet format_txt_obj.gsub_body - @sto.seg_lev_para_ocn.bullet_indent1 - when /^i1$/ + para=@sto.seg_lev_para_ocn.format('li',"i#{$1}") + when /^i([1-9])$/ #indent levels 1-9 format_txt_obj.gsub_body - @sto.seg_lev_para_ocn.indent1 - when /^i2$/ - format_txt_obj.gsub_body - @sto.seg_lev_para_ocn.indent2 + para=@sto.seg_lev_para_ocn.format('p',"i#{$1}") when /^(?:verse|group|alt)$/ @sto.seg_lev_para_ocn.para when /^code$/ @@ -439,7 +436,7 @@ module SiSU_HTML_seg try=e_n.split(/<br \/>/) try.each do |e| format_seg=SiSU_HTML_Format_type::Format_seg.new(@md,e) - note_match=if e =~/<:i[12]>/ + note_match=if e =~/<:i[1-9]>/ format_seg.endnote_body_seg_tail_indent else format_seg.endnote_body_seg_tail end diff --git a/lib/sisu/v0/html_tune.rb b/lib/sisu/v0/html_tune.rb index 2d295a6c..749f5180 100644 --- a/lib/sisu/v0/html_tune.rb +++ b/lib/sisu/v0/html_tune.rb @@ -187,6 +187,7 @@ module SiSU_Tune @env=SiSU_Env::Info_env.new(@md.fns) @sys=SiSU_Env::System_call.new @dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern + @env=SiSU_Env::Info_env.new(@md.fns) #@utf8=SiSU_character_encode::UTF8 #.new end def songsheet @@ -231,6 +232,45 @@ module SiSU_Tune @tuned_file << para end end + def urls(data) + @words=[] + data.each do |word| + @words << if word=~/\{(.+?)\}((?:https?|ftp)\S+|image)/ + if word =~/\{(.+?)\}((?:https?|ftp)\S+|image)([.,](?:\s|$))/ + m,u,d=/\{(.+?)\}((?:https?|ftp)\S+|image)([.,](?:\s|$))/.match(word).captures + else m,u=/\{(.+?)\}((?:https?|ftp)\S+|image)/.match(word).captures + d='' + end + case m + when /\.png|\.jpg|\.gif|c=|\d+x\d+/ + w,h=/(\d+)x(\d+)/.match(m).captures if m =~/\d+x\d+/ + w=%{width="#{w}"} if w + h=%{height="#{h}"} if h + c=m[/"(.+?)"/m,1] + caption=%{<br /><p class="caption">#{c}</p>} if c + png=m.scan(/\S+/)[0] + image_path=if @md.fns =~/\.-ss[tm]$/; @env.url.images_external + else @env.url.images_local + end + ins=if u and u.strip !~/^image$/ + %{<a href="#{u}"><img src="#{image_path}/#{png}" #{w} #{h} naturalsizeflag="0" align="bottom" border="0"></a>#{caption}} + else %{<img src="#{image_path}/#{png}" #{w} #{h} naturalsizeflag="0" align="bottom" border="0">#{caption}} + end + word.gsub!(/\{.+?\}((?:https?|ftp)\S+|image)/,ins) + else + link=m[/(.+)/m] + png=m.scan(/\S+/)[0].strip + link=link.strip + ins=%{<a href="#{u}">#{link}</a>#{d}} + word.gsub!(/\{.+?\}(?:https?|ftp)\S+/,ins) + end + word + else word + end + word + end + @words + end def url_markup data=@data @tuned_file=[] @@ -256,7 +296,7 @@ module SiSU_Tune end if para =~/\{.+?\}((?:http|ftp)\S+|image)/ @word_mode=para.scan(/\{.+?\}(?:(?:https?|ftp)\S+|image)|\S+/) - word_mode=SiSU_Tune::Tune_urls.new(@word_mode,@md).urls + word_mode=urls(@word_mode) words=word_mode.join(' ') para.gsub!(/.+/,words) end @@ -274,20 +314,20 @@ module SiSU_Tune para.gsub!(/<:h(.{1,7}?)>/,'<a href="#h\1">\1</a>') para.gsub!(/<:to(\d{1,7}?)>/,'<a href="#to\1">to { \1 }</a> ') if (para =~/\b\S+\@\S+?\.\S+/ and para !~/(\"\S+\@\S+?\.\S+\"|>\S+\@\S+?\.\S+?<)/) - para.gsub!(/\b(\S+\@\S+?\.\S+)(\s)/,'<a href="mailto:\1">\1</a>\\2') + para.gsub!(/\b(\S+\@\S+?\.\S+)(\s)/,'<<a href="mailto:\1">\1</a>>\2') end if (para !~/(\"\w+:\/\/\S+?\"|>\s*\w+:\/\/\w+?\S*<)/) #url markup http etc. if para=~/\w+:\/\/\S+?\.\S+?[.,] / - para.gsub!(/(\w+:\/\/\S+?\.\S+?)([.,] )/,'<a href="\1" target="_top">\1</a>\2') #full stops ! have been a bother + para.gsub!(/(\w+:\/\/\S+?\.\S+?)([.,] )/,'<<a href="\1" target="_top">\1</a>>\2') #full stops ! have been a bother else - para.gsub!(/(\w+:\/\/\S+?\.\S+)/, '<a href="\1" target="_top">\1</a>') + para.gsub!(/(\w+:\/\/\S+?\.\S+)/, '<<a href="\1" target="_top">\1</a>>') end end if (para =~/[ ^](?:https?|ftp):\/\/\S+/) #url markup http leftovers watch carefully may accept too much 2004w46 if para=~/([ ^])((?:https?|ftp):\/\/\S+?)([\.,] )/ - para.gsub!(/([ ^])((?:https?|ftp):\/\/\S+?)([\.,] )/,'\1<a href="\2" target="_top">\2</a>\3') #full stops ! have been a bother + para.gsub!(/([ ^])((?:https?|ftp):\/\/\S+?)([\.,] )/,'\1<<a href="\2" target="_top">\2</a>>\3') #full stops ! have been a bother else - para.gsub!(/([ ^])((?:https?|ftp):\/\/\S+)/,'\1<a href="\2" target="_top">\2</a>') + para.gsub!(/([ ^])((?:https?|ftp):\/\/\S+)/,'\1<<a href="\2" target="_top">\2</a>>') end end if (para =~/..\/\S+/ and para !~/(\"..\/\S+?\"|>\s*..\/\S+<)/) @@ -326,51 +366,5 @@ module SiSU_Tune @tuned_file end end - class Tune_urls - def initialize(data,md) - @data,@md=data,md - @vz=SiSU_Env::Get_init.instance.skin - @env=SiSU_Env::Info_env.new(@md.fns) - end - def urls - @words=[] - @data.each do |word| - @words << if word=~/\{(.+?)\}((?:https?|ftp)\S+|image)/ - if word =~/\{(.+?)\}((?:https?|ftp)\S+|image)([.,](?:\s|$))/ - m,u,d=/\{(.+?)\}((?:https?|ftp)\S+|image)([.,](?:\s|$))/.match(word).captures - else m,u=/\{(.+?)\}((?:https?|ftp)\S+|image)/.match(word).captures - d='' - end - case m - when /\.png|\.jpg|\.gif|c=|\d+x\d+/ - w,h=/(\d+)x(\d+)/.match(m).captures if m =~/\d+x\d+/ - w=%{width="#{w}"} if w - h=%{height="#{h}"} if h - c=m[/"(.+?)"/m,1] - caption=%{<br /><p class="caption">#{c}</p>} if c - png=m.scan(/\S+/)[0] - image_path=if @md.fns =~/\.-ss[tm]$/; @env.url.images_external - else @env.url.images_local - end - ins=if u and u.strip !~/^image$/ - %{<a href="#{u}"><img src="#{image_path}/#{png}" #{w} #{h} naturalsizeflag="0" align="bottom" border="0"></a>#{caption}} - else %{<img src="#{image_path}/#{png}" #{w} #{h} naturalsizeflag="0" align="bottom" border="0">#{caption}} - end - word.gsub!(/\{.+?\}((?:https?|ftp)\S+|image)/,ins) - else - link=m[/(.+)/m] - png=m.scan(/\S+/)[0].strip - link=link.strip - ins=%{<a href="#{u}">#{link}</a>#{d}} - word.gsub!(/\{.+?\}(?:https?|ftp)\S+/,ins) - end - word - else word - end - word - end - @words - end - end end __END__ diff --git a/lib/sisu/v0/odf.rb b/lib/sisu/v0/odf.rb index caf86a39..feac2d03 100644 --- a/lib/sisu/v0/odf.rb +++ b/lib/sisu/v0/odf.rb @@ -140,6 +140,7 @@ module SiSU_ODF end end class Scroll <Source + require "#{SiSU_lib}/defaults" require "#{SiSU_lib}/shared_txt" @@img_count=0 @@odf={ :body=>[],:open=>[],:close=>[],:head=>[],:metadata=>[],:tail=>[],:endnotes=>[] } @@ -153,13 +154,14 @@ module SiSU_ODF @regx=/^(?:(?:<:p[bn]>\s*)?\d~(?:(\S+))?\s+)?(.+?)\s*<~(\d+);(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ @serial=/\s*<~\d+;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>\s*/ @tab="\t" + @url_brace=SiSU_Viz::Skin.new.url_decoration @br=if @md.cmd =~/M/; "\n" else '' end end def songsheet pre - @data=markup + @data=markup(@data) post publish end @@ -169,8 +171,8 @@ module SiSU_ODF @n=[] notes.each do |n| #high cost to deal with <br> appropriately within odf, consider n=n.dup.to_s - if n =~/<br(?: \/)?>/ - fix=n.split(/<br(?: \/)?>/) #watch #added + if n =~/<:?br(?: \/)?>/ + fix=n.split(/<:?br(?: \/)?>/) #watch #added fix.each do |x| if x =~/\S+/; @n << x end @@ -282,16 +284,16 @@ module SiSU_ODF end def normal(para) #P1 - P3 para.gsub!(@serial,'') - para.gsub!(/(^|\s)(https?:\/\/[^'">< ]+)/,'\1<text:a xlink:type="simple" xlink:href="\2">\2</text:a>') - para.gsub!(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/,'<text:a xlink:type="simple" xlink:href="mailto:\1">\1</text:a>') - par=case para - when /^<:i1>\s/m; para.gsub!(/^<:i1>\s/m,'') - %{<text:p text:style-name="P2">#{para}</text:p>} - when /^<:i2>\s/m; para.gsub!(/^<:i2>\s/m,'') - %{<text:p text:style-name="P3">#{para}</text:p>} - else %{<text:p text:style-name="P1">#{para}</text:p>} #%{<text:p text:style-name="Standard">#{para}</text:p>} + para.gsub!(/(^|\s)(https?:\/\/[^'">< ]+)/,%{\\1#{@url_brace.xml_open}<text:a xlink:type="simple" xlink:href="\\2">\\2</text:a>#{@url_brace.xml_close}}) + para.gsub!(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/,%{#{@url_brace.xml_open}<text:a xlink:type="simple" xlink:href="mailto:\\1">\\1</text:a>#{@url_brace.xml_close}}) + para=case para + when /^<:i([1-9])>\s/m + m=$1 + para.gsub!(/^<:i#{m}>\s/m,'') + %{<text:p text:style-name="P1#{m}">#{para}</text:p>} + else %{<text:p text:style-name="P1">#{para}</text:p>} end - para=par #+ %{<text:p text:style-name="Standard"/>} + para end def fontface(para) #para=para.gsub(/<b>(.+?)<\/b>/,%{<text:span text:style-name="T1">\\1</text:span>}) @@ -300,7 +302,7 @@ module SiSU_ODF def footnote(para) @astx||=10000 para.gsub!(/<#@dp>([}\]]~)/,'\1') - para.gsub!(/<br \/><:i1>/,'<br />') + #para.gsub!(/<br \/><:i[1-9]>/,'<br />') if para =~/~\{\d+\s+/ para=para.gsub(/~\{(\d+)\s+(.+?)\}~/,'<text:note text:id="ftn\1" text:note-class="footnote"><text:note-citation>\1</text:note-citation><text:note-body><text:p text:style-name="Footnote"> \2</text:p><text:p text:style-name="Footnote"/></text:note-body></text:note>') end @@ -324,9 +326,7 @@ module SiSU_ODF end def group_clean(para) para.gsub!(/&nbsp;| /,' ') - para.gsub!(/</,'<') - para.gsub!(/>/,'>') - #para.gsub!(/<br(?:\s+\/)?>/,'<br />') + para.gsub!(/</,'<'); para.gsub!(/>/,'>') para.gsub!(/<br(?:\s+\/)?>/,'<br />') #para.gsub!(/\s\s/,'  ') para @@ -334,9 +334,9 @@ module SiSU_ODF def poem(para) #P4 #same as group para.gsub!(@serial,'') para.gsub!(/<:verse(?:-end)?>\s*/m,'') - para=group_clean(para) parray=[] - para.split(/<br(?: \/)?>/).each do |parablock| + para.split(/<:?br(?: \/)?>/).each do |parablock| + parablock=group_clean(parablock) parray << %{<text:p text:style-name="P4">#{parablock}</text:p>} if parablock =~/\S+/ end para=parray.join + '<text:p text:style-name="Standard"/>' @@ -344,9 +344,9 @@ module SiSU_ODF def group(para) #P4 #same as verse para.gsub!(@serial,'') para.gsub!(/<:group(?:-end)?>\s*/m,'') - para=group_clean(para) parray=[] - para.split(/<br(?: \/)?>/).each do |parablock| + para.split(/<:?br(?: \/)?>/).each do |parablock| + parablock=group_clean(parablock) parray << %{<text:p text:style-name="P4">#{parablock}</text:p>} if parablock =~/\S+/ end para=parray.join + '<text:p text:style-name="Standard"/>' @@ -354,10 +354,10 @@ module SiSU_ODF def code(para) #P5 para.gsub!(@serial,'') para.gsub!(/<:code(?:-end)?>\s*/m,'') - para=group_clean(para) para.gsub!(/\s\s/,'  ') parray=[] - para.split(/<:br>/).each do |parablock| + para.split(/<:?br(?: \/)?>/).each do |parablock| + parablock=group_clean(parablock) parray << %{<text:p text:style-name="P5">#{parablock}</text:p>} if parablock =~/\S+/ end para=parray.join + '<text:p text:style-name="Standard"/>' @@ -414,8 +414,7 @@ module SiSU_ODF #end wordlist end - def markup # Used for major markup instructions - data=@data + def markup(data) # Used for major markup instructions safe_characters=/[^a-zA-Z0-9}{\/?,."';:)(><\-_&!@%~#\]\[*=$| \n+`¡]/ dir=SiSU_Env::Info_env.new(@md.fns) @data_mod,@endnotes,@level,@cont,@copen,@odf_contents_close=Array.new(6){[]} @@ -443,9 +442,11 @@ module SiSU_ODF para=para_array.join(' ') para=para.strip end - para.gsub!(/^(<:i[12]>\s+)?_\*\s+/,'\\1<draw:frame draw:style-name="gr1" text:anchor-type="as-char" svg:width="0.25cm" svg:height="0.25cm" draw:z-index="2"><draw:image xlink:href="Pictures/bullet_red.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/></draw:frame> ') # bullet_red.png + para.gsub!(/^(<:i[1-9]>\s+)?_\*\s+/,'\\1<draw:frame draw:style-name="gr1" text:anchor-type="as-char" svg:width="0.25cm" svg:height="0.25cm" draw:z-index="2"><draw:image xlink:href="Pictures/bullet_red.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/></draw:frame> ') # bullet_red.png #para.gsub!(/^_\*\s+/,'<text:span text:style-name="T6">·</text:span> ') #bullet - para.gsub!(/^(<:i[12]>)\s+_\*\s+/,'\1 <text:span text:style-name="T6">·</text:span> ') #bullet + para.gsub!(/^(<:i[1-9]>)\s+_\*\s+/,'\1 <text:span text:style-name="T6">·</text:span> ') #bullet + #para.gsub!(/^(<:i[1-9]>\s+)?_\*\s+/,'\\1<draw:frame draw:style-name="gr1" text:anchor-type="as-char" svg:width="0.25cm" svg:height="0.25cm" draw:z-index="2"><draw:image xlink:href="Pictures/bullet_red.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/></draw:frame> ') # bullet_red.png + #para.gsub!(/^(<:i[1-9]>)\s+_\*\s+/,'\1 <text:span text:style-name="T6">·</text:span> ') #bullet para.gsub!(/<br>/,'<br />') para.gsub!(/<:p[bn]>/,'<text:p text:style-name="P8"> </text:p>') para.gsub!(/©/,'©') #too arbitrary @@ -542,18 +543,6 @@ module SiSU_ODF para=format_text.seg_no_paranum end para='' if para =~/<a name="n\d+">/ and para =~/^(-\{{2}~\d+|<!e[:_]\d+!>)/ # -endnote - case para #remove - when /<:i1>/ - if para =~/.*<:#>.*$/ - format_text=OD_format::Format_text_object.new(para,'') - para=format_text.scr_indent_one_no_paranum - end - when /<:i2>/ - if para =~/.*<:#>.*$/ - format_text=OD_format::Format_text_object.new(para,'') - para=format_text.scr_indent_one_no_paranum - end - end if (para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/) # i don't get the condition for no paranum end @@ -613,14 +602,26 @@ module SiSU_ODF %{<office:automatic-styles>#@br} + %{#{table}#@br} + %{<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:text-align="justify" style:justify-single-word="false"/></style:style>#@br} + - %{<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:margin-left="1cm" fo:margin-right="0cm" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/></style:style>#@br} + - %{<style:style style:name="P3" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:margin-left="2cm" fo:margin-right="0cm" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/></style:style>#@br} + + %{<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:text-align="justify" style:justify-single-word="false"/></style:style>#@br} + # P1 + %{<style:style style:name="P3" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:text-align="justify" style:justify-single-word="false"/></style:style>#@br} + # P1 %{<style:style style:name="P4" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" fo:line-height="100%" fo:text-align="justify" style:justify-single-word="false"/></style:style>#@br} + %{<style:style style:name="P5" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" fo:line-height="100%" fo:text-align="start" style:justify-single-word="false"/></style:style>#@br} + %{<style:style style:name="P6" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:break-before="page"/></style:style>#@br} + %{<style:style style:name="P7" style:family="paragraph" style:parent-style-name="Table_20_Contents"><style:paragraph-properties fo:text-align="justify" style:justify-single-word="false"/></style:style>#@br} + %{<style:style style:name="P8" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:break-before="page"/></style:style>#@br} + %{<style:style style:name="P9" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:break-after="page"/></style:style>#@br} + + %{<style:style style:name="P10" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:text-align="justify" style:justify-single-word="false"/></style:style>#@br} + # P1 + + %{<style:style style:name="P11" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:margin-left="1cm" fo:margin-right="0cm" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/></style:style>#@br} + + %{<style:style style:name="P12" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:margin-left="2cm" fo:margin-right="0cm" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/></style:style>#@br} + + %{<style:style style:name="P13" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:margin-left="3cm" fo:margin-right="0cm" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/></style:style>#@br} + + %{<style:style style:name="P14" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:margin-left="4cm" fo:margin-right="0cm" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/></style:style>#@br} + + %{<style:style style:name="P15" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:margin-left="5cm" fo:margin-right="0cm" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/></style:style>#@br} + + %{<style:style style:name="P16" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:margin-left="6cm" fo:margin-right="0cm" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/></style:style>#@br} + + %{<style:style style:name="P17" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:margin-left="7cm" fo:margin-right="0cm" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/></style:style>#@br} + + %{<style:style style:name="P18" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:margin-left="8cm" fo:margin-right="0cm" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/></style:style>#@br} + + %{<style:style style:name="P19" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" fo:line-height="150%" fo:margin-left="8cm" fo:margin-right="0cm" fo:text-align="justify" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/></style:style>#@br} + + %{<style:style style:name="T1" style:family="text"><style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/></style:style>#@br} + %{<style:style style:name="T2" style:family="text"><style:text-properties fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic"/></style:style>#@br} + %{<style:style style:name="T3" style:family="text"><style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/></style:style>#@br} + diff --git a/lib/sisu/v0/plaintext.rb b/lib/sisu/v0/plaintext.rb index c39cba14..8728741a 100644 --- a/lib/sisu/v0/plaintext.rb +++ b/lib/sisu/v0/plaintext.rb @@ -143,6 +143,7 @@ module SiSU_Plaintext end end class Scroll <Source + require "#{SiSU_lib}/defaults" require "#{SiSU_lib}/shared_txt" include SiSU_text_utils @@endnotes_para=[] @@ -150,6 +151,7 @@ module SiSU_Plaintext @@dp=nil def initialize(data,md) @data,@md=data,md + @url_brace=SiSU_Viz::Skin.new.url_decoration @vz=SiSU_Env::Get_init.instance.skin @dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern @regx=/^(?:(?:<:p[bn]>\s*)?\d~(?:(\S+))?\s+)?(.+?)\s*<~(\d+);(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ #m # 2004w18 pb pn removal added @@ -171,7 +173,7 @@ module SiSU_Plaintext end end def songsheet - markup + @data=markup(@data) publish #@data.each { |x| puts x.inspect if x =~/\[table/ } end @@ -264,9 +266,10 @@ WOK para.gsub!(/~[{\[]([\d*+]+)\s+(?:.+?)[}\]]~/,'[^\1]') # endnote marker marked up wrapped=if para[@regx] paragraph=para[@regx,2] - if paragraph.include? '<:i1>' - paragraph.gsub!(/<:i1>/,'') - util=SiSU_text_utils::Wrap.new(paragraph,70,2) + if paragraph =~/<:i([1-9])>/ + m=$1.to_i + paragraph.gsub!(/<:i#{m}>/,'') + util=SiSU_text_utils::Wrap.new(paragraph,70,m*2) else util=SiSU_text_utils::Wrap.new(paragraph,70,0) end util.line_wrap @@ -291,8 +294,7 @@ WOK end @@endnotes_para=[] end - def markup # Used for major markup instructions - data=@data + def markup(data) # Used for major markup instructions dir=SiSU_Env::Info_env.new(@md.fns) @data_mod,@endnotes,@level,@cont,@copen,@plaintext_contents_close=Array.new(6){[]} (0..6).each { |x| @cont[x]=@level[x]=false } @@ -303,17 +305,22 @@ WOK data.each do |para| para.gsub!(/<!Th?¡.+/m,"#@br#{table_message}") para.gsub!(/.+?<-#>/,'') # remove dummy headings (used by html) #check - para.gsub!(/_\*\s+/,'* ') # bullet markup, marked down + para.gsub!(/_\*\s+/,'* ') # bullet markup, marked down + #para.gsub!(/<br(?: \/)?>/,"\n") # introduces a bug para.gsub!(/©/,'©') # bullet markup, marked down - para.gsub!(/&/,'&') # bullet markup, marked down + para.gsub!(/&/,'&') # bullet markup, marked down para.gsub!(/<sup>(.+?)<\/sup>/,'^\1^') para.gsub!(/<sub>(.+?)<\/sub>/,'[\1]') para.gsub!(/<i>(.+?)<\/i>/,'/\1/') para.gsub!(/<b>(.+?)<\/b>/,'*\1*') para.gsub!(/<u>(.+?)<\/u>/,'_\1_') - para.gsub!(/<:(?:group|verse|alt|code)(?:-end)?>(?:\s+<~(\d+);(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>)?/,'') + if para =~/<:(?:group|verse|alt|code)(?:-end)?>(?:\s+<~(\d+);(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>)?/ + para.gsub!(/<br(?: \/)?>/,"\n") # watch + para.gsub!(/<:(?:group|verse|alt|code)(?:-end)?>(?:\s+<~(\d+);(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>)?/,'') + end para.gsub!(/<:p[bn]>/,'') # remove page breaks para.gsub!(/^\s*<~\d+;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/,'') # remove empty lines - check + para.gsub!(/(^|\s)(https?:\/\/[^"><]+?)([,.:;"><]?(?:\s|$))/,"\\1#{@url_brace.txt_open}\\2#{@url_brace.txt_close}\\3") para.gsub!(/<a href=".+?">(.+?)<\/a>/m,'\1') para.gsub!(/<:name#\S+?>/,'') # remove name links para.gsub!(/ /,' ') # decide on @@ -394,13 +401,8 @@ WOK end para='' if (para =~/<a name="n\d+">/ and para =~/^(-\{{2}~\d+|<!e[:_]\d+!>)/) # -endnote case para - when /<:i1>/ - if para =~/.*<:#>.*$/ - format_text=Format_text_object.new(para,'') - para=format_text.scr_indent_one_no_paranum - end - when /<:i2>/ - if para =~/.*<:#>.*$/ + when /<:i[1-9]>/ + if para =~/.*<:#>.*$/m format_text=Format_text_object.new(para,'') para=format_text.scr_indent_one_no_paranum end @@ -421,7 +423,6 @@ WOK def publish divider="=" content=[] - data=@data content << @@plaintext[:open] content << @@plaintext[:head] content << @@plaintext[:body] @@ -446,11 +447,12 @@ WOK filename_plaintext=SiSU_Env::SiSU_file.new(@md,@md.fn[:plain]).mkfile @sisu=[] @content.each do |para| # this is a hack - if para =~/^\S/ - if para !~/^([*=-]|\.){5}/; filename_plaintext.puts para #unix plaintext - else filename_plaintext.puts para #unix plaintext + if para.class == Array and para.length > 0 + para.each do |line| + line.gsub!(/\s+$/m,'') + filename_plaintext.puts line #unix plaintext end - else filename_plaintext.puts para # if para =~/^\s/ + else filename_plaintext.puts para #unix plaintext # /^([*=-]|\.){5}/ end end end diff --git a/lib/sisu/v0/shared_html_lite.rb b/lib/sisu/v0/shared_html_lite.rb index 93e77db7..3c0e9ce1 100644 --- a/lib/sisu/v0/shared_html_lite.rb +++ b/lib/sisu/v0/shared_html_lite.rb @@ -50,6 +50,7 @@ module SiSU_Format_Shared require "#{SiSU_lib}/defaults" include SiSU_Viz class CSS_Format + require "#{SiSU_lib}/defaults" def initialize(content=nil,id=nil,ocnd='',ocns='',lv='',hname=nil) content.gsub!(/<:i[12]>/,'') @content=content @@ -58,14 +59,78 @@ module SiSU_Format_Shared @lv=@notenumber=lv.to_s @hname=hname.to_s @tab="\t" + @url_brace=SiSU_Viz::Skin.new.url_decoration # lots introduced to do html tables in db @@tablehead,@@tablefoot=[],[] @vz=SiSU_Env::Get_init.instance.skin end + def urls(data) + @words=[] + data.each do |word| + @words << if word=~/\{(.+?)\}((?:https?|ftp)\S+|image)/ + if word =~/\{(.+?)\}((?:https?|ftp)\S+|image)([.,](?:\s|$))/ + m,u,d=/\{(.+?)\}((?:https?|ftp)\S+|image)([.,](?:\s|$))/.match(word).captures + else m,u=/\{(.+?)\}((?:https?|ftp)\S+|image)/.match(word).captures + d='' + end + case m + when /\.png|\.jpg|\.gif|c=|\d+x\d+/ + w,h=/(\d+)x(\d+)/.match(m).captures if m =~/\d+x\d+/ + w=%{width="#{w}"} if w + h=%{height="#{h}"} if h + c=m[/"(.+?)"/m,1] + caption=%{<br /><p class="caption">#{c}</p>} if c + png=m.scan(/\S+/)[0] + #image_path=if @md.fns =~/\.-ss[tm]$/; @env.url.images_external + #else @env.url.images_local + #end + ins=if u and u.strip !~/^image$/ + %{<a href="#{u}">[#{png}]</a>#{caption}} + else %{[#{png}] #{caption}} + end + word.gsub!(/\{.+?\}((?:https?|ftp)\S+|image)/,ins) + else + link=m[/(.+)/m] + png=m.scan(/\S+/)[0].strip + link=link.strip + ins=%{<a href="#{u}">#{link}</a>#{d}} + word.gsub!(/\{.+?\}(?:https?|ftp)\S+/,ins) + end + word + else word + end + word + end + @words + end + def markup(para) + if para =~/\{.+?\}((?:http|ftp)\S+|image)/ + @word_mode=para.scan(/\{.+?\}(?:(?:https?|ftp)\S+|image)|\S+/) + word_mode=urls(para) + words=word_mode.join(' ') + para.gsub!(/.+/,words) + end + if (para !~/(\"\w+:\/\/\S+?\"|>\s*\w+:\/\/\w+?\S*<)/) #url markup http etc. + if para=~/\w+:\/\/\S+?\.\S+?[.,] / + para.gsub!(/(\w+:\/\/\S+?\.\S+?)([.,] )/,%{#{@url_brace.xml_open}<a href="\\1" target="_top">\\1</a>#{@url_brace.xml_close}\\2}) #full stops ! have been a bother + else + para.gsub!(/(\w+:\/\/\S+?\.\S+)/,%{#{@url_brace.xml_open}<a href="\\1" target="_top">\\1</a>#{@url_brace.xml_close}}) + end + end + if (para =~/[ ^](?:https?|ftp):\/\/\S+/) #url markup http leftovers watch carefully may accept too much 2004w46 + if para=~/([ ^])((?:https?|ftp):\/\/\S+?)([\.,] )/ + para.gsub!(/([ ^])((?:https?|ftp):\/\/\S+?)([\.,] )/,%{\\1#{@url_brace.xml_open}<a href="\\2" target="_top">\\2</a>#{@url_brace.xml_close}\\3}) #full stops ! have been a bother + else + para.gsub!(/([ ^])((?:https?|ftp):\/\/\S+)/,%{\\1#{@url_brace.xml_open}<a href="\\2" target="_top">\\2</a>#{@url_brace.xml_close}}) + end + end + para + end def paragraph %{#{@tab*1}<p class="h#@lv" id="#@ocn" type="substantive" header="#@hname">\n#{@tab*2}#@content\n#{@tab*1}</p>\n} << "\n" end def endnote + @content=markup(@content) <<GSUB #{@tab*1}<p class="endnote" name="note_#@notenumber" from="#@ocn"> #{@tab*2}<a name="_#@notenumber" href="#-#@notenumber">#@notenumber.</a> <note>#@content</note> @@ -88,12 +153,15 @@ GSUB %{#{@tab*1}<p class="norm" id="none" type="comment">\n#{@tab*2}#@content\n#{@tab*1}</p>\n} end def norm + @content=markup(@content) %{#{@tab*1}<p class="norm" id="#@ocn" type="substantive">\n#{@tab*2}#@content\n#{@tab*1}</p>\n} end def indent1 + @content=markup(@content) %{#{@tab*1}<p class="indent1" id="#@ocn" type="substantive">\n#{@tab*2}#@content\n#{@tab*1}</p>\n} end def indent2 + @content=markup(@content) %{#{@tab*1}<p class="indent2" id="#@ocn" type="substantive">\n#{@tab*2}#@content\n#{@tab*1}</p>\n} end def para_table diff --git a/lib/sisu/v0/shared_xml.rb b/lib/sisu/v0/shared_xml.rb index 6cb6f991..69b47d01 100644 --- a/lib/sisu/v0/shared_xml.rb +++ b/lib/sisu/v0/shared_xml.rb @@ -77,6 +77,12 @@ module SiSU_text_parts elsif /^([1-6]~)\s+(\S.+?)<~(0);(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/m.match(@para) @@alt_id_count+=1 @format,@text,@ocn=$1,$2,"x#{@@alt_id_count}" + elsif /^(?:<:i([1-9])>\s*_\*)\s+(.+?)<~(\d+);(?:[ohu]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/m.match(@para) + @format,@text,@ocn="_#{$1}\*",$2,$3,$4 + elsif /^(_\*)\s+(.+?)<~(\d+);(?:[ohu]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/m.match(@para) + @format,@text,@ocn=$1,$2,$3 + elsif /<:(i[1-9])>\s*(.+?)<~(\d+);(?:[ohu]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/m.match(@para) + @format,@text,@ocn=$1,$2,$3 end else if /(.+?)<~(\d+);(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/m.match(@para) @@ -135,10 +141,12 @@ module SiSU_text_parts end module SiSU_XML_munge class Trans + require "#{SiSU_lib}/defaults" def initialize(md) @sys=SiSU_Env::System_call.new @dir=SiSU_Env::Info_env.new(md.fns) @dp=SiSU_Env::Info_env.new.digest.pattern + @url_brace=SiSU_Viz::Skin.new.url_decoration end def char_enc #character encode def utf8(para='') @@ -336,12 +344,13 @@ module SiSU_XML_munge para.gsub!(/<:pb>\s*/,'') para.gsub!(/<+[-~]#>+/,'') para.gsub!(/<0;\w\d+;[um]\d+><#@dp:#@dp>/,'') - para.gsub!(/^(<:i[12]>\s*)_\*\s+/,'\1 <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="/usr/share/sisu/image/bullet_red.png" width="12" height="12" alt="*" /> ') - para.gsub!(/^_\*\s+/,'<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="/usr/share/sisu/image/bullet_red.png" width="12" height="12" alt="*" /> ') + #embeds a red-bullet image --> + #para.gsub!(/^(<:i[1-9]>\s*_\*)\s+/,'\1 <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="/usr/share/sisu/image/bullet_red.png" width="12" height="12" alt="*" /> ') + #para.gsub!(/^_\*\s+/,'<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="/usr/share/sisu/image/bullet_red.png" width="12" height="12" alt="*" /> ') para.gsub!(/(^|\s)\{\s*(\S+?\.(?:jpg|png|gif))\s+(\d+)x(\d+)(\s+[^}]+)?\}(https?:\/\/\S+)/,%{\\1<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="#{@dir.url.images_local}/\\2" width="\\3" height="\\4" />[\\2] \\5}) para.gsub!(/(^|\s)\{\s*(\S+?\.(?:jpg|png|gif))(\s+[^}]+)?\}(https?:\/\/\S+)/,%{\\1<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed" xlink:href="#{@dir.url.images_local}/\\2"/>\\2}) para.gsub!(/(^|\s)\{([^}]+)\}(https?:\/\/[^"><]+?)([,.:;"><]?(?:\s|$))/,'\1<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="\3">\2</link>\4') - para.gsub!(/(^|\s)(https?:\/\/[^"><]+?)([,.:;"><]?(?:\s|$))/,'\1<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="\2">\2</link>\3') + para.gsub!(/(^|\s)(https?:\/\/[^"><]+?)([,.:;"><]?(?:\s|$))/,%{\\1#{@url_brace.xml_open}<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="\\2">\\2</link>#{@url_brace.xml_close}\\3}) para.gsub!(/ /,' ') #clean para end @@ -363,9 +372,8 @@ module SiSU_XML_munge para end def markup_group(para='') - para.gsub!(/</,'<') - para.gsub!(/>/,'>') - para.gsub!(/<br(?:\s+\/)?>/,'<br />') + para.gsub!(/</,'<'); para.gsub!(/>/,'>') + para.gsub!(/<:?br(?:\s+\/)?>/,'<br />') para end end diff --git a/lib/sisu/v0/texpdf.rb b/lib/sisu/v0/texpdf.rb index 7440289d..aec45b58 100644 --- a/lib/sisu/v0/texpdf.rb +++ b/lib/sisu/v0/texpdf.rb @@ -472,8 +472,7 @@ WOK when /^4#{@@tilde}/; mono.level4 when /^5#{@@tilde}/; mono.level5 when /^6#{@@tilde}/; mono.level6 - when /^<:i1>/; mono.indent1 - when /^<:i2>/; mono.indent2 + when /^<:i([1-9])>/; mono.indent($1) when /<:=/; mono.symbol_graphic #watch when /^\s*<:image\s+/; mono.image when /\}image/; mono.png diff --git a/lib/sisu/v0/texpdf_format.rb b/lib/sisu/v0/texpdf_format.rb index ea418dd2..b981ca15 100644 --- a/lib/sisu/v0/texpdf_format.rb +++ b/lib/sisu/v0/texpdf_format.rb @@ -250,6 +250,7 @@ WOK end class Format_text_object require 'iconv' + require "#{SiSU_lib}/defaults" attr_accessor :string,:string1,:string,:orientation,:url,:dir,:tex @@sys=SiSU_Env::System_call.new @@tex_backslash="\\\\" @@ -268,6 +269,7 @@ WOK @start_table='' @dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern @tx=SiSU_Env::Get_init.instance.tex + @url_brace=SiSU_Viz::Skin.new.url_decoration end def longtable_landscape @end_table='\end{longtable}' @@ -493,7 +495,7 @@ WOK @string.gsub!(/[^\}>]((?:https?|ftp):\/\/\S+?)(<\/\S>)/,' \begin{scriptsize}\href{\1}{ \1 } \end{scriptsize}\2') else # regular urls !! http:// href if @string=~/(?:https?|ftp):\/\/\S+?[,.]? / - @string.gsub!(/(?:^|[^\}>])((?:https?|ftp):\/\/\S+?)([,.])? /,' \begin{scriptsize}\href{\1}{ \1}\end{scriptsize}\2 ') + @string.gsub!(/(?:^|[^\}>])((?:https?|ftp):\/\/\S+?)([,.])? /," #{@url_brace.tex_open}\\begin{scriptsize}\\href{\\1}{ \\1}\\end{scriptsize}#{@url_brace.tex_close}\\2 ") #tamper else @string.gsub!(/(?:^|[^\}>])((?:https?|ftp):\/\/\S+)/,' \begin{scriptsize}\href{ \1 }{\1} \end{scriptsize}') #should not be necessary, not checked end end @@ -526,7 +528,7 @@ WOK @string.gsub!(/\s+'/,' `') # open ' @string.gsub!(/^([1-6-]#{@@tilde}\S*|<.+?>)?\s*'/,'\1`') # open ' end - @string.gsub!(/^(<:i[12]>)?\s*\\_\*\s*/,'\\1 \begin{math} \bullet \end{math}~~') #bullets - added 2004w17 watch \\_ + @string.gsub!(/^(<:i[1-9]>)?\s*\\_\*\s*/,'\1 \begin{math} \bullet \end{math}~~') #bullets - added 2004w17 watch \\_ @string.gsub!(/(<font.*?>|<\/font>)/,'') @string.gsub!(/\s*<sup>(\S+?)<\/sup>/,'^\1') @string.gsub!(/(<sup>|<\/sup>)/,'') @@ -692,17 +694,11 @@ WOK @string.gsub!(/#{@md.lv6}\s*(.marginpar)/m,'\1') #end BUGWATCH end - def indent1 - @string.gsub!(/<:i1>(.*)/m, - '\begin{ParagraphIndent}{0.01\columnwidth} \1 -\end{ParagraphIndent} -') - end - def indent2 - @string.gsub!(/<:i2>(.*)/m, - '\begin{ParagraphIndent}{0.02\columnwidth} \1 -\end{ParagraphIndent} -') + def indent(lev) + @string.gsub!(/<:i#{lev}>(.*)/m, + "\\begin{ParagraphIndent}{0.0#{lev}\\columnwidth} \\1 +\\end{ParagraphIndent} +") end def symbol_graphic dir=SiSU_Env::Info_env.new(@md.fns) diff --git a/lib/sisu/v0/xhtml.rb b/lib/sisu/v0/xhtml.rb index 44293919..8d9e2764 100644 --- a/lib/sisu/v0/xhtml.rb +++ b/lib/sisu/v0/xhtml.rb @@ -120,7 +120,7 @@ module SiSU_XHTML end def songsheet pre - markup + @data=markup(@data) post publish end @@ -269,8 +269,7 @@ WOK @@xml[:body] << "#{@tab*0}</object>" << "\n" #if para[@regx] @endnotes=[] end - def markup - data=@data + def markup(data) @endnotes=[] @rcdc=false @level,@cont,@copen,@xml_contents_close=[],[],[],[] @@ -331,12 +330,13 @@ WOK table=SiSU_Tables::Table_xml.new(para,ocn) para=table.table_split table_structure(para,ocn) - elsif para =~ /<:i1>/ - xml_structure(para,nil,nil,nil,'indent1') - elsif para =~ /<:i2>/ - xml_structure(para,nil,nil,nil,'indent2') - else - xml_structure(para,nil,nil,nil) + elsif para =~ /^\s*(?:<:i([1-9])> )?_\*/ + m=$1 + para.gsub!(/^(\s*(?:<:i[1-9]> )?)_\*/,'\1') + xml_structure(para,nil,nil,nil,"indent_bullet#{m}") + elsif para =~ /<:i([1-9])>/ + xml_structure(para,nil,nil,nil,"indent#{$1}") + else xml_structure(para,nil,nil,nil) end #@@xml[:body] << "#{@tab*6}<object>" << "\n" if para[@regx] #@@xml[:body] << "#{@tab*7}<ocn>#{para[@regx,3]}</ocn>" << "\n" if para[@regx,3] @@ -358,12 +358,7 @@ WOK end para='' if (para =~/<a name="n\d+">/ and para =~/^(-\{{2}~\d+|<!e[:_]\d+!>)/) # -endnote para=case para - when /<:i1>/ - if para =~/.*<:#>.*$/ - format_text=Format_text_object.new(para,'') - format_text.scr_inden_ocn_e_no_paranum - end - when /<:i2>/ + when /<:i[1-9]>/ if para =~/.*<:#>.*$/ format_text=Format_text_object.new(para,'') format_text.scr_inden_ocn_e_no_paranum @@ -419,7 +414,6 @@ WOK end def publish content=[] - data=@data content << @@xml[:open] << @@xml[:head] << @@xml[:body] << @@xml[:metadata] content << @@xml[:owner_details] if @md.stmp =~/\w\w/ content << @@xml[:tail] << @@xml[:close] diff --git a/lib/sisu/v0/xml.rb b/lib/sisu/v0/xml.rb index 20c5f80e..7edbb8ea 100644 --- a/lib/sisu/v0/xml.rb +++ b/lib/sisu/v0/xml.rb @@ -120,7 +120,7 @@ module SiSU_XML_SAX end def songsheet pre - markup + @data=markup(@data) post publish end @@ -293,8 +293,7 @@ WOK @@xml[:body] << "#{@tab*0}</object>" << "\n" #if para[@regx] @endnotes=[] end - def markup - data=@data + def markup(data) xml_sc(@md) @endnotes,@level,@cont,@copen,@xml_contents_close=[],[],[],[],[] @rcdc=false @@ -355,10 +354,12 @@ WOK table=SiSU_Tables::Table_xml.new(para,ocn) para=table.table_split table_structure(para) - elsif para =~ /<:i1>/ - xml_structure(para,nil,nil,nil,'indent1') - elsif para =~ /<:i2>/ - xml_structure(para,nil,nil,nil,'indent2') + elsif para =~ /^\s*(?:<:i([1-9])> )?_\*/ #uncomment + m=$1 + para.gsub!(/^(\s*(?:<:i[1-9]> )?)_\*/,'\1') + xml_structure(para,nil,nil,nil,"indent_bullet#{m}") + elsif para =~ /<:i([1-9])>/ + xml_structure(para,nil,nil,nil,"indent#{$1}") else xml_structure(para,nil,nil,nil) end #@@xml[:body] << "#{@tab*6}<object>" << "\n" if para[@regx] @@ -381,11 +382,7 @@ WOK end para='' if para =~/<a name="n\d+">/ and para =~/^(-\{{2}~\d+|<!e[:_]\d+!>)/ # -endnote if para =~/.*<:#>.*$/ - para=case para - when /<:i1>/ - format_text=Format_text_object.new(para,'') - format_text.scr_inden_ocn_e_no_paranum - when /<:i2>/ + para=if para =~ /<:i[1-9]>/ format_text=Format_text_object.new(para,'') format_text.scr_inden_ocn_e_no_paranum end @@ -438,7 +435,6 @@ WOK end def publish content=[] - data=@data content << @@xml[:open] << @@xml[:head] << @@xml[:body] << @@xml[:metadata] content << @@xml[:owner_details] if @md.stmp =~/\w\w/ content << @@xml[:tail] << @@xml[:close] diff --git a/lib/sisu/v0/xml_dom.rb b/lib/sisu/v0/xml_dom.rb index 9c13dcc1..4225a276 100644 --- a/lib/sisu/v0/xml_dom.rb +++ b/lib/sisu/v0/xml_dom.rb @@ -118,7 +118,7 @@ module SiSU_XML_DOM end def songsheet pre - markup + @data=markup(@data) post publish end @@ -225,13 +225,13 @@ WOK @cont[2]=false if @cont[2] @cont[3]=false if @cont[3] ####### attempt to close contents - if @copen[3] # 6{ + if @copen[3] # 6~ [3,2,1].each { |v| @@xml[:body] << "#{@tab*n}</contents#{v}>\n" } @copen[1]=@copen[2]=@copen[3]=false - elsif @copen[2] # 5{ + elsif @copen[2] # 5~ [2,1].each { |v| @@xml[:body] << "#{@tab*n}</contents#{v}>\n" } @copen[1]=@copen[2]=@copen[3]=false - elsif @copen[1] # 4{ + elsif @copen[1] # 4~ [1].each { |v| @@xml[:body] << "#{@tab*n}</contents#{v}>\n" } @copen[1]=@copen[2]=@copen[3]=false end @@ -318,8 +318,7 @@ WOK @@xml[:body] << "#{@tab*0}</object>" << "\n" #if para[@regx] @endnotes=[] end - def markup - data=@data + def markup(data) xml_sc(@md) @rcdc=false @level,@cont,@copen,@xml_contents_close=[],[],[],[] @@ -388,9 +387,12 @@ WOK @@xml[:body] << table_structure(para,ocn) else #xml_structure(para, nil, nil, nil) type=case para - when /^\s*<:i1>/; 'indent1' - when /^\s*<:i2>/; 'indent2' - else 'norm' + when /^\s*(?:<:i([1-9])> )?_\*/ + m=$1 + para.gsub!(/^(\s*(?:<:i[1-9]> )?)_\*/,'\1') + "indent_bullet#{m}" + when /^\s*<:i([1-9])>/; "indent#{$1}" + else 'norm' end xml_markup(para) @@xml[:body] << %{#{@tab*6}<object id="#{para[@regx,3]}">} << "\n" if para[@regx] and para[@regx,3] @@ -417,10 +419,7 @@ WOK para='' if para =~/<a name="n\d+">/ and para =~/^(-\{{2}~\d+|<!e[:_]\d+!>)/ # -endnote if para =~/.*<:#>.*$/ para=case para - when /<:i1>/ - format_text=Format_text_object.new(para,'') - format_text.scr_inden_ocn_e_no_paranum - when /<:i2>/ + when /<:i[1-9]>/ format_text=Format_text_object.new(para,'') format_text.scr_inden_ocn_e_no_paranum end @@ -481,7 +480,6 @@ WOK end def publish content=[] - data=@data content << @@xml[:open] << @@xml[:head] << @@xml[:body] << @@xml[:metadata] content << @@xml[:owner_details] if @md.stmp =~/\w\w/ content << @@xml[:tail] << @@xml[:close] -- cgit v1.2.3