From 05cf1f8b43a61aa7863053e640ea55cb93bbc165 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 10 Mar 2013 14:48:34 -0400 Subject: v4: version & changelog --- data/doc/sisu/CHANGELOG_v4 | 7 +++++++ data/sisu/v4/v/version.yml | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 7705161b..9e844a80 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -21,6 +21,13 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: +%% 4.0.13.orig.tar.xz (2013-03-10:09/7) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.13 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.13-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.13.orig.tar.xz + sisu_4.0.13.orig.tar.xz + sisu_4.0.13-1.dsc + %% 4.0.12.orig.tar.xz (2013-03-08:09/5) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.12 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.12-1 diff --git a/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml index 15092f0e..d64b01d5 100644 --- a/data/sisu/v4/v/version.yml +++ b/data/sisu/v4/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 4.0.12 -:date_stamp: 2013w09/5 -:date: "2013-03-08" +:version: 4.0.13 +:date_stamp: 2013w09/7 +:date: "2013-03-10" :project: SiSU -- cgit v1.2.3 From 280d46e9c343f802d9cec108d5229ec5ec120b2c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 10 Mar 2013 14:52:22 -0400 Subject: v4: html_format, manifest red arrow, next (segment), (broken) link fix, to toc --- data/doc/sisu/CHANGELOG_v4 | 2 ++ lib/sisu/v4/html_format.rb | 15 ++++++++++++--- lib/sisu/v4/manifest.rb | 7 +++---- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 9e844a80..73c64a7f 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -28,6 +28,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.13.orig.tar.xz sisu_4.0.13.orig.tar.xz sisu_4.0.13-1.dsc +* v4: html_format, manifest red arrow, next (segment), (broken) link fix, to toc + %% 4.0.12.orig.tar.xz (2013-03-08:09/5) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.12 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.12-1 diff --git a/lib/sisu/v4/html_format.rb b/lib/sisu/v4/html_format.rb index d2c12154..1bdd7182 100644 --- a/lib/sisu/v4/html_format.rb +++ b/lib/sisu/v4/html_format.rb @@ -297,6 +297,7 @@ module SiSU_HTML_Format @md=md @o_str ||=SiSU_Env::ProcessingSettings.new(md).output_dir_structure @make=SiSU_Env::ProcessingSettings.new(@md) + @file=SiSU_Env::FileOp.new(@md) end def scroll_head_navigation_band if @make.build.html_top_band? @@ -338,9 +339,17 @@ WOK end end def seg_head_navigation_band(page=:seg) - firstseg=%{ - #{png_nav.nxt} - } if @md.firstseg =~/\S+/ + if page==:manifest + nxt=(@file.output_dir_structure.by_language_code? \ + || @file.output_dir_structure.by_filetype?) \ + ? "../html/#{@md.fnb}/toc#{@md.lang_code_insert}#{Sfx[:html]}" + : "toc#{@md.lang_code_insert}#{Sfx[:html]}" + firstseg=%{ + #{png_nav.nxt}} + elsif @md.firstseg =~/\S+/ + firstseg=%{ + #{png_nav.nxt}} + end %{" - else '' - end + search_form=(make.build.search_form?) \ + ? "" + : '' format_head_toc=SiSU_HTML_Format::HeadToc.new(@md) @manifest[:html] <<< Date: Tue, 12 Mar 2013 20:11:41 -0400 Subject: v4: terminal reporting, cosmetic --- data/doc/sisu/CHANGELOG_v4 | 2 ++ data/doc/sisu/markup-samples/v4/sisu_manual/_sisu/image/cp | 1 + lib/sisu/v4/concordance.rb | 2 +- lib/sisu/v4/db_create.rb | 6 +++--- lib/sisu/v4/param.rb | 8 ++++++-- lib/sisu/v4/xhtml.rb | 2 +- lib/sisu/v4/xml.rb | 2 +- lib/sisu/v4/xml_dom.rb | 2 +- 8 files changed, 16 insertions(+), 9 deletions(-) create mode 120000 data/doc/sisu/markup-samples/v4/sisu_manual/_sisu/image/cp diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 73c64a7f..ad01d58f 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -30,6 +30,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.13.orig.tar.xz * v4: html_format, manifest red arrow, next (segment), (broken) link fix, to toc +* v4: terminal reporting, cosmetic + %% 4.0.12.orig.tar.xz (2013-03-08:09/5) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.12 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.12-1 diff --git a/data/doc/sisu/markup-samples/v4/sisu_manual/_sisu/image/cp b/data/doc/sisu/markup-samples/v4/sisu_manual/_sisu/image/cp new file mode 120000 index 00000000..68e480cc --- /dev/null +++ b/data/doc/sisu/markup-samples/v4/sisu_manual/_sisu/image/cp @@ -0,0 +1 @@ +cp \ No newline at end of file diff --git a/lib/sisu/v4/concordance.rb b/lib/sisu/v4/concordance.rb index db8059a0..c7a77a36 100644 --- a/lib/sisu/v4/concordance.rb +++ b/lib/sisu/v4/concordance.rb @@ -84,7 +84,7 @@ module SiSU_Concordance ? "#{@env.program.web_browser} #{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}" : "[#{@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_hi_blue : SiSU_Screen::Ansi.new(@opt.cmd,'Concordance',tool).green_title_hi end wordmax=@env.concord_max diff --git a/lib/sisu/v4/db_create.rb b/lib/sisu/v4/db_create.rb index a7e6c774..e5b8dc78 100644 --- a/lib/sisu/v4/db_create.rb +++ b/lib/sisu/v4/db_create.rb @@ -84,9 +84,9 @@ module SiSU_DbCreate def create_db @env=SiSU_Env::InfoEnv.new(@opt.fns) tell=(@sql_type=='sqlite') \ - ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','Create Sqlite db tables in:',%{"#{@file}"}) - : SiSU_Screen::Ansi.new(@opt.cmd,'invert','Create PG db tables in:',%{"#{Db[:name_prefix]}#{@env.path.stub_pwd}"}) - tell.colorize if @opt.cmd =~/[vVM]/ + ? SiSU_Screen::Ansi.new(@opt.cmd,'Create SQLite db tables in:',%{"#{@file}"}) + : SiSU_Screen::Ansi.new(@opt.cmd,'Create pgSQL db tables in:',%{"#{Db[:name_prefix]}#{@env.path.stub_pwd}"}) + tell.dark_grey_title_hi if @opt.cmd =~/[vVM]/ SiSU_Env::SystemCall.new.create_pg_db(@env.path.stub_pwd) if @sql_type=='pg' #watch use of path.stub_pwd instead of stub end def output_dir? diff --git a/lib/sisu/v4/param.rb b/lib/sisu/v4/param.rb index 375e2af8..360625e4 100644 --- a/lib/sisu/v4/param.rb +++ b/lib/sisu/v4/param.rb @@ -1154,8 +1154,12 @@ module SiSU_Param tf="@title: #{tf}" @title=SiSU_Param::Parameters::Md.new(tf.strip,@opt,@env).title end - @html_title=@title.full.gsub(/(

|

|
|
)/,'') - SiSU_Screen::Ansi.new(@opt.cmd,'Parameters',@html_title).txt_grey if @opt.cmd =~/v/ + creator=(defined? @creator.author \ + && @creator.author.is_a?(String)) \ + ? " #{@creator.author}" + : '' + title=%{"#{@title.full.gsub(/(

|

|
|
)/,'')}",} + SiSU_Screen::Ansi.new(@opt.cmd,'Parameters',%{#{title}#{creator}}).txt_grey if @opt.cmd =~/v/ end if not @book_idx \ and para =~/^=\{(.+?)\}\s*$/ diff --git a/lib/sisu/v4/xhtml.rb b/lib/sisu/v4/xhtml.rb index bd04b3f4..c6dca8fb 100644 --- a/lib/sisu/v4/xhtml.rb +++ b/lib/sisu/v4/xhtml.rb @@ -93,7 +93,7 @@ module SiSU_XHTML else "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" end @opt.cmd=~/[MVvz]/ \ - ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XHTML',tool).colorize + ? SiSU_Screen::Ansi.new(@opt.cmd,'XHTML',tool).green_hi_blue : SiSU_Screen::Ansi.new(@opt.cmd,'XHTML',tool).green_title_hi 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 diff --git a/lib/sisu/v4/xml.rb b/lib/sisu/v4/xml.rb index 7a788257..e82fe58c 100644 --- a/lib/sisu/v4/xml.rb +++ b/lib/sisu/v4/xml.rb @@ -91,7 +91,7 @@ module SiSU_XML_SAX else "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" end @opt.cmd=~/[MVvz]/ \ - ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XML SAX',tool).colorize + ? SiSU_Screen::Ansi.new(@opt.cmd,'XML SAX',tool).green_hi_blue : SiSU_Screen::Ansi.new(@opt.cmd,'XML SAX',tool).green_title_hi 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 diff --git a/lib/sisu/v4/xml_dom.rb b/lib/sisu/v4/xml_dom.rb index 822566db..a5aafd03 100644 --- a/lib/sisu/v4/xml_dom.rb +++ b/lib/sisu/v4/xml_dom.rb @@ -92,7 +92,7 @@ module SiSU_XML_DOM else "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" end @opt.cmd=~/[MVvz]/ \ - ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XML DOM',tool).colorize + ? SiSU_Screen::Ansi.new(@opt.cmd,'XML DOM',tool).green_hi_blue : SiSU_Screen::Ansi.new(@opt.cmd,'XML DOM',tool).green_title_hi 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 -- cgit v1.2.3 From f88fb6e87d39a5cd0df8fb1e8195b96d898fea58 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 12 Mar 2013 20:18:13 -0400 Subject: v4: manifest, link to harvest authors & topics if available, else cosmeitc --- data/doc/sisu/CHANGELOG_v4 | 2 ++ lib/sisu/v4/manifest.rb | 21 ++++++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index ad01d58f..0da67946 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -32,6 +32,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.13.orig.tar.xz * v4: terminal reporting, cosmetic +* v4: manifest, link to harvest authors & topics if available, else cosmeitc + %% 4.0.12.orig.tar.xz (2013-03-08:09/5) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.12 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.12-1 diff --git a/lib/sisu/v4/manifest.rb b/lib/sisu/v4/manifest.rb index 80373663..c8103a0a 100644 --- a/lib/sisu/v4/manifest.rb +++ b/lib/sisu/v4/manifest.rb @@ -113,11 +113,9 @@ module SiSU_Manifest @fnb=md.fnb @base_url="#{@env.url.root}/#{@fnb}" @o_str=SiSU_Env::FileOp.new(md).output_dir_structure - @image_path=if @o_str.dump_or_redirect? - './image' - else - %{#{@f.path_rel_links.html_scroll_2}_sisu/image_sys} - end + @image_path=(@o_str.dump_or_redirect?) \ + ? './image' + : %{#{@f.path_rel_links.html_scroll_2}_sisu/image_sys} @base_path=@f.output_path.manifest.dir @@dg ||=SiSU_Env::InfoEnv.new.digest.type @dg=@@dg @@ -825,10 +823,18 @@ WOK

WOK end + harvest=(FileTest.file?("#{@f.output_path.manifest.dir}/authors.html") \ + && FileTest.file?("#{@f.output_path.manifest.dir}/topics.html")) \ + ? %{

other document manifests: [authors] [topics]

} + : '' + manifest_title=%{

#{@translate.manifest_description}

#{harvest}} @manifest[:html] <<<#{@translate.manifest_description} -

#{@md.title.full}

+ +

#{@md.title.full}

#{@md.author}

+
#{button_home(page)} diff --git a/lib/sisu/v4/manifest.rb b/lib/sisu/v4/manifest.rb index cb34a3d3..80373663 100644 --- a/lib/sisu/v4/manifest.rb +++ b/lib/sisu/v4/manifest.rb @@ -785,10 +785,9 @@ WOK minitoc=SiSU_HTML_MiniToc::TocMini.new(@md,data).songsheet.join("\n") id,file='','' vz=SiSU_Viz::Defaults.new - search_form=if make.build.search_form? - "#{@env.widget_static.search_form}#{@env.widget_static.search_form}
WOK published_versions -- cgit v1.2.3 From 0f85875f703ae722ba0ebebcd755dd13911df5a8 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 13 Mar 2013 21:43:14 -0400 Subject: v4: hub, sysenv, remote, work on rsync of document/site build --- data/doc/sisu/CHANGELOG_v4 | 2 + lib/sisu/v4/hub.rb | 81 +++++++------ lib/sisu/v4/remote.rb | 6 +- lib/sisu/v4/sysenv.rb | 295 ++++++++++++++++++++++++--------------------- 4 files changed, 204 insertions(+), 180 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 0da67946..813f4d83 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -34,6 +34,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.13.orig.tar.xz * v4: manifest, link to harvest authors & topics if available, else cosmeitc +* v4: hub, sysenv, remote, work on rsync of document/site build + %% 4.0.12.orig.tar.xz (2013-03-08:09/5) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.12 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.12-1 diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb index dee13bc1..cf821246 100644 --- a/lib/sisu/v4/hub.rb +++ b/lib/sisu/v4/hub.rb @@ -191,22 +191,22 @@ module SiSU @@n_do=0 end def remote_put_base_site_rsync # -CR -p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on + puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:cyan) 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.act[:maintenance][:set] ==:on + puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:cyan) 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.act[:maintenance][:set] ==:on + puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:cyan) 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.act[:maintenance][:set] ==:on + puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:cyan) if @opt.act[:maintenance][:set] ==:on require_relative 'remote' # remote.rb SiSU_Remote::Put.new(@opt).scp_base_all end @@ -629,45 +629,50 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on ensure end end - if @opt.act[:site_init][:set]==:on #% -C - require_relative 'conf' # -s conf.rb - SiSU_Initialize::Source.new(@opt).read - end end def actions if @opt.act[:profile][:set]==:on require 'profile' end - action_on_file_ =(@opt.act[:dal][:set]==:on \ - || @opt.act[:manpage][:set]==:on \ - || @opt.act[:texinfo][:set]==:on \ - || @opt.act[:txt][:set]==:on \ - || @opt.act[:html][:set]==:on \ - || @opt.act[:html_scroll][:set]==:on \ - || @opt.act[:html_seg][:set]==:on \ - || @opt.act[:concordance][:set]==:on \ - || @opt.act[:xhtml][:set]==:on \ - || @opt.act[:epub][:set]==:on \ - || @opt.act[:odt][:set]==:on \ - || @opt.act[:xml_sax][:set]==:on \ - || @opt.act[:xml_dom][:set]==:on \ - || @opt.act[:pdf][:set]==:on \ - || @opt.act[:pdf_p][:set]==:on \ - || @opt.act[:pdf_l][:set]==:on \ - || @opt.act[:psql][:set]==:on \ - || @opt.act[:sqlite][:set]==:on \ - || @opt.act[:sqlite_discrete][:set]==:on \ - || @opt.act[:share_source][:set]==:on \ - || @opt.act[:sisupod][:set]==:on \ - || @opt.act[:qrcode][:set]==:on \ - || @opt.act[:hash_digests][:set]==:on \ - || @opt.act[:manifest][:set]==:on \ - || @opt.act[:rsync][:set]==:on \ - || @opt.act[:scp][:set]==:on \ - || @opt.act[:webrick][:set]==:on \ - || @opt.act[:zap][:set]==:on) \ - ? (:true) - : (:false) + action_on_file_ =if @opt.act[:rsync][:set]==:on \ + && @opt.act[:site_init][:set]==:on #\ + #|| @opt.act[:harvest][:set]==:on) + :false + elsif @opt.act[:rsync][:set]==:on \ + && @opt.act[:site_init][:set] !=:on #\ + #&& @opt.act[:harvest][:set] !=:on + :true + else + action_on_file_ =(@opt.act[:dal][:set]==:on \ + || @opt.act[:manpage][:set]==:on \ + || @opt.act[:texinfo][:set]==:on \ + || @opt.act[:txt][:set]==:on \ + || @opt.act[:html][:set]==:on \ + || @opt.act[:html_scroll][:set]==:on \ + || @opt.act[:html_seg][:set]==:on \ + || @opt.act[:concordance][:set]==:on \ + || @opt.act[:xhtml][:set]==:on \ + || @opt.act[:epub][:set]==:on \ + || @opt.act[:odt][:set]==:on \ + || @opt.act[:xml_sax][:set]==:on \ + || @opt.act[:xml_dom][:set]==:on \ + || @opt.act[:pdf][:set]==:on \ + || @opt.act[:pdf_p][:set]==:on \ + || @opt.act[:pdf_l][:set]==:on \ + || @opt.act[:psql][:set]==:on \ + || @opt.act[:sqlite][:set]==:on \ + || @opt.act[:sqlite_discrete][:set]==:on \ + || @opt.act[:share_source][:set]==:on \ + || @opt.act[:sisupod][:set]==:on \ + || @opt.act[:qrcode][:set]==:on \ + || @opt.act[:hash_digests][:set]==:on \ + || @opt.act[:manifest][:set]==:on \ + || @opt.act[:scp][:set]==:on \ + || @opt.act[:webrick][:set]==:on \ + || @opt.act[:zap][:set]==:on) \ + ? (:true) + : (:false) + end if @opt.act[:harvest][:set]==:on require_relative 'harvest' # harvest.rb SiSU_Harvest::Source.new(@opt).read # -h -H html.rb diff --git a/lib/sisu/v4/remote.rb b/lib/sisu/v4/remote.rb index 0da44697..1ef40898 100644 --- a/lib/sisu/v4/remote.rb +++ b/lib/sisu/v4/remote.rb @@ -68,9 +68,9 @@ module SiSU_Remote @opt=opt @dir=SiSU_Env::InfoEnv.new(@opt.fns) @put=(@opt.fns =~/\.ssm\.sst$/) \ - ? @opt.fns.gsub(/(.+)?\.ssm\.sst$/,'\1.ssm') - : @opt.fns - @remote=SiSU_Env::InfoRemote.new(@opt) + ? opt.fns.gsub(/(.+)?\.ssm\.sst$/,'\1.ssm') + : opt.fns + @remote=SiSU_Env::InfoRemote.new(opt) end def rsync SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->',@put).dark_grey_title_hi unless @opt.cmd =~/q/ diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index 5647efd7..7fc11eb6 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -873,19 +873,20 @@ module SiSU_Env elsif @cmd =~/v/; 'v' else '' end - msg='' - msg=" && echo 'OK: #{@input} -> #{@output}'" unless @cmd =~/q/ + cX=SiSU_Screen::Ansi.new(@cmd).cX + msg=(@cmd =~/q/) ? '' : %{ && echo " #{cX.grey}OK: #{@input} -> #{@output}#{cX.off}"} + amp=(@cmd =~/[vVM]/) ? '' : '&' rsync_cmd="rsync -az#{vb} #{action} #{@input} #{@output}" puts rsync_cmd if @cmd =~/[vVM]/ dir_change,dir_return='','' - if chdir \ + if not chdir.nil? \ && chdir != Dir.pwd dir_change=Dir.chdir(chdir) dir_return=Dir.pwd end dir_change system(" - #{rsync_cmd} #{msg} + #{rsync_cmd} #{msg} #{amp} ") dir_return else STDERR.puts "\t*WARN* #{program} not found" @@ -2900,121 +2901,124 @@ WOK @env=(@opt.fns && !(@opt.fns.empty?) \ ? (SiSU_Env::InfoEnv.new(@opt.fns)) : (SiSU_Env::InfoEnv.new('dummy.sst'))) - if @opt.cmd =~/m/; @md=SiSU_Param::Parameters.new(@opt).get - end ft=[] - if @md \ - and defined? @md.fn \ - and @md.fn # used for by_language_code? - if @md.opt.cmd =~ /[hH]/ - ft << @md.fn[:html] - end - if @md.opt.cmd =~ /w/ \ - and @md.opt.cmd !~ /[hH]/ - ft << @md.fn[:concordance] - end - if @md.opt.cmd =~ /y/ \ - and @md.opt.cmd !~ /[hH]/ - ft << @md.fn[:manifest] - end - if @md.opt.cmd =~ /[at]/; ft << @md.fn[:plain] - end - if @md.opt.cmd =~ /b/; ft << @md.fn[:xhtml] - end - if @md.opt.cmd =~ /e/; ft << @md.fn[:epub] - end - if @md.opt.cmd =~ /g/; ft << @md.fn[:wiki] - end - if @md.opt.cmd =~ /i/; ft << @md.fn[:manpage] - end - if @md.opt.cmd =~ /N/; ft << @md.fn[:digest] - end - if @md.opt.cmd =~ /o/; ft << @md.fn[:odf] - end - if @md.opt.cmd =~ /O/; ft << @md.fn[:oai_pmh] - end - if @md.opt.cmd =~ /p/; ft << @md.fn[:pdf_l] << @md.fn[:pdf_p] - end - if @md.opt.cmd =~ /s/; ft << @md.fns - end - if @md.opt.cmd =~ /S/; ft << @md.fn[:sisupod] << '.kdi' - end - if @md.opt.cmd =~ /x/; ft << @md.fn[:sax] - end - if @md.opt.cmd =~ /X/; ft << @md.fn[:dom] - end - if @md.opt.cmd =~ /G/; ft << @md.fn[:pot] - end - @fnb=@md.fnb - else # still needed where/when param is not parsed - if @opt.cmd =~ /[hH]/; ft << '.html' << '.html.??' - end - if @opt.cmd =~ /w/ \ - and @opt.cmd !~ /[hH]/ - ft << 'concordance.html' << '??.concordance.html' << 'concordance.??.html' - end - if @opt.cmd =~ /y/ \ - and @opt.cmd !~ /[hH]/ - ft << 'sisu_manifest.html' << '??.sisu_manifest.html' << 'sisu_manifest.??.html' - end - if @opt.cmd =~ /a/; ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' - end - if @opt.cmd =~ /b/; ft << 'scroll.xhtml' << '??.scroll.xhtml' << 'scroll.??.xhtml' - end - if @opt.cmd =~ /e/; ft << @fnb << '.epub' - end - if @opt.cmd =~ /g/; ft << 'wiki.txt' << '??.wiki.txt' << 'wiki.??.txt' - end - if @opt.cmd =~ /i/; ft << '.1' << '??.man.1' << 'man.??.1' - end - if @opt.cmd =~ /N/; ft << 'digest.txt' << '??.digest.txt' << 'digest.??.txt' - end - if @opt.cmd =~ /o/; ft << 'opendocument.odt' << '??.opendocument.odt' << 'opendocument.??.odt' - end - if @opt.cmd =~ /O/; ft << 'oai_pmh.xml' - end - if @opt.cmd =~ /p/; ft << 'landscape.pdf' << 'portrait.pdf' << '.pdf' - end - if @opt.cmd =~ /s/; ft << '.sst' << '.ssi' << '.ssm' - end - if @opt.cmd =~ /S/; ft << '.zip' << '.kdi' - end - if @opt.cmd =~ /x/; ft << 'sax.xml' << '??.sax.xml' << 'sax.??.xml' - end - if @opt.cmd =~ /X/; ft << 'dom.xml' << '??.dom.xml' << 'dom.??.xml' - end - if @opt.mod.inspect =~ /sxm|sxs|xml/; ft << @fnb << '.sxs.xml' - end - if @opt.mod.inspect =~ /sxd/; ft << @fnb << '.sxd.xml' - end - if @opt.mod.inspect =~ /sxn/; ft << @fnb << '.sxn.xml' + if @opt.act[:dal][:set]==:on + @md=SiSU_Param::Parameters.new(@opt).get + if @md \ + and defined? @md.fn \ + and @md.fn # used for by_language_code? + if @md.opt.cmd =~ /[hH]/ + ft << @md.fn[:html] + end + if @md.opt.cmd =~ /w/ \ + and @md.opt.cmd !~ /[hH]/ + ft << @md.fn[:concordance] + end + if @md.opt.cmd =~ /y/ \ + and @md.opt.cmd !~ /[hH]/ + ft << @md.fn[:manifest] + end + if @md.opt.cmd =~ /[at]/; ft << @md.fn[:plain] + end + if @md.opt.cmd =~ /b/; ft << @md.fn[:xhtml] + end + if @md.opt.cmd =~ /e/; ft << @md.fn[:epub] + end + if @md.opt.cmd =~ /g/; ft << @md.fn[:wiki] + end + if @md.opt.cmd =~ /i/; ft << @md.fn[:manpage] + end + if @md.opt.cmd =~ /N/; ft << @md.fn[:digest] + end + if @md.opt.cmd =~ /o/; ft << @md.fn[:odf] + end + if @md.opt.cmd =~ /O/; ft << @md.fn[:oai_pmh] + end + if @md.opt.cmd =~ /p/; ft << @md.fn[:pdf_l] << @md.fn[:pdf_p] + end + if @md.opt.cmd =~ /s/; ft << @md.fns + end + if @md.opt.cmd =~ /S/; ft << @md.fn[:sisupod] << '.kdi' + end + if @md.opt.cmd =~ /x/; ft << @md.fn[:sax] + end + if @md.opt.cmd =~ /X/; ft << @md.fn[:dom] + end + if @md.opt.cmd =~ /G/; ft << @md.fn[:pot] + end + @fnb=@md.fnb + else # still needed where/when param is not parsed + if @opt.cmd =~ /[hH]/; ft << '.html' << '.html.??' + end + if @opt.cmd =~ /w/ \ + and @opt.cmd !~ /[hH]/ + ft << 'concordance.html' << '??.concordance.html' << 'concordance.??.html' + end + if @opt.cmd =~ /y/ \ + and @opt.cmd !~ /[hH]/ + ft << 'sisu_manifest.html' << '??.sisu_manifest.html' << 'sisu_manifest.??.html' + end + if @opt.cmd =~ /a/; ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' + end + if @opt.cmd =~ /b/; ft << 'scroll.xhtml' << '??.scroll.xhtml' << 'scroll.??.xhtml' + end + if @opt.cmd =~ /e/; ft << @fnb << '.epub' + end + if @opt.cmd =~ /g/; ft << 'wiki.txt' << '??.wiki.txt' << 'wiki.??.txt' + end + if @opt.cmd =~ /i/; ft << '.1' << '??.man.1' << 'man.??.1' + end + if @opt.cmd =~ /N/; ft << 'digest.txt' << '??.digest.txt' << 'digest.??.txt' + end + if @opt.cmd =~ /o/; ft << 'opendocument.odt' << '??.opendocument.odt' << 'opendocument.??.odt' + end + if @opt.cmd =~ /O/; ft << 'oai_pmh.xml' + end + if @opt.cmd =~ /p/; ft << 'landscape.pdf' << 'portrait.pdf' << '.pdf' + end + if @opt.cmd =~ /s/; ft << '.sst' << '.ssi' << '.ssm' + end + if @opt.cmd =~ /S/; ft << '.zip' << '.kdi' + end + if @opt.cmd =~ /x/; ft << 'sax.xml' << '??.sax.xml' << 'sax.??.xml' + end + if @opt.cmd =~ /X/; ft << 'dom.xml' << '??.dom.xml' << 'dom.??.xml' + end + if @opt.mod.inspect =~ /sxm|sxs|xml/; ft << @fnb << '.sxs.xml' + end + if @opt.mod.inspect =~ /sxd/; ft << @fnb << '.sxd.xml' + end + if @opt.mod.inspect =~ /sxn/; ft << @fnb << '.sxn.xml' + end end + ft=ft.uniq + filetypes=ft.join(',') + @filetypes=if filetypes !~/..+/; '' # -r called alone, copy all + elsif @opt.cmd =~/u/; '' # -u added, copy all, (used to create remote directory tree see output path), not the usual function of -u + elsif filetypes =~/\S+?,\S+/; '*{' + filetypes + '}' # more than one relevant file type + else '*' + filetypes # one relevant file type + end + @source_path=(@fnb && !(@fnb.empty?) \ + ? "#{@env.path.output}/#{@fnb}" + : @env.path.output) + @source_path_epub=(@fnb && !(@fnb.empty?) \ + ? "#{@env.path.output}/epub" + : @env.path.output_epub) + @source_path_src=(@fnb && !(@fnb.empty?) \ + ? "#{@env.path.output}/src" + : @env.path.output_src) + @source_path_pod=(@fnb && !(@fnb.empty?) \ + ? "#{@env.path.output}/pod" + : @env.path.output_pod) + @source_path_harvest=(@fnb && !(@fnb.empty?) \ + ? "#{@env.path.output}/manifest" + : @env.path.output_harvest) + @local_sisu_source=(@filetypes =~/\S/) \ + ? "#{@source_path}/#{@filetypes}" + : @source_path + end + if @opt.act[:rsync][:set]==:on end - ft=ft.uniq - filetypes=ft.join(',') - @filetypes=if filetypes !~/..+/; '' # -r called alone, copy all - elsif @opt.cmd =~/u/; '' # -u added, copy all, (used to create remote directory tree see output path), not the usual function of -u - elsif filetypes =~/\S+?,\S+/; '*{' + filetypes + '}' # more than one relevant file type - else '*' + filetypes # one relevant file type - end - @source_path=(@fnb && !(@fnb.empty?) \ - ? "#{@env.path.output}/#{@fnb}" - : @env.path.output) - @source_path_epub=(@fnb && !(@fnb.empty?) \ - ? "#{@env.path.output}/epub" - : @env.path.output_epub) - @source_path_src=(@fnb && !(@fnb.empty?) \ - ? "#{@env.path.output}/src" - : @env.path.output_src) - @source_path_pod=(@fnb && !(@fnb.empty?) \ - ? "#{@env.path.output}/pod" - : @env.path.output_pod) - @source_path_harvest=(@fnb && !(@fnb.empty?) \ - ? "#{@env.path.output}/manifest" - : @env.path.output_harvest) - @local_sisu_source=(@filetypes =~/\S/) \ - ? "#{@source_path}/#{@filetypes}" - : @source_path end end class CleanOutput @@ -3254,7 +3258,9 @@ WOK self end def rsync - @f=SiSU_Env::FileOp.new(@md) + @f=(@opt.act[:dal][:set]==:on) \ + ? SiSU_Env::FileOp.new(@md) + : nil def document self.remote_host_base.each do |remote_conn| local_gen=@source_path @@ -3372,10 +3378,6 @@ WOK && (@md.ec[:image].length > 0) local_css=@f.output_path.css.rel images_system='_sisu/image_sys' - if @f.output_path.images.rel.length > 0 \ - && images_from_skin.length > 0 - images_skin=@f.place_file.images.rel + '/' + images_from_skin.join(" #{@f.output_path.images.rel}/") - end end begin ##create file structure without copying files?: @@ -3404,27 +3406,25 @@ WOK end end def site_base #base site + ldest='_sisu/*' + l_rel="#{@env.path.webserv}/#{@env.path.stub_pwd}" + image_sys="#{@env.path.webserv}/_sisu/image_sys" + images="#{@env.path.webserv}/_sisu/image" + self.remote_host_base.each do |remote_conn| + remote="#{remote_conn[:name]}/#{@env.path.stub_pwd}" + remote_conf="#{remote_conn[:name]}/_sisu" + SiSU_Env::SystemCall.new(image_sys,remote_conf).rsync + SiSU_Env::SystemCall.new(ldest,remote).rsync('--relative',l_rel) + end + end + def site_harvest ldest="#{@env.path.webserv}/#{@env.path.stub_pwd}/_sisu" image_sys="#{@env.path.webserv}/_sisu/image_sys" images="#{@env.path.webserv}/_sisu/image" self.remote_host_base.each do |remote_conn| remote="#{remote_conn[:name]}/#{@env.path.stub_pwd}/." remote_conf="#{remote_conn[:name]}/_sisu" - if defined? @rc['permission_set']['remote_base_site'] \ - and @rc['permission_set']['remote_base_site'] \ - and @@flag_remote==true \ - and @opt.cmd !~/U/ - SiSU_Env::SystemCall.new("#{image_sys}","#{remote_conf}").rsync - SiSU_Env::SystemCall.new("#{images}","#{remote_conf}").rsync - SiSU_Env::SystemCall.new("#{ldest}","#{remote}").rsync - elsif @opt.cmd =~/U/ - puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/ - puts "rsync_base: #{local} -> #{remote}" - puts "#{local}/_sisu/image -> #{remote}" - puts "#{local}/_sisu/image_sys/ -> #{remote}" - puts "#{local}/#{@env.path.style}/ -> #{remote}" - else puts "permission not granted #{__FILE__} #{__LINE__}" if @opt.cmd =~/M/ - end + SiSU_Env::SystemCall.new("#{harvest}","#{remote_manifest}").rsync end end def site_base_sync @@ -3469,10 +3469,27 @@ WOK def rsync_harvest self.remote_host_base.each do |remote_conn| local=@source_path_harvest - remote="#{remote_conn[:name]}/#{@env.path.stub_pwd}/." - if @@flag_remote + @env=SiSU_Env::InfoEnv.new + harvest_pth,file='','' + lng='en' + if @env.output_dir_structure.by? == :language + harvest_out_pth="#{@env.path.webserv}/#{@opt.base_stub}/#{lng}/manifest" + harvest_pth="#{@opt.base_stub}/#{lng}/manifest" + files="#{harvest_out_pth}/authors.html #{harvest_out_pth}/topics.html" + elsif @env.output_dir_structure.by? == :filetype + harvest_out_pth="#{@env.path.webserv}/#{@opt.base_stub}/manifest" + harvest_pth="#{@opt.base_stub}/manifest" + files="#{harvest_out_pth}/authors.#{lng}.html #{harvest_out_pth}/topics.#{lng}.html" + elsif @env.output_dir_structure.by? == :filename + harvest_out_pth="#{@env.path.webserv}/#{@opt.base_stub}" + harvest_pth="#{@opt.base_stub}" + files="#{harvest_out_pth}/authors.#{lng}.html #{harvest_out_pth}/topics.#{lng}.html" + end + remote="#{remote_conn[:name]}/#{harvest_pth}/." + if @opt.act[:harvest][:set] \ + && @opt.act[:rsync][:set] delete_extra_files='--delete' # '--delete-after' - SiSU_Env::SystemCall.new(local,remote).rsync(delete_extra_files) + SiSU_Env::SystemCall.new(files,remote).rsync(delete_extra_files) elsif @opt.cmd =~/U/ puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/ puts "rsync_sitemaps: #{local} -> #{remote}" -- cgit v1.2.3 From 0e87ea14e6dcccf4e63755e128e0ddff0d80fb79 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 13 Mar 2013 22:02:20 -0400 Subject: v4: hub, sql db, fix for actions not requiring files, create, drop, etc. --- data/doc/sisu/CHANGELOG_v4 | 2 ++ lib/sisu/v4/hub.rb | 51 ++++++++++++++++++++-------------------------- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 813f4d83..3f8b0c4d 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -36,6 +36,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.13.orig.tar.xz * v4: hub, sysenv, remote, work on rsync of document/site build +* v4: hub, sql db, fix for actions not requiring files, create, drop, etc. + %% 4.0.12.orig.tar.xz (2013-03-08:09/5) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.12 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.12-1 diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb index cf821246..f7cdb1e2 100644 --- a/lib/sisu/v4/hub.rb +++ b/lib/sisu/v4/hub.rb @@ -457,42 +457,22 @@ module SiSU end if @opt.act[:psql][:set]==:on #% --pg, -D DB postgresql require_relative '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 - end - else - SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb + OptionLoopFiles.new(@opt).loop_files_on_given_option do + SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb end end if @opt.act[:sqlite][:set]==:on #% --sqlite, -d DB sqlite require_relative '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 - end - else - SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb + OptionLoopFiles.new(@opt).loop_files_on_given_option do + SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb end end - if @opt.act[:dal][:set]==:on #% --dal, -m embedded content - # OptionLoopFiles.new(@opt).loop_files_on_given_option do - # require_relative '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 # require_relative '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 - # require_relative 'sisupod_make' - # SiSU_Doc::Source.new(@opt).read # -S sisupod_make.rb - # end - end if @opt.act[:manifest][:set]==:on #% --manifest, -y require_relative 'manifest' OptionLoopFiles.new(@opt).manifest_on_files_translated do @@ -635,15 +615,17 @@ module SiSU require 'profile' end action_on_file_ =if @opt.act[:rsync][:set]==:on \ - && @opt.act[:site_init][:set]==:on #\ - #|| @opt.act[:harvest][:set]==:on) + && @opt.act[:site_init][:set]==:on :false elsif @opt.act[:rsync][:set]==:on \ - && @opt.act[:site_init][:set] !=:on #\ - #&& @opt.act[:harvest][:set] !=:on + && @opt.act[:site_init][:set] !=:on :true + elsif ((@opt.act[:psql][:set]==:on \ + or @opt.act[:sqlite][:set]==:on) \ + and @opt.mod.join(';') =~/--(?:createdb|init(?:ialize)?|create(?:all)?|createtables|recreate|drop(?:all))/) + :false else - action_on_file_ =(@opt.act[:dal][:set]==:on \ + (@opt.act[:dal][:set]==:on \ || @opt.act[:manpage][:set]==:on \ || @opt.act[:texinfo][:set]==:on \ || @opt.act[:txt][:set]==:on \ @@ -678,6 +660,17 @@ module SiSU SiSU_Harvest::Source.new(@opt).read # -h -H html.rb elsif @opt.mod.inspect =~/--convert|--to|--from/ require_relative 'sst_convert_markup' # sst_convert_markup.rb + elsif action_on_file_ == :false \ + and (@opt.act[:psql][:set]==:on \ + or @opt.act[:sqlite][:set]==:on) + if @opt.act[:psql][:set]==:on + require_relative 'dbi' + SiSU_DBI::SQL.new(@opt).connect + end + if @opt.act[:sqlite][:set]==:on + require_relative 'dbi' + SiSU_DBI::SQL.new(@opt).connect + end elsif action_on_file_ == :true \ or ( @opt.cmd =~/^-/ \ -- cgit v1.2.3 From f9cb4b0311e9deed51b475f2dd93dd913a036f81 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 13 Mar 2013 22:08:08 -0400 Subject: v4: version & changelog, dates touched --- data/doc/sisu/CHANGELOG_v4 | 2 +- data/sisu/v4/v/version.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 3f8b0c4d..a1929474 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -21,7 +21,7 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: -%% 4.0.13.orig.tar.xz (2013-03-10:09/7) +%% 4.0.13.orig.tar.xz (2013-03-13:10/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.13 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.13-1 http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.13.orig.tar.xz diff --git a/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml index d64b01d5..815ce51f 100644 --- a/data/sisu/v4/v/version.yml +++ b/data/sisu/v4/v/version.yml @@ -1,5 +1,5 @@ --- :version: 4.0.13 -:date_stamp: 2013w09/7 -:date: "2013-03-10" +:date_stamp: 2013w10/3 +:date: "2013-03-13" :project: SiSU -- cgit v1.2.3