From 220c63e5ac25d2539ffb11b5348bad339a268cb5 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 21 Sep 2013 00:02:15 -0400 Subject: v4 v5: minor cleaning --- data/doc/sisu/CHANGELOG_v4 | 2 ++ data/doc/sisu/CHANGELOG_v5 | 2 ++ lib/sisu/v4/hub.rb | 6 +++--- lib/sisu/v4/sysenv.rb | 24 +++++++----------------- lib/sisu/v4/utils.rb | 1 + lib/sisu/v5/hub.rb | 6 +++--- lib/sisu/v5/sysenv.rb | 24 +++++++----------------- lib/sisu/v5/utils.rb | 1 + 8 files changed, 26 insertions(+), 40 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 2dff6982..01053457 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.2.4.orig.tar.xz sisu_4.2.4.orig.tar.xz sisu_4.2.4-1.dsc +* minor cleaning + %% 4.2.3.orig.tar.xz (2013-09-07:35/6) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.2.3 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.2.3-1 diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 2582acf0..27f4d405 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -30,6 +30,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.17.orig.tar.xz sisu_5.0.17.orig.tar.xz sisu_5.0.17-1.dsc +* minor cleaning + %% 5.0.16.orig.tar.xz (2013-09-07:35/6) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.16 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.16-1 diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb index 5f80e795..ebe9ccf4 100644 --- a/lib/sisu/v4/hub.rb +++ b/lib/sisu/v4/hub.rb @@ -75,9 +75,9 @@ module SiSU class HubMaster def initialize(argv) pwd_the=Dir.pwd - begin #% select what to do - opt=SiSU_Commandline::Options.new(argv) - SiSU::Processing.new(opt).actions + begin #% select what to do (set options & start processing (files selected if any)) + opt=SiSU_Commandline::Options.new(argv) # command line selection of what to do, files & operations set + SiSU::Processing.new(opt).actions # do it rescue cmd=(opt ? opt.cmd : '') SiSU_Screen::Ansi.new(cmd,$!,$@).rescue do diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index cfbbc0c1..4db204d8 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -281,7 +281,7 @@ module SiSU_Env @@tx ||=SiSU_Viz::TeX.new end def rc_path_options - @rc_path=[ + [ "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_version_dir}", "#{$sisu_document_markup_directory_base_fixed_path}/.sisu", "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_version_dir}", @@ -297,14 +297,12 @@ module SiSU_Env S_CONF[:header_make] end def makefile - #if @markup_dir_changed_ - rc_path_options.each do |v| - if FileTest.exist?("#{v}/#{makefile_name}") - @sisu_make_path=v - break - end + rc_path_options.each do |v| + if FileTest.exist?("#{v}/#{makefile_name}") + @sisu_make_path=v + break end - #end + end @sisu_make_file_path=@sisu_make_path \ ? "#{@sisu_make_path}/#{makefile_name}" : nil @@ -552,7 +550,6 @@ module SiSU_Env n =n + '.' + @fn[:t] x << { f: "#{@fn[:m]}.#{@fn[:t]}", l: lng_base, n: n } end - #x << { f: "#{@fns}", l: lng_base } langs.each do |l| lng=SiSU_Env::StandardiseLanguage.new(l) if FileTest.file?("#{@fn[:m]}~#{lng.code}.#{@fn[:t]}") @@ -617,16 +614,10 @@ module SiSU_Env @m=@m.uniq end def filename(code,name,suffix) - #d=SiSU_Env::InfoEnv.new(@fns) - #fnl=d.i18n.lang_filename(code) "#{name}#{suffix}" - #if code - # "#{fnl[:pre]}#{name}#{fnl[:mid]}#{suffix}#{fnl[:post]}" - #else "#{name}#{suffix}" - #end end def lang(code) - @fn={ + { html: filename(code,'','.html'), book_index: filename(code,'book_index','.html'), concordance: filename(code,'concordance','.html'), @@ -671,7 +662,6 @@ module SiSU_Env book_idx_epub: filename(code,'book_index','.xhtml'), epub_concord: filename(code,'concordance','.xhtml'), } - @fn end end class SystemCall diff --git a/lib/sisu/v4/utils.rb b/lib/sisu/v4/utils.rb index b120cc01..d18e2180 100644 --- a/lib/sisu/v4/utils.rb +++ b/lib/sisu/v4/utils.rb @@ -151,6 +151,7 @@ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark({ m: %{ }}) if t_o=~/^```/m SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark(%{ code: #{@@flag['code']}, open --> "#{t_o}" }) \ if t_o=~/^```/m +SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark("open -->") SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark("open -->",:green) SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:green,"open -->") SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark("open -->") diff --git a/lib/sisu/v5/hub.rb b/lib/sisu/v5/hub.rb index 08ad7b58..fcbaa67a 100644 --- a/lib/sisu/v5/hub.rb +++ b/lib/sisu/v5/hub.rb @@ -75,9 +75,9 @@ module SiSU class HubMaster def initialize(argv) pwd_the=Dir.pwd - begin #% select what to do - opt=SiSU_Commandline::Options.new(argv) - SiSU::Processing.new(opt).actions + begin #% select what to do (set options & start processing (files selected if any)) + opt=SiSU_Commandline::Options.new(argv) # command line selection of what to do, files & operations set + SiSU::Processing.new(opt).actions # do it rescue cmd=(opt ? opt.cmd : '') SiSU_Screen::Ansi.new(cmd,$!,$@).rescue do diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index 3092532b..62ef451f 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -281,7 +281,7 @@ module SiSU_Env @@tx ||=SiSU_Viz::TeX.new end def rc_path_options - @rc_path=[ + [ "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_version_dir}", "#{$sisu_document_markup_directory_base_fixed_path}/.sisu", "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_version_dir}", @@ -297,14 +297,12 @@ module SiSU_Env S_CONF[:header_make] end def makefile - #if @markup_dir_changed_ - rc_path_options.each do |v| - if FileTest.exist?("#{v}/#{makefile_name}") - @sisu_make_path=v - break - end + rc_path_options.each do |v| + if FileTest.exist?("#{v}/#{makefile_name}") + @sisu_make_path=v + break end - #end + end @sisu_make_file_path=@sisu_make_path \ ? "#{@sisu_make_path}/#{makefile_name}" : nil @@ -552,7 +550,6 @@ module SiSU_Env n =n + '.' + @fn[:t] x << { f: "#{@fn[:m]}.#{@fn[:t]}", l: lng_base, n: n } end - #x << { f: "#{@fns}", l: lng_base } langs.each do |l| lng=SiSU_Env::StandardiseLanguage.new(l) if FileTest.file?("#{@fn[:m]}~#{lng.code}.#{@fn[:t]}") @@ -617,16 +614,10 @@ module SiSU_Env @m=@m.uniq end def filename(code,name,suffix) - #d=SiSU_Env::InfoEnv.new(@fns) - #fnl=d.i18n.lang_filename(code) "#{name}#{suffix}" - #if code - # "#{fnl[:pre]}#{name}#{fnl[:mid]}#{suffix}#{fnl[:post]}" - #else "#{name}#{suffix}" - #end end def lang(code) - @fn={ + { html: filename(code,'','.html'), book_index: filename(code,'book_index','.html'), concordance: filename(code,'concordance','.html'), @@ -671,7 +662,6 @@ module SiSU_Env book_idx_epub: filename(code,'book_index','.xhtml'), epub_concord: filename(code,'concordance','.xhtml'), } - @fn end end class SystemCall diff --git a/lib/sisu/v5/utils.rb b/lib/sisu/v5/utils.rb index 8ebc3647..52ca22d0 100644 --- a/lib/sisu/v5/utils.rb +++ b/lib/sisu/v5/utils.rb @@ -151,6 +151,7 @@ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark({ m: %{ }}) if t_o=~/^```/m SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark(%{ code: #{@@flag['code']}, open --> "#{t_o}" }) \ if t_o=~/^```/m +SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark("open -->") SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark("open -->",:green) SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:green,"open -->") SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark("open -->") -- cgit v1.2.3