aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-03-08 20:55:21 -0500
committerRalph Amissah <ralph@amissah.com>2013-03-08 20:55:21 -0500
commitbb9f9d8e19d53a21f9154a2dad3c6ea46f6ff547 (patch)
tree63827d1bfc6feb186f9df1053e223a86027b94c6
parentdebian/changelog (4.0.11-1) (diff)
parentv4: version & changelog, dates touched (diff)
Merge tag 'sisu_4.0.12' into debian/sid
SiSU 4.0.12
-rw-r--r--bin/sisu9
-rw-r--r--data/doc/sisu/CHANGELOG_v416
-rw-r--r--data/sisu/v4/v/version.yml6
-rw-r--r--lib/sisu/v4/hub.rb92
-rw-r--r--lib/sisu/v4/manifest.rb2
-rw-r--r--lib/sisu/v4/options.rb30
-rw-r--r--lib/sisu/v4/share_src.rb4
-rw-r--r--lib/sisu/v4/sysenv.rb18
8 files changed, 106 insertions, 71 deletions
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 15cbe459..7705161b 100644
--- a/data/doc/sisu/CHANGELOG_v4
+++ b/data/doc/sisu/CHANGELOG_v4
@@ -21,6 +21,22 @@ v2 branch is removed; it is available in sisu =< 3.3.2
%% Reverse Chronological:
+%% 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
+ sisu_4.0.12.orig.tar.xz
+ sisu_4.0.12-1.dsc
+
+* v4: share_src, sisu source, permissions, make world readable when shared
+
+* v4: manifest, sysenv, manifests sisupod relative link for output_by language
+
+* 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/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml
index c19a30f5..15092f0e 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/5
+:date: "2013-03-08"
:project: SiSU
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/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/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
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]/
diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb
index f3191be1..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)
@@ -4928,7 +4924,7 @@ WOK
if output_dir_structure.dump_or_redirect?
'.'
elsif output_dir_structure.by_language_code?
- "../../#{@ft}/#{@md.opt.lng}"
+ "../../#{@ft}"
else
"../#{@ft}"
end