aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-10-19 20:29:36 +0100
committerRalph Amissah <ralph@amissah.com>2007-10-19 20:29:36 +0100
commit70a56ab6c2c6bcc668f5c4f3667361f7d72d1809 (patch)
treeaa4b2229fdf2b9078d3f939372447c9892fcbc47
parentMerge branch 'upstream' into debian/sid (diff)
parentmostly paths for shared markup source (txt and pod), also... (diff)
Merge branch 'upstream' into debian/sid
-rw-r--r--CHANGELOG45
-rw-r--r--lib/sisu/v0/dal.rb16
-rw-r--r--lib/sisu/v0/embedded.rb45
-rw-r--r--lib/sisu/v0/help.rb2
-rw-r--r--lib/sisu/v0/manifest.rb26
-rw-r--r--lib/sisu/v0/options.rb9
-rw-r--r--lib/sisu/v0/sisupod_make.rb6
-rw-r--r--lib/sisu/v0/sysenv.rb55
-rw-r--r--lib/sisu/v0/texpdf_format.rb6
-rw-r--r--lib/sisu/v0/urls.rb12
10 files changed, 112 insertions, 110 deletions
diff --git a/CHANGELOG b/CHANGELOG
index aa90dcdf..8cbe7540 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -15,17 +15,21 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.62.0.orig.tar.gz
sisu_0.62.0-1.dsc
sisu_0.62.0-1.diff.gz
- [NOTE/WARNING: some directories moved, as overwrites are not automatic, will
- need manual adjustment of output locations (moving of a couple of
- directories, and possible creation of another) for images and shared source
- markup if any, see notes below (on directory shunting)]
+ [NOTE/WARNING: some directories moved, for existing sites will need manual
+ adjustment of output locations, (moving of a couple of image directories, and
+ if sharing text source the creation of shared source directories src and
+ pod), see notes below (on directory shunting)]
* directory shunting ... [some resulting re-setting/configuration up
necessary]
- * markup source directory (src), all shared markup source placed in a
- common directory (instead of being in output files generated
- sub-directory) [NOTE: New src directory for shared markup source output
- required at [output path]/src ]
+
+ * markup source and source pod directory (src and pod), all shared markup
+ source placed in common directories src for text source, and pod for
+ binary (instead of being in output files generated sub-directory) [NOTE:
+ New src and new pod directory for shared markup source output required at
+ [output path]/src and [output path]/pod ] [if nothing else makes repo of
+ online submissions easier]
+
* images, output images used by html moved, now in image directory instead
of image_local; system images moved from image to image_sys (to make sure
they are always available, i.e. not written over (by subsequent images
@@ -34,6 +38,11 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.62.0.orig.tar.gz
path]/_sisu/image_local is moved to [output path]/_sisu/image (and old
_sisu/image is now _sisu/image_sys) ]
+ * pwd directory stub name exception, regexs in sysenv and elsewhere, when
+ determining the pwd stub, take stub from parent of a directory named src
+ (todo with directory shunting, and placing of output source markup files
+ where shared in a directory named src)
+
* remote, (put, get) placed in single file (consider separating later)
* conf, remote, work on rsync building of basic remote site structure
@@ -60,21 +69,25 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.62.0.orig.tar.gz
* conditionals rearranged, (scope for breakage)
- * debian/control, added depends on rsync, used extensively (now also
- internally)
-
- * fictionbook, (-f) first pass at output, develop or drop?
- fictionbook is interesting, links:
+ * fictionbook, (-f) first pass at output, look into further and develop or
+ drop? fictionbook is interesting, links:
http://www.fictionbook.org/index.php/Eng:FictionBook
http://www.fictionbook.org/index.php/Eng:FictionBook_description
http://en.wikipedia.org/wiki/FictionBook
- * NOTE: there appears to be a bug with String.strip in ruby 1.9.0 (2007-09-10
- patchlevel 0) [i486-linux] ? [behaviour (current in Debian Sid) noted in
- 2007-09-18:38/2, confirmed again in irb1.9 today] (else is with my setup!)
+ * debian/control added depends on rsync, used extensively (now also
+ internally)
+
+ NOTE: fixed today in Debian Sid, bug with String.strip in ruby 1.9.0
+ (2007-09-10 patchlevel 0) [i486-linux] ? [behaviour noted in
+ 2007-09-18:38/2, existed till 2007-10-18:42/5]:
' apples, oranges'.strip #==> "apples," # expected "apples, oranges"
' apples, oranges '.strip #does as expected
+ ruby 1.9, for present time retain restriction on running and testing sisu
+ with ruby 1.9, there are still issues with 1.9 (at the C stack level, and
+ probably some in sisu compatibility/updating as well)
+
%% sisu_0.61.0.orig.tar.gz (2007-10-12:41/5)
http://www.jus.uio.no/sisu/pkg/src/sisu_0.61.0.orig.tar.gz
3a2329726d49945247b1f4340482c895 1474630 sisu_0.61.0.orig.tar.gz
diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb
index 0b445832..47d3750d 100644
--- a/lib/sisu/v0/dal.rb
+++ b/lib/sisu/v0/dal.rb
@@ -364,15 +364,14 @@ module SiSU_DAL
if para !~/^%+\s/ and
para =~/\{(?:~\^\s+)?(.+?)\s\[(?:\d(?:[sS]*))\]\}(?:\.\.\/\S+?\/|\S+?\.ss[tm]\b)/
txt,cmd,source,url_dir,note,manifest=nil,nil,nil,nil,nil,nil
- url_and_stub=SiSU_Env::Info_env.new.url
- if defined? url_and_stub.remote
- @output_url="#{url_and_stub.remote}"
+ @u=SiSU_Env::Info_env.new.url
+ if defined? @u.remote
if para =~/(.+?)\{(.+?)\s\[(\d[sS]*)\]\}((\S+?)\.ss[tm]\b)(.*)/m
pre,txt,cmd,source,url_dir,note="#{$1.strip} ",$2,$3,$4,$5,$6
elsif para =~/\{(.+?)\s\[(\d[sS]*)\]\}((\S+?)\.ss[tm]\b)(.*)/
pre,txt,cmd,source,url_dir,note='',$1,$2,$3,$4,$5
end
- manifest="#{pre}{#{txt} }#@output_url/#{url_dir}/toc.html#{note}\n\n"
+ manifest="#{pre}{#{txt} }#{@u.remote}/#{url_dir}/toc.html#{note}\n\n"
else
puts "error, does currently support relative paths (reltive paths were removed, as had problems for citation, and was not suited to all output types should possibly reconsider) #{__FILE__} #{__LINE__}"
if para =~/\{(?:~\^\s+)?(.+?)\s\[(\d[sS]*)\]\}\.\.\/(\S+?)\/(\s+~\{.+?\}~)?/
@@ -402,20 +401,23 @@ module SiSU_DAL
end
if describe
tuned_file_tmp << if @output_url #to double space <:br> at beginning of entry
- "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#@output_url/#{url_dir}/#{o_f}" if describe
+ "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#{@u.remote}/#{url_dir}/#{o_f}"
else "&nbsp;&nbsp;&nbsp;&nbsp; { #{describe} }../#{url_dir}/#{o_f}"
end
end
end
output_filetypes[:src].each do |o_f|
- describe = case o_f
+ describe=case o_f
when /#{source}\.zip/; ' markup source (zipped) pod'
when /#{source}/; ' markup source text'
else nil
end
if describe
tuned_file_tmp << if @output_url
- "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#@output_url/src/#{o_f}" if describe
+ x=if describe =~/\.zip/
+ "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#{@u.src_pod}/#{o_f}"
+ else "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#{@u.src_txt}/#{o_f}"
+ end
else "&nbsp;&nbsp;&nbsp;&nbsp; { #{describe} }../#{url_dir}/#{o_f}"
end
end
diff --git a/lib/sisu/v0/embedded.rb b/lib/sisu/v0/embedded.rb
index b5d33ac2..f03f0aab 100644
--- a/lib/sisu/v0/embedded.rb
+++ b/lib/sisu/v0/embedded.rb
@@ -133,48 +133,3 @@ module SiSU_Embedded
end
end
__END__
-def images # alternative may be preferable as source taken from local destination, and not sent remotely unless found there
- src="#{Dir.pwd}/_sisu/image"
- ldest="#{@env.path.webserv}/#{@env.path.stub_pwd}/_sisu/image"
- rdest="#@rhost/#{@env.path.stub_pwd}/_sisu/image"
- if @md.cmd.inspect =~/[vVMR]/ and FileTest.directory?(src)
- File.mkpath(ldest) unless FileTest.directory?(ldest)
- @md.ec[:image].each do |i|
- SiSU_Env::System_call.new("#{src}/#{i}","#{ldest}/.",'q').rsync
- #cp("#{src}/#{i}","#{ldest}/.") #use rysnc
- if @md.cmd.inspect =~/R/ #rsync to remote image directory #ldest used as source, if not in local repo, don't share
- SiSU_Env::System_call.new("#{ldest}/#{i}","#{rdest}/.",'q').rsync
- end
- end
- end
-end
-def audio
- #p @md.ec[:audio]
- src="#{Dir.pwd}/_sisu/mm/audio"
- ldest="#{@env.path.webserv}/#{@env.path.stub_pwd}/_sisu/mm/audio"
- if @md.cmd.inspect =~/[vVMR]/ and FileTest.directory?(src)
- File.mkpath(ldest) unless FileTest.directory?(ldest)
- @md.ec[:audio].each do |i|
- SiSU_Env::System_call.new("#{src}/#{i}","#{ldest}/.",'q').rsync
- #cp("#{src}/#{i}","#{ldest}/.") #use rysnc
- if @md.cmd.inspect =~/R/
- #rsync to remote audio directory
- end
- end
- end
-end
-def multimedia
- #p @md.ec[:multimedia]
- src="#{Dir.pwd}/_sisu/mm/video"
- ldest="#{@env.path.webserv}/#{@env.path.stub_pwd}/_sisu/mm/video"
- if @md.cmd.inspect =~/[vVMR]/ and FileTest.directory?(src)
- File.mkpath(ldest) unless FileTest.directory?(ldest)
- @md.ec[:multimedia].each do |i|
- SiSU_Env::System_call.new("#{src}/#{i}","#{ldest}/.",'q').rsync
- #cp("#{src}/#{i}","#{ldest}/.") #use rysnc
- if @md.cmd.inspect =~/R/
- #rsync to remote multimedia directory
- end
- end
- end
-end
diff --git a/lib/sisu/v0/help.rb b/lib/sisu/v0/help.rb
index b5077fa1..84a7391d 100644
--- a/lib/sisu/v0/help.rb
+++ b/lib/sisu/v0/help.rb
@@ -67,7 +67,7 @@ module SiSU_Help
fns='help_example_dummy_file_name.sst'
@env=SiSU_Env::Info_env.new(fns)
@db=SiSU_Env::Info_db.new
- m=/.+\/(\S+)/m
+ m=/.+\/(?:src\/)?(\S+)/im # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@output_stub=Dir.pwd[m,1]
end
def help_request
diff --git a/lib/sisu/v0/manifest.rb b/lib/sisu/v0/manifest.rb
index e0617fec..891d6f41 100644
--- a/lib/sisu/v0/manifest.rb
+++ b/lib/sisu/v0/manifest.rb
@@ -91,11 +91,8 @@ module SiSU_Manifest
@md,@fns=md
@env=SiSU_Env::Info_env.new(@md.fns)
@fnb=@md.fnb
- out=@env.path.output
- @base_url="#{@env.url.root}/#@fnb"
- @base_url_src="#{@env.url.root}/src"
- @base_path="#{out}/#@fnb"
- @base_path_src="#{out}/src"
+ @base_url,@base_url_src,@base_url_pod="#{@env.url.root}/#@fnb","#{@env.url.src_txt}","#{@env.url.src_pod}"
+ @base_path,@base_path_src,@base_path_pod="#{@env.path.output}/#@fnb","#{@env.path.output_src}","#{@env.path.output_pod}"
@@dg ||=SiSU_Env::Info_env.new.digest.type
@dg=@@dg
l=SiSU_Env::Standardise_language.new.file_to_language(@md.fns)
@@ -129,6 +126,19 @@ module SiSU_Manifest
@manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="../src/#{file}">#{id}</a></p></th><td class="right"><p class="tiny"><a href="../src/#{file}">#{file}</a> &nbsp;&nbsp;#{dgst[1]}<br />#{@url_brace.xml_open}<a href="#@base_url_src/#{file}">#@base_url_src/#{file}</a>#{@url_brace.xml_close}</p></td><td class="right"><p class="right">#{kb}</p>
</td></tr>\n} if kb and kb =~/\d+/
end
+ def summarize_pod(id,file)
+ sys=SiSU_Env::System_call.new
+ dgst =if @dg =~/^sha(?:2|256)$/; sys.sha256("#{@base_path_pod}/#{file}")
+ else sys.md5("#{@base_path_pod}/#{file}")
+ end
+ tell=SiSU_Screen::Ansi.new(@md.cmd,"#{dgst[1]} #{file}")
+ tell.warn if @md.cmd =~/[vVM]/
+ size=(File.size("#{@base_path_pod}/#{file}")/1024.00).to_s
+ kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]
+ @manifest[:txt] << "#{file} #{id} #{kb}\n"
+ @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="../pod/#{file}">#{id}</a></p></th><td class="right"><p class="tiny"><a href="../pod/#{file}">#{file}</a> &nbsp;&nbsp;#{dgst[1]}<br />#{@url_brace.xml_open}<a href="#@base_url_pod/#{file}">#@base_url_pod/#{file}</a>#{@url_brace.xml_close}</p></td><td class="right"><p class="right">#{kb}</p>
+ </td></tr>\n} if kb and kb =~/\d+/
+ end
def languages(id,file)
flv=@env.published_manifests?(@base_path)
@manifest[:html] << %{<tr><th class="left"><div id="horizontal_links"><ul id="horizontal">\n}
@@ -246,14 +256,14 @@ module SiSU_Manifest
summarize_source(id,file)
end
end
- if FileTest.file?("#@base_path_src/#{@md.fn[:sisupod]}")==true
+ if FileTest.file?("#@base_path_pod/#{@md.fn[:sisupod]}")==true
id,file='SiSU doc (zip)',@md.fn[:sisupod]
- summarize_source(id,file)
+ summarize_pod(id,file)
end
if FileTest.file?("#@base_path/#{@md.fnb}")==true \
and @md.fnb =~/\.kdi$/
id,file='Kdissert (.kdi source)',@md.fnb
- summarize_source(id,file)
+ summarize_pod(id,file)
end
end
def metadata_tests
diff --git a/lib/sisu/v0/options.rb b/lib/sisu/v0/options.rb
index 4c8afb58..273d4d4a 100644
--- a/lib/sisu/v0/options.rb
+++ b/lib/sisu/v0/options.rb
@@ -94,14 +94,7 @@ module SiSU_commandline
end
s << " #{y}" unless y.empty?
end
-if RUBY_VERSION > '1.9'
-#debug strip
-p 'problem with ruby 1.9.0 (2007-09-10 patchlevel 0) [i486-linux] on Debian Sid'
-p 'p content.class == String == String == ' + s.class.to_s
-p 'p s == -mv gpl.fsf.sst == -mv gpl.fsf.sst == ' + s
-p 'p s.strip == -mv gpl.fsf.sst #expected == -mv #i get == ' + s.strip + ' #actual, you get'
-end
- s.strip! # String.strip is broken in ruby 1.9.0 (2007-09-10 patchlevel 0) [i486-linux], 2007-09-18:38/2
+ s.strip!
a=s.split(/\s+/)
a.each do |x|
if x =~/^-[a-z0-5]+/i \
diff --git a/lib/sisu/v0/sisupod_make.rb b/lib/sisu/v0/sisupod_make.rb
index af60cf4e..81645883 100644
--- a/lib/sisu/v0/sisupod_make.rb
+++ b/lib/sisu/v0/sisupod_make.rb
@@ -63,7 +63,7 @@ module SiSU_Doc
require "#{SiSU_lib}/response"
def initialize(opt)
@opt=opt
- m=/.+\/(\S+)/m
+ m=/.+\/(?:src\/)?(\S+)/im # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@date=SiSU_Env::Info_date.new.dt
@env=SiSU_Env::Info_env.new(@opt.fns)
@ver=SiSU_Env::Info_version.new.get_version
@@ -72,7 +72,7 @@ module SiSU_Doc
@v=if @opt.cmd =~/[VM]/; 'v'
else ''
end
- @local_path="#{@env.path.output}/src" #@local_path="#{@env.path.output}/#{@env.fnb}"
+ @local_path="#{@env.path.output_pod}" #@local_path="#{@env.path.output}/#{@env.fnb}"
@zipfile=if @opt.fns =~/\.ssm\.sst$/; @opt.fns.gsub(/(?:\~\S{2,3})?\.ssm\.sst$/,'.ssm')
else @opt.fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1')
end
@@ -83,7 +83,7 @@ module SiSU_Doc
tell=SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (zip)',@opt.fns)
tell.green_hi_blue unless @opt.cmd =~/q/
unless @opt.fns.empty?
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Make sisu document (zip) and place in output directory',"#{@opt.fns} -> file://#{@env.path.output}/src/#{@zipfile}.zip")
+ tell=SiSU_Screen::Ansi.new(@opt.cmd,'Make sisu document (zip) and place in output directory',"#{@opt.fns} -> file://#{@env.path.output_pod}/#{@zipfile}.zip")
tell.warn unless @opt.cmd =~/q/
directories
sisupod_build
diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb
index 5d7dc7d8..7e94d8a3 100644
--- a/lib/sisu/v0/sysenv.rb
+++ b/lib/sisu/v0/sysenv.rb
@@ -96,7 +96,7 @@ module SiSU_Env
etc=Config::CONFIG['sysconfdir'] + '/sisu'
share=Config::CONFIG['datadir'] + '/sisu'
data=Config::CONFIG['datadir'] + '/doc/sisu'
- m=/.+\/(\S+)/m
+ m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@stub_pwd ||=@@pwd[m,1]
prcss_dir='_sisu_processing'
prcss_dir_tmp_root="/tmp/#{prcss_dir}"
@@ -205,7 +205,7 @@ module SiSU_Env
SQLITE_PORT => '**',
}
@@default_dir=DEFAULT_DIR
- m=/.+\/(\S+)/m
+ m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
stub_pwd=@@pwd[m,1]
@@rc_path=["#@@pwd/_sisu","#@@home/.sisu",@@sisu_etc]
@@yamlrc_path=unless stub_pwd =~/^sisupod$/
@@ -610,7 +610,7 @@ module SiSU_Env
def create_pg_db(dbname_stub=nil) #createdb
unless dbname_stub
@pwd ||=Dir.pwd
- m=/.+\/(\S+)/im
+ m=/.+\/(?:src\/)?(\S+)/im # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
dbname_stub=@pwd[m,1]
end
program='createdb'
@@ -803,9 +803,10 @@ module SiSU_Env
@fnb ||=@@fb #clean up this... used primarily for zap which is not passed normal parameters
@fixed_websev_root='' # @home
@pwd=@@pwd||=Dir.pwd
- m=/.+\/(\S+)/m
+ m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@stub_pwd=@@pwd[m,1]
@stub_src=@stub_pwd + '/src'
+ @stub_pod=@stub_pwd + '/pod'
end
def user
@sys.user
@@ -842,6 +843,9 @@ module SiSU_Env
def stub_src
@stub_src
end
+ def stub_pod
+ @stub_pod
+ end
def sisupod
#path.processing
# sisupod
@@ -1210,6 +1214,9 @@ WOK
def stub_src
@stub_src
end
+ def stub_pod
+ @stub_pod
+ end
def etc
defaults[:sisu_etc] #live/dynamic
# @sys.sisu_etc #broken: live/dynamic
@@ -1304,7 +1311,10 @@ WOK
"#{path.webserv}/#@stub_pwd"
end
def output_src #web/webserv output directory... subdirectory into which further subdirectories are made based on file names
- "#{path.webserv}/src"
+ "#{path.output}/src"
+ end
+ def output_pod
+ "#{path.output}/pod"
end
def manpage
"#{path.output}/man"
@@ -1473,7 +1483,7 @@ WOK
end
def root
if defined? @rc['webserv']['url_root'] \
- and @rc['webserv']['url_root'] =~/https?:\/\//
+ and @rc['webserv']['url_root'] =~/https?:\/\//
"#{@rc['webserv']['url_root']}/#@stub_pwd"
elsif defined? @rc['webserv']['url_root'] \
and @rc['webserv']['url_root'] =~/localhost/
@@ -1484,6 +1494,12 @@ WOK
def remote
root
end
+ def src_txt
+ "#{root}/src"
+ end
+ def src_pod
+ "#{root}/pod"
+ end
def webserv_host_base
if defined? @rc['webserv']['host']
case @rc['webserv']['host']
@@ -2155,6 +2171,7 @@ WOK
@env=SiSU_Env::Info_env.new
end
def zap
+p @zap
if @zap !~/\/\//; rm_rf(@zap) if FileTest.directory?(@zap)
else puts 'suspect zap request, ignored'
end
@@ -2285,6 +2302,7 @@ WOK
#remote="#{remote_conn[:name]}/#{@env.path.stub_pwd}/."
local_src=@source_path_src
remote_src="#{remote_conn[:name]}/#{@env.path.stub_src}/."
+ remote_pod="#{remote_conn[:name]}/#{@env.path.stub_pod}/."
src_txt=@opt.fnc
src_pod=@opt.fncb.gsub(/(\.ss[mt])(?:\.sst)?$/,'\1.zip')
if (local_gen =~/\S/ \
@@ -2294,16 +2312,18 @@ WOK
and @@flag_remote==true \
and @opt.cmd !~/U/
System_call.new(local_gen,remote_gen).scp
- if FileTest.file?("#{local_src}/#{src_txt}") \
- or FileTest.file?("#{local_src}/#{src_pod}")
- System_call.new("#{local_src}/#{src_txt} #{local_src}/#{src_pod}",remote_src).scp
+ if FileTest.file?("#{local_src}/#{src_txt}")
+ System_call.new("#{local_src}/#{src_txt}",remote_src).scp
+ elsif FileTest.file?("#{local_pod}/#{src_pod}")
+ System_call.new("#{local_src}/#{src_pod}",remote_pod).scp
end
elsif @opt.cmd =~/U/
puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
puts "#{local_gen} -> #{remote_gen}"
- if FileTest.file?("#{local_src}/#{src_doc}") \
- or FileTest.file?("#{local_src}/#{src_doc}.zip")
+ if FileTest.file?("#{local_src}/#{src_doc}")
puts "#{local_src}/#{src_doc}* -> #{remote_src}"
+ elsif FileTest.file?("#{local_pod}/#{src_doc}.zip")
+ puts "#{local_pod}/#{src_doc}* -> #{remote_pod}"
end
else
puts 'suspect scp request, ignored'
@@ -2319,7 +2339,9 @@ WOK
remote_gen="#{remote_conn[:name]}/#{@env.path.stub_pwd}/."
remote_images="#{remote_conn[:name]}/#{@env.path.stub_pwd}/_sisu/image/."
local_src=@source_path_src
+ local_pod=@source_path_pod
remote_src="#{remote_conn[:name]}/#{@env.path.stub_src}/."
+ remote_pod="#{remote_conn[:name]}/#{@env.path.stub_pod}/."
src_txt=@opt.fnc
src_pod=@opt.fncb.gsub(/(\.ss[mt])(?:\.sst)?$/,'\1.zip')
if (local_gen =~/\S/ \
@@ -2329,13 +2351,14 @@ WOK
and @@flag_remote==true \
and @opt.cmd !~/U/
System_call.new(local_gen,remote_gen,@opt.cmd).rsync('--delete-after')
- if FileTest.file?("#{local_src}/#{src_txt}") \
- or FileTest.file?("#{local_src}/#{src_pod}")
- System_call.new("#{local_src}/#{src_txt} #{local_src}/#{src_pod}",remote_src,@opt.cmd).rsync
+ if FileTest.file?("#{local_src}/#{src_txt}")
+ System_call.new("#{local_src}/#{src_txt}",remote_src,@opt.cmd).rsync
if defined? @md.ec[:image]
images="#{local_gen_image}/" + @md.ec[:image].join(" #{local_gen_image}/")
System_call.new(images,remote_images,@opt.cmd).rsync
end
+ elsif FileTest.file?("#{local_pod}/#{src_pod}")
+ System_call.new("#{local_pod}/#{src_pod}",remote_src,@opt.cmd).rsync
end
elsif @opt.cmd =~/U/
puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/
@@ -2521,7 +2544,7 @@ WOK
@@pwd ||=Dir.pwd
@pwd=Dir.pwd
@env=SiSU_Env::Info_env.new
- m=/.+\/(\S+)/m
+ m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@pwd_stub=@pwd[m,1]
@rc=@@rc ||=Get_init.instance.yamlrc
@defaults=Info_env.new.defaults
@@ -2583,7 +2606,7 @@ WOK
else nil
end
@home,@pwd=ENV['HOME'],ENV['PWD']
- m=/.+\/(\S+)/m
+ m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@pwd_stub=@pwd[m,1]
@env=SiSU_Env::Info_env.new
end
diff --git a/lib/sisu/v0/texpdf_format.rb b/lib/sisu/v0/texpdf_format.rb
index 3887600d..4f31311a 100644
--- a/lib/sisu/v0/texpdf_format.rb
+++ b/lib/sisu/v0/texpdf_format.rb
@@ -825,8 +825,7 @@ WOK
when /a5/; @tx.a5
else @tx.a4
end
- width=if \
- orientation =~/portrait/ #value is not currently passed
+ width=if orientation =~/portrait/ #value is not currently passed
width=if width.to_i > dm.portrait.img_px; dm.portrait.img_px
else width
end
@@ -1208,7 +1207,8 @@ WOK
end
def para_num
paranumber_display=if @md.markup.inspect =~/no_ocn/ \
- or @md.mod.inspect =~/--no-ocn/; ''
+ or @md.mod.inspect =~/--no-ocn/
+ ''
else "\\begin{tiny}~\\end{tiny}{\\marginpar{\\begin{tiny}#@string1\\end{tiny}}}" #ocn object citation numbering
end
if @string !~/^([1-6a-z-]#{@@tilde}\S*|<:.+?>|#{@md.lv1}|#{@md.lv2}|#{@md.lv3}|#{@md.lv4}|#{@md.lv5}|#{@md.lv6})/
diff --git a/lib/sisu/v0/urls.rb b/lib/sisu/v0/urls.rb
index b9b1e0ec..ca1b6928 100644
--- a/lib/sisu/v0/urls.rb
+++ b/lib/sisu/v0/urls.rb
@@ -192,7 +192,7 @@ module SiSU_urls
tell.grey_title_hi unless @opt.cmd =~/q/
tell=SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output}/#@fnb")
tell.flow unless @opt.cmd =~/q/
- m=/.+\/(\S+)/m
+ m=/.+\/(?:src\/)?(\S+)/im # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@pwd_stub="#@webserv_url"[m,1]
@u.each do |x,y|
if @opt.fns =~ @m_regular
@@ -234,12 +234,18 @@ module SiSU_urls
tell.result unless @opt.cmd =~/q/
@opt.cmd.gsub!(/P[iu]/,'')
end
- if x=~/^[sS]/ \
+ if x=~/^s/ \
+ and @opt.cmd =~/s/
+ tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#@browser #@webserv_url/src/#{y}")
+ tell.result unless @opt.cmd =~/q/
+ @opt.cmd.gsub!(/I/,'')
+ end
+ if x=~/^S/ \
and @opt.cmd =~/[sS]/
zipfile=if @opt.fns =~/\.ssm\.sst$/; y.gsub(/(?:\~\S{2,3})?(\.ssm\.sst\.zip)$/,'.ssm.zip')
else y.gsub(/(?:\~\S{2,3})?(\.sst\.zip)$/,'\1')
end
- tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#@browser #@webserv_url/src/#{y}")
+ tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#@browser #@webserv_url/pod/#{y}")
tell.result unless @opt.cmd =~/q/
@opt.cmd.gsub!(/I/,'')
end