From 0bd17c97aa19fb4a03c27e07d9e0a631b560b9f6 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 3 Oct 2014 19:15:10 -0400 Subject: v5 v6: cleaning, minor --- lib/sisu/v5/hub_options.rb | 51 ---------------------------------------------- 1 file changed, 51 deletions(-) (limited to 'lib/sisu/v5') diff --git a/lib/sisu/v5/hub_options.rb b/lib/sisu/v5/hub_options.rb index ceeebe78..0854b9c6 100644 --- a/lib/sisu/v5/hub_options.rb +++ b/lib/sisu/v5/hub_options.rb @@ -505,57 +505,6 @@ module SiSU_Commandline end s.strip! end - def expand_numeric_shortcuts_(a) - shortcut=SiSU_Env::InfoProcessingFlag.new - s='' - a.each do |x| - y=case x - when /0/ - (x=~/^-0\S+/) \ - ? x.gsub(/^-0(\S+)/,shortcut.act_0.str + ' -\1') - : x.gsub(/^-0/,shortcut.act_0.str + ' ') - when /1/ - (x=~/^-1\S+/) \ - ? x.gsub(/^-1(\S+)/,shortcut.act_1.str + ' -\1') - : x.gsub(/^-1/,shortcut.act_1.str + ' ') - when /2/ - (x=~/^-2\S+/) \ - ? x.gsub(/^-2(\S+)/,shortcut.act_2.str + ' -\1') - : x.gsub(/^-2/,shortcut.act_2.str + ' ') - when /3/ - (x=~/^-3\S+/) \ - ? x.gsub(/^-3(\S+)/,shortcut.act_3.str + ' -\1') - : x.gsub(/^-3/,shortcut.act_3.str + ' ') - when /4/ - (x=~/^-4\S+/) \ - ? x.gsub(/^-4(\S+)/,shortcut.act_4.str + ' -\1') - : x.gsub(/^-4/,shortcut.act_4.str + ' ') - when /5/ - (x=~/^-5\S+/) \ - ? x.gsub(/^-5(\S+)/,shortcut.act_5.str + ' -\1') - : x.gsub(/^-5/,shortcut.act_5.str + ' ') - when /6/ - (x=~/^-6\S+/) \ - ? x.gsub(/^-6(\S+)/,shortcut.act_6.str + ' -\1') - : x.gsub(/^-6/,shortcut.act_6.str + ' ') - when /7/ - (x=~/^-7\S+/) \ - ? x.gsub(/^-7(\S+)/,shortcut.act_7.str + ' -\1') - : x.gsub(/^-7/,shortcut.act_7.str + ' ') - when /8/ - (x=~/^-8\S+/) \ - ? x.gsub(/^-8(\S+)/,shortcut.act_8.str + ' -\1') - : x.gsub(/^-8/,shortcut.act_8.str + ' ') - when /9/ - (x=~/^-9\S+/) \ - ? x.gsub(/^-9(\S+)/,shortcut.act_9.str + ' -\1') - : x.gsub(/^-9/,shortcut.act_9.str + ' ') - else x - end - s << " #{y}" unless y.empty? - end - s.strip! - end def opt_cmd_and_mod_adjust(ch,select_arr,files) select_arr=select_arr.flatten sel_init=select_arr.flatten -- cgit v1.2.3 From 97864e99d0819efdd3916f11f16cca058438ffc4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 3 Oct 2014 19:20:08 -0400 Subject: v5 v6: --act provides info on current --act0 to --act9 settings * makes it easier to make use of acts 0 to 9 --- lib/sisu/v5/hub_options.rb | 8 +++++- lib/sisu/v5/se_processing.rb | 68 +++++++++++++++++++++++++++++++------------- 2 files changed, 55 insertions(+), 21 deletions(-) (limited to 'lib/sisu/v5') diff --git a/lib/sisu/v5/hub_options.rb b/lib/sisu/v5/hub_options.rb index 0854b9c6..9e35cc36 100644 --- a/lib/sisu/v5/hub_options.rb +++ b/lib/sisu/v5/hub_options.rb @@ -511,7 +511,7 @@ module SiSU_Commandline shortcut=SiSU_Env::InfoProcessingFlag.new if files ==:true if not sel_init.empty? \ - and sel_init.inspect =~/"--act[0-9]/ + and sel_init.inspect =~/"--act[s0-9]?/ sel_init.each do |s| select_arr <<=case s when /--act0/ then shortcut.act_0.arr @@ -524,6 +524,7 @@ module SiSU_Commandline when /--act7/ then shortcut.act_7.arr when /--act8/ then shortcut.act_8.arr when /--act9/ then shortcut.act_9.arr + when /--act/ then shortcut.act_info end end end @@ -688,6 +689,11 @@ module SiSU_Commandline end end else + if not sel_init.empty? \ + and sel_init.inspect =~/"--acts?/ + shortcut.act_info + exit + end if ch =~/c/ then select_arr << '--color-toggle' ch=ch.gsub(/[c]/,'') end diff --git a/lib/sisu/v5/se_processing.rb b/lib/sisu/v5/se_processing.rb index 88b0b7df..8646b5e0 100644 --- a/lib/sisu/v5/se_processing.rb +++ b/lib/sisu/v5/se_processing.rb @@ -472,6 +472,9 @@ module SiSU_Info_Processing_Flag : false end def act_0 #configurable processing flag shortcuts + def default + '--manifest --digest --qrcode --text --html --epub --concordance --pdf --odf --docbook --xhtml --xml-sax --xml-dom --sqlite --verbose' + end def str if defined? @rc['flag']['act0'] \ and @rc['flag']['act0'].is_a?(String) @@ -479,8 +482,7 @@ module SiSU_Info_Processing_Flag elsif defined? @rc['flag']['default'] \ and @rc['flag']['default'].is_a?(String) @rc['flag']['default'] - else - '--manifest --digest --qrcode --text --html --epub --concordance --pdf --odf --docbook --xhtml --xml-sax --xml-dom --sqlite --verbose' + else default end end def arr @@ -489,6 +491,9 @@ module SiSU_Info_Processing_Flag self end def act_1 #configurable processing flag shortcuts + def default + '--manifest --text --html' + end def str if defined? @rc['flag']['act1'] \ and @rc['flag']['act1'].is_a?(String) @@ -496,8 +501,7 @@ module SiSU_Info_Processing_Flag elsif defined? @rc['flag']['i'] \ and @rc['flag']['i'].is_a?(String) @rc['flag']['i'] - else - '--manifest --text --html' + else default end end def arr @@ -506,6 +510,9 @@ module SiSU_Info_Processing_Flag self end def act_2 #configurable processing flag shortcuts + def default + '--manifest --text --html --epub --pdf' + end def str if defined? @rc['flag']['act2'] \ and @rc['flag']['act2'].is_a?(String) @@ -513,8 +520,7 @@ module SiSU_Info_Processing_Flag elsif defined? @rc['flag']['ii'] \ and @rc['flag']['ii'].is_a?(String) @rc['flag']['ii'] - else - '--manifest --text --html --epub --pdf' + else default end end def arr @@ -523,6 +529,9 @@ module SiSU_Info_Processing_Flag self end def act_3 #configurable processing flag shortcuts + def default + '--manifest --text --html --epub --pdf --concordance --qrcode' + end def str if defined? @rc['flag']['act3'] \ and @rc['flag']['act3'].is_a?(String) @@ -530,8 +539,7 @@ module SiSU_Info_Processing_Flag elsif defined? @rc['flag']['iii'] \ and @rc['flag']['iii'].is_a?(String) @rc['flag']['iii'] - else - '--manifest --text --html --epub --pdf --concordance --qrcode' + else default end end def arr @@ -540,6 +548,9 @@ module SiSU_Info_Processing_Flag self end def act_4 #configurable processing flag shortcuts + def default + '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook' + end def str if defined? @rc['flag']['act4'] \ and @rc['flag']['act4'].is_a?(String) @@ -547,8 +558,7 @@ module SiSU_Info_Processing_Flag elsif defined? @rc['flag']['iv'] \ and @rc['flag']['iv'].is_a?(String) @rc['flag']['iv'] - else - '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook' + else default end end def arr @@ -557,6 +567,9 @@ module SiSU_Info_Processing_Flag self end def act_5 #configurable processing flag shortcuts + def default + '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite' + end def str if defined? @rc['flag']['act5'] \ and @rc['flag']['act5'].is_a?(String) @@ -564,8 +577,7 @@ module SiSU_Info_Processing_Flag elsif defined? @rc['flag']['v'] \ and @rc['flag']['v'].is_a?(String) @rc['flag']['v'] - else - '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite' + else default end end def arr @@ -574,12 +586,14 @@ module SiSU_Info_Processing_Flag self end def act_6 #configurable processing flag shortcuts + def default + '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite --xhtml --xml-sax --xml-dom' + end def str if defined? @rc['flag']['act6'] \ and @rc['flag']['act6'].is_a?(String) @rc['flag']['act6'] - else - '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite --xhtml --xml-sax --xml-dom' + else default end end def arr @@ -588,12 +602,14 @@ module SiSU_Info_Processing_Flag self end def act_7 #configurable processing flag shortcuts + def default + '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite --xhtml --xml-sax --xml-dom --source --sisupod' + end def str if defined? @rc['flag']['act7'] \ and @rc['flag']['act7'].is_a?(String) @rc['flag']['act7'] - else - '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite --xhtml --xml-sax --xml-dom --source --sisupod' + else default end end def arr @@ -602,12 +618,14 @@ module SiSU_Info_Processing_Flag self end def act_8 #configurable processing flag shortcuts + def default + '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --xhtml --xml-sax --xml-dom --pg --update' + end def str if defined? @rc['flag']['act8'] \ and @rc['flag']['act8'].is_a?(String) @rc['flag']['act8'] - else - '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --xhtml --xml-sax --xml-dom --pg --update' + else default end end def arr @@ -616,12 +634,14 @@ module SiSU_Info_Processing_Flag self end def act_9 #configurable processing flag shortcuts + def default + '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --xhtml --xml-sax --xml-dom --pg --update --source --sisupod' + end def str if defined? @rc['flag']['act9'] \ and @rc['flag']['act9'].is_a?(String) @rc['flag']['act9'] - else - '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --xhtml --xml-sax --xml-dom --pg --update --source --sisupod' + else default end end def arr @@ -629,6 +649,14 @@ module SiSU_Info_Processing_Flag end self end + def act_info + puts 'current "act" settings:' + acts=%w[ act_0 act_1 act_2 act_3 act_4 act_5 act_6 act_7 act_8 act_9 ] + acts.each_with_index do |m,i| + puts '--act-' + i.to_s + ' == ' \ + + send(m).str + end + end end end __END__ -- cgit v1.2.3 From 14b5f96494f79b75e3e77844561678c793d0caa6 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 3 Oct 2014 19:28:27 -0400 Subject: v5 v6: html, tiny first nudge toward html5 (v5 v6 differ) * document headers, other minor --- lib/sisu/v5/cgi_sql_common.rb | 21 ++++++++++----------- lib/sisu/v5/harvest_authors.rb | 10 +++++----- lib/sisu/v5/harvest_topics.rb | 10 +++++----- lib/sisu/v5/html_concordance.rb | 3 ++- lib/sisu/v5/html_format.rb | 29 ++++++----------------------- lib/sisu/v5/html_manifest.rb | 8 ++++---- lib/sisu/v5/html_segments.rb | 2 +- lib/sisu/v5/se_css.rb | 6 +++--- lib/sisu/v5/shared_metadata.rb | 14 ++++++++++++++ 9 files changed, 50 insertions(+), 53 deletions(-) (limited to 'lib/sisu/v5') diff --git a/lib/sisu/v5/cgi_sql_common.rb b/lib/sisu/v5/cgi_sql_common.rb index 187859ec..a16ca0db 100644 --- a/lib/sisu/v5/cgi_sql_common.rb +++ b/lib/sisu/v5/cgi_sql_common.rb @@ -144,18 +144,17 @@ module SiSU_CGI_SQL end def header_desc <<-WOK_SQL - - + + - - SiSU search form (sample): SiSU information Structuring Universe - - - - - - + + <meta charset="utf-8"> + <meta name="sourcefile" content="SiSU._sst" /> + SiSU search form (sample): SiSU information Structuring Universe + + + + diff --git a/lib/sisu/v5/harvest_authors.rb b/lib/sisu/v5/harvest_authors.rb index 1ea2167a..8db14eee 100644 --- a/lib/sisu/v5/harvest_authors.rb +++ b/lib/sisu/v5/harvest_authors.rb @@ -318,20 +318,20 @@ module SiSU_HarvestAuthors output_structure_by='(output organised by ?)' end < - + + + SiSU Metadata Harvest - Authors - + - + diff --git a/lib/sisu/v5/harvest_topics.rb b/lib/sisu/v5/harvest_topics.rb index bb0bbe22..b2e83683 100644 --- a/lib/sisu/v5/harvest_topics.rb +++ b/lib/sisu/v5/harvest_topics.rb @@ -688,20 +688,20 @@ module SiSU_HarvestTopics output_structure_by='(output organised by ?)' end < - + + + SiSU Metadata Harvest - Topics - + - + diff --git a/lib/sisu/v5/html_concordance.rb b/lib/sisu/v5/html_concordance.rb index 44a6cd69..51acabef 100644 --- a/lib/sisu/v5/html_concordance.rb +++ b/lib/sisu/v5/html_concordance.rb @@ -156,9 +156,10 @@ WOK else '' end < + + SiSU created WordIndex for: #{@md.title.full} diff --git a/lib/sisu/v5/html_format.rb b/lib/sisu/v5/html_format.rb index b8db9445..c34759cf 100644 --- a/lib/sisu/v5/html_format.rb +++ b/lib/sisu/v5/html_format.rb @@ -89,7 +89,7 @@ module SiSU_HTML_Format end end def id #w3c? "tidy" complains about numbers as identifiers ! annoying - (@ocn==nil || @ocn.empty?) ? '' : %{id="o#{@ocn}"} + (@ocn==nil || @ocn.empty?) ? '' : %{id="#{Mx[:ocn_id_char]}#{@ocn}"} end def goto (@ocn==nil || @ocn.empty?) ? '' : %{} @@ -173,9 +173,8 @@ module SiSU_HTML_Format SiSU_XML_Tags::RDF.new(md) end def doc_type - %{ -\n} + %{ +\n} end def table_close %{ @@ -414,6 +413,7 @@ WOK rdf=SiSU_XML_Tags::RDF.new(@md) %{#{doc_type} + #{@md.html_title} @@ -597,11 +597,7 @@ WOK #{@vz.credits_splash} #{@vz.credits_sisu} - - - - @@ -615,11 +611,7 @@ WOK #{@vz.credits_splash} #{@vz.credits_sisu} - - - - } end @@ -630,11 +622,7 @@ WOK #{@vz.credits_splash} #{@vz.credits_sisu} - - - - @@ -775,11 +763,7 @@ WOK #{@vz.credits_splash} #{@vz.credits_sisu} - - - - } end @@ -832,6 +816,7 @@ WOK rdf=SiSU_XML_Tags::RDF.new(@md) %{#{doc_type} + #{@seg_name_html[@seg_name_html_tracker]} - #{@md.html_title} @@ -841,9 +826,7 @@ WOK #{@stylesheet.css_head_seg} </head> #{@vz.color_body} -<a name="top" id="top"></a> -<a name="up" id="up"></a> -<a name="start" id="start"></a>} +<a name="top" id="top"></a>} end def title_banner(title,subtitle,creator) %{ diff --git a/lib/sisu/v5/html_manifest.rb b/lib/sisu/v5/html_manifest.rb index a31420ac..45ee2aae 100644 --- a/lib/sisu/v5/html_manifest.rb +++ b/lib/sisu/v5/html_manifest.rb @@ -888,10 +888,10 @@ WOK vz=SiSU_Viz::Defaults.new format_head_toc=SiSU_HTML_Format::HeadToc.new(@md) @manifest[:html] <<<<WOK -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> +<!DOCTYPE html> +<html> <head> +<meta charset="utf-8"> <title> SiSU manifest: #{@md.title.full} @@ -901,7 +901,7 @@ SiSU manifest: #{@md.title.full} #{@stylesheet.css_head} - + #{format_head_toc.seg_head_navigation_band(:manifest)} WOK if make.build.manifest_minitoc? diff --git a/lib/sisu/v5/html_segments.rb b/lib/sisu/v5/html_segments.rb index 0467a128..555b75bb 100644 --- a/lib/sisu/v5/html_segments.rb +++ b/lib/sisu/v5/html_segments.rb @@ -120,7 +120,7 @@ module SiSU_HTML_Seg << @seg[:idx] \ << '' # << '' elsif @type=='metadata' - metadata=SiSU_Metadata::Summary.new(@md).xhtml_display.metadata + metadata=SiSU_Metadata::Summary.new(@md).html_display.metadata @seg[:headings]=[] format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md) if @title_banner_ diff --git a/lib/sisu/v5/se_css.rb b/lib/sisu/v5/se_css.rb index 378fece8..4d4713e1 100644 --- a/lib/sisu/v5/se_css.rb +++ b/lib/sisu/v5/se_css.rb @@ -169,21 +169,21 @@ module SiSU_CSS @file.path_rel_links.html_scroll_css \ + @env.path.style + '/' \ + @css.html - %{ } + %{ } end def html_seg stylesheet= @file.path_rel_links.html_seg_css \ + @env.path.style + '/' \ + @css.html - %{ } + %{ } end def html_tables stylesheet= @file.path_rel_links.html_seg_css \ + @env.path.style + '/' \ + @css.html - %{ } + %{ } end def xhtml_epub %{ } diff --git a/lib/sisu/v5/shared_metadata.rb b/lib/sisu/v5/shared_metadata.rb index 3a83d674..9f4f4362 100644 --- a/lib/sisu/v5/shared_metadata.rb +++ b/lib/sisu/v5/shared_metadata.rb @@ -829,6 +829,20 @@ WOK end self end + def html_display + def meta_para + inf_xml=char_enc(@inf).amp + inf_xml=char_enc(inf_xml).utf8 + inf_xml=char_enc(inf_xml).br + %{

+ #{@tag}: #{inf_xml} +

} + end + def metadata + SiSU_Metadata::Summary.new(@md,true).metadata_base + end + self + end def xml_sax def meta_para inf_xml=char_enc(@inf).utf8 -- cgit v1.2.3