aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/param.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/param.rb')
-rw-r--r--lib/sisu/v3/param.rb25
1 files changed, 16 insertions, 9 deletions
diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb
index 0f721468..f1c4aa3a 100644
--- a/lib/sisu/v3/param.rb
+++ b/lib/sisu/v3/param.rb
@@ -7,7 +7,8 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012 Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -33,9 +34,7 @@
<http://www.fsf.org/licensing/licenses/gpl.html>
<http://www.gnu.org/licenses/gpl.html>
- <http://www.jus.uio.no/sisu/gpl.fsf/toc.html>
- <http://www.jus.uio.no/sisu/gpl.fsf/doc.html>
- <http://www.jus.uio.no/sisu/gpl.fsf/plain.txt>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
* SiSU uses:
* Standard SiSU markup syntax,
@@ -47,7 +46,7 @@
<http://www.sisudoc.org>
* Download:
- <http://www.jus.uio.no/sisu/SiSU/download.html>
+ <http://www.sisudoc.org/sisu/en/SiSU/download.html>
* Ralph Amissah
<ralph@amissah.com>
@@ -91,6 +90,7 @@ module SiSU_Param
and @opt.f_pth[:pth] != Dir.pwd #BUG check
# you may need to change Dir.pwd to @opt.f_pth[:pth] where the latter
# has a path value that is different, however, f_pth is not always set!
+ Dir.chdir(@opt.f_pth[:pth])
p '-- bug alert -- '
p __FILE__ + ':' + __LINE__.to_s
p 'f_pth ' + @opt.f_pth[:pth]
@@ -1064,12 +1064,20 @@ module SiSU_Param
@flv,@lang,@seg_names,@tags,@tag_array,@tag_a,@ec[:image],@ec[:audio],@ec[:multimedia]=Array.new(9){[]}
@authors,@topic_register_array,@papersize_array=[],[],[]
@lvs=[nil,0,0,0,0,0,0]
- @lang_code_insert=(@opt.dir_structure_by ==:language) \
- ? ''
- : ".#{@opt.lng}"
+ @lang_code_insert=if @opt.act[:output_by][:set]==:language
+ ''
+ elsif @opt.act[:output_by][:set]==:filetype \
+ or @opt.act[:output_by][:set]==:filename
+ ".#{@opt.lng}"
+ elsif @opt.dir_structure_by ==:language
+ ''
+ else
+ ".#{@opt.lng}"
+ end
@rgx_image=/(?:^|[^_\\])\{(?:\s*|\~\^\s+)(\S+?\.(?:png|jpg|gif)\b)/m
@rgx_audio=/\{\s*(\S+?\.(?:mp3|ogg))/
@rgx_mm=/\{\s*(\S+?\.(?:ogg|mpeg))/ #expand and distinguish ogg
+ Dir.chdir(@opt.f_pth[:pth])
begin
rescue
SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@fns).error do
@@ -1463,7 +1471,6 @@ module SiSU_Param
end
@papersize_array=@papersize.scan(/(?:a4|letter|legal|book|a5|b5)/i)
fn=@opt.fno #decide what to do a filesize on .ssm tells very little about actual document size
- #fn=@fns=~/\.ssm\.sst$/ ? @fns.gsub(/.sst/,'') : @fns #decide what to do a filesize on .ssm tells very little about actual document size
@filesize=(File.size(fn)).to_s
if @sys.openssl !=false
skin=@doc_skin \