From d13ffd55f37400a5642970e5dd365a1087ee7553 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 7 May 2012 00:04:09 -0400 Subject: sha256 (3.2.7) --- data/doc/sisu/CHANGELOG_v3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index d2a52c50..71d992ef 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -17,9 +17,9 @@ v3 branch once stable will supersede & replace current stable v2 branch http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.2.7 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.2.7-1 http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.7.orig.tar.xz - sisu_3.2.7.orig.tar.xz - sisu_3.2.7-1.dsc - sisu_3.2.7-1.debian.tar.gz + 6a75dfe1c7980e6caa07790f8e9b3831b730308de68a408db1ef1b9e202431bc 1685048 sisu_3.2.7.orig.tar.xz + 58253f0cf3ece9b52085a3571b136dd82b79f5602f35a364d77994d95990b074 1382 sisu_3.2.7-1.dsc + 07dbe1ee848421339560a09f430321b94d05da9fdac53e493701c92d49b98682 296207 sisu_3.2.7-1.debian.tar.gz * v3: hub, options, fixes * dbi: pgsql, sqlite -- cgit v1.2.3 From 0832d42ccdbd129ef5f2cbc15a449296b729bc64 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 12 May 2012 00:40:16 -0400 Subject: v3: 3.2.8 version & changelog "opened" --- data/doc/sisu/CHANGELOG_v3 | 8 ++++++++ data/sisu/v3/v/version.yml | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 71d992ef..96b73282 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -13,6 +13,14 @@ Reverse Chronological: %% Development branch UNSTABLE v3 branch once stable will supersede & replace current stable v2 branch +%% 3.2.8.orig.tar.xz (2012-05-12:19/6) +http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.2.8 +http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.2.8-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.8.orig.tar.xz + sisu_3.2.8.orig.tar.xz + sisu_3.2.8-1.dsc + sisu_3.2.8-1.debian.tar.gz + %% 3.2.7.orig.tar.xz (2012-05-06:18/7) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.2.7 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.2.7-1 diff --git a/data/sisu/v3/v/version.yml b/data/sisu/v3/v/version.yml index e763cb14..992132db 100644 --- a/data/sisu/v3/v/version.yml +++ b/data/sisu/v3/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 3.2.7 -:date_stamp: 2012w18/7 -:date: "2012-05-06" +:version: 3.2.8 +:date_stamp: 2012w19/6 +:date: "2012-05-12" :project: SiSU -- cgit v1.2.3 From 99965a524e09c324e0820990d4332e9d0df94bbd Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 12 May 2012 00:42:03 -0400 Subject: v3: rescue & error warnings, more touched --- data/doc/sisu/CHANGELOG_v3 | 3 +++ lib/sisu/v3/composite.rb | 10 ++++++++-- lib/sisu/v3/concordance.rb | 15 ++++++++++++--- lib/sisu/v3/db_drop.rb | 6 +++++- lib/sisu/v3/db_import.rb | 8 ++++++-- lib/sisu/v3/db_select.rb | 5 ++++- lib/sisu/v3/dbi.rb | 4 +++- lib/sisu/v3/dbi_discreet.rb | 10 ++++++++-- lib/sisu/v3/manpage.rb | 5 ++++- lib/sisu/v3/po4a.rb | 5 ++++- lib/sisu/v3/xhtml.rb | 10 ++++++++-- lib/sisu/v3/xml.rb | 10 ++++++++-- lib/sisu/v3/xml_dom.rb | 10 ++++++++-- lib/sisu/v3/xml_fictionbook.rb | 5 ++++- lib/sisu/v3/xml_scaffold.rb | 5 ++++- 15 files changed, 89 insertions(+), 22 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 96b73282..dabb56be 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -21,6 +21,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.8.orig.tar.xz sisu_3.2.8-1.dsc sisu_3.2.8-1.debian.tar.gz +* v3: reporting + * rescue & error warnings, more touched + %% 3.2.7.orig.tar.xz (2012-05-06:18/7) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.2.7 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.2.7-1 diff --git a/lib/sisu/v3/composite.rb b/lib/sisu/v3/composite.rb index ac64b15e..4b70dfe3 100644 --- a/lib/sisu/v3/composite.rb +++ b/lib/sisu/v3/composite.rb @@ -111,7 +111,10 @@ module SiSU_Assemble @fns_array=IO.readlines(@opt.fno,'') assembled=insertions? write(assembled) - rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure end end @@ -240,7 +243,10 @@ module SiSU_Assemble @opt.fns=@opt.fns.gsub(/\.ssm\.sst$/,'.ssm') #FIX earlier, hub @fns_array=IO.readlines(@opt.fns,'') files=insertions? - rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure end end diff --git a/lib/sisu/v3/concordance.rb b/lib/sisu/v3/concordance.rb index 3d8ab38a..76f79d41 100644 --- a/lib/sisu/v3/concordance.rb +++ b/lib/sisu/v3/concordance.rb @@ -95,7 +95,10 @@ module SiSU_Concordance SiSU_Screen::Ansi.new(@md.opt.cmd,"wc (word count) is off, concordance will be processed for all files including those over the max set size of: #{wordmax} words").warn unless @md.opt.cmd =~/q/ SiSU_Concordance::Source::Words.new(@particulars).songsheet end - rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure end end @@ -214,7 +217,10 @@ WOK @alph=SiSU_i18n::Alphabet.new(@md.opt.lng).hash_arrays @alphlst=SiSU_i18n::Alphabet.new(@md.opt.lng).hash_strings @rgx_scanlist=%r{#{Mx[:fa_italics_o]}[#{@alphlst[:l]}#{@alphlst[:u]}0-9"\s]{2,12}#{Mx[:fa_italics_c]}|#{Mx[:fa_bold_o]}[#{@alphlst[:l]}#{@alphlst[:u]}0-9"\s]{2,12}#{Mx[:fa_bold_c]}|(?:https?|file)://\S+|<\S+?>|[#{@alphlst[:l]}#{@alphlst[:u]}]+|\w+}mi - rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + __LINE__.to_s + ':' + __FILE__ + end end end def songsheet @@ -222,7 +228,10 @@ WOK FileUtils::mkdir_p(@file.output_path.html_concordance.dir) unless FileTest.directory?(@file.output_path.html_concordance.dir) @file_concordance=File.open(@file.place_file.html_concordance.dir,'w') map_para - rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure @file_concordance.close end diff --git a/lib/sisu/v3/db_drop.rb b/lib/sisu/v3/db_drop.rb index 4b9aba7d..42562307 100644 --- a/lib/sisu/v3/db_drop.rb +++ b/lib/sisu/v3/db_drop.rb @@ -104,7 +104,11 @@ module SiSU_DbDrop sdb.create_table.endnotes_plus sdb.create_table.urls sdb_index.create_indexes - rescue; SiSU_Errors::InfoError.new($!,$@,'-D').error; sdb.output_dir? + rescue + SiSU_Errors::InfoError.new($!,$@,'-D').error do + __LINE__.to_s + ':' + __FILE__ + end + sdb.output_dir? end exit else diff --git a/lib/sisu/v3/db_import.rb b/lib/sisu/v3/db_import.rb index a31a0d2d..e4aa1fa4 100644 --- a/lib/sisu/v3/db_import.rb +++ b/lib/sisu/v3/db_import.rb @@ -168,7 +168,9 @@ module SiSU_DbImport puts "Error code: #{e.err}" puts "Error message: #{e.errstr}" puts "Error SQLSTATE: #{e.state}" - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error + SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + __LINE__.to_s + ':' + __FILE__ + end sqlfn="#{@env.processing_path.sql}/#{@md.fnb}.sql" sql=File.new(sqlfn,'w') t_d.each {|i| sql.puts i} @@ -179,7 +181,9 @@ module SiSU_DbImport puts "#{__FILE__}:#{__LINE__}" end rescue - SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error + SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + __LINE__.to_s + ':' + __FILE__ + end sqlfn="#{@env.processing_path.sql}/#{@md.fnb}.sql" sql=File.new(sqlfn,'w') t_d.each {|i| sql.puts i} diff --git a/lib/sisu/v3/db_select.rb b/lib/sisu/v3/db_select.rb index 2d32310d..b77be351 100644 --- a/lib/sisu/v3/db_select.rb +++ b/lib/sisu/v3/db_select.rb @@ -121,7 +121,10 @@ module SiSU_DbSelect @sdb.create_table.endnotes_plus @sdb.create_table.urls @sdb_index.create_indexes - rescue; SiSU_Errors::InfoError.new($!,$@,'-D').error; @sdb.output_dir? + rescue + SiSU_Errors::InfoError.new($!,$@,'-D').error; @sdb.output_dir? do + __LINE__.to_s + ':' + __FILE__ + end end when /^--createtables?$/ @sdb.output_dir? diff --git a/lib/sisu/v3/dbi.rb b/lib/sisu/v3/dbi.rb index f11d9e81..905ab211 100644 --- a/lib/sisu/v3/dbi.rb +++ b/lib/sisu/v3/dbi.rb @@ -130,7 +130,9 @@ module SiSU_DBI begin SiSU_DbDBI::Case.new(@opt,@conn,@sql_type).cases rescue - SiSU_Errors::InfoError.new($!,$@,@cf,@opt.fns).error + SiSU_Errors::InfoError.new($!,$@,@cf,@opt.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure end begin diff --git a/lib/sisu/v3/dbi_discreet.rb b/lib/sisu/v3/dbi_discreet.rb index 8f7f0c53..c808dbcc 100644 --- a/lib/sisu/v3/dbi_discreet.rb +++ b/lib/sisu/v3/dbi_discreet.rb @@ -133,7 +133,11 @@ module SiSU_DBI_Discreet #% database building sdb_import.marshal_load tell=SiSU_Screen::Ansi.new(@opt.cmd,"sqlite3 #{db.sqlite.db} database?") tell.puts_grey if @opt.cmd =~/v/ - rescue; SiSU_Errors::InfoError.new($!,$@,'-d').error; sdb.output_dir? + rescue + SiSU_Errors::InfoError.new($!,$@,'-d').error do + __LINE__.to_s + ':' + __FILE__ + end + sdb.output_dir? end end def read_sqlite @@ -149,7 +153,9 @@ module SiSU_DBI_Discreet #% database building SiSU_Screen::Ansi.new(@opt.cmd,"DBI (#{@sql_type}) #{@opt.mod}",@opt.fns).dbi_title unless @opt.cmd =~/q/ @db.sqlite_discreet.conn_sqlite3 rescue - SiSU_Errors::InfoError.new($!,$@,@cf,@opt.fns).error + SiSU_Errors::InfoError.new($!,$@,@cf,@opt.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure end end diff --git a/lib/sisu/v3/manpage.rb b/lib/sisu/v3/manpage.rb index 0571a0e6..76e6721e 100644 --- a/lib/sisu/v3/manpage.rb +++ b/lib/sisu/v3/manpage.rb @@ -94,7 +94,10 @@ module SiSU_Manpage @dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here SiSU_Manpage::Source::Scroll.new(@md,@dal_array).songsheet SiSU_Env::InfoSkin.new(@md).select #watch - rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure end end diff --git a/lib/sisu/v3/po4a.rb b/lib/sisu/v3/po4a.rb index adb977c2..aeff7acb 100644 --- a/lib/sisu/v3/po4a.rb +++ b/lib/sisu/v3/po4a.rb @@ -152,7 +152,10 @@ module SiSU_Po4a SiSU_Po4a::Source::Scroll.new(fn,@dal_array_lang_src,@dal_array_lang_translation,@@md_src,@@md_trn,wrap_width).songsheet SiSU_Env::InfoSkin.new(md).select #watch end - rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure end end diff --git a/lib/sisu/v3/xhtml.rb b/lib/sisu/v3/xhtml.rb index c537275c..ff40f9f1 100644 --- a/lib/sisu/v3/xhtml.rb +++ b/lib/sisu/v3/xhtml.rb @@ -95,7 +95,10 @@ module SiSU_XHTML SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"/#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}").flow if @opt.cmd =~/[MV]/ end SiSU_XHTML::Source::Songsheet.new(@particulars).song - rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure end end @@ -110,7 +113,10 @@ module SiSU_XHTML SiSU_XHTML::Source::Scroll.new(@particulars).songsheet SiSU_XHTML::Source::Tidy.new(@md,@file.place_file.xhtml.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use SiSU_Rexml::Rexml.new(@md,@file.place_file.xhtml.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug - rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure end end diff --git a/lib/sisu/v3/xml.rb b/lib/sisu/v3/xml.rb index aa75e139..0b2467f2 100644 --- a/lib/sisu/v3/xml.rb +++ b/lib/sisu/v3/xml.rb @@ -93,7 +93,10 @@ module SiSU_XML_SAX SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.xml_sax.dir}/#{@md.file.base_filename.xml_sax}").flow if @opt.cmd =~/[MV]/ end SiSU_XML_SAX::Source::Songsheet.new(@particulars).song - rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure #file closed in songsheet end @@ -109,7 +112,10 @@ module SiSU_XML_SAX SiSU_XML_SAX::Source::Scroll.new(@particulars).songsheet SiSU_XML_SAX::Source::Tidy.new(@md,@file.place_file.xml_sax.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_sax.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug - rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure end end diff --git a/lib/sisu/v3/xml_dom.rb b/lib/sisu/v3/xml_dom.rb index 6b8c4e5c..7b1b7b72 100644 --- a/lib/sisu/v3/xml_dom.rb +++ b/lib/sisu/v3/xml_dom.rb @@ -91,7 +91,10 @@ module SiSU_XML_DOM SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}").flow if @opt.cmd =~/[MV]/ end SiSU_XML_DOM::Source::Songsheet.new(@particulars).songsheet - rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure end end @@ -106,7 +109,10 @@ module SiSU_XML_DOM SiSU_XML_DOM::Source::Scroll.new(@particulars).songsheet SiSU_XML_DOM::Source::Tidy.new(@md,@file.place_file.xml_dom.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_dom.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug - rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure end end diff --git a/lib/sisu/v3/xml_fictionbook.rb b/lib/sisu/v3/xml_fictionbook.rb index 8fe1e7c1..3234e146 100644 --- a/lib/sisu/v3/xml_fictionbook.rb +++ b/lib/sisu/v3/xml_fictionbook.rb @@ -76,7 +76,10 @@ module SiSU_XML_Fictionbook @md=SiSU_Param::Parameters.new(@opt).get @dal_array=SiSU_DAL::Source.new(@opt).get SiSU_XML_Fictionbook::Source::Scroll.new(@dal_array,@md).songsheet - rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure end end diff --git a/lib/sisu/v3/xml_scaffold.rb b/lib/sisu/v3/xml_scaffold.rb index f43daacf..9232a493 100644 --- a/lib/sisu/v3/xml_scaffold.rb +++ b/lib/sisu/v3/xml_scaffold.rb @@ -73,7 +73,10 @@ module SiSU_XML_Scaffold begin @md,@dal_array=@particulars.md,@particulars.dal_array SiSU_XML_Scaffold::Source::Scroll.new(@dal_array,@md).songsheet - rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error + rescue + SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do + __LINE__.to_s + ':' + __FILE__ + end ensure end end -- cgit v1.2.3 From 5dace95567352f850f147cd911dd9846940caa17 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 12 May 2012 00:44:04 -0400 Subject: v3: reporting, composite file names touched --- data/doc/sisu/CHANGELOG_v3 | 1 + lib/sisu/v3/composite.rb | 4 ++-- lib/sisu/v3/concordance.rb | 2 +- lib/sisu/v3/dal.rb | 2 +- lib/sisu/v3/dbi.rb | 2 +- lib/sisu/v3/dbi_discreet.rb | 2 +- lib/sisu/v3/digests.rb | 2 +- lib/sisu/v3/epub.rb | 2 +- lib/sisu/v3/html.rb | 2 +- lib/sisu/v3/manifest.rb | 2 +- lib/sisu/v3/manpage.rb | 2 +- lib/sisu/v3/odf.rb | 2 +- lib/sisu/v3/options.rb | 6 +++++- lib/sisu/v3/param.rb | 4 ++-- lib/sisu/v3/plaintext.rb | 2 +- lib/sisu/v3/sisupod_make.rb | 4 ++-- lib/sisu/v3/texinfo.rb | 2 +- lib/sisu/v3/texpdf.rb | 2 +- lib/sisu/v3/xhtml.rb | 2 +- lib/sisu/v3/xml.rb | 2 +- lib/sisu/v3/xml_dom.rb | 2 +- 21 files changed, 28 insertions(+), 23 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index dabb56be..71e1017b 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -22,6 +22,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.8.orig.tar.xz sisu_3.2.8-1.debian.tar.gz * v3: reporting + * composite file names touched * rescue & error warnings, more touched %% 3.2.7.orig.tar.xz (2012-05-06:18/7) diff --git a/lib/sisu/v3/composite.rb b/lib/sisu/v3/composite.rb index 4b70dfe3..3d28cfcb 100644 --- a/lib/sisu/v3/composite.rb +++ b/lib/sisu/v3/composite.rb @@ -187,7 +187,7 @@ module SiSU_Assemble def insertions? data=@fns_array tuned_file,imagedir=[],[] - SiSU_Screen::Ansi.new(@opt.cmd,'Composite Document',"[#{@opt.f_pth[:lng_is]}] #{@opt.fns}").grey_title_hi unless @opt.cmd =~/q/ + SiSU_Screen::Ansi.new(@opt.cmd,'Composite Document',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").grey_title_hi unless @opt.cmd =~/q/ para=data.each do |para| if para =~/^<<\s+(\S+?\.ss[it])$/ \ or para =~/^<<\{(\S+?\.ss[it])\}$/ \ @@ -253,7 +253,7 @@ module SiSU_Assemble def insertions? data=@fns_array tuned_file,imagedir=[],[] - SiSU_Screen::Ansi.new(@opt.cmd,'Composite Document',@opt.fns).grey_title_hi unless @opt.cmd =~/q/ + SiSU_Screen::Ansi.new(@opt.cmd,'Composite Document',@opt.fno).grey_title_hi unless @opt.cmd =~/q/ @ssm=[@opt.fns] para=data.each do |para| if para =~/^<<\s+(\S+?\.ss[it])$/ diff --git a/lib/sisu/v3/concordance.rb b/lib/sisu/v3/concordance.rb index 76f79d41..1b8f5a2a 100644 --- a/lib/sisu/v3/concordance.rb +++ b/lib/sisu/v3/concordance.rb @@ -79,7 +79,7 @@ module SiSU_Concordance unless @md.opt.cmd =~/q/ tool=(@md.opt.cmd =~/[MVv]/) \ ? "#{@env.program.web_browser} #{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}" - : "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}" + : "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" @md.opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,"Concordance",tool).grey_title_hi : SiSU_Screen::Ansi.new(@opt.cmd,'Concordance',tool).green_title_hi diff --git a/lib/sisu/v3/dal.rb b/lib/sisu/v3/dal.rb index 89dd8fdb..a753be10 100644 --- a/lib/sisu/v3/dal.rb +++ b/lib/sisu/v3/dal.rb @@ -266,7 +266,7 @@ module SiSU_DAL unless @opt.cmd =~/q/ tell=(@opt.cmd=~/[vVM]/) \ ? SiSU_Screen::Ansi.new(@opt.cmd,'Document Abstraction') - : SiSU_Screen::Ansi.new(@opt.cmd,'Document Abstraction',"[#{@opt.f_pth[:lng_is]}] #{@opt.fns}") + : SiSU_Screen::Ansi.new(@opt.cmd,'Document Abstraction',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}") tell.green_title_hi end fn=(@fnx && @fnx =~/\.ss[tmi]$/) \ diff --git a/lib/sisu/v3/dbi.rb b/lib/sisu/v3/dbi.rb index 905ab211..57a6e4f2 100644 --- a/lib/sisu/v3/dbi.rb +++ b/lib/sisu/v3/dbi.rb @@ -126,7 +126,7 @@ module SiSU_DBI when /pg/; read_psql when /sqlite/; read_sqlite end - SiSU_Screen::Ansi.new(@opt.cmd,"DBI (#{@sql_type}) #{@opt.mod}",@opt.fns).dbi_title unless @opt.cmd =~/q/ + SiSU_Screen::Ansi.new(@opt.cmd,"DBI (#{@sql_type}) #{@opt.mod}",@opt.fno).dbi_title unless @opt.cmd =~/q/ begin SiSU_DbDBI::Case.new(@opt,@conn,@sql_type).cases rescue diff --git a/lib/sisu/v3/dbi_discreet.rb b/lib/sisu/v3/dbi_discreet.rb index c808dbcc..b0943d7d 100644 --- a/lib/sisu/v3/dbi_discreet.rb +++ b/lib/sisu/v3/dbi_discreet.rb @@ -119,7 +119,7 @@ module SiSU_DBI_Discreet #% database building sdb_index=SiSU_DbDBI::Index.new(@opt,conn,@file_maint,'sqlite') sdb.output_dir? begin - SiSU_Screen::Ansi.new(@opt.cmd,'SQLite',"[#{@opt.f_pth[:lng_is]}] #{@opt.fns}").green_title_hi unless @opt.cmd =~/q/ + SiSU_Screen::Ansi.new(@opt.cmd,'SQLite',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").green_title_hi unless @opt.cmd =~/q/ sdb.create_db sdb.create_table.metadata_and_text sdb.create_table.doc_objects diff --git a/lib/sisu/v3/digests.rb b/lib/sisu/v3/digests.rb index bc4a37e5..a7291ae4 100644 --- a/lib/sisu/v3/digests.rb +++ b/lib/sisu/v3/digests.rb @@ -77,7 +77,7 @@ module SiSU_DigestView unless @opt.cmd =~/q/ tool=(@opt.cmd =~/[MVv]/) \ ? "#{@env.program.text_editor} file://#{@md.file.output_path.hash_digest.dir}/#{@md.file.base_filename.hash_digest}" - : "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}" + : "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,"Document #{@dg} Digests",tool).green_hi_blue : SiSU_Screen::Ansi.new(@opt.cmd,"Document #{@dg} Digests",tool).green_title_hi diff --git a/lib/sisu/v3/epub.rb b/lib/sisu/v3/epub.rb index e19f0e33..6e0a77ca 100644 --- a/lib/sisu/v3/epub.rb +++ b/lib/sisu/v3/epub.rb @@ -87,7 +87,7 @@ module SiSU_EPUB unless @opt.cmd =~/q/ tool=(@opt.cmd =~/[MVvz]/) \ ? "#{@env.program.epub_viewer} #{@md.file.output_path.epub.dir}/#{@md.file.base_filename.epub}" - : "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}" + : "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'EPUB',tool).green_hi_blue : SiSU_Screen::Ansi.new(@opt.cmd,'EPUB',tool).green_title_hi diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb index 937ae0d0..8ff16167 100644 --- a/lib/sisu/v3/html.rb +++ b/lib/sisu/v3/html.rb @@ -88,7 +88,7 @@ module SiSU_HTML loc=@env.url.output_tell unless @opt.cmd =~/q/ tool=if @opt.cmd =~/[MVvz]/; "#{@env.program.web_browser} file://#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}" - else "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}" + else "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" end @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_hi_blue diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb index ffb540e3..c784fac4 100644 --- a/lib/sisu/v3/manifest.rb +++ b/lib/sisu/v3/manifest.rb @@ -88,7 +88,7 @@ module SiSU_Manifest url_html="file://#{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}" @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',"#{xbrowser} #{url_html}").green_hi_blue - : SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',"[#{@opt.f_pth[:lng_is]}] #{@opt.fns}").green_title_hi + : SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").green_title_hi SiSU_Screen::Ansi.new(@opt.cmd,"#{browser} #{url_html}").grey_tab if @opt.cmd =~/v/i end data=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions diff --git a/lib/sisu/v3/manpage.rb b/lib/sisu/v3/manpage.rb index 76e6721e..f034cdd3 100644 --- a/lib/sisu/v3/manpage.rb +++ b/lib/sisu/v3/manpage.rb @@ -85,7 +85,7 @@ module SiSU_Manpage path=@env.path.output_tell tool=(@opt.cmd =~/[MVv]/) \ ? "#{@env.program.text_editor} #{@md.file.output_path.manpage.dir}/#{@md.file.base_filename.manpage}" - : "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}" + : "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" @opt.cmd=~/[MVvz]/ \ && @opt.cmd !~/q/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'Manpage',tool).green_hi_blue diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb index 6a6da8b9..07bd1c04 100644 --- a/lib/sisu/v3/odf.rb +++ b/lib/sisu/v3/odf.rb @@ -82,7 +82,7 @@ module SiSU_ODF unless @opt.cmd =~/q/ tool=(@opt.cmd =~/[MVv]/) \ ? "#{@env.program.odf_viewer} file://#{@md.file.output_path.odt.dir}/#{@md.file.base_filename.odt}" - : "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}" + : "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'Opendocument (ODF:ODT)',tool).green_hi_blue : SiSU_Screen::Ansi.new(@opt.cmd,'Opendocument (ODF:ODT)',tool).green_title_hi diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb index 82306079..e804d7f7 100644 --- a/lib/sisu/v3/options.rb +++ b/lib/sisu/v3/options.rb @@ -782,7 +782,11 @@ module SiSU_Commandline @lng_base end def fno - @fno + @fno=if @fno and not @fno.empty? + @fno + else + fns[/(.+?(?:sst|ssm))(?:\.sst)?/,1] + end end def fns @fns diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb index 20f3b2b9..0e77cf3e 100644 --- a/lib/sisu/v3/param.rb +++ b/lib/sisu/v3/param.rb @@ -1051,9 +1051,9 @@ module SiSU_Param @doc={ lv: [] } @doc[:fns],@doc[:fnb],@doc[:scr_suffix]='','','' @@publisher='SiSU scribe' - attr_accessor :make,:env,:path,:file,:fn,:fns,:fnb,:fnn,:fnt,:fnl,:flv,:fnz,:fnstex,:ocn,:sfx_src,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:site_skin,:sisu,:sisu_version,:ruby_version,:title,:subtitle,:full_title,:html_title,:subtitle_tex,:creator,:classify,:author_home,:author,:author_title,:author_nationality,:authors,:authorship,:translator,:illustrator,:prepared_by,:digitized_by,:subject,:description,:publisher,:current_publisher,:contributor,:date,:date_created,:date_issued,:date_available,:date_valid,:date_modified,:date_translated,:date_added_to_site,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:type,:format,:identifier,:source,:language,:language_original,:relation,:coverage,:rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:papersize_array,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:lvs,:pagenew,:pagebreak,:num_top,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:markup,:markup_instruction,:markup_version,:markup_declared,:flag_tables,:vocabulary,:doc_skin,:doc_css,:yaml,:lnk,:links,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:filesize,:user,:home,:hostname,:pwd,:firstseg,:programs,:author_copymark,:i18n,:lang,:lang_code_insert,:en,:notes,:dgst,:dgst_skin,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:ec,:opt,:sem_tag,:book_idx,:topic_register,:topic_register_array,:original,:writing_focus,:audio,:daisy + attr_accessor :make,:env,:path,:file,:fn,:fns,:fno,:fnb,:fnn,:fnt,:fnl,:flv,:fnz,:fnstex,:ocn,:sfx_src,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:site_skin,:sisu,:sisu_version,:ruby_version,:title,:subtitle,:full_title,:html_title,:subtitle_tex,:creator,:classify,:author_home,:author,:author_title,:author_nationality,:authors,:authorship,:translator,:illustrator,:prepared_by,:digitized_by,:subject,:description,:publisher,:current_publisher,:contributor,:date,:date_created,:date_issued,:date_available,:date_valid,:date_modified,:date_translated,:date_added_to_site,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:type,:format,:identifier,:source,:language,:language_original,:relation,:coverage,:rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:papersize_array,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:lvs,:pagenew,:pagebreak,:num_top,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:markup,:markup_instruction,:markup_version,:markup_declared,:flag_tables,:vocabulary,:doc_skin,:doc_css,:yaml,:lnk,:links,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:filesize,:user,:home,:hostname,:pwd,:firstseg,:programs,:author_copymark,:i18n,:lang,:lang_code_insert,:en,:notes,:dgst,:dgst_skin,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:ec,:opt,:sem_tag,:book_idx,:topic_register,:topic_register_array,:original,:writing_focus,:audio,:daisy def initialize(fns_array,opt) - @env=@path,@file=@fn=@fns=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@make=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@site_skin=@sisu=@sisu_version=@ruby_version=@title=@subtitle=@full_title=@html_title=@subtitle_tex=@creator=@classify=@author_home=@author=@author_title=@author_nationality=@translator=@illustrator=@prepared_by=@digitized_by=@subject=@description=@publisher=@current_publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@date_translated=@date_added_to_site=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@type=@format=@identifier=@source=@language=@language_original=@relation=@coverage=@rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@num_top=@toc_lev_limit=@flag_tables=@vocabulary=@doc_skin=@doc_css=@yaml=@lnk=@links=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@filesize=@firstseg=@programs=@author_copymark=@i18n=@lang=@lang_code_insert=@en=@notes=@dgst=@dgst_skin=@generated=@heading_seg_first=@base_program=@topic_register=@original=@writing_focus=@audio=nil + @env=@path,@file=@fn=@fns=@fno=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@make=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@site_skin=@sisu=@sisu_version=@ruby_version=@title=@subtitle=@full_title=@html_title=@subtitle_tex=@creator=@classify=@author_home=@author=@author_title=@author_nationality=@translator=@illustrator=@prepared_by=@digitized_by=@subject=@description=@publisher=@current_publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@date_translated=@date_added_to_site=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@type=@format=@identifier=@source=@language=@language_original=@relation=@coverage=@rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@num_top=@toc_lev_limit=@flag_tables=@vocabulary=@doc_skin=@doc_css=@yaml=@lnk=@links=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@filesize=@firstseg=@programs=@author_copymark=@i18n=@lang=@lang_code_insert=@en=@notes=@dgst=@dgst_skin=@generated=@heading_seg_first=@base_program=@topic_register=@original=@writing_focus=@audio=nil @data,@path,@fns,@opt=fns_array,opt.pth,opt.fns,opt #@data used as data @flag_tables,@set_header_title,@set_heading_top,@set_heading_seg,@heading_seg_first_flag,@flag_promo,@book_idx=false,false,false,false,false,false,false @seg_autoname_safe=true diff --git a/lib/sisu/v3/plaintext.rb b/lib/sisu/v3/plaintext.rb index 557c5f1b..b5077c9d 100644 --- a/lib/sisu/v3/plaintext.rb +++ b/lib/sisu/v3/plaintext.rb @@ -85,7 +85,7 @@ module SiSU_Plaintext path=env.path.output_tell tool=(@opt.cmd =~/[MVv]/) \ ? "#{env.program.text_editor} #{md.file.output_path.txt.dir}/#{md.file.base_filename.txt}" - : "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}" + : "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'Plaintext',tool).green_hi_blue : SiSU_Screen::Ansi.new(@opt.cmd,'Plaintext',tool).green_title_hi diff --git a/lib/sisu/v3/sisupod_make.rb b/lib/sisu/v3/sisupod_make.rb index ac584925..ef467444 100644 --- a/lib/sisu/v3/sisupod_make.rb +++ b/lib/sisu/v3/sisupod_make.rb @@ -83,8 +83,8 @@ module SiSU_Doc def read unless @opt.cmd =~/q/ @opt.cmd=~/[MVvz]/ \ - ? SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (txz)',@opt.fns).green_hi_blue - : SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (txz)',@opt.fns).green_title_hi + ? SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (txz)',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").green_hi_blue + : SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (txz)',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").green_title_hi end unless @opt.fns.empty? unless @opt.cmd =~/q/ diff --git a/lib/sisu/v3/texinfo.rb b/lib/sisu/v3/texinfo.rb index d13fb979..224bef92 100644 --- a/lib/sisu/v3/texinfo.rb +++ b/lib/sisu/v3/texinfo.rb @@ -102,7 +102,7 @@ module SiSU_TexInfo begin tool=(@opt.cmd =~/[MVv]/) \ ? "#{@env.program.texinfo} #{@md.file.output_path.texinfo.dir}/#{@md.file.base_filename.info}" - : "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}" + : "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" tell=@opt.cmd=~/[MVvz]/ \ && @opt.cmd !~/q/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'TexInfo',tool).green_hi_blue diff --git a/lib/sisu/v3/texpdf.rb b/lib/sisu/v3/texpdf.rb index eb3b1b44..2fe3f0f3 100644 --- a/lib/sisu/v3/texpdf.rb +++ b/lib/sisu/v3/texpdf.rb @@ -107,7 +107,7 @@ module SiSU_TeX def song begin @md=@particulars.md - SiSU_Screen::Ansi.new(@opt.cmd,'LaTeX/PDF',"[#{@opt.f_pth[:lng_is]}] #{@opt.fns}").green_title_hi unless @opt.cmd =~/q/ + SiSU_Screen::Ansi.new(@opt.cmd,'LaTeX/PDF',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").green_title_hi unless @opt.cmd =~/q/ if @opt.cmd =~/[MVv]/ path=@env.url.output_tell SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l}pdf").flow diff --git a/lib/sisu/v3/xhtml.rb b/lib/sisu/v3/xhtml.rb index ff40f9f1..9aa8f107 100644 --- a/lib/sisu/v3/xhtml.rb +++ b/lib/sisu/v3/xhtml.rb @@ -87,7 +87,7 @@ module SiSU_XHTML "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}" elsif @opt.cmd =~/v/ "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}" - else "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}" + else "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" end @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XHTML',tool).colorize diff --git a/lib/sisu/v3/xml.rb b/lib/sisu/v3/xml.rb index 0b2467f2..17444b3f 100644 --- a/lib/sisu/v3/xml.rb +++ b/lib/sisu/v3/xml.rb @@ -85,7 +85,7 @@ module SiSU_XML_SAX loc=@env.url.output_tell tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_sax.dir}/#{@md.file.base_filename.xml_sax}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xml_sax.dir}/#{@md.file.base_filename.xml_sax}" elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_sax.dir}/#{@md.file.base_filename.xml_sax}" - else "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}" + else "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" end @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XML SAX',tool).colorize diff --git a/lib/sisu/v3/xml_dom.rb b/lib/sisu/v3/xml_dom.rb index 7b1b7b72..81006d49 100644 --- a/lib/sisu/v3/xml_dom.rb +++ b/lib/sisu/v3/xml_dom.rb @@ -83,7 +83,7 @@ module SiSU_XML_DOM loc=@env.url.output_tell tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}" elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}" - else "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}" + else "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" end @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XML DOM',tool).colorize -- cgit v1.2.3 From 782e36f0c1466278ccd4a5dfe77f4c5c85b44071 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 12 May 2012 00:45:23 -0400 Subject: v3: sst_identify_markup, document header SiSU 3.0 * pretty much as SiSU 2.0, some header additions * identification not fully implemented --- data/doc/sisu/CHANGELOG_v3 | 3 +++ lib/sisu/v3/sst_identify_markup.rb | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 71e1017b..b3f0bb66 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -21,6 +21,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.8.orig.tar.xz sisu_3.2.8-1.dsc sisu_3.2.8-1.debian.tar.gz +* v3: sst_identify_markup, introduce document header SiSU 3.0, + pretty much the same as 2.0 + * v3: reporting * composite file names touched * rescue & error warnings, more touched diff --git a/lib/sisu/v3/sst_identify_markup.rb b/lib/sisu/v3/sst_identify_markup.rb index af30f19b..857ed3d7 100644 --- a/lib/sisu/v3/sst_identify_markup.rb +++ b/lib/sisu/v3/sst_identify_markup.rb @@ -255,6 +255,14 @@ WOK def initialize(opt) @opt=opt end + def sisu_3_0 + < Date: Sat, 12 May 2012 00:49:57 -0400 Subject: v3: a few misc fixes * options, omissions and typo fix * particulars, fix, check * shared_metadata, fix --- data/doc/sisu/CHANGELOG_v3 | 5 +++++ lib/sisu/v3/options.rb | 9 ++++++++- lib/sisu/v3/particulars.rb | 10 +++++----- lib/sisu/v3/shared_metadata.rb | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index b3f0bb66..fa196362 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -21,6 +21,11 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.8.orig.tar.xz sisu_3.2.8-1.dsc sisu_3.2.8-1.debian.tar.gz +* v3: misc fixes + * options, omissions and typo fix + * particulars, fix, check + * shared_metadata, fix + * v3: sst_identify_markup, introduce document header SiSU 3.0, pretty much the same as 2.0 diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb index e804d7f7..a193c093 100644 --- a/lib/sisu/v3/options.rb +++ b/lib/sisu/v3/options.rb @@ -427,6 +427,9 @@ module SiSU_Commandline else '' end end + if cmd !~/u/ #% add urls + extra+='u' + end cmd=cmd + extra cmds=cmd.scan(/CC|\S/) [cmds.uniq.join,mod] @@ -695,6 +698,10 @@ module SiSU_Commandline || mod.inspect =~/"--git"/) \ ? { bool: true, set: :on } : { bool: false, set: :na } + act[:zap]=(cmd =~/Z/ \ + || mod.inspect =~/"--zap"|"--delete"/) \ + ? { bool: true, set: :on } + : { bool: false, set: :na } act[:hash_digests]=(cmd =~/N/ \ || mod.inspect =~/"--hash-digests"/) \ ? { bool: true, set: :on } @@ -731,7 +738,7 @@ module SiSU_Commandline || mod.inspect =~/"--urls-all"/) \ ? { bool: true, set: :on } : { bool: false, set: :na } - act[:urls_seleted]=(cmd =~/u/ \ + act[:urls_selected]=(cmd =~/u/ \ || mod.inspect =~/"--urls"/) \ ? { bool: true, set: :on } : { bool: false, set: :na } diff --git a/lib/sisu/v3/particulars.rb b/lib/sisu/v3/particulars.rb index e183d4c8..36dbd75f 100644 --- a/lib/sisu/v3/particulars.rb +++ b/lib/sisu/v3/particulars.rb @@ -163,7 +163,7 @@ module SiSU_Particulars attr_accessor :opt,:dal_array def set_dal begin - @dal_array=@dal_array=SiSU_DAL::Source.new(@md).get + @dal_array=SiSU_DAL::Source.new(@opt).get self rescue SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do @@ -173,7 +173,7 @@ module SiSU_Particulars end def set_sst_idx begin - @sst_idx=SiSU_DAL::Source.new(@md).get_idx_sst + @sst_idx=SiSU_DAL::Source.new(@opt).get_idx_sst self rescue SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do @@ -183,7 +183,7 @@ module SiSU_Particulars end def set_tex_idx begin - @tex_idx=SiSU_DAL::Source.new(@md).get_idx_tex + @tex_idx=SiSU_DAL::Source.new(@opt).get_idx_tex self rescue SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do @@ -193,7 +193,7 @@ module SiSU_Particulars end def set_html_idx begin - @html_idx=SiSU_DAL::Source.new(@md).get_idx_html + @html_idx=SiSU_DAL::Source.new(@opt).get_idx_html self rescue SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do @@ -203,7 +203,7 @@ module SiSU_Particulars end def set_xhtml_idx begin - @xhtml_idx=SiSU_DAL::Source.new(@md).get_idx_xhtml + @xhtml_idx=SiSU_DAL::Source.new(@opt).get_idx_xhtml self rescue SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do diff --git a/lib/sisu/v3/shared_metadata.rb b/lib/sisu/v3/shared_metadata.rb index 14cc885a..5a45a692 100644 --- a/lib/sisu/v3/shared_metadata.rb +++ b/lib/sisu/v3/shared_metadata.rb @@ -355,7 +355,7 @@ module SiSU_Metadata def texpdf_font if defined? @md.make.texpdf_font \ and @md.make.texpdf_font - ' :texpdf_font: ' + @md.make.texpdf_font + ' :texpdf_font: ' + @md.make.texpdf_font.main else nil end end -- cgit v1.2.3 From 64c73059f10392d585de786917634af98742e1f8 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 12 May 2012 00:53:26 -0400 Subject: v3: hub, fixes, still a construction zone --- data/doc/sisu/CHANGELOG_v3 | 2 + lib/sisu/v3/hub.rb | 432 +++++++++++++++++---------------------------- 2 files changed, 163 insertions(+), 271 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index fa196362..2023bf50 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -21,6 +21,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.8.orig.tar.xz sisu_3.2.8-1.dsc sisu_3.2.8-1.debian.tar.gz +* v3: hub, fixes, still a construction zone + * v3: misc fixes * options, omissions and typo fix * particulars, fix, check diff --git a/lib/sisu/v3/hub.rb b/lib/sisu/v3/hub.rb index 1e86db71..d1cb48f1 100644 --- a/lib/sisu/v3/hub.rb +++ b/lib/sisu/v3/hub.rb @@ -101,16 +101,17 @@ module SiSU end end if files_translated_idx.flatten.length > 1 - SiSU_Screen::Ansi.new(@opt.cmd,'Manifest re-run on (currently generated) tranlated files',"").grey_title_hi unless @opt.cmd =~/q/ + SiSU_Screen::Ansi.new(@opt.cmd,'Manifest re-run on (currently generated) tranlated files',"").grey_title_hi unless @opt.act[:quiet][:set] ==:on files_translated_idx.flatten.each do |i| @opt.fns=@opt.files[i] @opt.f_pth=@opt.f_pths[i] - if @opt.fns !~/\.-sst$/ - @opt.pth=@opt.paths[i] - @opt.lng=@opt.lngs[i] - else + if @opt.fns =~/\.-sst$/ @opt.pth=Dir.pwd @opt.lng='en' + elsif @opt.fno =~/\.txz$/ + else + @opt.pth=@opt.paths[i] + @opt.lng=@opt.lngs[i] end @@pwd=@opt.pth Dir.chdir(@opt.pth) #watch @@ -120,148 +121,6 @@ module SiSU end end end - class Op - @@env=SiSU_Env::InfoEnv.new - def initialize(opt,req,message) - @opt,@req,@message=opt,req,message - @n_do=0 - end - def pod3_output(fns_pod) - dir_pwd=@@env.path.pwd - dir_pod=@@env.sisupod_gen_v3(fns_pod) - Dir.chdir("#{dir_pod}/doc") - #system("ls") - files=Dir['*/*.ss[tm]'] - files_ssm=Dir['*/*.ssm'] - files_sst=Dir['*/*.sst'] - content=if files_ssm.length > 0 - files_ssm.join(' ') - elsif files_sst.length > 0 - files_sst.join(' ') - else - p 'no files found' - end - @opt.fns=content #check - if FileTest.directory?("#{dir_pod}/doc") - Dir.chdir("#{dir_pod}/doc") - system(" - sisu3 -CC #{@opt.cmd} #{@opt.mod.join(' ')} #{content} - #sisu3 -CC #{@opt.cmd} -G #{@opt.mod.join(' ')} #{content} - ") - Dir.chdir(dir_pwd) - end - @pwd=`pwd`.strip - Dir.chdir(@pwd) - end - def pod2_output(fns_pod) - dir_pwd=@@env.path.pwd - dir_pod=@@env.sisupod_gen_v2(fns_pod) - Dir.chdir(dir_pod) - system("ls") - files=Dir['*.ss[tm]'] - files_ssm=Dir['*.ssm'] - files_sst=Dir['*.sst'] - content=if files_ssm.length > 0 - files_ssm.join(' ') - elsif files_sst.length > 0 - files_sst.join(' ') - else - p 'no files found' - end - @opt.fns=content - if FileTest.directory?(dir_pod) - Dir.chdir(dir_pod) - system(" - sisu3 -CC #{@opt.cmd} #{@opt.mod.join(' ')} #{content} - #sisu3 -CC #{@opt.cmd} -G #{@opt.mod.join(' ')} #{content} - ") - Dir.chdir(dir_pwd) - end - @pwd=`pwd`.strip - Dir.chdir(@pwd) - end - def select - require_relative @req - if not @opt.files.empty? - @opt.files.each_with_index do |fns,i| - env=SiSU_Env::InfoEnv.new(fns) - if fns =~ /sisupod(?:\.txz)?|\S+?(?:\.ss[mt]\.txz|\.ssp)$/ - require_relative 'remote' # remote.rb #check - pod_name=if fns =~ /http:\/\/\S+?(?:\.ss[mt]\.txz|\.ssp)$/ - SiSU_Remote::RemoteDownload.new(fns).pod.name - else - re_p=/(\S+?\.ss[mt](?:\.txz)?)$/ - re_p.match(fns).captures.join - end - SiSU_Screen::Ansi.new(@opt.cmd,pod_name).puts_blue unless @opt.cmd =~/q/ - @opt.files.shift - pod3_output(pod_name) - break - elsif fns =~ /sisupod(?:\.zip)?|\S+?(?:\.ss[mt]\.zip|\.ssp)$/ - require_relative 'remote' # remote.rb #check - pod_name=if fns =~ /http:\/\/\S+?(?:\.ss[mt]\.zip|\.ssp)$/ - SiSU_Remote::RemoteDownload.new(fns).pod.name - else - re_p=/(\S+?\.ss[mt](?:\.zip)?)$/ - re_p.match(fns).captures.join - end - SiSU_Screen::Ansi.new(@opt.cmd,pod_name).puts_blue unless @opt.cmd =~/q/ - @opt.files.shift - pod2_output(pod_name) - break - else - put=fns.gsub(/(.+)?\.ssm\.sst$/,'\1.ssm') - if fns !~/\.-sst$/ - @opt.fns=fns - @opt.pth=@opt.paths[i] - @opt.f_pth=@opt.f_pths[i] - @opt.lng=@opt.lngs[i] - @@pwd=@opt.pth - else - @opt.fns=fns - @opt.pth=Dir.pwd - @opt.f_pth=@opt.f_pths[i] #@opt.f_pth= { pth: Dir.pwd } - @opt.lng='en' - #@opt.lng=@opt.lngs[i] - @@pwd=@opt.pth - end - Dir.chdir(@opt.pth) #watch - env=SiSU_Env::InfoEnv.new(fns) - if @req !~/(?:urls|remote)$/ - if @opt.cmd.inspect =~/-P/ \ - and @req =~ /^po4a$/ - require_relative 'composite' # composite.rb #pre-processing - SiSU_Po4a::Source.new(@opt).read # -P po4a.rb - else - if @req !~/^conf$/ \ - and @opt.fns !~/http:\/\// - SiSU::Operations.new(@opt).not_found - end - end - elsif FileTest.file?(put) - if @opt.mod.inspect !~/harvest/ #decide whether should permit harvest in single operation - case @req - when /^urls$/; SiSU_Urls::Source.new(@opt).read # -u -v -V -M - when /^remote$/ - case @message - when /scp/; SiSU_Remote::Put.new(@opt).scp # -r - when /rsync/; SiSU_Remote::Put.new(@opt).rsync # -R - else #SiSU_Remote::Put.new(put,@opt.cmd).scp - end - end - @n_do=@n_do+1 - SiSU_Screen::Ansi.new(@opt.cmd,@n_do,"#{@req.upcase} processed").files_processed if @opt.cmd =~/[MVv]/ - end - else SiSU::Operations.new(@opt).not_found - end - end - end - #elsif @req =~/^dbi$/; SiSU_DBI::SQL.new(@opt).connect # -D -d - #elsif @req=~/^sisupod_make$/; SiSU_Doc::Source.new(@opt).read # -S - end - SiSU::Operations.new.counter - end - end class Operations @@n_do=0 def initialize(opt='') @@ -272,22 +131,22 @@ module SiSU @@n_do=0 end def remote_put_base_site_rsync # -CR -p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ +p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on require_relative 'remote' # remote.rb SiSU_Remote::Put.new(@opt).rsync_base end def remote_put_base_site_rsync_match # -CCRZ -p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ +p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on require_relative 'remote' # remote.rb SiSU_Remote::Put.new(@opt).rsync_base_sync end def remote_put_base_site # -Cr -p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ +p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on require_relative 'remote' # remote.rb SiSU_Remote::Put.new(@opt).scp_base end def remote_put_base_site_all # -CCr -p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ +p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on require_relative 'remote' # remote.rb SiSU_Remote::Put.new(@opt).scp_base_all end @@ -302,7 +161,7 @@ p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ def termsheet # -t system("sisu_termsheet #{@opt.cmd} #{@opt.fns}\n") @@n_do=@@n_do+1 - SiSU_Screen::Ansi.new(@opt.cmd,@@n_do,'Termsheet(s) processed').term_sheet_title unless @opt.cmd =~/q/ + SiSU_Screen::Ansi.new(@opt.cmd,@@n_do,'Termsheet(s) processed').term_sheet_title unless @opt.act[:quiet][:set] ==:on end def webrick # -W port=prt=@fns @@ -347,36 +206,31 @@ p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ @msg,@msgs='',nil @tell=lambda { SiSU_Screen::Ansi.new(@opt.cmd,@msg,"#{@msgs.inspect if @msgs}") } end - def op(req,msg) - SiSU::Op.new(@opt,req,msg).select if req and msg - end def actions - if @opt.cmd =~/E/ # re-assign character + if @opt.act[:profile][:set]==:on require 'profile' end - if @opt.act[:harvest][:bool] - require_relative 'harvest' # harvest.rb - SiSU_Harvest::Source.new(@opt).read # -h -H html.rb + if @opt.act[:harvest][:set]==:on + require_relative 'harvest' # harvest.rb + SiSU_Harvest::Source.new(@opt).read # -h -H html.rb elsif @opt.mod.inspect =~/--convert|--to|--from/ - require_relative 'sst_convert_markup' # sst_convert_markup.rb + require_relative 'sst_convert_markup' # sst_convert_markup.rb elsif @opt.cmd =~/([abCcDdeFGgHhIjikLMmNnoPpQqRrSsTtUuVvWwXxYyZ_0-9])/ \ and @opt.cmd =~/^-/ \ and @opt.mod.inspect !~/--(?:sitemaps|query|identify)/ \ or @opt.mod.inspect =~/--(?:(?:sq)?lite|pg(?:sql)?)/ @cX=SiSU_Screen::Ansi.new(@opt.cmd).cX flag=SiSU_Env::InfoProcessingFlag.new - if @opt.cmd =~/[vVM]/ #% version information - if (@opt.cmd =~/V/) \ - && (@opt.files.empty?) #% environment - SiSU_Help::Help.new('env',@opt).environment - else SiSU_Help::Help.new('env',@opt).sisu_version + if @opt.cmd =~/[vVM]/ #% version information + unless @opt.files.empty? + SiSU_Help::Help.new('env',@opt).sisu_version end end - if @opt.act[:license][:bool] #% license information + if @opt.act[:license][:set]==:on #% license information SiSU_Help::Help.new('license',@opt).help_request end - if @opt.act[:dal][:bool] \ - or @opt.act[:maintenance][:bool] #% --maintenance, -m for -C + if @opt.act[:dal][:set]==:on \ + or @opt.act[:maintenance][:set]==:on #% --maintenance, -m for -C path={} path[:css]=@@env.path.output + '/_sisu/css' path[:xml]=@@env.path.output + '/_sisu/xml' @@ -385,34 +239,35 @@ p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ path[:xsd]=path[:xml] + '/rng' re_p3=/(sisupod(?:\.txz)?|\S+?\.ss[mt]\.txz|[^\/]+?\.ssp)$/ unless @opt.files.join(',') =~ re_p3 #do not mix pods with source markup files in command line - unless ( FileTest.directory?(path[:css]) \ - and FileTest.directory?(path[:xsd]) ) - @opt.cmd=@opt.cmd +='C' unless @opt.cmd =~/C/ #FIX - end - if @opt.cmd =~/M/ - $VERBOSE=false #debug $VERBOSE=true + # unless ( FileTest.directory?(path[:css]) \ + # and FileTest.directory?(path[:xsd]) ) + # @opt.cmd=@opt.cmd +='C' unless @opt.cmd =~/C/ #FIX + # end + if @opt.act[:maintenance][:set] ==:on + $VERBOSE=false #debug $VERBOSE=true end end re_p2=/(sisupod(?:\.zip)?|\S+?\.ss[mt]\.zip)$/ unless @opt.files.join(',') =~ re_p2 #do not mix pods with source markup files in command line - unless ( FileTest.directory?(path[:css]) \ - and FileTest.directory?(path[:xsd]) ) - @opt.cmd=@opt.cmd +='C' unless @opt.cmd =~/C/ #FIX - end - if @opt.cmd =~/M/ - $VERBOSE=false #debug $VERBOSE=true + # unless ( FileTest.directory?(path[:css]) \ + # and FileTest.directory?(path[:xsd]) ) + # @opt.cmd=@opt.cmd +='C' unless @opt.cmd =~/C/ #FIX + # end + if @opt.act[:maintenance][:set] ==:on + $VERBOSE=false #debug $VERBOSE=true end end end - if @opt.act[:site_init][:bool] #% --init-site, -C initialize/configure - op('conf','configure site') - if @opt.cmd =~/R/ + if @opt.act[:site_init][:set]==:on #% --init-site, -C initialize/configure + requires('conf') #% --init-site, -C initialize/configure + SiSU_Initialize::Source.new(@opt).read + if @opt.act[:rsync][:set]==:on if @opt.mod.inspect =~/--init(?:ialize)?=site/ \ and @opt.cmd =~/RZ/ SiSU::Operations.new(@opt).remote_put_base_site_rsync_match else SiSU::Operations.new(@opt).remote_put_base_site_rsync end - elsif @opt.cmd =~/r/ + elsif @opt.act[:scp][:set]==:on if @opt.mod.inspect =~/--init(?:ialize)?=site/ \ and @opt.cmd =~/CCr/ SiSU::Operations.new(@opt).remote_put_base_site_all @@ -420,16 +275,17 @@ p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ end end end - if @opt.act[:sample_search_form][:bool] #% --sample-search-form, -F cgi sample search form + if @opt.act[:sample_search_form][:set]==:on #% --sample-search-form, -F cgi sample search form SiSU::Operations.new(@opt).cgi end - if @opt.act[:webrick][:bool] #% --webrick, -W webrick + if @opt.act[:webrick][:set]==:on #% --webrick, -W webrick SiSU::Operations.new(@opt).webrick end - if @opt.cmd =~/Z/ #% -Z wipe previous output clean - op('zap','Zap, deletions') + if @opt.act[:zap][:set]==:on #% --zap -Z wipe previous output clean DUPLICATE + #requires('zap') + #SiSU_Zap::Source.new(@opt).read # -Z zap.rb end - if @opt.act[:dal][:bool] + if @opt.act[:dal][:set]==:on @retry_count= -1 begin path_image='./_sisu/processing/external_document/image' @@ -449,23 +305,13 @@ p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ @get_pl << re_pl3.match(fns)[1] if re_p3 end end - #re_p2=/((?:https?|file):\/\/\S+?(?:\/\S+?\.ss[mt]\.zip|sisupod(?:\.zip)?|\.ssp))/ - #re_pl2=/^(\/\S+?\.ss[mt]\.zip)/ - #@opt.files.each do |fns| - # if fns =~re_p2 - # @get_p << re_p2.match(fns)[1] if re_p2 - # end - # if fns =~re_pl2 - # @get_pl << re_pl2.match(fns)[1] if re_p2 - # end - #end - if @get_s.length > 0 #% remote markup file .sst - require_relative 'remote' # remote.rb + if @get_s.length > 0 #% remote markup file .sst + require_relative 'remote' # remote.rb SiSU_Remote::Get.new(@opt,@get_s).fns SiSU::Operations.new.counter end - if @get_p.length > 0 #% remote sisupod - require_relative 'remote' # remote.rb + if @get_p.length > 0 #% remote sisupod + require_relative 'remote' # remote.rb SiSU_Remote::Get.new(@opt,@get_p).sisupod end rescue @@ -476,9 +322,7 @@ p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ retry unless @retry_count > 1 ensure end - #@opt.files=@opt.files.collect {|x| x=x.gsub(/(?:https?|file):\/\/\S+\/(\S+)\.sst$/,'\1.-sst') } end - #@opt.files_mod=@opt.files.collect {|x| x=x.gsub(/\.ssm$/,'.ssm.sst') } def requires(req) require_relative req end @@ -495,110 +339,129 @@ p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ @opt.pth=Dir.pwd @opt.lng='en' end - @@pwd=@opt.pth - Dir.chdir(@opt.pth) #watch + unless @opt.pth.nil? + @@pwd=@opt.pth + Dir.chdir(@opt.pth) #watch + end @env=SiSU_Env::InfoEnv.new(@opt.fns) - if @opt.act[:dal][:bool] #% --dal, -m - if @opt.fno =~ /\.ssm$/ - require_relative 'composite' # composite.rb #pre-processing - SiSU_Assemble::Composite.new(@opt).read + if @opt.act[:dal][:set]==:on #% --dal, -m + unless @opt.act[:po4a][:set]==:on # --po4a, -P + if @opt.fno =~ /\.ssm$/ + require_relative 'composite' # composite.rb #pre-processing + SiSU_Assemble::Composite.new(@opt).read + end + requires('dal') # -m dal.rb + SiSU_DAL::Source.new(@opt).read end - requires('dal') # -m dal.rb - SiSU_DAL::Source.new(@opt).read end - if @opt.act[:share_source][:bool] + if @opt.act[:share_source][:set]==:on requires('share_src') # -s share_src.rb SiSU_Markup::Source.new(@opt).read end - if @opt.act[:sisupod][:bool] #% --sisupod, -S make sisupod - requires('sisupod_make') # -S sisupod_make.rb - SiSU_Doc::Source.new(@opt).read - end - if @opt.act[:qrcode][:bool] #% --qrcode, -Q + if @opt.act[:qrcode][:set]==:on #% --qrcode, -Q requires('qrcode') # -Q qrcode.rb SiSU_QRcode::Source.new(@opt).read end - if @opt.act[:hash_digests][:bool] #% --hash-digests, -N digest tree + if @opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree requires('digests') # -N digests.rb SiSU_DigestView::Source.new(@opt).read end - if @opt.act[:txt][:bool] #% --txt, -t -a + if @opt.act[:txt][:set]==:on #% --txt, -t -a requires('plaintext') # -t -a plaintext.rb SiSU_Plaintext::Source.new(@opt).read end - if @opt.act[:html][:bool] #% --html, -h + if @opt.act[:html][:set]==:on #% --html, -h requires('html') # -h -H html.rb SiSU_HTML::Source.new(@opt).read end - if @opt.act[:concordance][:bool] #% --concordance, -w + if @opt.act[:concordance][:set]==:on #% --concordance, -w requires('concordance') # -w concordance.rb SiSU_Concordance::Source.new(@opt).read end - if @opt.act[:epub][:bool] #% --epub, -e + if @opt.act[:epub][:set]==:on #% --epub, -e requires('epub') # -e epub.rb SiSU_EPUB::Source.new(@opt).read end - if @opt.act[:odt][:bool] #% --odt, -o opendocument + if @opt.act[:odt][:set]==:on #% --odt, -o opendocument requires('odf') # -o odf.rb SiSU_ODF::Source.new(@opt).read end - if @opt.act[:xhtml][:bool] #% --xhtml, -b xhtml + if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml requires('xhtml') # -b xhtml.rb SiSU_XHTML::Source.new(@opt).read end - if @opt.act[:xml_sax][:bool] #% --xml-sax, -x xml sax type + if @opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type requires('xml') # -x xml.rb SiSU_XML_SAX::Source.new(@opt).read end - if @opt.act[:xml_dom][:bool] #% --xml-dom, -x xml dom type + if @opt.act[:xml_dom][:set]==:on #% --xml-dom, -x xml dom type requires('xml_dom') # -X xml_dom.rb SiSU_XML_DOM::Source.new(@opt).read end - if @opt.act[:pdf][:bool] #% --pdf, -p latex/ texpdf + if @opt.act[:pdf][:set]==:on #% --pdf, -p latex/ texpdf requires('texpdf') # -p texpdf.rb SiSU_TeX::Source.new(@opt).read end - if @opt.act[:manpage][:bool] #% --manpage, -i + if @opt.act[:manpage][:set]==:on #% --manpage, -i requires('manpage') # -i manpage.rb SiSU_Manpage::Source.new(@opt).read end - if @opt.act[:texinfo][:bool] #% --texinfo, -I + if @opt.act[:texinfo][:set]==:on #% --texinfo, -I requires('texinfo') # -I texinfo.rb SiSU_TexInfo::Source.new(@opt).read end - if @opt.act[:sqlite_discreet][:bool] #% --sqlite, -d DB sqlite + if @opt.act[:sqlite_discreet][:set]==:on #% --sqlite, -d DB sqlite requires('dbi_discreet') # -d dbi_discreet.rb SiSU_DBI_Discreet::SQL.new(@opt).build end - if @opt.act[:manifest][:bool] #% --manifest, -y + if @opt.act[:manifest][:set]==:on #% --manifest, -y requires('manifest') # -y manifest.rb SiSU_Manifest::Source.new(@opt).read end end end - def loop_files_on_given_option_do - if @opt.act[:images][:bool] #% --images, -j - OptionLoopFiles.new(@opt).loop_files_on_given_option do - requires('shared_images') - SiSU_Images::Source.new(@opt).read # -j shared_images.rb + def pre_loop_files_on_given_option_do + if @opt.act[:sisupod][:set]==:on #% --sisupod, -S make sisupod + requires('sisupod_make') # -S sisupod_make.rb + begin + OptionLoopFiles.new(@opt).loop_files_on_given_option do + SiSU_Doc::Source.new(@opt).read + end + ensure + SiSU_Doc::Source.new(@opt).sisupod_tar_xz end end - if @opt.cmd =~/O/ #% -O open archive initiative, metadata harvesting - op('xml_md_oai_pmh_dc','OAI PMH') + end + def post_loop_files_on_given_option_do + if @opt.act[:sisupod][:set]==:on #% --sisupod, -S make sisupod + requires('sisupod_make') # -S sisupod_make.rb + begin + OptionLoopFiles.new(@opt).loop_files_on_given_option do + SiSU_Doc::Source.new(@opt).read + end + ensure + SiSU_Doc::Source.new(@opt).sisupod_tar_xz + end end - if @opt.act[:po4a][:bool] #% --po4a, -P + if @opt.act[:images][:set]==:on #% --images, -j + requires('shared_images') OptionLoopFiles.new(@opt).loop_files_on_given_option do - requires('po4a') - SiSU_Po4a::Source.new(@opt).read # -P po4a.rb + SiSU_Images::Source.new(@opt).read # -j shared_images.rb end end - if @opt.act[:git][:bool] #% --git, -g sisu git + if @opt.act[:po4a][:set]==:on #% --po4a, -P + requires('po4a') OptionLoopFiles.new(@opt).loop_files_on_given_option do - #requires('git') - #fix + SiSU_Po4a::Source.new(@opt).read # -P po4a.rb + end + end + if @opt.act[:git][:set]==:on #% --git, -g sisu git + requires('git') + OptionLoopFiles.new(@opt).loop_files_on_given_option do + SiSU_Git::Source.new(@opt).read # -g git.rb end end - if @opt.cmd =~/T/ #% -T termsheet/standard form + if @opt.cmd =~/T/ #% -T termsheet/standard form SiSU_Help::Help.new('termsheet').help_request @opt.files.each do |fns| if FileTest.file?(fns) @@ -613,70 +476,97 @@ p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ end SiSU::Operations.new.counter end - if @opt.cmd =~/k/ #% -T temporary tests + if @opt.cmd =~/k/ #% -k temporary tests OptionLoopFiles.new(@opt).loop_files_on_given_option do #requires('xml_scaffold') #fix end end - if @opt.act[:psql][:bool] #% --pg, -D DB postgresql + if @opt.act[:psql][:set]==:on #% --pg, -D DB postgresql requires('dbi') if @opt.files.length > 0 #switch test to actual commands OptionLoopFiles.new(@opt).loop_files_on_given_option do - SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb + SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb end else SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb end end - if @opt.act[:sqlite][:bool] #% --sqlite, -d DB sqlite + if @opt.act[:sqlite][:set]==:on #% --sqlite, -d DB sqlite requires('dbi') if @opt.files.length > 0 #switch test to actual commands OptionLoopFiles.new(@opt).loop_files_on_given_option do - SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb + SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb end else SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb end end - if @opt.act[:manifest][:bool] #% --manifest, -y + if @opt.act[:dal][:set]==:on #% --dal, -m embedded content + # OptionLoopFiles.new(@opt).loop_files_on_given_option do + # requires('embedded') + # SiSU_Embedded::Source.new(@opt).read # -m embedded.rb (image and other content) #check + # end + end + if @opt.act[:zap][:set]==:on #% --zap, -Z + # OptionLoopFiles.new(@opt).loop_files_on_given_option do + # requires('zap') + # SiSU_Zap::Source.new(@opt).read # -Z zap.rb + # end + end + if @opt.act[:sisupod][:set]==:on #% --sisupod, -S make sisupod + # OptionLoopFiles.new(@opt).loop_files_on_given_option do + # requires('sisupod_make') + # SiSU_Doc::Source.new(@opt).read # -S sisupod_make.rb + # end + end + if @opt.act[:manifest][:set]==:on #% --manifest, -y + requires('manifest') OptionLoopFiles.new(@opt).manifest_on_files_translated do - requires('manifest') - SiSU_Manifest::Source.new(@opt).read # -y manifest.rb + SiSU_Manifest::Source.new(@opt).read # -y manifest.rb end end - if @opt.act[:sitemap][:bool] #% --sitemap, -Y + if @opt.act[:sitemap][:set]==:on #% --sitemap, -Y + requires('sitemaps') OptionLoopFiles.new(@opt).loop_files_on_given_option do - requires('sitemaps') - SiSU_Sitemaps::Source.new(@opt).read # -Y sitemaps.rb + SiSU_Sitemaps::Source.new(@opt).read # -Y sitemaps.rb end end - if @opt.mod.inspect !~/--harvest/ - if @opt.act[:scp][:bool] #% -r copy to remote server - op('remote','scp') + if @opt.act[:harvest][:set] !=:on + if @opt.act[:scp][:set]==:on #% -r copy to remote server + OptionLoopFiles.new(@opt).loop_files_on_given_option do + SiSU_Remote::Put.new(@opt).scp # -r + end end - if @opt.act[:rsync][:bool] #% -R copy to remote server - op('remote','rsync') + if @opt.act[:rsync][:set]==:on #% -R copy to remote server + OptionLoopFiles.new(@opt).loop_files_on_given_option do + SiSU_Remote::Put.new(@opt).rsync # -R + end end else end - op('urls','urls') + if @opt.act[:urls_selected][:set]==:on #% --sitemap, -Y + requires('urls') + OptionLoopFiles.new(@opt).loop_files_on_given_option do + SiSU_Urls::Source.new(@opt).read #% -u -v -V -M + end + end end - #if @opt.mod=~/^conf$/ # -C - if @opt.cmd=~/C/ # -C - requires('conf') # -s conf.rb + if @opt.act[:site_init][:set]==:on #% -C + requires('conf') # -s conf.rb SiSU_Initialize::Source.new(@opt).read end + #pre_loop_files_on_given_option_do each_file_loop_options - loop_files_on_given_option_do - @msg,@msgs="\tsisu -W [to start ruby web-server on output directory]\n",nil unless @opt.cmd =~/q/ + post_loop_files_on_given_option_do + @msg,@msgs="\tsisu -W [to start ruby web-server on output directory]\n",nil unless @opt.act[:quiet][:set] ==:on @tell.call.print_brown if @opt.cmd =~/[uUvVM]/ unless @opt.files.join.empty? if defined? @@env.processing_path.processing \ and @@env.user \ and FileTest.directory?(@@env.processing_path.processing) \ and @@env.processing_path.processing =~/#{@@env.user}$/ #clean temporary processing directory of content as is located in public area FileUtils::cd(@@env.processing_path.processing_base_tmp) do - FileUtils::rm_rf(@@env.user) unless @opt.cmd =~/M/ + FileUtils::rm_rf(@@env.user) unless @opt.act[:maintenance][:set] ==:on end end elsif @opt.mod.inspect =~/--query/ @@ -695,7 +585,7 @@ p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ elsif @opt.mod.inspect =~/--sitemaps/ #% sitemaps require_relative 'sitemaps' # sitemaps.rb SiSU_Sitemaps::Source.new(@opt).read - if @opt.cmd =~/R/ + if @opt.act[:rsync][:set]==:on require_relative 'remote' # remote.rb SiSU_Remote::Put.new(@opt).rsync_sitemaps end -- cgit v1.2.3 From 35825d2292a741459e4ddeabd208dd0b172457c2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 12 May 2012 19:26:08 -0400 Subject: v3: po4a, runs, needs checking --- data/doc/sisu/CHANGELOG_v3 | 2 ++ lib/sisu/v3/po4a.rb | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 2023bf50..fa594e2e 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -23,6 +23,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.8.orig.tar.xz * v3: hub, fixes, still a construction zone +* v3: po4a, runs, needs checking + * v3: misc fixes * options, omissions and typo fix * particulars, fix, check diff --git a/lib/sisu/v3/po4a.rb b/lib/sisu/v3/po4a.rb index aeff7acb..e3c297a3 100644 --- a/lib/sisu/v3/po4a.rb +++ b/lib/sisu/v3/po4a.rb @@ -77,7 +77,7 @@ module SiSU_Po4a r=r.gsub(/\|en\|/,'|') @lang_regx=%r{(?:#{r})} if opt.fns =~/\S+?~#{@lang_regx}\.ss[mti]/ \ - and opt.f_pth[:lng]!=opt.lng_base + and opt.f_pth[:lng]!=@opt.lng_base @@opt_src_=false @@opt_trn=opt @@md_trn=SiSU_Param::Parameters.new(opt).get @@ -114,7 +114,7 @@ module SiSU_Po4a SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{path}/#{md.fnb}/#{md.fn[:plain]}").flow if @opt.cmd =~/[MV]/ end if @opt.fns =~/\S+?~#{@lang_regx}\.ss[mti]/ \ - or @opt.f_pth[:lng] !=opt.lng_base + or @opt.f_pth[:lng] !=@opt.lng_base opt_lang_trn_fn=fn @dal_array_lang_translation=SiSU_DAL::Source.new(@opt,opt_lang_trn_fn).get # dal file drawn here opt_lang_src_fn=if fn =~/\S+?~\S{2}(?:_\S{2})?\.ss[mti]/ @@ -124,7 +124,7 @@ module SiSU_Po4a transdir,srcdir=Dir.pwd,Dir.pwd if Dir.pwd.to_s =~/\/#{@lang_regx}$/ transdir=Dir.pwd - srcdir=transdir.gsub(/\/#{@lang_regx}$/,"/#{opt.lng_base}") + srcdir=transdir.gsub(/\/#{@lang_regx}$/,"/#{@opt.lng_base}") if FileTest.directory?(srcdir) Dir.chdir(srcdir) end @@ -929,7 +929,7 @@ GSUB @file=SiSU_Env::FileOp.new(md,fn) end def po4a #%pot output - file_pot=(@md.opt.f_pth[:lng] ==opt.lng_base) \ + file_pot=(@md.opt.f_pth[:lng] ==@md.opt.lng_base) \ ? @file.write_file.pot : @file.write_file.po @sisu=[] @@ -960,7 +960,7 @@ GSUB require_relative 'git' # git.rb git=SiSU_Git::Source.new(@md.opt) git.create_file_structure_git unless FileTest.directory?(@file.output_path.pot_git.dir) - if @md.opt.f_pth[:lng] ==opt.lng_base + if @md.opt.f_pth[:lng] ==@md.opt.lng_base FileUtils::cp(@file.place_file.pot.dir, @file.output_path.pot_git.dir) else # naive, work on --> FileUtils::cp(@file.place_file.po.dir, @file.output_path.po_git.dir) #unless FileTest.file?(@file.place_file.po_git.dir) -- cgit v1.2.3 From 2dee3abf48159ac1e7f2cd9a4d5dd40d01c5a0cd Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 12 May 2012 19:28:12 -0400 Subject: v3: sisupod make, re-fixed, check again --- data/doc/sisu/CHANGELOG_v3 | 2 + lib/sisu/v3/composite.rb | 3 ++ lib/sisu/v3/param.rb | 3 +- lib/sisu/v3/sisupod_make.rb | 53 +++++++++++----------- lib/sisu/v3/sysenv.rb | 106 +++++++++++++++++++++++++++++++------------- 5 files changed, 107 insertions(+), 60 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index fa594e2e..70bf8967 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -21,6 +21,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.8.orig.tar.xz sisu_3.2.8-1.dsc sisu_3.2.8-1.debian.tar.gz +* v3: sisupod make, re-fixed, check again + * v3: hub, fixes, still a construction zone * v3: po4a, runs, needs checking diff --git a/lib/sisu/v3/composite.rb b/lib/sisu/v3/composite.rb index 3d28cfcb..a3a1c433 100644 --- a/lib/sisu/v3/composite.rb +++ b/lib/sisu/v3/composite.rb @@ -108,9 +108,12 @@ module SiSU_Assemble end def read begin + pwd=Dir.pwd + Dir.chdir(@opt.f_pth[:pth]) @fns_array=IO.readlines(@opt.fno,'') assembled=insertions? write(assembled) + Dir.chdir(pwd) rescue SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error do __LINE__.to_s + ':' + __FILE__ diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb index 0e77cf3e..0f721468 100644 --- a/lib/sisu/v3/param.rb +++ b/lib/sisu/v3/param.rb @@ -1462,7 +1462,8 @@ module SiSU_Param @papersize=determine_papersize(@opt.mod.inspect) end @papersize_array=@papersize.scan(/(?:a4|letter|legal|book|a5|b5)/i) - fn=@fns=~/\.ssm\.sst$/ ? @fns.gsub(/.sst/,'') : @fns #decide what to do a filesize on .ssm tells very little about actual document size + fn=@opt.fno #decide what to do a filesize on .ssm tells very little about actual document size + #fn=@fns=~/\.ssm\.sst$/ ? @fns.gsub(/.sst/,'') : @fns #decide what to do a filesize on .ssm tells very little about actual document size @filesize=(File.size(fn)).to_s if @sys.openssl !=false skin=@doc_skin \ diff --git a/lib/sisu/v3/sisupod_make.rb b/lib/sisu/v3/sisupod_make.rb index ef467444..b4ef43de 100644 --- a/lib/sisu/v3/sisupod_make.rb +++ b/lib/sisu/v3/sisupod_make.rb @@ -69,30 +69,28 @@ module SiSU_Doc @env=SiSU_Env::InfoEnv.new(@opt.fns) @ver=SiSU_Env::InfoVersion.instance.get_version @ans=SiSU_Response::Response.new - pod_path="#{@env.processing_path.processing}/sisupod" + pod_path="#{@env.processing_path.processing_sisupod(@opt)}" @v=(@opt.cmd =~/[VM]/) ? 'v' : '' @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) @file=@particulars.file @local_path="#{@file.output_path.sisupod.dir}" - @zipfile=(@opt.fns =~/\.ssm\.sst$/) \ - ? @opt.fns.gsub(/(?:\~\S{2,3})?\.ssm\.sst$/,'.ssm') - : @opt.fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1') + @zipfile=@opt.fno.gsub(/(?:\~\S{2,3})?(\.ss[tm])$/,'\1') FileUtils::mkdir_p(pod_path) unless FileTest.directory?(pod_path) - FileUtils::rm_rf("#{@env.processing_path.processing}sisupod/*") if FileTest.directory?("#{@env.processing_path.processing}sisupod") + FileUtils::rm_rf("#{@env.processing_path.processing_sisupod(@opt)}/*") if FileTest.directory?("#{@env.processing_path.processing_sisupod(@opt)}") end def read unless @opt.cmd =~/q/ - @opt.cmd=~/[MVvz]/ \ + @opt.cmd=~/[MVv]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (txz)',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").green_hi_blue : SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (txz)',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").green_title_hi end unless @opt.fns.empty? - unless @opt.cmd =~/q/ + if @opt.cmd=~/[MVv]/ SiSU_Screen::Ansi.new(@opt.cmd,'Make sisu document (txz) and place in output directory',"#{@opt.fns} -> file://#{@file.output_path.sisupod.dir}/#{@zipfile}.txz").warn if @opt.cmd =~/[MVv]/ end directories sisupod_build - sisupod_xz + #sisupod_tar_xz else if @opt.cmd =~/[MVv]/ SiSU_Screen::Ansi.new(@opt.cmd,'Make (zip (txz)) of sisu work directory',"#{@env.stub_pwd}\_#{@date}.txz").warn @@ -141,7 +139,7 @@ module SiSU_Doc "#{@env.path.pwd}/_sisu/skin", "#{@env.path.home}/.sisu/skin", '/etc/sisu/skin', - "#{@env.processing_path.processing}/external_document/skin" + "#{@env.processing_path.processing_sisupod(@opt)}/external_document/skin" ] sk_doc,sk_dir="doc/#{skin}.rb","dir/skin_#{@env.stub_pwd}.rb" skin_path.each do |v| #document skin priority 1 @@ -174,10 +172,7 @@ module SiSU_Doc @rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/ @rgx_skin=/^\s+:skin:\s+(\S+)/ @rgx_doc_import=/^<<\s*(\S+?\.ss[ti])/ - use_file=@opt.fns =~/(?:\.ssm|\.ssm\.sst)$/ \ - ? @opt.fns.gsub(/\.ssm\.sst$/,'.ssm') - : @opt.fns - file_array=IO.readlines(use_file,'') + file_array=IO.readlines(@opt.fno,'') skin,images,doc_import=[],[],[] doc_import_dir=@opt.sub_location file_array.each do |f| #% work area @@ -188,7 +183,7 @@ module SiSU_Doc and f =~@rgx_image images=images_extract(f,images) end - if use_file =~/\.ssm$/ + if @opt.fno =~/\.ssm$/ doc_import << f.scan(@rgx_doc_import) if f =~@rgx_doc_import end end @@ -213,7 +208,8 @@ module SiSU_Doc else skin_source=select_skin end - docskin_place="#{@env.processing_path.processing}/sisupod/doc/_sisu/skin/#{skin_source[:type]}" + docskin_place="#{@env.processing_path.processing_sisupod(@opt)}/doc/_sisu/skin/#{skin_source[:type]}" + FileUtils::mkdir_p(docskin_place) if skin_source[:type] =~/dir/ docskin_with_path="#{docskin_place}/skin_#{@env.stub_pwd}.rb" docskin=[docskin_with_path.gsub(/.+?\/(skin_\S+?)\.rb/,'\1')] @@ -241,9 +237,10 @@ module SiSU_Doc images=images.flatten.uniq images.delete_if {|x| x =~/https?:\/\// } #images=images.sort - path_pod="#{@env.processing_path.processing}/sisupod" - path_pod_conf="#{@env.processing_path.processing}/sisupod/_sisu" + path_pod="#{@env.processing_path.processing_sisupod(@opt)}" + path_pod_conf="#{@env.processing_path.processing_sisupod(@opt)}/_sisu" images_path_pod="#{path_pod}/image" + FileUtils::mkdir_p(images_path_pod) #unattractive hard coding ... ! image_path='_sisu/image' images_pwd="#{@env.path.pwd}/#{image_path}" @@ -265,29 +262,31 @@ module SiSU_Doc end end if doc_import.length > 0 \ - and use_file =~/\.ssm$/ + and @opt.fno =~/\.ssm$/ doc_import.each do |f| - FileUtils::cp_r("#{@env.path.pwd}#{doc_import_dir}/#{f}","#{@env.processing_path.processing}/sisupod/doc/#{@opt.lng}/#{f}") + FileUtils::cp_r("#{@env.path.pwd}#{doc_import_dir}/#{f}","#{@env.processing_path.processing_sisupod(@opt)}/doc/#{@opt.lng}/#{f}") end end x=@env.document_language_versions_found #check multiple document language versions (param not used) if x[:f] \ and x[:f].length > 0 #store multiple document language versions, sisupod x[:f].each do |f| - (use_file =~/\.ssm$/) \ - ? FileUtils::cp_r("#{@env.path.pwd}#{doc_import_dir}/#{f[:f]}","#{@env.processing_path.processing}/sisupod/doc/#{f[:l]}/#{f[:n]}") - : FileUtils::cp_r("#{@env.path.pwd}/#{f[:f]}","#{@env.processing_path.processing}/sisupod/doc/#{f[:l]}/#{f[:n]}") + pth="#{@env.processing_path.processing_sisupod(@opt)}/doc/#{@opt.lng}" + FileUtils::mkdir_p(pth) unless FileTest.directory?(pth) + (@opt.fno =~/\.ssm$/) \ + ? FileUtils::cp_r("#{@env.path.pwd}#{doc_import_dir}/#{f[:f]}","#{@env.processing_path.processing_sisupod(@opt)}/doc/#{@opt.lng}/#{f[:n]}") + : FileUtils::cp_r("#{@env.path.pwd}/#{f[:f]}","#{@env.processing_path.processing_sisupod(@opt)}/doc/#{@opt.lng}/#{f[:n]}") end end #NB not all possibilies met, revisit, also in case of composite file may wish to add README end - def sisupod_xz + def sisupod_tar_xz FileUtils::mkdir_p(@file.output_path.sisupod.dir) unless FileTest.directory?(@file.output_path.sisupod.dir) tree=(@opt.cmd =~/[vVM]/ \ && SiSU_Env::SystemCall.new.program_found?('tree')) \ ? 'tree sisupod' : '' - if FileTest.directory?(@env.processing_path.processing) - Dir.chdir(@env.processing_path.processing) + if FileTest.directory?(@env.processing_path.processing_sisupod(@opt)) + Dir.chdir("#{@env.processing_path.root_dir}/#{@env.processing_path.user}/pods/#{@opt.fns}") system(%{ #{tree} tar -cJf #{@zipfile}.txz sisupod @@ -296,9 +295,9 @@ module SiSU_Doc FileUtils::mv("#{@zipfile}.txz",@file.place_file.sisupod.dir) FileUtils::rm_r(Dir.glob("sisupod/*")) Dir.chdir(@env.path.pwd) - SiSU_Screen::Ansi.new('',"#{@opt.fns}.txz").blue_tab unless @opt.cmd =~/q/ + SiSU_Screen::Ansi.new('',"#{@opt.fns}.txz").blue_tab if @opt.cmd=~/[MVv]/ else - SiSU_Screen::Ansi.new('',"#{@opt.fns}.txz not built").blue_tab + SiSU_Screen::Ansi.new('',"#{@opt.fns}.txz not built").blue_tab if @opt.cmd=~/[MVv]/ end end end diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index 09dd5d6e..23f88ad7 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -1671,19 +1671,6 @@ WOK file=@fns.gsub(/\.ssm(?:\.sst)?/,'.ssm.sst') "#{source_file_path}/#{file}" end - def read_source_file(fns) - fns_array=if RUBY_VERSION < '1.9' - x=unless fns =~/\.ssm.sst$/ - IO.readlines(fns,'') - else IO.readlines("#{processing_path.composite_file}/#{fns}",'') - end - else #ruby version >= '1.9' - x=unless fns =~/\.ssm.sst$/ - IO.readlines(fns,'r:utf-8') - else IO.readlines("#{processing_path.composite_file}/#{fns}",'r:utf-8') - end - end - end def font def texpdf def main @@ -1794,6 +1781,19 @@ WOK end self end + def read_source_file(fns) + fns_array=if RUBY_VERSION < '1.9' + x=unless fns =~/\.ssm.sst$/ + IO.readlines(fns,'') + else IO.readlines("#{processing_path.composite_file}/#{fns}",'') + end + else #ruby version >= '1.9' + x=unless fns =~/\.ssm.sst$/ + IO.readlines(fns,'r:utf-8') + else IO.readlines("#{processing_path.composite_file}/#{fns}",'r:utf-8') + end + end + end def path #dir def home @sys.home @@ -2043,6 +2043,34 @@ WOK ? ("#{root_dir}/#{user}/#{stub_pwd}") : ("#{root_dir}/#{stub_pwd}") # see defaults[:processing_path] end + def stub_dir_orig # ends up with lang, if lang dir + (usr_dir?) \ + ? ("#{root_dir}/#{user}/#{stub_pwd}") + : ("#{root_dir}/#{stub_pwd}") # see defaults[:processing_path] + end + def processing_sisupod(opt=nil) #processing directory, used/needed for sisu work files, has sub-directories (dal,tex etc) + unless FileTest.directory?(root_dir) + FileUtils::mkdir_p(root_dir) + File.chmod(0777,root_dir) + end + if usr_dir? + processing_path_usr="#{root_dir}/#{user}" + FileUtils::mkdir_p(processing_path_usr) unless FileTest.directory?(processing_path_usr) + File.chmod(0700,processing_path_usr) + end + sisupod_processing_path=processing_path_usr + '/pods/' + opt.fno + '/sisupod' + FileUtils::mkdir_p(sisupod_processing_path) unless FileTest.directory?(sisupod_processing_path) + sisupod_processing_path_lng=if defined? opt.lng + sisupod_processing_path + '/doc/' + opt.lng + else + sisupod_processing_path + '/doc' + end + unless FileTest.directory?(sisupod_processing_path_lng) + FileUtils::mkdir_p(sisupod_processing_path_lng) + File.chmod(0700,sisupod_processing_path_lng) + end + sisupod_processing_path + end def processing #processing directory, used/needed for sisu work files, has sub-directories (dal,tex etc) unless FileTest.directory?(root_dir) FileUtils::mkdir_p(root_dir) @@ -2060,7 +2088,6 @@ WOK path_processing.each do |v| # processing=v unless FileTest.directory?(processing) - puts "a processing directory (#{processing}) is being created for use by sisu" FileUtils::mkdir_p(processing) File.chmod(0700,processing) end @@ -3537,7 +3564,8 @@ WOK true elsif cmd_rc[:ocn][:set]==:off false - elsif @md.make.ocn? ==:off + elsif defined? @md.make.ocn? \ + and @md.make.ocn? ==:off false elsif env_rc.build.ocn? ==:off false @@ -3550,7 +3578,8 @@ WOK true elsif cmd_rc[:toc][:set]==:off false - elsif @md.make.toc? ==:off + elsif defined? @md.make.toc? \ + and @md.make.toc? ==:off false elsif env_rc.build.toc? ==:off false @@ -3563,7 +3592,8 @@ WOK true elsif cmd_rc[:manifest][:set]==:off false - elsif @md.make.manifest? ==:off + elsif defined? @md.make.manifest? \ + and @md.make.manifest? ==:off false elsif env_rc.build.manifest? ==:off false @@ -3576,7 +3606,8 @@ WOK true elsif cmd_rc[:links_to_manifest][:set]==:off false - elsif @md.make.links_to_manifest? ==:off + elsif defined? @md.make.links_to_manifest? \ + and @md.make.links_to_manifest? ==:off false elsif env_rc.build.links_to_manifest? ==:off false @@ -3589,7 +3620,8 @@ WOK true elsif cmd_rc[:metadata][:set]==:off false - elsif @md.make.metadata? ==:off + elsif defined? @md.make.metadata? \ + and @md.make.metadata? ==:off false elsif env_rc.build.metadata? ==:off false @@ -3604,7 +3636,8 @@ WOK true elsif cmd_rc[:minitoc][:set]==:off false - elsif @md.make.minitoc? ==:off + elsif defined? @md.make.minitoc? \ + and @md.make.minitoc? ==:off false elsif env_rc.build.minitoc? ==:off false @@ -3621,8 +3654,9 @@ WOK elsif cmd_rc[:manifest_minitoc][:set]==:off \ || cmd_rc[:minitoc][:set]==:off false - elsif @md.make.manifest_minitoc? ==:off \ - || @md.make.minitoc? ==:off + elsif defined? @md.make.manifest_minitoc? \ + and (@md.make.manifest_minitoc? ==:off \ + || @md.make.minitoc? ==:off) false elsif env_rc.build.manifest_minitoc? ==:off \ || env_rc.build.minitoc? ==:off @@ -3642,8 +3676,9 @@ WOK elsif cmd_rc[:html_minitoc][:set]==:off \ || cmd_rc[:minitoc][:set]==:off false - elsif @md.make.html_minitoc? ==:off \ - || @md.make.minitoc? ==:off + elsif defined? @md.make.html_minitoc? \ + and (@md.make.html_minitoc? ==:off \ + || @md.make.minitoc? ==:off) false elsif env_rc.build.html_minitoc? ==:off \ || env_rc.build.minitoc? ==:off @@ -3659,7 +3694,8 @@ WOK true elsif cmd_rc[:html_top_band][:set]==:off false - elsif @md.make.html_top_band? ==:off + elsif defined? @md.make.html_top_band? \ + and @md.make.html_top_band? ==:off false elsif env_rc.build.html_top_band? ==:off false @@ -3672,7 +3708,8 @@ WOK true elsif cmd_rc[:html_navigation][:set]==:off false - elsif @md.make.html_navigation? ==:off + elsif defined? @md.make.html_navigation? \ + and @md.make.html_navigation? ==:off false elsif env_rc.build.html_navigation? ==:off false @@ -3685,7 +3722,8 @@ WOK true elsif cmd_rc[:html_navigation_bar][:set]==:off false - elsif @md.make.html_navigation_bar? ==:off + elsif defined? @md.make.html_navigation_bar? \ + and @md.make.html_navigation_bar? ==:off false elsif env_rc.build.html_navigation_bar? ==:off false @@ -3698,7 +3736,8 @@ WOK true elsif cmd_rc[:search_form][:set]==:off false - elsif @md.make.search_form? ==:off + elsif defined? @md.make.html_search_form? \ + and @md.make.search_form? ==:off false elsif env_rc.build.search_form? ==:off false @@ -3713,8 +3752,9 @@ WOK elsif cmd_rc[:html_search_form][:set]==:off \ || cmd_rc[:search_form][:set]==:off false - elsif @md.make.html_search_form? ==:off \ - || @md.make.search_form? ==:off + elsif defined? @md.make.html_search_form? \ + and (@md.make.html_search_form? ==:off \ + || @md.make.search_form? ==:off) false elsif env_rc.build.html_search_form? ==:off \ || env_rc.build.search_form? ==:off @@ -3730,7 +3770,8 @@ WOK true elsif cmd_rc[:html_right_pane][:set]==:off false - elsif @md.make.html_right_pane? ==:off + elsif defined? @md.make.html_right_pane? \ + and @md.make.html_right_pane? ==:off false elsif env_rc.build.html_right_pane? ==:off false @@ -3743,7 +3784,8 @@ WOK true elsif cmd_rc[:segsubtoc][:set]==:off false - elsif @md.make.segsubtoc? ==:off + elsif defined? @md.make.segsubtoc? \ + and @md.make.segsubtoc? ==:off false elsif env_rc.build.segsubtoc? ==:off false -- cgit v1.2.3