From c4a842ffdc9d24b79eae40dfaec8e43a6a796e30 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 18 Mar 2013 00:03:50 -0400 Subject: v4: share document source, markup text file &/or sisupod * processing flow, correct sequence * terminal reporting --- data/doc/sisu/CHANGELOG_v4 | 4 ++++ lib/sisu/v4/hub.rb | 9 ++++----- lib/sisu/v4/screen_text_color.rb | 3 +++ lib/sisu/v4/share_src.rb | 9 ++++----- lib/sisu/v4/sisupod_make.rb | 8 +++++--- 5 files changed, 20 insertions(+), 13 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 5fa882b4..5b994c82 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -28,6 +28,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.15.orig.tar.xz sisu_4.0.15.orig.tar.xz sisu_4.0.15-1.dsc +* v4: share document source, markup text file &/or sisupod + * processing flow, correct sequence + * terminal reporting + %% 4.0.14.orig.tar.xz (2013-03-16:10/6) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.14 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.14-1 diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb index f7cdb1e2..ba36c9ad 100644 --- a/lib/sisu/v4/hub.rb +++ b/lib/sisu/v4/hub.rb @@ -359,10 +359,6 @@ module SiSU require_relative 'dbi_discrete' # -d dbi_discrete.rb SiSU_DBI_Discrete::SQL.new(@opt).build end - if @opt.act[:manifest][:set]==:on #% --manifest, -y - require_relative 'manifest' # -y manifest.rb - SiSU_Manifest::Source.new(@opt).read - end end end def loop_files_on_given_option_pre_do @@ -417,11 +413,14 @@ module SiSU end end end + if @opt.act[:manifest][:set]==:on #% --manifest, -y + require_relative 'manifest' # -y manifest.rb + SiSU_Manifest::Source.new(@opt).read + end ensure path_pod=@env.processing_path.processing_sisupod(@opt).paths unless @opt.cmd =~/M/ FileUtils::rm_rf("#{path_pod[:sisupod]}/*") if FileTest.directory?(path_pod[:sisupod]) - #FileUtils::rm_rf("#{path_pod[:fnb]}/*") if FileTest.directory?(path_pod[:fnb]) end end end diff --git a/lib/sisu/v4/screen_text_color.rb b/lib/sisu/v4/screen_text_color.rb index c2678ba7..06307154 100644 --- a/lib/sisu/v4/screen_text_color.rb +++ b/lib/sisu/v4/screen_text_color.rb @@ -349,6 +349,9 @@ module SiSU_Screen def cyan_title_hi puts %{#{@cX.cyan_hi}#{@cX.black}#{@txt[0]}#{@cX.off*2} #{@cX.blue}#{@txt[1]}#{@cX.off}} end + def cyan_hi_blue + puts %{#{@cX.cyan_hi}#{@cX.black}#{@txt[0]}#{@cX.off*2} #{@cX.blue}#{@txt[1]}#{@cX.off}} + end def dbi_title puts %{#{@cX.blue_hi}#{@cX.black}#{@txt[0]}#{@cX.off*2} #{@cX.cyan}#{@cX.grey}#{@txt[1]}#{@cX.off*2} #{@cX.green}#{@txt[2]}#{@cX.off}} end diff --git a/lib/sisu/v4/share_src.rb b/lib/sisu/v4/share_src.rb index 725ded35..34c1d713 100644 --- a/lib/sisu/v4/share_src.rb +++ b/lib/sisu/v4/share_src.rb @@ -64,7 +64,6 @@ module SiSU_Markup include SiSU_Source require_relative 'sysenv' # sysenv.rb include SiSU_Env - pwd=Dir.pwd class Source < SiSU_Source::SiSUpodSource def initialize(opt,build=nil,place=nil) super(opt,build,place) @@ -73,19 +72,19 @@ module SiSU_Markup def read unless @opt.cmd =~/q/ @opt.cmd=~/[MVvz]/ \ - ? SiSU_Screen::Ansi.new(@opt.cmd,'Share Document Source!',@opt.fns).green_hi_blue - : SiSU_Screen::Ansi.new(@opt.cmd,'Share Document Source!',@opt.fns).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,"Copy sisu markup file to output directory","#{@opt.fno} -> #{@file.output_path.src.dir}").warn if @opt.cmd =~/[MVv]/ + ? SiSU_Screen::Ansi.new(@opt.cmd,'Share document markup text source',@opt.fns).cyan_hi_blue + : SiSU_Screen::Ansi.new(@opt.cmd,'Share document markup text source',@opt.fns).cyan_title_hi end if FileTest.directory?(@path_pod[:fnb]) FileUtils::mkdir_p(@file.output_path.src.dir) unless FileTest.directory?(@file.output_path.src.dir) v=(@opt.cmd =~/M/) ? 'v' : '' system(%{ rsync -a#{v} #{@path_pod[:fnb]} #{@file.output_path.sisupod.dir} + chbk=`pwd` cd #{@file.output_path.sisupod.dir} for I in `find -type d` ; do chmod 755 $I ; done for I in `find -type f` ; do chmod 644 $I ; done - cd - + cd ${chbk} }) else SiSU_Screen::Ansi.new('',"#{@opt.fno} not available").blue_tab if @opt.cmd=~/[MVv]/ diff --git a/lib/sisu/v4/sisupod_make.rb b/lib/sisu/v4/sisupod_make.rb index 99103554..57c12049 100644 --- a/lib/sisu/v4/sisupod_make.rb +++ b/lib/sisu/v4/sisupod_make.rb @@ -69,9 +69,11 @@ module SiSU_Doc def initialize(opt,build=nil,place=nil) super(opt,build,place) @zipfile=@opt.fno.gsub(/(?:\~\S{2,3})?(\.ss[tm])$/,'\1') - @ans=SiSU_Response::Response.new - if @opt.cmd=~/[MVv]/ - SiSU_Screen::Ansi.new(@opt.cmd,'Assemble source for sisu document',"#{@opt.fns} -> file://#{@file.output_path.sisupod.dir}/#{@zipfile}.txz").warn + unless @opt.cmd =~/q/ + pthinfo="#{@file.output_path.sisupod.dir}/#{@zipfile}.txz" + @opt.cmd=~/[MVv]/ \ + ? SiSU_Screen::Ansi.new(@opt.cmd,'Assemble source for sisu document',"#{@opt.fns} -> file://#{pthinfo}").cyan_hi_blue + : SiSU_Screen::Ansi.new(@opt.cmd,'Assemble source for sisu document',pthinfo).cyan_title_hi end end def sisupod_tar_xz -- cgit v1.2.3