From 51e583aac065ba15b7ece31f1d5339ac2dc53254 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 19 Dec 2009 16:17:09 -0500 Subject: directory structure changes to accommodate the introduction of sisu v2 --- lib/sisu/v1/sysenv.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v1/sysenv.rb b/lib/sisu/v1/sysenv.rb index 945cf07c..1adb3509 100644 --- a/lib/sisu/v1/sysenv.rb +++ b/lib/sisu/v1/sysenv.rb @@ -211,11 +211,11 @@ module SiSU_Env @@default_dir=DEFAULT_DIR m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m stub_pwd=@@pwd[m,1] - @@rc_path=["#@@pwd/_sisu","#@@home/.sisu",@@sisu_etc] + @@rc_path=["#@@pwd/_sisu","#@@home/.sisu","#@@sisu_etc/#{SiSU_version_dir}"] @@yamlrc_path=unless stub_pwd =~/^sisupod$/ - ["#@@pwd/_sisu","#@@home/.sisu",@@sisu_etc] + ["#@@pwd/_sisu","#@@home/.sisu","#@@sisu_etc/#{SiSU_version_dir}"] else #security policy: prevent reading of sisurc.yml in sisupod - ["#@@home/.sisu",@@sisu_etc] + ["#@@home/.sisu","#@@sisu_etc/#{SiSU_version_dir}"] end @@ad_path=unless stub_pwd =~/^sisupod$/ ["#@@pwd/_sisu/skin/yml","#@@home/.sisu/skin/yml","#{@@sisu_etc}/skin/yml"] @@ -2019,7 +2019,6 @@ WOK end def i18n def language # language settings -## m=/.+\/\S+?\~(\S+)/ pwd=Dir.pwd conf=if defined? @rc['default']['language']; @rc['default']['language'] @@ -2075,7 +2074,7 @@ WOK end def odf_structure rm_rf("#{path.processing}/odf") - system("unzip -q #{path.share}/odf/odt.zip -d #{path.processing}") + system("unzip -q #{path.share}/#{SiSU_version_dir}/odf/odt.zip -d #{path.processing}") end def sisupod_gen(fns_pod) pwd=Dir.pwd @@ -2642,11 +2641,13 @@ WOK class Info_version Date: Sat, 19 Dec 2009 16:28:24 -0500 Subject: minor code adjustments --- lib/sisu/v1/cgi_pgsql.rb | 14 ++++---- lib/sisu/v1/cgi_sqlite.rb | 4 +-- lib/sisu/v1/constants.rb | 2 +- lib/sisu/v1/css.rb | 17 +++++----- lib/sisu/v1/dal_images.rb | 2 +- lib/sisu/v1/db_import.rb | 2 +- lib/sisu/v1/harvest_authors.rb | 39 ++++++++++------------ lib/sisu/v1/harvest_topics.rb | 72 +++++++++++++++++----------------------- lib/sisu/v1/sst_from_kdissert.rb | 4 +-- lib/sisu/v1/sst_to_s_xml_dom.rb | 27 ++++++++------- lib/sisu/v1/sst_to_s_xml_node.rb | 33 +++++++++--------- 11 files changed, 100 insertions(+), 116 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v1/cgi_pgsql.rb b/lib/sisu/v1/cgi_pgsql.rb index 4f201dfa..f6f62bfb 100644 --- a/lib/sisu/v1/cgi_pgsql.rb +++ b/lib/sisu/v1/cgi_pgsql.rb @@ -153,11 +153,11 @@ module SiSU_CGI_pgsql end search_construct=[] if @c - unescaped_search.gsub!(/\s*(AND|OR)\s*/,"' \) \\1 #@l~\( '") - unescaped_search.gsub!(/(.+)/,"#@l~\( '\\1' \)") + unescaped_search.gsub!(/\s*(AND|OR)\s*/,"' \) \\1 #{@l}~\( '") + unescaped_search.gsub!(/(.+)/,"#{@l}~\( '\\1' \)") else - unescaped_search.gsub!(/\s*(AND|OR)\s*/,"' \) \\1 #@l~*\( '") - unescaped_search.gsub!(/(.+)/,"#@l~*\( '\\1' \)") + unescaped_search.gsub!(/\s*(AND|OR)\s*/,"' \) \\1 #{@l}~*\( '") + unescaped_search.gsub!(/(.+)/,"#{@l}~*\( '\\1' \)") end search_construct << unescaped_search search_construct=search_construct.join(' ') @@ -188,7 +188,7 @@ module SiSU_CGI_pgsql def sql_select_body limit ||=@@limit offset ||=@@offset - @sql_statement[:body]=%{SELECT metadata.title, metadata.subtitle, metadata.creator, metadata.filename, metadata.suffix, documents.body, documents.seg, documents.ocn, metadata.tid FROM documents, metadata WHERE (#@search_text) AND documents.metadata_tid = metadata.tid ORDER BY metadata.title, metadata.filename, documents.ocn} + @sql_statement[:body]=%{SELECT metadata.title, metadata.subtitle, metadata.creator, metadata.filename, metadata.suffix, documents.body, documents.seg, documents.ocn, metadata.tid FROM documents, metadata WHERE (#{@search_text}) AND documents.metadata_tid = metadata.tid ORDER BY metadata.title, metadata.filename, documents.ocn} @sql_statement[:range]=%{LIMIT #{limit} OFFSET #{offset} ;} select=@sql_statement[:body] + ' ' + @sql_statement[:range] select @@ -196,7 +196,7 @@ module SiSU_CGI_pgsql def sql_select_endnotes limit ||=@@limit offset ||=@@offset - @sql_statement[:endnotes]=%{SELECT metadata.title, metadata.subtitle, metadata.creator, metadata.filename, endnotes.body, endnotes.nr, endnotes.ocn, endnotes.metadata_tid FROM metadata, endnotes WHERE (#@search_endnotes) AND metadata.tid = endnotes.metadata_tid ORDER BY metadata.title, metadata.filename, endnotes.nr} + @sql_statement[:endnotes]=%{SELECT metadata.title, metadata.subtitle, metadata.creator, metadata.filename, endnotes.body, endnotes.nr, endnotes.ocn, endnotes.metadata_tid FROM metadata, endnotes WHERE (#{@search_endnotes}) AND metadata.tid = endnotes.metadata_tid ORDER BY metadata.title, metadata.filename, endnotes.nr} @sql_statement[:range]=%{LIMIT #{limit} OFFSET #{offset} ;} select=@sql_statement[:endnotes] + ' ' + @sql_statement[:range] select @@ -218,7 +218,7 @@ module SiSU_CGI_pgsql end def buttons1_pgsql <<-'WOK_SQL' - case sensitive + case sensitive WOK_SQL end def dbi_connect diff --git a/lib/sisu/v1/cgi_sqlite.rb b/lib/sisu/v1/cgi_sqlite.rb index 34cb67dc..9a2be6dd 100644 --- a/lib/sisu/v1/cgi_sqlite.rb +++ b/lib/sisu/v1/cgi_sqlite.rb @@ -148,8 +148,8 @@ module SiSU_CGI_sqlite elsif @q =~/\S+/; unescaped_search=CGI.unescape(@q) end search_construct=[] - unescaped_search.gsub!(/\s*(AND|OR)\s*/,"%' \) \\1 #@l LIKE \( '%") - unescaped_search.gsub!(/(.+)/,"#@l LIKE \( '%\\1%' \)") + unescaped_search.gsub!(/\s*(AND|OR)\s*/,"%' \) \\1 #{@l} LIKE \( '%") + unescaped_search.gsub!(/(.+)/,"#{@l} LIKE \( '%\\1%' \)") search_construct << unescaped_search search_construct=search_construct.join(' ') search[:search] << search_construct diff --git a/lib/sisu/v1/constants.rb b/lib/sisu/v1/constants.rb index 5c93d543..b2fdf5a1 100644 --- a/lib/sisu/v1/constants.rb +++ b/lib/sisu/v1/constants.rb @@ -167,6 +167,6 @@ check: ‹ › ∗  '〔lv1〕','〔lv2〕','〔lv3〕','〔lv4〕','〔lv5〕','〔lv6〕','〔lv7〕','〔lv8〕','〔lv9〕' '〔 Ѳ1〕','〔 Ѳ2〕','〔 Ѳ3〕','〔 Ѳ4〕','〔 Ѳ5〕','〔Ѳ6〕','〔Ѳ7〕','〔Ѳ8〕','〔Ѳ9〕' -◁▷ +◁▷ ◀this is text or an image▶ http:// diff --git a/lib/sisu/v1/css.rb b/lib/sisu/v1/css.rb index ced72d17..60ebf35c 100644 --- a/lib/sisu/v1/css.rb +++ b/lib/sisu/v1/css.rb @@ -104,8 +104,8 @@ WOK /* SiSU harvest css default stylesheet */ body { color: black; - background: "#ffffff"; - background-color: "#ffffff"; + background: #ffffff; + background-color: #ffffff; } a:link { color: #003399; @@ -120,7 +120,7 @@ WOK background-color: #f9f9aa; } a:hover img { - background-color: "#ffffff"; + background-color: #ffffff; } a:active { color: #003399; @@ -229,13 +229,13 @@ WOK } WOK end - def html #stylesheet for css html pages == html.css + def html #stylesheet for css html pages== html.css < filename, :file => file, :orig_pub => @orig_pub, :date => @date, :title => @fulltitle, :author => creator, :page => page } else - #p "missing author field: #@filename title: #@title; author: #@author_format; idx: #@orig_pub" + #p "missing author field: #{@filename} title: #{@title}; author: #{@author_format}; idx: #{@orig_pub}" end idx_array.flatten! idx_array @@ -191,7 +189,7 @@ module HARVEST_authors end def html_file_close @output[:html].close - @output[:html_mnt].close if @output[:html_mnt].class == File + @output[:html_mnt].close if @output[:html_mnt].class==File end def html_print def html_songsheet @@ -239,12 +237,9 @@ WOK a=[] a << '

' @alph.each do |x| - a << if x =~/[0-9]/; '' - else - %{#{x}, } - end + a << (x =~/[0-9]/) ? '' : %{#{x}, } end - @output[:html_mnt] << a.join if @output[:html_mnt].class == File + @output[:html_mnt] << a.join if @output[:html_mnt].class==File @output[:html] << a.join end def html_tail @@ -261,11 +256,11 @@ WOK WOK - @output[:html_mnt] << a if @output[:html_mnt].class == File + @output[:html_mnt] << a if @output[:html_mnt].class==File @output[:html] << a end def do_html(html) - @output[:html_mnt] << html if @output[:html_mnt].class == File + @output[:html_mnt] << html if @output[:html_mnt].class==File @output[:html] << html end def do_string(attrib,string) @@ -278,7 +273,7 @@ WOK while @letter < f if @alph.length > 0 @letter=@alph.shift - if @output[:html_mnt].class == File + if @output[:html_mnt].class==File @output[:html_mnt] << %{\n

#{@letter}

} end @output[:html] << %{\n

#{@letter}

} @@ -293,21 +288,21 @@ WOK do_string_name('',a) name=a[0].sub(/(.+?)(?:,.+|$)/,'\1').gsub(/\s+/,'_') x = %{

#{a[0]}

} - if @output[:html_mnt].class == File + if @output[:html_mnt].class==File @output[:html_mnt] << x end @output[:html] << x works=[] a[1][:md].each do |x| work=[ "#{x[:date]} #{x[:title]}", %{

#{x[:date]} #{x[:title]}, #{x[:author][:authors_s]}

} ] - works<<=if @output[:html_mnt].class == File + works<<=if @output[:html_mnt].class==File work.concat([%{

[src]  #{x[:date]} #{x[:title]}, #{x[:author][:authors_s]} -- [#{x[:file]}.sst]

}]) else work end end works.sort_by {|x| x[0]}.each do |x| @output[:html] << x[1] - @output[:html_mnt] << x[2] if @output[:html_mnt].class == File + @output[:html_mnt] << x[2] if @output[:html_mnt].class==File end end end diff --git a/lib/sisu/v1/harvest_topics.rb b/lib/sisu/v1/harvest_topics.rb index 1ab62a95..f1274b40 100644 --- a/lib/sisu/v1/harvest_topics.rb +++ b/lib/sisu/v1/harvest_topics.rb @@ -79,10 +79,10 @@ module HARVEST_topics file_array=[] File.open(filename,'r') do |file| file.each_line("\n\n") do |line| - if line =~/^@\S+?: / - #line=line.gsub(/\n/,' ') + if line =~/^@(?:title|subtitle|author|creator|classify|topic_register|date):(?:\s|$)/m file_array << line - elsif line =~/^(?:\s*\n|%+ )/ + elsif line =~/^@\S+?:(?:\s|$)/m \ + or line =~/^(?:\s*\n|%+ )/ else break end end @@ -105,10 +105,10 @@ module HARVEST_topics data,filename,idx_array=@data,@filename,@idx_array @idx_lst,@title,@subtitle,@fulltitle,@author,@author_format=nil,nil,nil,nil,nil,nil rgx={} - rgx[:author]=/^@(?:author|creator):\s+(.+)/ + rgx[:author]=/^@(?:author|creator):(?:[ ]+|.+?:author:[ ]+)(.+?)(?:\||\n)/m rgx[:title]=/^@title:\s+(.+)/ - rgx[:subtitle]=/^@subtitle:\s+(.+)/ - rgx[:idx]=/^@topic_register:\s+(.+)/ + rgx[:subtitle]=/^(?:@subtitle:\s+|@title:.+?:subtitle:[ ]+)(.+)/m + rgx[:idx]=/^(?:@topic_register:[ ]+|@classify:.+?:topic_register:[ ]+)(.+?)\n/m data.each do |para| if para=~ rgx[:idx] @idx_list=rgx[:idx].match(para)[1] @@ -124,10 +124,7 @@ module HARVEST_topics end break if @title and @subtitle and @author and @idx_lst end - @fulltitle=if @subtitle - @title + ' - ' + @subtitle - else @title - end + @fulltitle=@subtitle ? (@title + ' - ' + @subtitle) : @title if @title and @author_format and @idx_list creator=FORMAT::Author.new(@author_format.strip).author_details @authors,@authorship=creator[:authors],creator[:authorship] @@ -196,7 +193,7 @@ module HARVEST_topics if @@the_idx_topics[lv0].class==NilClass @@the_idx_topics[lv0]={:md => []} end - @lv0=lv0 if lev0.length == 1 + @lv0=lv0 if lev0.length==1 j=@@the_idx_topics[lv0][:md] contents(j,idx) if idx_lst_alt.length - 1 == t end @@ -207,7 +204,7 @@ module HARVEST_topics if @@the_idx_topics[@lv0][lv1].class==NilClass @@the_idx_topics[@lv0][lv1]={:md => []} end - @lv1=lv1 if lev1.length == 1 + @lv1=lv1 if lev1.length==1 j=@@the_idx_topics[@lv0][lv1][:md] contents(j,idx) if idx_lst_alt.length - 1 == t end @@ -218,7 +215,7 @@ module HARVEST_topics if @@the_idx_topics[@lv0][@lv1][lv2].class==NilClass @@the_idx_topics[@lv0][@lv1][lv2]={:md => []} end - @lv2=lv2 if lev2.length == 1 + @lv2=lv2 if lev2.length==1 j=@@the_idx_topics[@lv0][@lv1][lv2][:md] contents(j,idx) if idx_lst_alt.length - 1 == t end @@ -229,7 +226,7 @@ module HARVEST_topics if @@the_idx_topics[@lv0][@lv1][@lv2][lv3].class==NilClass @@the_idx_topics[@lv0][@lv1][@lv2][lv3]={:md => []} end - @lv3=lv3 if lev3.length == 1 + @lv3=lv3 if lev3.length==1 j=@@the_idx_topics[@lv0][@lv1][@lv2][lv3][:md] contents(j,idx) if idx_lst_alt.length - 1 == t end @@ -240,7 +237,7 @@ module HARVEST_topics if @@the_idx_topics[@lv0][@lv1][@lv2][@lv3][lv4].class==NilClass @@the_idx_topics[@lv0][@lv1][@lv2][@lv3][lv4]={:md => []} end - @lv4=lv4 if lev4.length == 1 + @lv4=lv4 if lev4.length==1 j=@@the_idx_topics[@lv0][@lv1][@lv2][@lv3][lv4][:md] contents(j,idx) if idx_lst_alt.length - 1 == t end @@ -269,7 +266,7 @@ module HARVEST_topics end def html_file_close @output[:html].close - @output[:html_mnt].close if @output[:html_mnt].class == File + @output[:html_mnt].close if @output[:html_mnt].class==File end def html_print def html_songsheet @@ -339,19 +336,19 @@ WOK WOK - @output[:html_mnt] << a if @output[:html_mnt].class == File + @output[:html_mnt] << a if @output[:html_mnt].class==File @output[:html] << a end def do_html(html) @output[:html] << html end def do_html_maintenance(html) - @output[:html_mnt] << html if @output[:html_mnt].class == File + @output[:html_mnt] << html if @output[:html_mnt].class==File end def do_string(attrib,string) html=%{

#{string}

} do_html(html) - do_html_maintenance(html) if @output[:html_mnt].class == File + do_html_maintenance(html) if @output[:html_mnt].class==File end def do_string_default(attrib,string) html=%{

#{string}

} @@ -359,7 +356,7 @@ WOK end def do_string_maintenance(attrib,string) html=%{

#{string}

} - do_html_maintenance(html) if @output[:html_mnt].class == File + do_html_maintenance(html) if @output[:html_mnt].class==File end def do_string_name(attrib,string) f=/^(\S)/.match(string)[1] @@ -367,7 +364,7 @@ WOK while @letter < f if @alph.length > 0 @letter=@alph.shift - if @output[:html_mnt].class == File + if @output[:html_mnt].class==File @output[:html_mnt] << %{\n

#{@letter}

} end @output[:html] << %{\n

#{@letter}

} @@ -378,7 +375,7 @@ WOK name=string.strip.gsub(/\s+/,'_') html=%{

#{string}

} do_html(html) - do_html_maintenance(html) if @output[:html_mnt].class == File + do_html_maintenance(html) if @output[:html_mnt].class==File end def do_array(lv,array) lv+=1 @@ -391,7 +388,7 @@ WOK do_string_default(attrib,html) end def do_hash_md_maintenance(attrib,hash) - if @output[:html_mnt].class == File #should not be run for presentation output + if @output[:html_mnt].class==File #should not be run for presentation output html=%{[src]  #{hash[:title]} - #{hash[:author]}} do_string_maintenance(attrib,html) end @@ -412,10 +409,7 @@ WOK if key.length > 0 key.sort.each do |m| attrib="lev#{lv}" - if lv == 0 - do_string_name(attrib,m) - else do_string(attrib,m) - end + lv==0 ? do_string_name(attrib,m) : do_string(attrib,m) do_case(lv,hash[m]) end end @@ -423,16 +417,12 @@ WOK def do_case(lv,a) y = a.class case - when y == String + when y==String attrib="lev#{lv}" - if lv == 0 - do_string_name(attrib,a) - else do_string(attrib,a) - end - #do_string_name(attrib,a) - when y == Array + lv==0 ? do_string_name(attrib,a) : do_string(attrib,a) + when y==Array do_array(lv,a) - when y == Hash + when y==Hash do_hash(lv,a) end end @@ -482,11 +472,11 @@ WOK s=' '*4 y = a.class case - when y == String + when y==String do_string(lv,a) - when y == Array + when y==Array do_array(lv,a) - when y == Hash + when y==Hash do_hash(lv,a) end end @@ -533,11 +523,11 @@ WOK s=' '*4 y = a.class case - when y == String + when y==String do_string(lv,a) - when y == Array + when y==Array do_array(lv,a) - when y == Hash + when y==Hash do_hash(lv,a) end end diff --git a/lib/sisu/v1/sst_from_kdissert.rb b/lib/sisu/v1/sst_from_kdissert.rb index 53840fcd..8f22c5f5 100644 --- a/lib/sisu/v1/sst_from_kdissert.rb +++ b/lib/sisu/v1/sst_from_kdissert.rb @@ -74,7 +74,7 @@ module SiSU_Kdissert sisu_head=<id,:ma=>ma,:ch=>ch,:sum=>sum,:txt=>txt } - if ma == '-1' + if ma=='-1' @el[id][:lev]=':A' @top=id end diff --git a/lib/sisu/v1/sst_to_s_xml_dom.rb b/lib/sisu/v1/sst_to_s_xml_dom.rb index 3db194b2..39ae7bcc 100644 --- a/lib/sisu/v1/sst_to_s_xml_dom.rb +++ b/lib/sisu/v1/sst_to_s_xml_dom.rb @@ -22,7 +22,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with @@ -214,13 +214,13 @@ WOK #{@tab*n2} #{@tab*n1}#{xml_content} WOK - if lv == 4 + if lv==4 @copen[1]=true @copen[2]=@copen[3]=false - elsif lv == 5 + elsif lv==5 @copen[2]=true @copen[3]=false - elsif lv == 6 + elsif lv==6 @copen[3]=true end end @@ -264,7 +264,7 @@ WOK when 4..6 6.downto(lv) do |x| y=x - 1 - if @level[x] == true + if @level[x]==true u=x - 3; @xml_contents_close[x]='' end @@ -275,11 +275,11 @@ WOK case lv when 4 @@xml[:body] << "#{@tab*5}\n" if @cont[1] - if @copen[3] == true # 6{ + if @copen[3]==true # 6{ [3,2,1].each { |v| @@xml[:body] << "#{@tab*n}\n" } - elsif @copen[2] == true # 5{ + elsif @copen[2]==true # 5{ [2,1].each { |v| @@xml[:body] << "#{@tab*n}\n" } - elsif @copen[1] == true # 4{ + elsif @copen[1]==true # 4{ [1].each { |v| @@xml[:body] << "#{@tab*n}\n" } end @cont[1]=true @@ -288,9 +288,9 @@ WOK or @cont[1] @@xml[:body] << "#{@tab*5}\n" end - if @copen[3] == true #6{ + if @copen[3]==true #6{ [3,2].each { |v| @@xml[:body] << "#{@tab*n}\n" } - elsif @copen[2] == true #5{ + elsif @copen[2]==true #5{ [2].each { |v| @@xml[:body] << "#{@tab*n}\n" } end @cont[2]=true @@ -479,7 +479,7 @@ WOK @content_flag=true 6.downto(4) do |x| y=x - 1; v=x - 3 - if @level[x] == true + if @level[x]==true if @content_flag==true @@xml[:body] << "#{@tab*5}\n#{@tab*y}\n" @content_flag=false @@ -490,9 +490,8 @@ WOK end 3.downto(1) do |x| y=x - 1 - @@xml[:body] << "#{@tab*y}\n" if @level[x] == true + @@xml[:body] << "#{@tab*y}\n" if @level[x]==true end - #6.downto(1) { |x| y=x - 1; @@xml[:body] << "#{@tab*y}\n" if @level[x] == true } end def pre rdf=SiSU_XML_tags::RDF.new(@md) @@ -559,7 +558,7 @@ WOK @sisu=new_file_data.scan(/.+/) SiSU_Env::SiSU_file.new(@md).mkdir filename_sxm=SiSU_Env::SiSU_file.new(@md,@md.fn[:sxd]).mkfile_pwd - if filename_sxm.class == File + if filename_sxm.class==File @sisu.each {|para| filename_sxm.puts para} filename_sxm.close else puts 'file not created, is directory writable?' diff --git a/lib/sisu/v1/sst_to_s_xml_node.rb b/lib/sisu/v1/sst_to_s_xml_node.rb index 09e9f740..3cbd1156 100644 --- a/lib/sisu/v1/sst_to_s_xml_node.rb +++ b/lib/sisu/v1/sst_to_s_xml_node.rb @@ -22,7 +22,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with @@ -203,10 +203,10 @@ WOK @@parent[:ocn] end def prt_node - parent.node.each_with_index { |a,n| puts "n.#{n} a.#{a}" unless n == 0 } #x == node + parent.node.each_with_index { |a,n| puts "n.#{n} a.#{a}" unless n==0 } #x==node end def prt_ocn - parent.ocn.each_with_index { |a,n| puts "n.#{n} a.#{a}" unless n == 0 } #x == node + parent.ocn.each_with_index { |a,n| puts "n.#{n} a.#{a}" unless n==0 } #x==node end self end @@ -233,10 +233,10 @@ WOK end if lv.inspect =~/^[1-6]/; @@current=lv end - if o.node == 1 \ - or lv == 1 + if o.node==1 \ + or lv==1 @@parent[:node][o.node]=0 - elsif @@current == lv \ + elsif @@current==lv \ and @@current !=nil if @node[:no][lv-1] != nil @@parent[:node][o.node]=@node[:no][lv-1] @@ -246,14 +246,14 @@ WOK @@parent[:node][o.node]=@node[:no][lv-3] else puts 'error' end - elsif lv == nil - if o.ocn.class == Fixnum \ + elsif lv==nil + if o.ocn.class==Fixnum \ and @@current @@parent[:node][o.node]=@node[:no][@@current] end else puts 'error' end - if @@current == lv \ + if @@current==lv \ and @@current !=nil if @node[:ocn][lv-1] != nil @@parent[:ocn][o.ocn]=@node[:ocn][lv-1] @@ -263,8 +263,8 @@ WOK @@parent[:ocn][o.ocn]=@node[:ocn][lv-3] else puts 'error' end - elsif lv == nil - if o.ocn.class == Fixnum \ + elsif lv==nil + if o.ocn.class==Fixnum \ and @@current @@parent[:ocn][o.ocn]=@node[:ocn][@@current] end @@ -274,7 +274,7 @@ WOK #def node_structure(o='',para='',lv='',hname='') #extracted endnotes # if o.ocn # lv=lv.to_i - # lv=nil if lv == 0 + # lv=nil if lv==0 # build_relationships(o,lv) # end #end @@ -284,7 +284,7 @@ WOK lv=lv.to_i n=lv - 1 n3=lv + 2 - lv=nil if lv == 0 + lv=nil if lv==0 embedded_endnotes(para) if para[@regx] paragraph="#{para[@regx,2]}" @@ -533,13 +533,12 @@ WOK end 6.downto(4) do |x| y=x - 1; v=x - 3 - @@xml[:body] << "#{@tab*5}\n#{@tab*y}\n" if @level[x] == true + @@xml[:body] << "#{@tab*5}\n#{@tab*y}\n" if @level[x]==true end 3.downto(1) do |x| y=x - 1 - @@xml[:body] << "#{@tab*y}\n" if @level[x] == true + @@xml[:body] << "#{@tab*y}\n" if @level[x]==true end - #6.downto(1) { |x| y=x - 1; @@xml[:body] << "#{@tab*y}\n" if @level[x] == true } end def pre rdf=SiSU_XML_tags::RDF.new(@md) @@ -591,7 +590,7 @@ WOK @sisu=new_file_data.scan(/.+/) SiSU_Env::SiSU_file.new(@md).mkdir filename_sxm=SiSU_Env::SiSU_file.new(@md,@md.fn[:sxn]).mkfile_pwd - if filename_sxm.class == File + if filename_sxm.class==File @sisu.each {|para| filename_sxm.puts para} filename_sxm.close else puts 'file not created, is directory writable?' -- cgit v1.2.3 From c55796e30e0aad7db8367d7a56dd80c9a278d2d5 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 19 Dec 2009 16:44:00 -0500 Subject: param & dal, includes removal of older header markup, simplification to allow cleaner v1 & v2 --- lib/sisu/v1/dal_doc_str.rb | 1 + lib/sisu/v1/dal_substitutions_and_insertions.rb | 73 ++++++--- lib/sisu/v1/dal_syntax.rb | 16 +- lib/sisu/v1/param.rb | 199 ++++++++++++++---------- 4 files changed, 174 insertions(+), 115 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v1/dal_doc_str.rb b/lib/sisu/v1/dal_doc_str.rb index 2e135243..bed3115c 100644 --- a/lib/sisu/v1/dal_doc_str.rb +++ b/lib/sisu/v1/dal_doc_str.rb @@ -101,6 +101,7 @@ module SiSU_document_structure @para.gsub!(/^:?B~\s+/,"#{Mx[:lv_o]}2:#{Mx[:lv_c]}") @para.gsub!(/^:?A~(\S+)/,"#{Mx[:lv_o]}1:\\1#{Mx[:lv_c]}") @para.gsub!(/^:?A~\s+/,"#{Mx[:lv_o]}1:#{Mx[:lv_c]}") + @para.gsub!(/^:?A~\s*$/,"#{Mx[:lv_o]}1:#{Mx[:lv_c]} @title @author") @para=if @para =~/^@(?:level|markup):\s/ @para.gsub!(/3/,'6') @para.gsub!(/2/,'5') diff --git a/lib/sisu/v1/dal_substitutions_and_insertions.rb b/lib/sisu/v1/dal_substitutions_and_insertions.rb index cadae8a7..1ffb22d4 100644 --- a/lib/sisu/v1/dal_substitutions_and_insertions.rb +++ b/lib/sisu/v1/dal_substitutions_and_insertions.rb @@ -79,29 +79,55 @@ module SiSU_substitute_and_insert @skin.select ins=SiSU_Viz::Inserts.new case para - when /^\s*<:insert1>\s*$/ - para=[] - ins.insert1.split(/\n\n/).each{|x| para << x } - when /^\s*<:insert2>\s*$/ - para=[] - ins.insert2.split(/\n\n/).each{|x| para << x } - when /^\s*<:insert3>\s*$/ - para=[] - ins.insert3.split(/\n\n/).each{|x| para << x << "\n"} - para=ins.insert3 - when /^\s*<:insert4>\s*$/ - para=[] - ins.insert4.split(/\n\n/).each{|x| para << x << "\n"} - para=ins.insert4 - when /^\s*<:insert5>\s*$/ - para=[] - ins.insert5.split(/\n\n/).each{|x| para << x << "\n"} - when /^\s*<:insert6>\s*$/ - para=[] - ins.insert6.split(/\n\n/).each{|x| para << x << "\n"} - when /^\s*<:insert7>\s*$/ - para=[] - ins.insert7.split(/\n\n/).each{|x| para << x << "\n"} + when /^\s*<:(insert1)>\s*$/ + i=$1 + if defined? ins.insert1 + para=[] + ins.insert1.split(/\n\n/).each{|x| para << x } + else p "skin #{i} not found in #{@skin.select}" + end + when /^\s*<:(insert2)>\s*$/ + i=$1 + if defined? ins.insert2 + para=[] + ins.insert2.split(/\n\n/).each{|x| para << x } + else p "skin #{i} not found in #{@skin.select}" + end + when /^\s*<:(insert3)>\s*$/ + i=$1 + if defined? ins.insert3 + para=[] + ins.insert3.split(/\n\n/).each{|x| para << x << "\n"} + else p "skin #{i} not found in #{@skin.select}" + end + when /^\s*<:(insert4)>\s*$/ + i=$1 + if defined? ins.insert4 + para=[] + ins.insert4.split(/\n\n/).each{|x| para << x << "\n"} + else p "skin #{i} not found in #{@skin.select}" + end + when /^\s*<:(insert5)>\s*$/ + i=$1 + if defined? ins.insert5 + para=[] + ins.insert5.split(/\n\n/).each{|x| para << x << "\n"} + else p "skin #{i} not found in #{@skin.select}" + end + when /^\s*<:(insert6)>\s*$/ + i=$1 + if defined? ins.insert6 + para=[] + ins.insert6.split(/\n\n/).each{|x| para << x << "\n"} + else p "skin #{i} not found in #{@skin.select}" + end + when /^\s*<:(insert7)>\s*$/ + i=$1 + if defined? ins.insert7 + para=[] + ins.insert7.split(/\n\n/).each{|x| para << x << "\n"} + else p "skin #{i} not found in #{@skin.select}" + end end para.each{|x| data_expand << x } else data_expand << para @@ -126,4 +152,3 @@ module SiSU_substitute_and_insert end end __END__ - diff --git a/lib/sisu/v1/dal_syntax.rb b/lib/sisu/v1/dal_syntax.rb index e917621a..c6bab08f 100644 --- a/lib/sisu/v1/dal_syntax.rb +++ b/lib/sisu/v1/dal_syntax.rb @@ -252,18 +252,12 @@ module SiSU_Syntax line.gsub!(/~\{(.+?)\}~/m,Mx[:en_a_o] + '\1' + Mx[:en_a_c]) line.gsub!(/~\[([^*+].+?)\]~/m,Mx[:en_b_o] + '* \1' + Mx[:en_b_c]) #default if markup does not specify line.gsub!(/~\[(.+?)\]~/m,Mx[:en_b_o] + '\1' + Mx[:en_b_c]) - if @md.subtitle and not @md.subtitle.empty? - if line =~/(?:by\s+)?(?:@creator|@author)/ - line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s+(?:(by\s+)?(?:@creator|@author))\s*$/,"\\1#{@md.title} - #{@md.subtitle},
\\2#{@md.author}") - else - line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s*$/,"\\1 #{@md.title} - #{@md.subtitle}") - end - else - if line =~/(?:by\s+)?(?:@creator|@author)/ - line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s+(?:(by\s+)?(?:@creator|@author))\s*$/,"\\1#{@md.title},
\\2#{@md.author}") - else - line.gsub!(/^(#{Mx[:lv_o]}1:\??#{Mx[:lv_c]})\s*@title\s*$/,"\\1 #{@md.title}") + if line =~/^#{Mx[:lv_o]}1:\S*?#{Mx[:lv_c]}/ + if @md.subtitle and not @md.subtitle.empty? + line.gsub!(/\s*@title\b/," #{@md.title} - #{@md.subtitle}") + else line.gsub!(/\s*@title\b/," #{@md.title}") end + line.gsub!(/\s+(?:@creator|@author)/,",
#{@md.author}") end line.gsub!(/^(1~\??) @title\s*$/,"\\1 #{@md.title} - #{@md.subtitle}") # line.gsub!(/^(#{Mx[:lv_o]}[23]:\??#{Mx[:lv_c]}) (?:(by\s+)?(?:@creator|@author))\s*$/,"\\1 \\2#{@md.author}") # diff --git a/lib/sisu/v1/param.rb b/lib/sisu/v1/param.rb index 4efdebb5..72593207 100644 --- a/lib/sisu/v1/param.rb +++ b/lib/sisu/v1/param.rb @@ -82,7 +82,7 @@ module SiSU_Param @fns=opt.fns.gsub(/\.ssm$/,'.ssm.sst') #revisit CHECK Instantiate.new.param_instantiate @env=SiSU_Env::Info_env.new(@fns) - @pstorefile="#{@env.path.dal}/#@fns.pstore" + @pstorefile="#{@env.path.dal}/#{@fns}.pstore" end def get unless @@fns==@fns @@ -233,13 +233,13 @@ module SiSU_Param @flag_auto_heading_num=false if @fns =~ /(?:-|ssm\.)?sst$/ #watch @env_out_root=@env.path.output - @dir_out="#{@env.path.output}/#@fnb" + @dir_out="#{@env.path.output}/#{@fnb}" @dir_tex=@env.path.tex @dir_lout=@env.path.lout @@publisher='SiSU http://www.jus.uio.no/sisu' end @txt_path=@txt_path ||= @env.path.output - @stmp=%{#@fns}[/^(.+?)\..*/m,1] + @stmp=%{#{@fns}}[/^(.+?)\..*/m,1] @fnstex=@fns.gsub(/_/,'\_') @flag_separate_endnotes=false @flag_separate_endnotes_make=true @@ -260,10 +260,10 @@ module SiSU_Param else '' end s_a,s_b,s_c=@sisu_version[:version].match(/^([0-9]+)?(?:\.([0-9]+))?(?:\.([0-9]+))?(?:\-\S+)?$/)[1..3] - tell=if @markup_version_declared.to_f == @markup_version.to_f - SiSU_Screen::Ansi.new(@cmd,"Markup version (#@markup_version)",sv) + tell=if @markup_version_declared.to_f==@markup_version.to_f + SiSU_Screen::Ansi.new(@cmd,"Markup version (#{@markup_version})",sv) else - SiSU_Screen::Ansi.new(@cmd,"Markup version declared (#@markup_version_declared), determined (#@markup_version)",sv) + SiSU_Screen::Ansi.new(@cmd,"Markup version declared (#{@markup_version_declared}), determined (#{@markup_version})",sv) end ok=if s_a.to_i > sm_a.to_i true @@ -279,7 +279,7 @@ module SiSU_Param if ok tell.txt_green if @cmd =~/[vVM]/ else - tell=SiSU_Screen::Ansi.new(@cmd,"Warning: markup version determined (#@markup_version) or markup version declared (#@markup_version_declared) is newer than SiSU version (#{@sisu_version[:version]})") + tell=SiSU_Screen::Ansi.new(@cmd,"Warning: markup version determined (#{@markup_version}) or markup version declared (#{@markup_version_declared}) is newer than SiSU version (#{@sisu_version[:version]})") tell.warn unless @cmd =~/q/ end else @@ -294,19 +294,19 @@ module SiSU_Param fns_array.each do |para| #% Scan document if para !~/^%+\s/ \ and para =~/|

|
|
)/,'') @@ -315,41 +315,46 @@ module SiSU_Param @html_title.chomp!(' ') tell=SiSU_Screen::Ansi.new(@cmd,'Parameters',@html_title) tell.txt_grey unless @cmd =~/q/ - when /^(?:@subtitle:|0~subtitle)\s+(.+?)$/m #% metainfo + when /^@subtitle:\s+(.+?)$/m #% metainfo @subtitle=$1.strip @full_title="#{@title} - #{@subtitle}" @subtitle_tex=@subtitle - when /^(?:@(?:creator|author)-?:|0~(?:creator|author)-?)\s+(.+?)$/ #% metainfo DC + when /^@creator:(?:[ ]+|.+?:author:[ ]+)(.+?)(?:[|]|$)/m #when /^@(?:creator|author):(?:[ ]+|.+?:author:[ ]+)(.+?)(?:[|]|$)/m + names=name_format($1) + @authorship=@author=names[:name_str] + @authors=names[:name_a_h] + when /^@author:\s+(.+?)$/ names=name_format($1) @authorship=@author=names[:name_str] @authors=names[:name_a_h] when /^@(?:creator|author)\.title:\s+(.+?)$/; @author_title=$1 # Prof. Dr. etc. when /^@(?:creator|author)\.nationality:\s+(.+?)$/; @author_nationality=$1 - when /^(?:@(?:translator|translated_by):|0~(?:translator|translated_by))\s+(.+?)$/m #% metainfo + when /^@(?:translator|translated_by):\s+(.+?)$/m #% metainfo names=name_format($1) @translator=names[:name_str] - when /^(?:@(?:illustrator|illustrated_by):|0~(?:illustrator|illustrated_by))\s+(.+?)$/m #% metainfo + when /^@(?:illustrator|illustrated_by):\s+(.+?)$/m #% metainfo names=name_format($1) @illustrator=names[:name_str] - when /^(?:@prepared_by:|0~prepared_by)\s+(.+?)$/m #% metainfo + when /^@prepared_by:\s+(.+?)$/m #% metainfo names=name_format($1) @prepared_by=names[:name_str] - when /^(?:@digitized_by:|0~digitized_by)\s+(.+?)$/m #% metainfo DC + when /^@digitized_by:\s+(.+?)$/m #% metainfo DC names=name_format($1) @digitized_by=names[:name_str] - when /^(?:@subject:|0~subject)\s+(.+?)$/m; @subject=$1 #% metainfo DC - when /^(?:@description:|0~description)\s+(.+?)$/m; @description=$1 #% metainfo DC & rss feed - when /^(?:@contributor:|0~contributor)\s+(.+?)$/m #% metainfo DC + when /^@subject:\s+(.+?)$/m; @subject=$1 #% metainfo DC + when /^@description:\s+(.+?)$/m; @description=$1 #% metainfo DC & rss feed + when /^@contributor:\s+(.+?)$/m #% metainfo DC names=name_format($1) @contributor=names[:name_str] - when /^(?:@publisher:|0~publisher)\s+(.+?)$/m; @publisher=$1 #% metainfo DC + when /^@publisher:\s+(.+?)$/m; @publisher=$1 #% metainfo DC when /^@original_publication:\s+(.+?)$/m; @original_publication=$1 when /^@original_publication\.date:\s+(.+?)$/; @original_publication_date=$1 when /^@original_publication\.nationality:\s+(.+?)$/; @original_publication_nationality=$1 when /^@original_publication\.institution:\s+(.+?)$/; @original_publication_institution=$1 when /^@writing_focus\.nationality:\s+(.+?)$/; @writing_focus=$1 # e.g. Finland (where and article on Finnish law) - when /^(?:@|0~)date.+?$/m #% metainfo DC - if para =~/(?:@date:|0~date)\s+(.+?)$/m + when /^@date:(?:[ ]+|.+?:published:[ ]+)(\d{4})/m #% metainfo DC + #when /^@date.+?$/m #% metainfo DC + if para =~/@date:\s+(.+?)$/m @date=$1.strip #% original publication date unless the substantive text is updated/modified, then date of update if @date !~regx_date \ and not @date.empty? @@ -358,7 +363,7 @@ module SiSU_Param end @date_scheme='scheme="ISO-8601"' if @date =~/\d{4}-\d{2}-\d{2}/ end - if para =~/(?:@date\.added_to_site:|0~date\.added_to_site)\s+(.+?)$/m + if para =~/@date\.added_to_site:\s+(.+?)$/m @date_added_to_site=$1.strip if @date_added_to_site !~regx_date \ and not @date_added_to_site.empty? @@ -367,7 +372,7 @@ module SiSU_Param end @date_scheme='scheme="ISO-8601"' if @date_added_to_site =~/\d{4}-\d{2}-\d{2}/ end - if para =~/(?:@date\.created:|0~date\.created)\s*(.+?)$/m + if para =~/@date\.created:\s*(.+?)$/m date=$1.strip if date !~regx_date \ and not date.empty? @@ -377,7 +382,7 @@ module SiSU_Param @date_created=date @date_created_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/ end - if para =~/(?:@date\.issued:|0~date\.issued)\s*(.+?)$/m + if para =~/@date\.issued:\s*(.+?)$/m date=$1.strip if date !~regx_date \ and not date.empty? @@ -387,7 +392,7 @@ module SiSU_Param @date_issued=date @date_issued_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/ end - if para =~/(?:@date\.available:|0~date\.available)\s*(.+?)$/m + if para =~/@date\.available:\s*(.+?)$/m date=$1.strip if date !~regx_date \ and not date.empty? @@ -397,7 +402,7 @@ module SiSU_Param @date_available=date @date_available_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/ end - if para =~/^(?:@date\.valid:|0~date\.valid)\s*(.+?)$/m + if para =~/^@date\.valid:\s*(.+?)$/m date=$1.strip if date !~regx_date \ and not date.empty? @@ -407,7 +412,7 @@ module SiSU_Param @date_valid=date @date_valid_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/ end - if para =~/^(?:@date\.modified:|0~date\.modified)\s*(.+?)$/m #% of interest rss feed & sitemap + if para =~/^@date\.modified:\s*(.+?)$/m #% of interest rss feed & sitemap date=$1.strip if date !~regx_date \ and not date.empty? @@ -417,7 +422,7 @@ module SiSU_Param @date_modified=date @date_modified_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/ end - if para =~/^(?:@date\.translated:|0~date\.translated)\s*(.+?)$/m + if para =~/^@date\.translated:\s*(.+?)$/m date=$1.strip if date !~regx_date \ and not date.empty? @@ -427,33 +432,33 @@ module SiSU_Param @date_translated=date @date_translated_scheme='scheme="ISO-8601"' if date =~/\d{4}-\d{2}-\d{2}/ end - when /^(?:@type:|0~type)\s+(.+?)$/m; @type=$1 #% metainfo DC - when /^(?:@format:|0~format)\s+(.+?)$/m; @format=$1 #% metainfo DC - #when /^(?:@identifier:|0~identifier)\s+(.+?)$/m; @identifier=$1 #% metainfo DC - when /^(?:@source:|0~source)\s+(.+?)$/m; @source=$1 #% metainfo DC - when /^(?:@language(?:\.document)?:|0~language(?:\.document)?)\s+(.+?)$/m #% metainfo DC + when /^@type:\s+(.+?)$/m; @type=$1 #% metainfo DC + when /^@format:\s+(.+?)$/m; @format=$1 #% metainfo DC + #when /^@identifier:\s+(.+?)$/m; @identifier=$1 #% metainfo DC + when /^@source:\s+(.+?)$/m; @source=$1 #% metainfo DC + when /^@language(?:\.document)?:\s+(.+?)$/m #% metainfo DC x=$1.strip lang=SiSU_Env::Standardise_language.new(x.dup) @language[:code]=lang.code @language[:name]=lang.title - when /^(?:@language\.original:|0~language\.original)\s+(.+?)$/m #% metainfo DC + when /^@language\.original:\s+(.+?)$/m #% metainfo DC x=$1.strip lang=SiSU_Env::Standardise_language.new(x.dup) @language_original[:name]=lang.title - when /^(?:@relation:|0~relation)\s+(.+?)$/m; @relation=$1 #% metainfo DC - when /^(?:@coverage:|0~coverage)\s+(.+?)$/m; @coverage=$1 #% metainfo DC - when /^(?:@rights:|0~rights)\s+(.+?)$/m; @rights=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line]) #% metainfo DC copyright, public domain, copyleft, creative commons, etc. - when /^(?:@papersize:|0~papersize)\s+(.+?)$/m #% metainfo DC + when /^@relation:\s+(.+?)$/m; @relation=$1 #% metainfo DC + when /^@coverage:\s+(.+?)$/m; @coverage=$1 #% metainfo DC + when /^@rights:\s+(.+?)$/m; @rights=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line]) #% metainfo DC copyright, public domain, copyleft, creative commons, etc. + when /^@papersize:\s+(.+?)$/m #% metainfo DC l=$1 if @mod.inspect !~/--papersize[=-]\S+/ l=determine_papersize(l.dup) @papersize=l end - when /^(?:@keywords?:|0~keywords?)\s+(.+?)$/m; @keywords=$1 #% metainfo DC - when /^(?:@comments?:|0~comments?)\s+(.+?)$/m; @comments=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line]) #% metainfo DC - when /^(?:@abstract:|0~abstract)\s+(.+?)$/m; @abstract=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line]) #% metainfo DC - when /^(?:@tags?:|0~tags?)\s+\S/m #% metainfo - tags=para.match(/^(?:@tags?:|0~tags?)\s+(.+)\Z/m)[1] + when /^@keywords?:\s+(.+?)$/m; @keywords=$1 #% metainfo DC + when /^@comments?:\s+(.+?)$/m; @comments=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line]) #% metainfo DC + when /^@abstract:\s+(.+?)$/m; @abstract=$1.gsub(/<(?:\/\s*)?br(?:\s*\/)?>/,Mx[:br_line]) #% metainfo DC + when /^@tags?:\s+\S/m #% metainfo + tags=para.match(/^@tags?:\s+(.+)\Z/m)[1] tags.split(/,|$/).each do |tag| tag.strip! @tags << tag @@ -462,18 +467,50 @@ module SiSU_Param tag_a=tag_a.split(/:/).join('][') @tag_a << tag_a end - when /^(?:@catalogue:|0~catalogue)\s+(.+)?$/m #% metainfo + when /^@catalogue:\s+(.+)?$/m #% metainfo m=$1 @cls_pg=m.match(/pg=(\S+)/)[1] if m =~/pg=/ @cls_isbn=m.match(/isbn=(\S+)/)[1] if m =~/isbn=/ @cls_dewey=m.match(/dewey=(\S+)/)[1] if m =~/dewey=/ @cls_loc=m.match(/loc=(\S+)/)[1] if m =~/loc=/ - when /^(?:@class(?:ify)?_loc:|0~class(?:ify)?_loc)\s+(.+?)$/m; @cls_loc=$1 #% metainfo - when /^(?:@class(?:ify)?_dewey:|0~class(?:ify)?_dewey)\s+(.+?)$/m; @cls_dewey=$1 #% metainfo - when /^(?:@class(?:ify)?_pg:|0~class(?:ify)?_pg)\s+(.+?)$/m; @cls_pg=$1 #% metainfo - when /^(?:@(?:class(?:ify)?_)?isbn:|0~(?:class(?:ify)?_)?isbn)\s+(\S+?)$/m; @cls_isbn=$1 #% metainfo - when /^(?:@images?:|0~images?)\s+(.+?)$/m; @image=$1 #% processing - when /^(?:@(?:toc|structure):|0~(?:toc|structure))\s+(.+?)\Z/m #% processing + when /^@class(?:ify)?_loc:\s+(.+?)$/m; @cls_loc=$1 #% metainfo + when /^@class(?:ify)?_dewey:\s+(.+?)$/m; @cls_dewey=$1 #% metainfo + when /^@class(?:ify)?_pg:\s+(.+?)$/m; @cls_pg=$1 #% metainfo + when /^@(?:class(?:ify)?_)?isbn:\s+(\S+?)$/m; @cls_isbn=$1 #% metainfo + when /^@images?:\s+(.+?)$/m; @image=$1 #% processing + + when /^@make:/m #% metainfo DC + + if para=~ /^@make:.+?:breaks:[ ]+(.+?)\n/m + #p $1 #FIX + #@pagenew= + #@pagebreak= + end + if para=~ /^@make:.+?:headings:[ ]+(.+?)\n/m + s=$1 + lv=[] + s=(s =~/;/) ? (s.split(/;\s*/)) : [ s ] + @toc=s + lv1=s[0] ||='1~ ' + @lv1=/^#{lv1}/ + lv2=s[1] ||='2~ ' + @lv2=/^#{lv2}/ + lv3=s[2] ||='3~ ' + @lv3=/^#{lv3}/ + lv4=s[3] ||='4~ ' + @lv4=/^#{lv4}/ + lv5=s[4] ||='5~ ' + @lv5=/^#{lv5}/ + lv6=s[5] ||='6~ ' + @lv6=/^#{lv6}/ + end + if para=~ /^@make:.+?:num_top:[ ]+(.+?)\n/m + @num_top=$1 + end + if para=~ /^@make:.+?:skin:[ ]+(.+?)\n/m + @doc_skin=$1 + end + when /^@(?:toc|structure):\s+(.+?)\Z/m #% processing doc_toc_str=$1 @toc=doc_toc_str.split(/;\s*/) @toc=[ @toc ] if @toc == String @@ -490,8 +527,8 @@ module SiSU_Param @lv5=/^#{lv5}/ lv6=@toc[5] ||='6~ ' @lv6=/^#{lv6}/ - when /^(?:@(?:level|page|markup):|0~(?:level|page|markup))\s+(.+?)$/m #% processing revisit..., use syntax 0~level new=1,2,3; break=4 - if para =~/(?:@|0~)(?:markup|level|page):?\s+(.+?)\Z/m + when /^@(?:level|page|markup):\s+(.+?)$/m #% processing revisit..., use syntax 0~level new=1,2,3; break=4 + if para =~/@(?:markup|level|page):?\s+(.+?)\Z/m page_break_str=$1 pagebreaks=page_break_str.split(/;\s*/) #pagebreaks=[ pagebreaks ] if pagebreaks == String @@ -508,11 +545,11 @@ module SiSU_Param @toc_lev_limit=toc_lev_limit if toc_lev_limit @flag_auto_heading_num=true if para =~/num_top/ end - if para =~/^(?:@markup:|0~markup)\s+(.+?)$/m #%use of markup depreciated for num_top + if para =~/^@markup:\s+(.+?)$/m #%use of markup depreciated for num_top @markup=$1 @flag_auto_heading_num=true if para =~/num_top/ end - when /^(?:@bold:|0~bold)\s+(.+?)$/m #% processing + when /^@bold:\s+(.+?)$/m #% processing m=$1.strip x=case m when /\/i$/; 'i' @@ -526,7 +563,7 @@ module SiSU_Param else /#{rgx}/ end @make_bold - when /^(?:@(?:italics?|itali[sz]e):|0~(?:italics?|itali[sz]e))\s+(.+?)$/m #% processing Dublin Core - dublin core within + when /^@(?:italics?|itali[sz]e):\s+(.+?)$/m #% processing Dublin Core - dublin core within m=$1.strip x=case m when /\/i$/; 'i' @@ -540,11 +577,11 @@ module SiSU_Param else /#{rgx}/ end @make_italic - when /^(?:@(?:vocabulary|wordlist):|0~(?:vocabulary|wordlist))\s+(.+?)$/m #% processing + when /^@(?:vocabulary|wordlist):\s+(.+?)$/m #% processing @vocabulary=$1 #not actually used by concordance - when /^(?:@skin:|0~skin)\s+(.+?)$/; @doc_skin=$1.strip #% processing - when /^(?:@(?:css|stylesheet):|0~(?:css|stylesheet))\s+(.+?)$/; @doc_css=$1.strip #% processing - when /^(?:@links:|0~links)\s+(.+?)\Z/m #% processing + when /^@skin:\s+(.+?)$/; @doc_skin=$1.strip #% processing + when /^@(?:css|stylesheet):\s+(.+?)$/; @doc_css=$1.strip #% processing + when /^@links:\s+(.+?)\Z/m #% processing doc_links_str=$1 @lnk=[] if doc_links_str=~/\{.+?\}(?:(?:https?|file|ftp):\/|\.\.)\/\S+(?:\s|$)/ @@ -568,16 +605,18 @@ module SiSU_Param end end end - when /^(?:@prefix(?:_[ab])?:|0~prefix(?:_[ab])?)\s/ #% metainfo + when /^@prefix(?:_[ab])?:\s/ #% metainfo if para =~/prefix_a:?\s+/ - @prefix_a=para[/(?:@prefix_a:|0~prefix_a)\s+(.+?)$/im,1] + @prefix_a=para[/@prefix_a:\s+(.+?)$/im,1] end if para =~/prefix(?:_b)?:?\s+/ - @prefix_b=para[/(?:@prefix(?:_b)?:|0~prefix(?:_b)?)\s+(.+?)$/im,1] + @prefix_b=para[/@prefix(?:_b)?:\s+(.+?)$/im,1] end - when /^(?:@suffix:|0~suffix)\s+(.+?)$/m; @suffix=$1 #% metainfo - when /^(?:@information:|0~information)\s+(.+?)$/m; @information=$1 #% metainfo - when /^(?:@topic_register:|0~topic_register)\s+(.+?)$/m; @topic_register=$1 #% metainfo, similar syntax to book index, leave out the ={} i.e. use equivalent of ={(.+?)} + when /^@suffix:\s+(.+?)$/m; @suffix=$1 #% metainfo + when /^@information:\s+(.+?)$/m; @information=$1 #% metainfo + when /^(?:@topic_register:[ ]+|@classify:.+?:topic_register:[ ]+)(.+?)\n/m #% metainfo, similar syntax to book index, leave out the ={} i.e. use equivalent of ={(.+?)} + #when /^@topic_register:\s+(.+?)$/m; @topic_register=$1 #% metainfo, similar syntax to book index, leave out the ={} i.e. use equivalent of ={(.+?)} + @topic_register=$1 u=@topic_register.scan(/[^;]+/) v=[] u.each do |l| @@ -588,30 +627,30 @@ module SiSU_Param @topic_register_array << m end @topic_register_array.sort! - when /^(?:@contact:|0~contact)\s+(.+?)$/m; @contact=$1 #% metainfo - when /^(?:@original_publication:|0~original_publication)\s+(.+?)$/m; @original_publication=$1 #% details of original publication - when /^(?:@icon:|0~icon)\s+(.+?)$/m; @icon=$1 #% processing - when /^(?:@promo:|0~promo)\s+(.+?)$/m + when /^@contact:\s+(.+?)$/m; @contact=$1 #% metainfo + when /^@original_publication:\s+(.+?)$/m; @original_publication=$1 #% details of original publication + when /^@icon:\s+(.+?)$/m; @icon=$1 #% processing + when /^@promo:\s+(.+?)$/m @flag_promo=true @promo=$1.split(/[,;]\s*/) - when /^(?:@ad:|0~ad)\s+(\S+)?\s+(\S+\.png)?\s+(.+?!)\s+(\d+)\s*$/m #% processing + when /^@ad:\s+(\S+)?\s+(\S+\.png)?\s+(.+?!)\s+(\d+)\s*$/m #% processing @ad_url,@ad_png,@ad_alt,@ad_began=$1,$2,$3,$4 - when /0~ad\.home\s+(.+)?\s*$/m #% processing - ad_home_str=$1 - @ad_home=ad_home_str.split(/\s+!/) - when /^(?:@sta?mp(?:ed)?:|0~sta?mp(?:ed)?)\s+(.+?)$/m; @stmp= $1.downcase! #% processing - when /^(?:@(?:rcs|cvs):|0~(?:rcs|cvs))\+?\s+/ #% processing - m=/(?:@(?:rcs|cvs):|0~(?:rcs|cvs))\+?\s+/ #note the + sign to turn on use of rcs or cvs id +# when /0~ad\.home\s+(.+)?\s*$/m #% processing +# ad_home_str=$1 +# @ad_home=ad_home_str.split(/\s+!/) + when /^@sta?mp(?:ed)?:\s+(.+?)$/m; @stmp= $1.downcase! #% processing + when /^@(?:rcs|cvs):\+?\s+/ #% processing + m=/@(?:rcs|cvs):\+?\s+/ #note the + sign to turn on use of rcs or cvs id ver=para[/#{m}(.+)/,1] #RCS or CVS ID tag # eg. # $Id$ contains=/[\$]Id:\s+(\S+),v\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+Exp\s+(?:\S+\s+)?[\$]/ # reason for [$] which is apparently unnecessary is that rcs or cvs will otherwise expand id! if contains.match(ver) filename,vnumber,date,time,operator=contains.match(ver).captures @sc_filename,@sc_number,@sc_date,@sc_time=filename,vnumber,date,time end - @sc_info=true if para[/(?:@(?:rcs|cvs):|0~(?:rcs|cvs))\+/] + @sc_info=true if para[/@(?:rcs|cvs):\+/] when /^@base_program:\s+(.+?)$/; @base_program=$1 #% processing #% break - break, not necessary to process headers further :-) but necessary to extract endnotes etc. ;-( - when /^(?:@man:|0~man)\s+(.+?)\Z/m #% man pages + when /^@man:\s+(.+?)\Z/m #% man pages maninfo_str=$1 maninfo=maninfo_str.split(/;\s*/m) maninfo.each do |x| -- cgit v1.2.3 From 2c1c6e728d509444dd198838ae02af0d88dd0a3e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 19 Dec 2009 16:45:26 -0500 Subject: manpage, fix --- lib/sisu/v1/manpage.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/sisu/v1/manpage.rb b/lib/sisu/v1/manpage.rb index 7129e45a..d3886fc2 100644 --- a/lib/sisu/v1/manpage.rb +++ b/lib/sisu/v1/manpage.rb @@ -270,6 +270,9 @@ WOK para.gsub!(/#{Mx[:gl_bullet]}\s*/,'* ') # bullet markup, marked down para.gsub!(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/,'^\1^') para.gsub!(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/,'[\1]') + para.gsub!(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/,'++\1++') + para.gsub!(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'--\1--') + para.gsub!(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,'"\1"') para.gsub!(/\A\s*#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}#{Mx[:br_line]}/m,"#{Mx[:br_line]}.I \\1#{Mx[:br_line]}") para.gsub!(/\s*#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/m,"#{Mx[:br_line]}.I \\1#{Mx[:br_line]}") para.gsub!(/\A\s*#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}#{Mx[:br_line]}/m,"#{Mx[:br_line]}.BI \\1#{Mx[:br_line]}") @@ -330,7 +333,7 @@ WOK para.gsub!(/(.+?)<\/a>/m,'\1') para.gsub!(/#{Mx[:mk_o]}name#\S+?#{Mx[:mk_c]}/,'') # remove name links para.gsub!(/ |#{Mx[:nbsp]}/,' ') # decide on - para.gsub!(/(["''])/,"\\\\\\1") # quotation marks need escape + #para.gsub!(/(["''])/,"\\\\\\1") #check note claims that quotation marks need escape, however that appears to result in error para.gsub!(/(?:^|[^_\\])#{Mx[:lnk_o]}\s*(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}(?:(?:https?|file|ftp):\/\/\S+|image)/,' [ \1 ]') #"[ #{dir.url.images_local}\/\\1 ]") para.gsub!(/^(?:^|[^_\\])#{Mx[:lnk_o]}\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*#{Mx[:lnk_c]}\S+/,'[image: "\1"]') wordlist=para.scan(/\S+/) -- cgit v1.2.3 From cbd35cfd8366f2fc9e854d2fca5654467974a547 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 19 Dec 2009 16:51:14 -0500 Subject: cgi_sql_common, minor style related, (mostly enclosing of used variables in curly braces) --- lib/sisu/v1/cgi_sql_common.rb | 93 ++++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 46 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v1/cgi_sql_common.rb b/lib/sisu/v1/cgi_sql_common.rb index bd0b38a5..5138e311 100644 --- a/lib/sisu/v1/cgi_sql_common.rb +++ b/lib/sisu/v1/cgi_sql_common.rb @@ -129,7 +129,7 @@ module SiSU_CGI_sql <<-'WOK_SQL' #Common TOP @@limit,@@offset=1000,0 - @base="#@hosturl_db/cgi-bin/#@version.cgi" + @base="#{@hosturl_db}/cgi-bin/#{@version}.cgi" @@canned_search_url=@base @color_heading='#DDFFAA' @color_match='#ffff48' @@ -160,12 +160,12 @@ module SiSU_CGI_sql - + - @@ -174,49 +174,49 @@ module SiSU_CGI_sql end def header2 <<-'WOK_SQL' - +
SiSU --> +
SiSU -->
- + - #@tip - #@search_note - #@the_can + #{@tip} + #{@search_note} + #{@the_can}
- + to search: select which database to search (drop-down menu below); enter your search query (in the form above); and click on the search button (below)
- index - text / grep + index + text / grep WOK_SQL end def buttons2 <<-'WOK_SQL'
- echo query - result stats - search url - searched - available fields - sql statement + echo query + result stats + search url + searched + available fields + sql statement
checks: - default - selected - all - none + default + selected + all + none
@@ -285,8 +285,9 @@ module SiSU_CGI_sql @date_modified=q['dtm'] if q['dtm']=~/\S/ @date_available=q['dta'] if q['dta']=~/\S/ @date_valid=q['dtv'] if q['dtv']=~/\S/ - @filename=q['fns'] if q['fns']=~/\S/ - @filename=q['doc'] if q['search'] !~/search db/ + @filename=if q['doc'] and q['search'] !~/search db/; q['doc'] + elsif q['fns']=~/\S/; q['fns']· + end @@limit=q['ltd'] if q['ltd']=~/\d+/ # 1000 @@offset=q['off'] if q['off']=~/\d+/ # 0 end @@ -525,7 +526,7 @@ module SiSU_CGI_sql

- SiSU + SiSU

@@ -572,7 +573,7 @@ module SiSU_CGI_sql

- GPLv3 + GPLv3

@@ -692,10 +693,10 @@ module SiSU_CGI_sql dtv='&dtv=' + CGI.escape(@search_for.date_valid) if @search_for.date_valid=~/\S/ fns='&fns=' + CGI.escape(@search_for.filename) if @search_for.filename=~/\S/ @@canned_search_url=if checked_all =~/checked/ - "#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}&a=1" - else "#@base?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}" + "#{@base}?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}&a=1" + else "#{@base}?#{s1}#{key}#{ti}#{au}#{sj}#{dsc}#{pb}#{cntr}#{dt}#{ty}#{id}#{src}#{lang}#{rel}#{cov}#{cr}#{co}#{ab}#{dtc}#{dti}#{dtm}#{dta}#{dtv}#{fns}&db=#{cgi['db']}&view=#{cgi['view']}" end - @canned_base_url="#@base?#{s1}&db=#{cgi['db']}" + @canned_base_url="#{@base}?#{s1}&db=#{cgi['db']}" if checked_case=~/\S/ @search[:text][1]=%{documents.clean~'#{@search_for.text1}'} #s1 @search[:endnotes][1]=%{endnotes.clean~'#{@search_for.text1}'} #s1 @@ -705,7 +706,7 @@ module SiSU_CGI_sql end canned_note='search url:' else - @@canned_search_url="#@base?db=#{@db}&view=index" + @@canned_search_url="#{@base}?db=#{@db}&view=index" canned_note='search url example:' end if search_field =~/\S+/ @@ -748,7 +749,7 @@ module SiSU_CGI_sql p_filename=%{filename: #{green}#{@search_for.filename}
} if @search_for.filename =~/\S+/ search_note=<<-WOK - database: #{green}#@db; selected view: #{green}#{cgi['view']} + database: #{green}#{@db}; selected view: #{green}#{cgi['view']} search string: "#{green}#{analyze_format}"
#{p_text} #{p_keywords} #{p_title} #{p_author} #{p_subject} #{p_description} #{p_publisher} #{p_contributor} #{p_date} #{p_type} #{p_format} #{p_identifier} #{p_source} #{p_language} #{p_relation} #{p_coverage} #{p_rights} #{p_comment} #{p_abstract} #{p_filename} @@ -805,10 +806,10 @@ module SiSU_CGI_sql ti=if c['subtitle'] =~/\S+/; "#{c['title']} - #{c['subtitle']}" else c['title'] end - can_txt_srch=if cgi['view']=~/index/; %{red bullet } - else %{red bullet } + can_txt_srch=if cgi['view']=~/index/; %{search } + else %{search } end - title=%{toc html #{ti} by #{c['creator']} #{can_txt_srch}toc html pdf portrait pdf landscape odf manifest
} if file_suffix=~/s/ #hmm watch file_suffix + title=%{toc html #{ti} by #{c['creator']} #{can_txt_srch}toc html pdf portrait pdf landscape odf manifest
} if file_suffix=~/s/ #hmm watch file_suffix if @text_search_flag; title='

'+title else title='
'+title end @@ -844,10 +845,10 @@ module SiSU_CGI_sql else nil end matched_para=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) - matched=c['body'].gsub(/(<\s]+#{@search_regx}[^>]+?>|#@search_regx)/mi,%{\\1}) + matched=c['body'].gsub(/(<\s]+#{@search_regx}[^>]+?>|#{@search_regx})/mi,%{\\1}) else c['body'] end - %{

ocn #{c['ocn']}:

#{matched_para}} + %{

ocn #{c['ocn']}:

#{matched_para}} elsif c['suffix'] =~/1/ #doc %{#{title}

ocn #{c['ocn']}:#{c['body']}} end @@ -857,9 +858,9 @@ module SiSU_CGI_sql end else #elsif cgi['view']=~/index/ #% idx body if c['suffix'] !~/1/ #seg - index=%{#{c['ocn']}, } if @text_search_flag + index=%{#{c['ocn']}, } if @text_search_flag elsif c['suffix'] =~/1/ #doc - index=%{#{c['ocn']}, } + index=%{#{c['ocn']}, } end if c['seg'] =~/\S+/ if @text_search_flag @@ -884,7 +885,7 @@ module SiSU_CGI_sql over='' false end - %{


Found in the main body of #@counter_txt_doc documents, and at #{over} #@counter_txt_ocn locations within.
} + %{
Found in the main body of #{@counter_txt_doc} documents, and at #{over} #{@counter_txt_ocn} locations within.
} else '' end else '' @@ -908,10 +909,10 @@ module SiSU_CGI_sql ti=if e['subtitle'] =~/\S+/; "#{e['title']} - #{e['subtitle']}" else e['title'] end - can_txt_srch=if cgi['view']=~/index/; %{red bullet } - else %{red bullet } + can_txt_srch=if cgi['view']=~/index/; %{search } + else %{search } end - title=%{

toc html #{ti} by #{e['creator']} #{can_txt_srch}toc html pdf portrait pdf landscape odf manifest
} if file_suffix=~/s/ + title=%{

toc html #{ti} by #{e['creator']} #{can_txt_srch}toc html pdf portrait pdf landscape  odf manifest
} if file_suffix=~/s/ @counter_endn_doc+=1 oldtid=e['metadata_tid'].to_i else title = '' @@ -920,13 +921,13 @@ module SiSU_CGI_sql or (cgi['view']!~/index/ and cgi['search'] !~/search db/) #% txt endnotes @counter_endn_ocn+=1 matched_endnote=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) - matched=e['body'].gsub(/(<\s]+#{@search_regx}[^>]+?>|#@search_regx)/mi,%{\\1}) + matched=e['body'].gsub(/(<\s]+#{@search_regx}[^>]+?>|#{@search_regx})/mi,%{\\1}) else e['body'] end - output=%{#{title}
note #{e['nr']} referred to from ocn #{e['ocn']}: #{matched_endnote}} + output=%{#{title}
note #{e['nr']} referred to from ocn #{e['ocn']}: #{matched_endnote}} else #elsif cgi['view']=~/index/ #% idx endnotes @counter_endn_ocn+=1 - output=%{#{title}#{e['nr']}#{e['ocn']}], } + output=%{#{title}#{e['nr']}#{e['ocn']}], } end @counters_endn=if @counter_endn_doc > 0 if checked_stats =~/\S/ @@ -937,7 +938,7 @@ module SiSU_CGI_sql over='' false end - %{Found in the endnotes of #@counter_endn_doc documents, and at #{over} #@counter_endn_ocn locations within.
} + %{Found in the endnotes of #{@counter_endn_doc} documents, and at #{over} #{@counter_endn_ocn} locations within.
} else '' end end -- cgit v1.2.3 From 9a29fdc4292fc230e6a7831191fab58c881af843 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 19 Dec 2009 21:35:44 -0500 Subject: documentation, small changes to description of -m & -n processing flags (closing debian bug #555496) --- lib/sisu/v1/help.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v1/help.rb b/lib/sisu/v1/help.rb index cd5eaf25..101f673b 100644 --- a/lib/sisu/v1/help.rb +++ b/lib/sisu/v1/help.rb @@ -269,11 +269,11 @@ WOK #{@cX.ruby}-M#{@cX.off} #{@cX.green}[filename/wildcard/url]#{@cX.off} maintenance mode, files created for processing are not deleted, and their locations are indicated (also see -V) - #{@cX.ruby}-m#{@cX.off} #{@cX.green}[filename/wildcard/url]#{@cX.off} create (new)metaVerse (used in all subsequent processing). Produce a meta file, the first step in processing, and the file all subsequent processing utilize. (Should usually be run together with other commands to ensure that the lated version of markup source document is used, i.e. add -m flag to other flags required). + #{@cX.ruby}-m#{@cX.off} #{@cX.green}[filename/wildcard/url]#{@cX.off} assumed for most other flags, creates new intermediate files for processing (document abstraction) that is used in all subsequent processing of other output. This step is assumed for most processing flags. To skip it see -n #{@cX.ruby}-N#{@cX.off} #{@cX.green}[filename/wildcard/url]#{@cX.off} document content certificate as md5 digest tree of document produced (as digest.txt), the digest for the document, and digests for each object contained within the document (together with information on software versions that produced it). Try -mNV for verbose digest output to screen - #{@cX.ruby}-n#{@cX.off} #{@cX.green}[filename/wildcard/url]#{@cX.off} skip meta-markup (building of "metaverse"), this skips the equivalent of -m + #{@cX.ruby}-n#{@cX.off} #{@cX.green}[filename/wildcard/url]#{@cX.off} skip the creation of intermediate processing files (document abstraction) if they already exist, this skips the equivalent of -m which is otherwise assumed by most processing flags. #{@cX.ruby}-p#{@cX.off} #{@cX.green}[filename/wildcard]#{@cX.off} produces LaTeX pdf (portrait & landscape). Default paper size is set in config file, or document header, or provided with additional command line parameter, e.g. --papersize='a4' preset sizes include: 'A4', U.S. 'letter' and 'legal' and book sizes 'A5' and 'B5' (system defaults to A4). -- cgit v1.2.3