From d172907e2c7ad3a8cebdf835447cb3f9a045aee3 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 7 Mar 2013 22:50:48 -0500 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 15cbe459..f43eaaba 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.12.orig.tar.xz (2013-03-07:09/4) +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 +http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.12.orig.tar.xz + sisu_4.0.12.orig.tar.xz + sisu_4.0.12-1.dsc + %% 4.0.11.orig.tar.xz (2013-03-06:09/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.11 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.11-1 diff --git a/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml index c19a30f5..0ec682d2 100644 --- a/data/sisu/v4/v/version.yml +++ b/data/sisu/v4/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 4.0.11 -:date_stamp: 2013w09/3 -:date: "2013-03-06" +:version: 4.0.12 +:date_stamp: 2013w09/4 +:date: "2013-03-07" :project: SiSU -- cgit v1.2.3 From c6d43f001f7749f33c207d261e5ce7515f98d0de Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 7 Mar 2013 22:53:11 -0500 Subject: v4: share_src, sisu source, permissions, make world readable when shared --- data/doc/sisu/CHANGELOG_v4 | 2 ++ lib/sisu/v4/share_src.rb | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index f43eaaba..2ef62c1d 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.12.orig.tar.xz sisu_4.0.12.orig.tar.xz sisu_4.0.12-1.dsc +* v4: share_src, sisu source, permissions, make world readable when shared + %% 4.0.11.orig.tar.xz (2013-03-06:09/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.11 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.11-1 diff --git a/lib/sisu/v4/share_src.rb b/lib/sisu/v4/share_src.rb index b767de0c..725ded35 100644 --- a/lib/sisu/v4/share_src.rb +++ b/lib/sisu/v4/share_src.rb @@ -82,6 +82,10 @@ module SiSU_Markup v=(@opt.cmd =~/M/) ? 'v' : '' system(%{ rsync -a#{v} #{@path_pod[:fnb]} #{@file.output_path.sisupod.dir} + 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 - }) else SiSU_Screen::Ansi.new('',"#{@opt.fno} not available").blue_tab if @opt.cmd=~/[MVv]/ -- cgit v1.2.3 From 5ca9a5a24e3b9b90339770ad85e9cbaa539f0957 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 7 Mar 2013 22:55:02 -0500 Subject: v4: manifest, sysenv, manifests sisupod relative link for output_by language --- data/doc/sisu/CHANGELOG_v4 | 2 ++ lib/sisu/v4/manifest.rb | 2 +- lib/sisu/v4/sysenv.rb | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 2ef62c1d..e60d12bc 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.12.orig.tar.xz * v4: share_src, sisu source, permissions, make world readable when shared +* v4: manifest, sysenv, manifests sisupod relative link for output_by language + %% 4.0.11.orig.tar.xz (2013-03-06:09/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.11 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.11-1 diff --git a/lib/sisu/v4/manifest.rb b/lib/sisu/v4/manifest.rb index d7c4d33a..cb34a3d3 100644 --- a/lib/sisu/v4/manifest.rb +++ b/lib/sisu/v4/manifest.rb @@ -497,7 +497,7 @@ WOK end if FileTest.file?(@f.place_file.sisupod.dir)==true pth=@f.output_path.sisupod.dir - rel=@f.output_path.sisupod.ab_pod + rel=@f.output_path.sisupod.rel_sm url=@f.output_path.sisupod.url id,file='SiSU doc (tar.xz)',@f.base_filename.sisupod summarize_sources(id,file,pth,rel,url) diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index f3191be1..581eb0d5 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -4928,7 +4928,7 @@ WOK if output_dir_structure.dump_or_redirect? '.' elsif output_dir_structure.by_language_code? - "../../#{@ft}/#{@md.opt.lng}" + "../../#{@ft}" else "../#{@ft}" end -- cgit v1.2.3 From 2f0fb40542396581325e1065e25ad31b8daee49e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 8 Mar 2013 20:05:40 -0500 Subject: v4: bin/sisu, process remote sisu markup file or sisupod, where url provided --- bin/sisu | 9 +++++++++ data/doc/sisu/CHANGELOG_v4 | 2 ++ 2 files changed, 11 insertions(+) diff --git a/bin/sisu b/bin/sisu index daa2a48d..ee4e1369 100644 --- a/bin/sisu +++ b/bin/sisu @@ -136,6 +136,15 @@ WOK SiSU::HubMaster.new(argv_sub) Dir.chdir(SiSU_called_from_directory) system("cd #{SiSU_called_from_directory}") + elsif markup_dir =~/https?:/ + markup_file.each do |mf| + (FileTest.file?(mf)) \ + ? (puts 'requested remote file already exists in current directory ' + Dir.pwd + ' using ' + mf) + : (system("wget #{markup_dir}/#{mf}")) + end + $sisu_document_markup_directory_base_fixed_path=Dir.pwd.gsub(/\/(?:#{lng_lst_rgx})$/,'') + argv_sub=argv_sub_mods + markup_file + SiSU::HubMaster.new(argv_sub) else p "Error directory specified #{markup_dir} not found" end end diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index e60d12bc..7f519f8f 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.12.orig.tar.xz * v4: manifest, sysenv, manifests sisupod relative link for output_by language +* v4: bin/sisu, process remote sisu markup file or sisupod, where url provided + %% 4.0.11.orig.tar.xz (2013-03-06:09/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.11 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.11-1 -- cgit v1.2.3 From 5d7e44a5b73caf2a835bef9c15020134cae34453 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 8 Mar 2013 20:18:52 -0500 Subject: v4: hub, operations, report on absent markup file, if needed by requested action --- data/doc/sisu/CHANGELOG_v4 | 3 ++ lib/sisu/v4/hub.rb | 92 +++++++++++++++++++++++++--------------------- lib/sisu/v4/options.rb | 30 ++++++++------- 3 files changed, 69 insertions(+), 56 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 7f519f8f..0ee9ec7f 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -34,6 +34,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.12.orig.tar.xz * v4: bin/sisu, process remote sisu markup file or sisupod, where url provided +* v4: hub, operations, report if no markup file provided, where required by + requested action + %% 4.0.11.orig.tar.xz (2013-03-06:09/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.11 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.11-1 diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb index e02fa940..dee13bc1 100644 --- a/lib/sisu/v4/hub.rb +++ b/lib/sisu/v4/hub.rb @@ -256,7 +256,7 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on attr_accessor :op def initialize(opt) @opt=opt - @@env=SiSU_Env::InfoEnv.new + @@env=@env=SiSU_Env::InfoEnv.new @msg,@msgs='',nil @tell=lambda { SiSU_Screen::Ansi.new(@opt.cmd,@msg,"#{@msgs.inspect if @msgs}") } end @@ -343,9 +343,7 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on end if @opt.act[:pdf][:set]==:on \ or @opt.act[:pdf_p][:set]==:on \ - or @opt.act[:pdf_l][:set]==:on - #% --pdf-l - #% --pdf, -p latex/ texpdf + or @opt.act[:pdf_l][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf require_relative 'texpdf' # -p texpdf.rb SiSU_TeX::Source.new(@opt).read end @@ -640,56 +638,66 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on 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) 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 - elsif @opt.act[:dal][:set]==:on \ - or @opt.act[:manpage][:set]==:on \ - or @opt.act[:texinfo][:set]==:on \ - or @opt.act[:txt][:set]==:on \ - or @opt.act[:html][:set]==:on \ - or @opt.act[:html_scroll][:set]==:on \ - or @opt.act[:html_seg][:set]==:on \ - or @opt.act[:concordance][:set]==:on \ - or @opt.act[:xhtml][:set]==:on \ - or @opt.act[:epub][:set]==:on \ - or @opt.act[:odt][:set]==:on \ - or @opt.act[:xml_sax][:set]==:on \ - or @opt.act[:xml_dom][:set]==:on \ - or @opt.act[:pdf][:set]==:on \ - or @opt.act[:pdf_p][:set]==:on \ - or @opt.act[:pdf_l][:set]==:on \ - or @opt.act[:psql][:set]==:on \ - or @opt.act[:sqlite][:set]==:on \ - or @opt.act[:sqlite_discrete][:set]==:on \ - or @opt.act[:share_source][:set]==:on \ - or @opt.act[:sisupod][:set]==:on \ - or @opt.act[:qrcode][:set]==:on \ - or @opt.act[:hash_digests][:set]==:on \ - or @opt.act[:manifest][:set]==:on \ - or @opt.act[:rsync][:set]==:on \ - or @opt.act[:scp][:set]==:on \ - or @opt.act[:webrick][:set]==:on \ - or @opt.act[:zap][:set]==:on \ + elsif action_on_file_ == :true \ or ( @opt.cmd =~/^-/ \ and @opt.cmd =~/([abCcDdeFGgHhIjikLMmNnoPpQqRrSsTtUuVvWwXxYyZ_0-9])/ \ and @opt.mod.inspect !~/--(?:sitemaps|query|identify)/ \ - or @opt.mod.inspect =~/--(?:(?:sq)?lite|pg(?:sql)?)/ \ + or @opt.mod.inspect =~/--(?:(?:sq)?lite|pg(?:sql)?)/ ) do_initialization - do_loops - @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.act[:maintenance][:set] ==:on + if action_on_file_ == :true \ + and @opt.files.length > 0 + do_loops + @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.act[:maintenance][:set] ==:on + end end + elsif action_on_file_ == :true \ + and @opt.files.length == 0 + STDERR.puts %{requested action requires valid sisu markup file filename (.sst .ssm) or wildcard (that includes a valid filame)} + puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:fuchsia) if @opt.cmd =~/[MV]/ end elsif @opt.mod.inspect =~/--query/ require_relative 'sst_identify_markup' # sst_identify_markup.rb diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb index 724fd9a9..0608df4e 100644 --- a/lib/sisu/v4/options.rb +++ b/lib/sisu/v4/options.rb @@ -1029,36 +1029,38 @@ module SiSU_Commandline @lng_base end def fno - @fno=fns[/(.+?(?:sst|ssm))(?:\.sst)?/,1] + @fno=(fns.nil? || fns.empty?) \ + ? '' \ + : (fns[/(.+?(?:sst|ssm))(?:\.sst)?/,1]) end def fng - @fng=fno.gsub(/(?:~(?:#{Px[:lng_lst_rgx]}))?(\.ss[tm])$/,'\1') + @fng=(fno.nil? || fno.empty?) \ + ? '' \ + : (fno.gsub(/(?:~(?:#{Px[:lng_lst_rgx]}))?(\.ss[tm])$/,'\1')) end def fns @fns end def fnl - x=@fns.gsub(/(\S+?)((?:\.ssm)?\.sst)/,"\\1.#{lng}\\2") + @fns.gsub(/(\S+?)((?:\.ssm)?\.sst)/,"\\1.#{lng}\\2") end def what @what end def fnb - unless fns.empty? - fns[/(.+?)\.(?:(?:-|ssm\.)?sst|ssm)$/,1] - end + (fns.nil? || fns.empty?) \ + ? '' \ + : (fns[/(.+?)\.(?:(?:-|ssm\.)?sst|ssm)$/,1]) end def fnc - @fnc=if @fns =~/\.(?:ssm\.sst|ssm)$/ - fnb + '.ssm.sst' - else @fns - end + @fnc=(@fns =~/\.(?:ssm\.sst|ssm)$/) \ + ? fnb + '.ssm.sst' + : @fns end def fncb - @fncb=if @fns =~/(?:\~\S{2,3})?\.(?:ssm\.sst|ssm)$/ - fnb + '.ssm.sst' - else @fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1') - end + @fncb=(@fns =~/(?:\~\S{2,3})?\.(?:ssm\.sst|ssm)$/) \ + ? fnb + '.ssm.sst' + : @fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1') end end end -- cgit v1.2.3 From 7c083c2adb09f2519fcc177753515930d9070486 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 8 Mar 2013 20:22:47 -0500 Subject: v4: sysenv, cosmetic, minor --- lib/sisu/v4/sysenv.rb | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index 581eb0d5..5647efd7 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -1838,21 +1838,17 @@ WOK self end def read_source_file_array(fns) - fns_array=unless fns =~/\.ssm.sst$/ - IO.readlines(fns, mode: 'r:utf-8', cr_newline: true) - else - IO.readlines("#{processing_path.composite_file}/#{fns}", mode: 'r:utf-8', cr_newline: true) - end + fns_array=(fns !~/\.ssm.sst$/) \ + ? (IO.readlines(fns, mode: 'r:utf-8', cr_newline: true)) + : (IO.readlines("#{processing_path.composite_file}/#{fns}", mode: 'r:utf-8', cr_newline: true)) end def read_source_file(fns) read_source_file_array(fns) end def read_source_file_string(fns) - fns_str=unless fns =~/\.ssm.sst$/ - IO.read(fns, mode: 'r:utf-8', cr_newline: true) - else - IO.read("#{processing_path.composite_file}/#{fns}", mode: 'r:utf-8', cr_newline: true) - end + fns_str=(fns !~/\.ssm.sst$/) \ + ? (IO.read(fns, mode: 'r:utf-8', cr_newline: true)) + : (IO.read("#{processing_path.composite_file}/#{fns}", mode: 'r:utf-8', cr_newline: true)) end def source_file_processing_array(fns) sf=read_source_file_string(fns).split(/\s*\n\s*\n/m) -- cgit v1.2.3 From 5fc0b66996f52ee97c4442381f6e95066686ab4c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 8 Mar 2013 20:54:09 -0500 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 0ee9ec7f..7705161b 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.12.orig.tar.xz (2013-03-07:09/4) +%% 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 http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.12.orig.tar.xz diff --git a/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml index 0ec682d2..15092f0e 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/4 -:date: "2013-03-07" +:date_stamp: 2013w09/5 +:date: "2013-03-08" :project: SiSU -- cgit v1.2.3