aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--data/doc/sisu/CHANGELOG_v36
-rw-r--r--data/sisu/v3/v/version.yml4
-rw-r--r--lib/sisu/v3/param.rb81
3 files changed, 43 insertions, 48 deletions
diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3
index e60a8ec3..5148f8aa 100644
--- a/data/doc/sisu/CHANGELOG_v3
+++ b/data/doc/sisu/CHANGELOG_v3
@@ -13,7 +13,7 @@ Reverse Chronological:
%% Development branch UNSTABLE
v3 branch once stable will supersede & replace current stable v2 branch
-%% 3.0.3.orig.tar.gz (2011-03-10:10/4)
+%% 3.0.3.orig.tar.gz (2011-03-11:10/5)
http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.3.orig.tar.gz
sisu_3.0.3.orig.tar.gz
sisu_3.0.3-1.dsc
@@ -40,11 +40,13 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.3.orig.tar.gz
* dal_doc_str: fix, looks like typo in regex
+ * param: tidy, remove redundant document header tags
+
* manpage output presentation fixes
* manpage: (lowercase .br; correct newlines before .nf and
after .fi; no escape of hyphens; remove redundant links; endnotes array
requires flatten; screen info on output path)
- * param: manpage header .br and no escape of hyphens
+ * param: manpage header .br and no escape of hyphens
* urls: correct output path for manpage
* texpdf: url (regex) pattern match fix (/https?/)
diff --git a/data/sisu/v3/v/version.yml b/data/sisu/v3/v/version.yml
index cb913787..5b718b7c 100644
--- a/data/sisu/v3/v/version.yml
+++ b/data/sisu/v3/v/version.yml
@@ -1,5 +1,5 @@
---
:version: 3.0.3-beta-rb1.9.2p180
-:date_stamp: 2011w10/4
-:date: "2011-03-10"
+:date_stamp: 2011w10/5
+:date: "2011-03-11"
:project: SiSU
diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb
index 8ae87010..9a11da8c 100644
--- a/lib/sisu/v3/param.rb
+++ b/lib/sisu/v3/param.rb
@@ -958,7 +958,7 @@ module SiSU_Param
SiSU_Screen::Ansi.new(@cmd,'SiSU filetype indicator not provided',mv).warn unless @cmd =~/q/
end
@code_flag=false
- fns_array.each do |para| #% Scan document
+ fns_array.each do |para| #% scan document
if para !~/^%+\s/ \
and para =~/<![abcdeghijklmnopqrstuvwxyz]/i # <!f not included
raise "Old markup style in file #{@fns}, current version #{@sisu_version[:project]} #{@sisu_version[:version]} #{@sisu_version[:date_stamp]} #{@sisu_version[:date]}:\n\t\t#{para}\n\n"
@@ -972,40 +972,46 @@ module SiSU_Param
if para =~regx_header \
and not @code_flag #or para=~/^(?:1|:?A)~/
case para
- when /^@ocn:\s+(.+?)$/m; @ocn=$1 #% processing
- when /^@title:(.+)/m #% metainfo DC
+ when /^@title:(.+)/m #% * header metadata - title
@title=Md.new($1.strip,@opt,@env).title
- when /^@creator:(.+)/m #% metainfo DC
+ when /^@creator:(.+)/m #% * header metadata - creator
@creator=Md.new($1.strip,@opt,@env).creator
@authorship=@author=@creator.author
@authors=@creator.author_detail
- when /^@classify:(.+)/m; classify=$1
- @classify=Md.new($1.strip,@opt,@env).classify
- when /^@publisher:\s+(.+)/m
+ when /^@date:(.+)/m #% * header metadata - date
+ @date=Md.new($1.strip,@opt,@env).date
+ when /^@publisher:\s+(.+)/m #% * header metadata - publisher
@publisher=Md.new($1.strip,@opt,@env).current_publisher
@current_publisher=@publisher
- when /^@original:(.+)/m
+ when /^@rights:(.+)/m; #% * header metadata - rights
+ @rights=Md.new($1.strip,@opt,@env).rights
+ when /^@classify:(.+)/m; classify=$1 #% * header metadata - classify
+ @classify=Md.new($1.strip,@opt,@env).classify
+ when /^@original:(.+)/m #% * header metadata - original (document)
@original=Md.new($1.strip,@opt,@env).original
@source=@original.source
- when /^@writing_focus[:.]nationality:\s+(.+?)$/; @writing_focus=$1 # e.g. Finland (where and article on Finnish law)
- when /^@date:(.+)/m #% metainfo DC
- @date=Md.new($1.strip,@opt,@env).date
- when /^@rights:(.+)/m; #@rights=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line]) #% metainfo DC copyright, public domain, copyleft, creative commons, etc.
- @rights=Md.new($1.strip,@opt,@env).rights
- when /^@papersize:\s+(.+?)$/m #% metainfo DC
- l=$1
- if @mod.inspect !~/--papersize[=-]\S+/
- l=determine_papersize(l.dup)
- @papersize=l
+ when /^@notes?:\s(.+)\Z/m #% * header metadata - notes
+ @notes=Md.new($1.strip,@opt,@env).notes
+ when /^@links:\s+(.+?)\Z/m #% * header metadata - links
+ doc_links=Md.new($1.strip,@opt,@env).links
+ count=1
+ @links=[]
+ doc_links.each do |doc_link|
+ if doc_link=~/\{.+?\}(?:(?:https?|file|ftp):\/|\.\.)\/\S+(?:\s|$)/
+ @links[count]={}
+ @links[count][:say],@links[count][:url]=/\{\s*(.+?)\s*\}((?:(?:https?|file|ftp):\/|\.\.)\/\S+)/im.match(doc_link)[1,2]
+ count +=1
+ end
end
- when /^@make:(.+)/m #% metainfo DC
+ @lnk=@links
+ when /^@make:(.+)/m #% * header processing - make
@make=Md.new($1.strip,@opt,@env).make
if defined? @make.breaks \
- and @make.breaks[:page_new] #clearpage
+ and @make.breaks[:page_new] #clearpage
@pagenew=@make.breaks[:page_new]
end
if defined? @make.breaks \
- and @make.breaks[:page_break] #newpage
+ and @make.breaks[:page_break] #newpage
@pagebreak=@make.breaks[:page_break]
end
if defined? @make.headings \
@@ -1032,23 +1038,10 @@ module SiSU_Param
end
if defined? @make.manpage \
and @make.manpage
- @man_section=(defined? @make.manpage.section) ? @make.manpage.section : 1
- end
- when /^@links:\s+(.+?)\Z/m #% processing
- doc_links=Md.new($1.strip,@opt,@env).links
- count=1
- @links=[]
- doc_links.each do |doc_link|
- if doc_link=~/\{.+?\}(?:(?:https?|file|ftp):\/|\.\.)\/\S+(?:\s|$)/
- @links[count]={}
- @links[count][:say],@links[count][:url]=/\{\s*(.+?)\s*\}((?:(?:https?|file|ftp):\/|\.\.)\/\S+)/im.match(doc_link)[1,2]
- count +=1
- end
+ @man_section=(defined? @make.manpage.section) \
+ ? @make.manpage.section \
+ : 1
end
- @lnk=@links
- when /^@notes?:\s(.+)\Z/m #% metainfo
- @notes=Md.new($1.strip,@opt,@env).notes
- when /^@base_program:\s+(.+?)$/; @base_program=$1 #% processing
end
@lv1 ||=/^1~/
@lv2 ||=/^2~/
@@ -1056,7 +1049,7 @@ module SiSU_Param
@lv4 ||=/^4~/
@lv5 ||=/^5~/
@lv6 ||=/^6~/
- else #%
+ else #% *
case para
when /^:?A~/
@lvs[1]=1
@@ -1071,7 +1064,7 @@ module SiSU_Param
when /^3~/
@lvs[6]=1
end
- if para =~ /^:A~/ #% processing
+ if para =~ /^:A~/ #% processing
if @markup.nil? \
or @markup.empty?
@markup=@markup_version.determined.to_s
@@ -1091,13 +1084,13 @@ module SiSU_Param
end
unless @code_flag
case para
- when /~\{\s+.+?\}~/m #% processing
+ when /~\{\s+.+?\}~/m #% processing
en=para.scan(/~\{.+?\}~/m)
en.each { |e| @en[:sum] +=1 }
- when /~\^(?:\s|$)/m #% processing
+ when /~\^(?:\s|$)/m #% processing
mk=para.scan(/~\^(?:\s|$)/)
mk.each { |e| @en[:mark] +=1 }
- when /^\^~\s+\S/; @en[:note] +=1 #% processing
+ when /^\^~\s+\S/; @en[:note] +=1 #% processing
end
end
if para =~/~\{|\^~ |~\^|<:ee>|\{.+?\[[1-6]\]\}\S+?\.ss[tm]/m; @flag_auto_endnotes,@flag_endnotes=true,true
@@ -1147,7 +1140,7 @@ module SiSU_Param
unless @sem_tag
@sem_tag=true if para=~/[:;]\{.+?\}[:;][a-z+]/ #refix later
end
- end #% here endeth the document loop
+ end #% here endeth the document loop
if @ec[:image].length > 0
@ec[:image].flatten!
@ec[:image].uniq!
@@ -1360,7 +1353,7 @@ module SiSU_Param
end
@data=nil #else whole file's contents are stored in md pstore & is not required to be... big waste actually
@file=SiSU_Env::SiSU_file.new(self) #watch
- Store.new(self,@env).store #% pstore
+ Store.new(self,@env).store #% pstore
self
end
private