aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/param.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v6/param.rb')
-rw-r--r--lib/sisu/v6/param.rb25
1 files changed, 11 insertions, 14 deletions
diff --git a/lib/sisu/v6/param.rb b/lib/sisu/v6/param.rb
index 7cbb6ba7..60c9bb54 100644
--- a/lib/sisu/v6/param.rb
+++ b/lib/sisu/v6/param.rb
@@ -500,12 +500,9 @@ module SiSU_Param
@h=build_hash(a)
def copyright
def text #you may wish to expand to take from all
- s=if @h['copyright']
- @h['copyright']
- elsif @h['text']
- @h['text']
- elsif @h['main']
- @h['main']
+ s=if @h['copyright'] then @h['copyright']
+ elsif @h['text'] then @h['text']
+ elsif @h['main'] then @h['main']
else
SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING Document Copyright missing; provide @rights: :copyright:').warn unless @opt.act[:quiet][:set]==:on
''
@@ -558,7 +555,7 @@ module SiSU_Param
validate_length(s,l,n)
end
def sep(str)
- (str =~/https?:\/\/\S+$/) ? ' ;' : ';'
+ ' \\\\ '
end
def all
s=if @h['all'] then @h['all']
@@ -574,36 +571,36 @@ module SiSU_Param
and copyright.translation \
and not copyright.translation.empty?
v=sep(copyright.translation)
- s +='\\\\ translation ' + copyright.translation + v
+ s +='translation: ' + copyright.translation + v
end
if defined? copyright.illustrations \
and copyright.illustrations \
and not copyright.illustrations.empty?
v=sep(copyright.illustrations)
- s +='\\\\ illustrations ' + copyright.illustrations + v
+ s +='illustrations: ' + copyright.illustrations + v
end
if defined? copyright.photographs \
and copyright.photographs \
and not copyright.photographs.empty?
v=sep(copyright.photographs)
- s +='\\\\ photographs ' + copyright.photographs + v
+ s +='photographs: ' + copyright.photographs + v
end
if defined? copyright.digitization \
and copyright.digitization \
and not copyright.digitization.empty?
v=sep(copyright.digitization)
- s +='\\\\ digitization ' + copyright.digitization + v
+ s +='digitization: ' + copyright.digitization + v
end
if defined? copyright.audio \
and copyright.audio \
and not copyright.audio.empty?
v=sep(copyright.audio)
- s +='\\\\ audio ' + copyright.audio + v
+ s +='audio: ' + copyright.audio + v
end
if defined? copyright.license \
and copyright.license \
and not copyright.license.empty?
- s +='\\\\ License: ' + copyright.license
+ s +='License: ' + copyright.license
end
if s.empty?
SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING Document Rights information missing; provide @rights: :copyright:').warn unless @opt.act[:quiet][:set]==:on
@@ -611,7 +608,7 @@ module SiSU_Param
l,n=Db[:col_info_note],'rights.all'
validate_length(s,l,n)
end
- s
+ s=s.gsub(/ [\\]+\s+$/,'')
end
s
end