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.rb100
1 files changed, 50 insertions, 50 deletions
diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb
index 58d3aba9..1be55583 100644
--- a/lib/sisu/v3/param.rb
+++ b/lib/sisu/v3/param.rb
@@ -132,7 +132,7 @@ module SiSU_Param
s=nil
if @author
s ||=((@date =~/([12][890]\d{2})/ ) \
- ? ("Copyright (C) #{$1} #{@author}") \
+ ? ("Copyright (C) #{$1} #{@author}")
: ('Copyright (C)' + @author)) #matches years 1800 through 20\d\d 2004w19
end
s
@@ -145,7 +145,7 @@ module SiSU_Param
s=nil
if @author
s ||=((@date =~/([12][890]\d{2})/ ) \
- ? ("Copyright (C) #{$1} #{@author}") \
+ ? ("Copyright (C) #{$1} #{@author}")
: ('Copyright (C)' + @author)) #matches years 1800 through 20\d\d 2004w19
end
s
@@ -259,14 +259,14 @@ module SiSU_Param
end
def short
s=@h['short'] \
- ? @h['short'] \
+ ? @h['short']
: @h['main']
l,n=Db[:col_title_part],'title.short'
validate_length(s,l,n)
end
def full
s=@h['subtitle'] \
- ? (@h['main'] + ' - ' + @h['subtitle']) \
+ ? (@h['main'] + ' - ' + @h['subtitle'])
: @h['main']
l,n=Db[:col_title],'title.full'
validate_length(s,l,n)
@@ -295,17 +295,17 @@ module SiSU_Param
end
def author_detail
s=@h['author'] \
- ? @h['author'] \
+ ? @h['author']
: @h['main']
names=name_format(s)
names[:name_a_h]
end
def editor
names=@h['editor'] \
- ? name_format(@h['editor']) \
+ ? name_format(@h['editor'])
: nil
s=(names.class==Hash) \
- ? names[:name_str] \
+ ? names[:name_str]
: nil
s=if s
l,n=Db[:col_name],'creator.editor'
@@ -315,18 +315,18 @@ module SiSU_Param
end
def editor_detail
names=@h['editor'] \
- ? name_format(@h['editor']) \
+ ? name_format(@h['editor'])
: nil
(names.class==Hash) \
- ? names[:name_a_h] \
+ ? names[:name_a_h]
: nil
end
def contributor
names=@h['contributor'] \
- ? name_format(@h['contributor']) \
+ ? name_format(@h['contributor'])
: nil
s=(names.class==Hash) \
- ? names[:name_str] \
+ ? names[:name_str]
: nil
s=if s
l,n=Db[:col_name],'creator.author'
@@ -336,18 +336,18 @@ module SiSU_Param
end
def contributor_detail
names=@h['contributor'] \
- ? name_format(@h['contributor']) \
+ ? name_format(@h['contributor'])
: nil
(names.class==Hash) \
- ? names[:name_a_h] \
+ ? names[:name_a_h]
: nil
end
def illustrator
names=@h['illustrator'] \
- ? name_format(@h['illustrator']) \
+ ? name_format(@h['illustrator'])
: nil
s=(names.class==Hash) \
- ? names[:name_str] \
+ ? names[:name_str]
: nil
s=if s
l,n=Db[:col_name],'creator.illustrator'
@@ -357,18 +357,18 @@ module SiSU_Param
end
def illustrator_detail
names=@h['illustrator'] \
- ? name_format(@h['illustrator']) \
+ ? name_format(@h['illustrator'])
: nil
(names.class==Hash) \
- ? names[:name_a_h] \
+ ? names[:name_a_h]
: nil
end
def photographer
names=@h['photographer'] \
- ? name_format(@h['photographer']) \
+ ? name_format(@h['photographer'])
: nil
s=(names.class==Hash) \
- ? names[:name_str] \
+ ? names[:name_str]
: nil
s=if s
l,n=Db[:col_name],'creator.photographer'
@@ -378,18 +378,18 @@ module SiSU_Param
end
def photographer_detail
names=@h['photographer'] \
- ? name_format(@h['photographer']) \
+ ? name_format(@h['photographer'])
: nil
(names.class==Hash) \
- ? names[:name_a_h] \
+ ? names[:name_a_h]
: nil
end
def translator
names=@h['translator'] \
- ? name_format(@h['translator']) \
+ ? name_format(@h['translator'])
: nil
s=(names.class==Hash) \
- ? names[:name_str] \
+ ? names[:name_str]
: nil
s=if s
l,n=Db[:col_name],'creator.translator'
@@ -399,18 +399,18 @@ module SiSU_Param
end
def translator_detail
names=@h['translator'] \
- ? name_format(@h['translator']) \
+ ? name_format(@h['translator'])
: nil
(names.class==Hash) \
- ? names[:name_a_h] \
+ ? names[:name_a_h]
: nil
end
def audio
names=@h['audio'] \
- ? name_format(@h['audio']) \
+ ? name_format(@h['audio'])
: nil
s=(names.class==Hash) \
- ? names[:name_str] \
+ ? names[:name_str]
: nil
s=if s
l,n=Db[:col_name],'creator.audio'
@@ -420,18 +420,18 @@ module SiSU_Param
end
def audio_detail
names=@h['audio'] \
- ? name_format(@h['audio']) \
+ ? name_format(@h['audio'])
: nil
(names.class==Hash) \
- ? names[:name_a_h] \
+ ? names[:name_a_h]
: nil
end
def digitized_by
names=@h['digitized_by'] \
- ? name_format(@h['digitized_by']) \
+ ? name_format(@h['digitized_by'])
: nil
s=(names.class==Hash) \
- ? names[:name_str] \
+ ? names[:name_str]
: nil
s=if s
l,n=Db[:col_name],'creator.digitized_by'
@@ -441,18 +441,18 @@ module SiSU_Param
end
def digitized_by_detail
names=@h['digitized_by'] \
- ? name_format(@h['digitized_by']) \
+ ? name_format(@h['digitized_by'])
: nil
(names.class==Hash) \
- ? names[:name_a_h] \
+ ? names[:name_a_h]
: nil
end
def prepared_by
names=@h['prepared_by'] \
- ? name_format(@h['prepared_by']) \
+ ? name_format(@h['prepared_by'])
: nil
s=(names.class==Hash) \
- ? names[:name_str] \
+ ? names[:name_str]
: nil
s=if s
l,n=Db[:col_name],'creator.prepared_by'
@@ -462,11 +462,11 @@ module SiSU_Param
end
def prepared_by_detail
names=@h['prepared_by'] \
- ? name_format(@h['prepared_by']) \
+ ? name_format(@h['prepared_by'])
: nil
names=name_format(@h['prepared_by'])
(names.class==Hash) \
- ? names[:name_a_h] \
+ ? names[:name_a_h]
: nil
end
self
@@ -491,35 +491,35 @@ module SiSU_Param
end
def translation
s=@h['translation'] \
- ? @h['translation'] \
+ ? @h['translation']
: nil
l,n=Db[:col_info_note],'rights.copyright.translation'
validate_length(s,l,n)
end
def illustrations
s=@h['illustrations'] \
- ? @h['illustrations'] \
+ ? @h['illustrations']
: nil
l,n=Db[:col_info_note],'rights.copyright.illustrations'
validate_length(s,l,n)
end
def photographs
s=@h['photographs'] \
- ? @h['photographs'] \
+ ? @h['photographs']
: nil
l,n=Db[:col_info_note],'rights.copyright.photographs'
validate_length(s,l,n)
end
def digitization
s=@h['digitization'] \
- ? @h['digitization'] \
+ ? @h['digitization']
: nil
l,n=Db[:col_info_note],'rights.copyright.digitization'
validate_length(s,l,n)
end
def audio
s=@h['audio'] \
- ? @h['audio'] \
+ ? @h['audio']
: nil
l,n=Db[:col_info_note],'rights.copyright.audio'
validate_length(s,l,n)
@@ -528,7 +528,7 @@ module SiSU_Param
end
def license
s=@h['license'] \
- ? @h['license'] \
+ ? @h['license']
: nil
l,n=Db[:col_info_note],'rights.license'
validate_length(s,l,n)
@@ -752,7 +752,7 @@ module SiSU_Param
end
def breaks
pagebreaks=((@h['breaks'] =~/;/) \
- ? (@h['breaks'].split(/;\s*/)) \
+ ? (@h['breaks'].split(/;\s*/))
: [ @h['breaks'] ])
page_new,page_break=nil,nil
pagebreaks.each do |x|
@@ -764,7 +764,7 @@ module SiSU_Param
def language
l=if @h['language'] && (@h['language']=~/\S{2,}/)
((@h['language'] =~/,/) \
- ? (@h['language'].split(/,\s*/)) \
+ ? (@h['language'].split(/,\s*/))
: [ @h['language'] ])
else [ 'en' ]
end
@@ -812,7 +812,7 @@ module SiSU_Param
end
def texpdf_font
@h['texpdf_font'] && (@h['texpdf_font']=~/\S{3,}/) \
- ? @h['texpdf_font'] \
+ ? @h['texpdf_font']
: @env.font.texpdf
end
def skin
@@ -939,7 +939,7 @@ module SiSU_Param
@authors,@topic_register_array,@papersize_array=[],[],[]
@lvs=[nil,0,0,0,0,0,0]
@lang_code_insert=(@opt.dir_structure_by =~/language/) \
- ? '' \
+ ? ''
: ".#{@opt.lng}"
@rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/
@rgx_audio=/\{\s*(\S+?\.(?:mp3|ogg))/
@@ -1028,7 +1028,7 @@ module SiSU_Param
sv=(@opt.cmd =~/[VMv]/) ? ("SiSU version (#{@sisu_version[:version]})") : ''
s_a,s_b,s_c=@sisu_version[:version].match(/^([0-9]+)?(?:\.([0-9]+))?(?:\.([0-9]+))?(?:\-\S+)?$/)[1..3]
tell=(@markup_version_declared.to_f==@markup_version.determined) \
- ? SiSU_Screen::Ansi.new(@opt.cmd,"Markup version (#{@markup_version.series} version #{@markup_version.determined})",sv) \
+ ? SiSU_Screen::Ansi.new(@opt.cmd,"Markup version (#{@markup_version.series} version #{@markup_version.determined})",sv)
: SiSU_Screen::Ansi.new(@opt.cmd,"Markup version declared (#{@markup_version_declared}), determined (#{@markup_version.series} version #{@markup_version.determined})",sv)
ok=if s_a.to_i > sm_a.to_i
true
@@ -1139,7 +1139,7 @@ module SiSU_Param
if defined? @make.manpage \
and @make.manpage
@man_section=(defined? @make.manpage.section) \
- ? @make.manpage.section \
+ ? @make.manpage.section
: 1
end
end
@@ -1332,7 +1332,7 @@ module SiSU_Param
@filesize=(File.size(fn)).to_s
if @sys.openssl !=false
skin=@doc_skin \
- ? (SiSU_Env::Info_skin.new(@opt,@doc_skin).select) \
+ ? (SiSU_Env::Info_skin.new(@opt,@doc_skin).select)
: SiSU_Env::Info_skin.new(@opt).select
@dgst,@dgst_skin=[],[]
if @env.digest.type =~/sha256/