diff options
Diffstat (limited to 'lib/sisu/v5')
-rw-r--r-- | lib/sisu/v5/cgi_sql_common.rb | 21 | ||||
-rw-r--r-- | lib/sisu/v5/harvest_authors.rb | 10 | ||||
-rw-r--r-- | lib/sisu/v5/harvest_topics.rb | 10 | ||||
-rw-r--r-- | lib/sisu/v5/html_concordance.rb | 3 | ||||
-rw-r--r-- | lib/sisu/v5/html_format.rb | 29 | ||||
-rw-r--r-- | lib/sisu/v5/html_manifest.rb | 8 | ||||
-rw-r--r-- | lib/sisu/v5/html_segments.rb | 2 | ||||
-rw-r--r-- | lib/sisu/v5/hub_options.rb | 59 | ||||
-rw-r--r-- | lib/sisu/v5/se_css.rb | 6 | ||||
-rw-r--r-- | lib/sisu/v5/se_processing.rb | 68 | ||||
-rw-r--r-- | lib/sisu/v5/shared_metadata.rb | 14 |
11 files changed, 105 insertions, 125 deletions
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 - <!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> - <title> - SiSU search form (sample): SiSU information Structuring Universe - </title> - <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> - <meta name="sourcefile" content="SiSU._sst" /> - <link rel="generator" href="http://www.jus.uio.no/sisu" /> - <link rel="shortcut icon" href="#{@image_src}/rb7.ico" /> - <link rel="stylesheet" href="../_sisu/css/html.css" type="text/css" /> + <title> + <meta charset="utf-8"> + <meta name="sourcefile" content="SiSU._sst" /> + SiSU search form (sample): SiSU information Structuring Universe + </title> + <link rel="generator" href="http://www.jus.uio.no/sisu" /> + <link rel="shortcut icon" href="#{@image_src}/rb7.ico" /> + <link href="../_sisu/css/html.css" rel="stylesheet"> </head> <body bgcolor="#ffffff" text="#000000" link="#003090" lang="en" xml:lang="en"> <table summary="band" border="0" cellpadding="3" cellspacing="0"> 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 <<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 Metadata Harvest - Authors</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="dc.title" content= "SiSU metadata harvest, Authors - SiSU information Structuring Universe, Structured information Serialised Units" /> <meta name="dc.subject" content= "document structuring, ebook, publishing, PDF, LaTeX, XML, ODF, SQL, postgresql, sqlite, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, granular search, digital library" /> <meta name="generator" content="#{sv[:project]} #{sv[:version]} of #{sv[:date_stamp]} (n*x and Ruby!)" /> <link rel="generator" href="http://www.jus.uio.no/sisu/SiSU" /> -<link rel="stylesheet" href="#{css_path}" type="text/css" /> +<link href="#{css_path}" rel="stylesheet" > <link rel="shortcut icon" href="../_sisu/image/rb7.ico" /> </head> -<body bgcolor="#ffffff" text="#000000" link="#003090" lang="en" xml:lang="en"> +<body lang="en" xml:lang="en"> <a name="top" id="top"></a> <a name="up" id="up"></a> <a name="start" id="start"></a> 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 <<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 Metadata Harvest - Topics</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="dc.title" content= "SiSU metadata harvest, Topics - SiSU information Structuring Universe, Structured information Serialised Units" /> <meta name="dc.subject" content= "document structuring, ebook, publishing, PDF, LaTeX, XML, ODF, SQL, postgresql, sqlite, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, granular search, digital library" /> <meta name="generator" content="#{sv[:project]} #{sv[:version]} of #{sv[:date_stamp]} (n*x and Ruby!)" /> <link rel="generator" href="http://www.jus.uio.no/sisu/SiSU" /> -<link rel="stylesheet" href="#{css_path}" type="text/css" /> +<link href="#{css_path}" rel="stylesheet"> <link rel="shortcut icon" href="../_sisu/image/rb7.ico" /> </head> -<body bgcolor="#ffffff" text="#000000" link="#003090" lang="en" xml:lang="en"> +<body lang="en" xml:lang="en"> <a name="top" id="top"></a> <a name="up" id="up"></a> <a name="start" id="start"></a> 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 <<WOK -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<!DOCTYPE html> <html> <head> + <meta charset="utf-8"> <title> SiSU created WordIndex for: #{@md.title.full} </title> 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?) ? '' : %{<a href="##{@ocn_html_identifier}#{@ocn}">} @@ -173,9 +173,8 @@ module SiSU_HTML_Format SiSU_XML_Tags::RDF.new(md) end def doc_type - %{<!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">\n} + %{<!DOCTYPE html> +<html>\n} end def table_close %{ </font> @@ -414,6 +413,7 @@ WOK rdf=SiSU_XML_Tags::RDF.new(@md) %{#{doc_type} <head> + <meta charset="utf-8"> <title> #{@md.html_title} </title> @@ -597,11 +597,7 @@ WOK #{@vz.credits_splash} #{@vz.credits_sisu} <a name="bottom" id="bottom"></a> -<a name="down" id="down"></a> <a name="end" id="end"></a> -<a name="finish" id="finish"></a> -<a name="stop" id="stop"></a> -<a name="credits"></a> </div> </div> </div> @@ -615,11 +611,7 @@ WOK #{@vz.credits_splash} #{@vz.credits_sisu} <a name="bottom" id="bottom"></a> -<a name="down" id="down"></a> <a name="end" id="end"></a> -<a name="finish" id="finish"></a> -<a name="stop" id="stop"></a> -<a name="credits"></a> </div> } end @@ -630,11 +622,7 @@ WOK #{@vz.credits_splash} #{@vz.credits_sisu} <a name="bottom" id="bottom"></a> -<a name="down" id="down"></a> <a name="end" id="end"></a> -<a name="finish" id="finish"></a> -<a name="stop" id="stop"></a> -<a name="credits"></a> </div> </div> </div> @@ -775,11 +763,7 @@ WOK #{@vz.credits_splash} #{@vz.credits_sisu} <a name="bottom" id="bottom"></a> -<a name="down" id="down"></a> <a name="end" id="end"></a> -<a name="finish" id="finish"></a> -<a name="stop" id="stop"></a> -<a name="credits" id="credits"></a> </div></div> } end @@ -832,6 +816,7 @@ WOK rdf=SiSU_XML_Tags::RDF.new(@md) %{#{doc_type} <head> + <meta charset="utf-8"> <title> #{@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} </title> @@ -901,7 +901,7 @@ SiSU manifest: #{@md.title.full} <link rel="shortcut icon" href="#{@f.path_rel_links.html_scroll_css}_sisu/image_sys/rb7.ico" /> #{@stylesheet.css_head} </head> -<body bgcolor="#ffffff" text="#000000" link="#003090" lang="en" xml:lang="en"> +<body lang="en" xml:lang="en"> #{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] \ << '</div>' # << '</div>' 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/hub_options.rb b/lib/sisu/v5/hub_options.rb index ceeebe78..9e35cc36 100644 --- a/lib/sisu/v5/hub_options.rb +++ b/lib/sisu/v5/hub_options.rb @@ -505,64 +505,13 @@ 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 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 @@ -575,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 @@ -739,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_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 - %{ <link rel="stylesheet" href="#{stylesheet}" type="text/css" />} + %{ <link href="#{stylesheet}" rel="stylesheet">} end def html_seg stylesheet= @file.path_rel_links.html_seg_css \ + @env.path.style + '/' \ + @css.html - %{ <link rel="stylesheet" href="#{stylesheet}" type="text/css" />} + %{ <link href="#{stylesheet}" rel="stylesheet">} end def html_tables stylesheet= @file.path_rel_links.html_seg_css \ + @env.path.style + '/' \ + @css.html - %{ <link rel="stylesheet" href="#{stylesheet}" type="text/css" />} + %{ <link href="#{stylesheet}" rel="stylesheet">} end def xhtml_epub %{ <link rel="stylesheet" href="css/xhtml.css" type="text/css" />} 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__ 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 + %{<p class="norm"> + <b>#{@tag}</b>: #{inf_xml} +</p>} + 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 |