From 546ea64f0ab03a52b1eb67cf216c8cc4c39d74c4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 13 Jul 2007 01:58:26 +0100 Subject: syntax hilighting (gedit), sisu rights and other info in outputs, cgi sample search improvements, see changelog --- lib/sisu/v0/cgi_sql_common.rb | 298 +++++++++++++++++++++------------------- lib/sisu/v0/db_import.rb | 71 ++++++---- lib/sisu/v0/defaults.rb | 53 ++++--- lib/sisu/v0/html_format.rb | 1 - lib/sisu/v0/html_segments.rb | 4 +- lib/sisu/v0/shared_html_lite.rb | 27 ++-- lib/sisu/v0/sysenv.rb | 3 + lib/sisu/v0/texpdf_format.rb | 12 +- 8 files changed, 269 insertions(+), 200 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v0/cgi_sql_common.rb b/lib/sisu/v0/cgi_sql_common.rb index 762632dc..6239b6bf 100644 --- a/lib/sisu/v0/cgi_sql_common.rb +++ b/lib/sisu/v0/cgi_sql_common.rb @@ -174,7 +174,7 @@ module SiSU_CGI_sql
WOK end def widget_way_better + v=SiSU_Env::Info_version.new.get_version <
- + #@tip @@ -451,28 +451,31 @@ module SiSU_CGI_sql end self end - def sql_canned_search_url - can=sql_canned_search - page=(sql_offset.to_i + sql_limit.to_i)/sql_limit.to_i - case page.to_s - when /^1$/ - %{

- pg. #{page.to_s} -   > -
} - when /^2$/ - %{

- <   - pg. #{page.to_s} -   > -
} - else - %{

- |<   - <   - pg. #{page.to_s} -   > -
} + def sql_canned_search_url(ok) + if ok + can=sql_canned_search + page=(sql_offset.to_i + sql_limit.to_i)/sql_limit.to_i + case page.to_s + when /^1$/ + %{

+ pg. #{page.to_s} +   > +
} + when /^2$/ + %{

+ <   + pg. #{page.to_s} +   > +
} + else + %{

+ |<   + <   + pg. #{page.to_s} +   > +
} + end + else '' end end WOK_SQL @@ -483,51 +486,7 @@ module SiSU_CGI_sql def tail <<-'WOK'


- - +
- -
-

- - - GPLv3 - -

-
-

- SiSU © Ralph Amissah - 1993, current 2007 - All Rights Reserved. -
- SiSU is released under - GPL v3 - or later - - http://www.gnu.org/licenses/gpl.html - -

-
-

- Developed using - - Ruby - - on - - Debian/Gnu/Linux - - software infrastructure, - & with the usual GPL (or OSS) suspects. -
- Better - "performance, reliability, scalability, security & total cost of ownership" - [not to mention flexibility & choice] -
- Get With the Future - - Way Better! - -

-
+ +

@@ -540,9 +499,16 @@ module SiSU_CGI_sql

Generated by - SiSU - - #{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]}) + #{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]}) +
+ + #{v[:project]} © Ralph Amissah + 1993, current 2007. + All Rights Reserved. +
+ + #{v[:project]} + is software for document structuring, publishing and search,
www.jus.uio.no/sisu @@ -551,7 +517,6 @@ module SiSU_CGI_sql www.sisudoc.org -

w3 since October 3 1993 @@ -560,7 +525,7 @@ module SiSU_CGI_sql

- Using: + #{v[:project]} using:
Standard SiSU markup syntax,
Standard SiSU meta-markup syntax, and the
Standard SiSU object citation numbering and system, (object/text positioning system) @@ -568,6 +533,44 @@ module SiSU_CGI_sql © Ralph Amissah 1997, current 2007. All Rights Reserved.

+
+

+ + GPLv3 + +

+
+

+ SiSU is released under + GPL v3 + or later, + + http://www.gnu.org/licenses/gpl.html + +

+
+

+ #{v[:project]}, developed using + + Ruby + + on + + Debian/Gnu/Linux + + software infrastructure, + with the usual GPL (or OSS) suspects. +
+ Better - "performance, reliability, scalability, security & total cost of ownership" + [not to mention flexibility & choice] +
+ Get With the Future + + Way Better! + +

@@ -658,6 +661,7 @@ module SiSU_CGI_sql "#@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']}" if checked_case=~/\S/ @search[:text][1]=%{documents.clean~'#{@search_for.text1}'} #s1 @search[:endnotes][1]=%{endnotes.clean~'#{@search_for.text1}'} #s1 @@ -767,75 +771,82 @@ module SiSU_CGI_sql ti=if c['subtitle'] =~/\S+/; "#{c['title']} - #{c['subtitle']}" else c['title'] end - title=%{toc html #{ti} by #{c['creator']} toc htmlpdf portraitpdf landscape odf manifest
} if file_suffix=~/s/ #hmm watch file_suffix - if @text_search_flag; title='

'+title - else title='
'+title - end - @counter_txt_doc+=1 - oldtid=c['tid'].to_i - else title='' + can_txt_srch=if cgi['view']=~/index/; %{red bullet } + else %{red bullet } end - if @text_search_flag - if cgi['view']=~/text/ #% txt body - text=if c['suffix'] !~/1/ #seg - if @search_for.text1 =~/\S+/ or q['s1'] =~/\S+/ #% only this branch is working !! - unescaped_search=if @search_for.text1 =~/\S+/; CGI.unescape(@search_for.text1) - elsif q['s1'] =~/\S+/; CGI.unescape(q['s1']) - else nil - end - @search_regx=if unescaped_search #check - search_regex=[] - build=unescaped_search.scan(/\S+/).each do |g| - if g.to_s =~/(AND|OR)/ - search_regex << '|' - else search_regex << %{#{g.to_s}} - end - end - search_regex=search_regex.join(' ') - search_regex=search_regex.gsub(/\s*\|\s*/,'|') - search_regex.to_s - else nil - 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 + if @text_search_flag; title='

'+title + else title='
'+title + end + @counter_txt_doc+=1 + oldtid=c['tid'].to_i + else title='' + end + if @text_search_flag + if cgi['view']=~/text/ #% txt body + text=if c['suffix'] !~/1/ #seg + if @search_for.text1 =~/\S+/ or q['s1'] =~/\S+/ #% only this branch is working !! + unescaped_search=if @search_for.text1 =~/\S+/; CGI.unescape(@search_for.text1) + elsif q['s1'] =~/\S+/; CGI.unescape(q['s1']) else nil end - matched_para=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) - matched=if c['body'] =~/\\1})) + @search_regx=if unescaped_search #check + search_regex=[] + build=unescaped_search.scan(/\S+/).each do |g| + if g.to_s =~/(AND|OR)/ + search_regex << '|' + else search_regex << %{#{g.to_s}} + end end - matched - else c['body'] + search_regex=search_regex.join(' ') + search_regex=search_regex.gsub(/\s*\|\s*/,'|') + Regexp.new(search_regex, Regexp::IGNORECASE) + else nil end - %{

ocn #{c['ocn']}:

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

ocn #{c['ocn']}:#{c['body']}} - end - @counter_txt_ocn+=1 - output=if c['seg'] =~/\S+/; title+text - else text + else nil end - elsif cgi['view']=~/index/ #% idx body - if c['suffix'] !~/1/ #seg - index=%{#{c['ocn']}, } if @text_search_flag - elsif c['suffix'] =~/1/ #doc - index=%{#{c['ocn']}, } + 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}) + else c['body'] end - if c['seg'] =~/\S+/ - if @text_search_flag - @counter_txt_ocn+=1 - output=title+index - end - else + %{


ocn #{c['ocn']}:

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

ocn #{c['ocn']}:#{c['body']}} + end + @counter_txt_ocn+=1 + output=if c['seg'] =~/\S+/; title+text + else text + end + elsif cgi['view']=~/index/ #% idx body + if c['suffix'] !~/1/ #seg + index=%{#{c['ocn']}, } if @text_search_flag + elsif c['suffix'] =~/1/ #doc + index=%{#{c['ocn']}, } + end + if c['seg'] =~/\S+/ + if @text_search_flag @counter_txt_ocn+=1 - output=unless c['suffix'] =~/1/; title+index - else %{#{title}#{c['ocn'].sort}, } - end + output=title+index + end + else + @counter_txt_ocn+=1 + output=unless c['suffix'] =~/1/; title+index + else %{#{title}#{c['ocn'].sort}, } end end - else output=title end + else output=title + end @counters_txt=if @counter_txt_doc > 0 if checked_stats =~/\S/ - %{


Found in the main body of #@counter_txt_doc documents, and at #@counter_txt_ocn locations within.
} + @@lt_t=if @counter_txt_ocn == dbi_statement.sql_limit.to_i + over='over' + true + else + over='' + false + end + %{
Found in the main body of #@counter_txt_doc documents, and at #{over} #@counter_txt_ocn locations within.
} else '' end else '' @@ -859,7 +870,10 @@ module SiSU_CGI_sql ti=if e['subtitle'] =~/\S+/; "#{e['title']} - #{e['subtitle']}" else e['title'] end - title=%{

toc html #{ti} by #{e['creator']} toc html pdf portraitpdf landscape odf manifest
} if file_suffix=~/s/ + can_txt_srch=if cgi['view']=~/index/; %{red bullet } + else %{red bullet } + end + title=%{

toc html #{ti} by #{e['creator']} #{can_txt_srch}toc html pdf portraitpdf landscape odf manifest
} if file_suffix=~/s/ @counter_endn_doc+=1 oldtid=e['metadata_tid'].to_i else title = '' @@ -867,21 +881,24 @@ module SiSU_CGI_sql if cgi['view']=~/text/ #% txt endnotes @counter_endn_ocn+=1 matched_endnote=if (@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) - matched=if e['body'] =~/\\1}) - #e['body'] - end - matched + 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}} elsif cgi['view']=~/index/ #% idx endnotes @counter_endn_ocn+=1 output=%{#{title}#{e['nr']}#{e['ocn']}], } end @counters_endn=if @counter_endn_doc > 0 if checked_stats =~/\S/ - %{Found in the endnotes of #@counter_endn_doc documents, and at #@counter_endn_ocn locations within.
} + @@lt_e=if @counter_endn_ocn == dbi_statement.sql_limit.to_i + over='over' + true + else + over='' + false + end + %{Found in the endnotes of #@counter_endn_doc documents, and at #{over} #@counter_endn_ocn locations within.
} else '' end end @@ -891,7 +908,12 @@ module SiSU_CGI_sql end offset=dbi_statement.sql_offset.to_s limit=dbi_statement.sql_limit.to_s - canned=dbi_statement.sql_canned_search_url.to_s + @@lt_t ||=false; @@lt_e ||=false + canned=if (@@lt_t or @@lt_e) + dbi_statement.sql_canned_search_url(true).to_s + else + dbi_statement.sql_canned_search_url(false).to_s + end limit=dbi_statement.sql_limit.to_s cgi.out{@header + @counters_txt + @counters_endn + @body_main.join + @endnotes.join + canned + @tail} #% print cgi_output_header+counters+body+endnotes end diff --git a/lib/sisu/v0/db_import.rb b/lib/sisu/v0/db_import.rb index 1148ab63..b9528063 100644 --- a/lib/sisu/v0/db_import.rb +++ b/lib/sisu/v0/db_import.rb @@ -63,6 +63,7 @@ module SiSU_DB_import include SiSU_Param include SiSU_Screen @@dl=nil + @@hname=nil attr_accessor :tp def initialize(opt,conn='',sql_type='pg') @opt,@conn,@sql_type=opt,conn,sql_type @@ -381,7 +382,7 @@ module SiSU_DB_import @en_pls << txt.scan(/~\[[+](\d+).+?\]~/) txt.gsub!(/~\[([+]\d+).+?\]~/,'\1') end - @col[:body]=SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:lev]).lev4_minus + @col[:body]=SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).lev4_minus special_character_escape(@col[:body]) @col[:plaintext]=@col[:body].dup strip_markup(@col[:plaintext]) @@ -405,25 +406,31 @@ module SiSU_DB_import @col[:lv4]+=1 @col[:lid]+=1 @col[:lev]=4 + @hname=if @col[:seg] and not @col[:seg].to_s.empty? + @@hname=@col[:seg].to_s + else @@hname + end + @env=SiSU_Env::Info_env.new(@md.fns) + @base_url="#{@env.url.root}/#{@md.fnb}/#@hname.html" if txt =~ /~\{.+?\}~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en << txt.scan(/~\{(\d+).+?\}~/) - txt.gsub!(/~\{(\d+).+?\}~/,'\1') + txt.gsub!(/~\{(\d+).+?\}~/,%{\\1}) end if txt =~/~\[\*.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_ast << txt.scan(/~\[[*](\d+).+?\]~/) - txt.gsub!(/~\[([*]\d+).+?\]~/,'\1') + txt.gsub!(/~\[([*]\d+).+?\]~/,%{\\1}) end if txt =~/~\[\+.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_pls << txt.scan(/~\[[+](\d+).+?\]~/) - txt.gsub!(/~\[([+]\d+).+?\]~/,'\1') + txt.gsub!(/~\[([+]\d+).+?\]~/,%{\\1}) end - @col[:body]=SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:lev],@col[:seg]).lev4_plus + @col[:body]=SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).lev4_plus special_character_escape(@col[:body]) @col[:plaintext]=@col[:body].dup strip_markup(@col[:plaintext]) @@ -445,25 +452,31 @@ module SiSU_DB_import @col[:lv5]+=1 @col[:lid]+=1 @col[:lev]=5 + @hname=if @col[:seg] and not @col[:seg].to_s.empty? + @@hname=@col[:seg].to_s + else @@hname + end + @env=SiSU_Env::Info_env.new(@md.fns) + @base_url="#{@env.url.root}/#{@md.fnb}/#@hname.html" if txt =~ /~\{.+?\}~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en << txt.scan(/~\{(\d+).+?\}~/) - txt.gsub!(/~\{(\d+).+?\}~/,'\1') + txt.gsub!(/~\{(\d+).+?\}~/,%{\\1}) end if txt =~/~\[\*.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_ast << txt.scan(/~\[[*](\d+).+?\]~/) - txt.gsub!(/~\[([*]\d+).+?\]~/,'\1') + txt.gsub!(/~\[([*]\d+).+?\]~/,%{\\1}) end if txt =~/~\[\+.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_pls << txt.scan(/~\[[+](\d+).+?\]~/) - txt.gsub!(/~\[([+]\d+).+?\]~/,'\1') + txt.gsub!(/~\[([+]\d+).+?\]~/,%{\\1}) end - @col[:body]=SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns],@col[:lev],@col[:seg]).lev4_plus + @col[:body]=SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).lev4_plus special_character_escape(@col[:body]) @col[:plaintext]=@col[:body].dup strip_markup(@col[:plaintext]) @@ -485,25 +498,31 @@ module SiSU_DB_import @col[:lv6]+=1 @col[:lid]+=1 @col[:lev]=6 + @hname=if @col[:seg] and not @col[:seg].to_s.empty? + @@hname=@col[:seg].to_s + else @@hname + end + @env=SiSU_Env::Info_env.new(@md.fns) + @base_url="#{@env.url.root}/#{@md.fnb}/#@hname.html" if txt =~ /~\{.+?\}~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en << txt.scan(/~\{(\d+).+?\}~/) - txt.gsub!(/~\{(\d+).+?\}~/,'\1') + txt.gsub!(/~\{(\d+).+?\}~/,%{\\1}) end if txt =~/~\[\*.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_ast << txt.scan(/~\[[*](\d+).+?\]~/) - txt.gsub!(/~\[([*]\d+).+?\]~/,'\1') + txt.gsub!(/~\[([*]\d+).+?\]~/,%{\\1}) end if txt =~/~\[\+.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_pls << txt.scan(/~\[[+](\d+).+?\]~/) - txt.gsub!(/~\[([+]\d+).+?\]~/,'\1') + txt.gsub!(/~\[([+]\d+).+?\]~/,%{\\1}) end - @col[:body]=SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns],@col[:lev],@col[:seg]).lev4_plus + @col[:body]=SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).lev4_plus special_character_escape(@col[:body]) @col[:plaintext]=@col[:body].dup strip_markup(@col[:plaintext]) @@ -520,24 +539,30 @@ module SiSU_DB_import @col[:lid]+=1 txt='' txt,@col[:ocn],@col[:ocnd],@col[:ocns],@col[:digest_clean],@col[:digest_all]=(/(.+?)<~(\d+);((?:\w|[0-6]:)\d+);(\w\d+)><([0-9a-f]{#{@@dl}}):([0-9a-f]{#{@@dl}})>/m).match(data).captures + @hname=if @col[:seg] and not @col[:seg].to_s.empty? + @@hname=@col[:seg].to_s + else @@hname + end + @env=SiSU_Env::Info_env.new(@md.fns) + @base_url="#{@env.url.root}/#{@md.fnb}/#@hname.html" if txt =~ /~\{.+?\}~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en << txt.scan(/~\{(\d+).+?\}~/) - txt.gsub!(/~\{(\d+).+?\}~/,'\1') + txt.gsub!(/~\{(\d+).+?\}~/,%{\\1}) #txt.gsub!(/~\{(\d+).+?\}~/,'^[\1]') # remove endnote, keep endnote reference number, display as, e.g. [^1] end if txt =~/~\[\*.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_ast << txt.scan(/~\[[*](\d+).+?\]~/) - txt.gsub!(/~\[([*]\d+).+?\]~/,'\1') + txt.gsub!(/~\[([*]\d+).+?\]~/,%{\\1}) end if txt =~/~\[\+.+?\]~/ word_mode=txt.scan(/\S+/) endnote_range(word_mode) @en_pls << txt.scan(/~\[[+](\d+).+?\]~/) - txt.gsub!(/~\[([+]\d+).+?\]~/,'\1') + txt.gsub!(/~\[([+]\d+).+?\]~/,%{\\1}) end if @sql_type=~/pg/ and txt.size > (document_clean - 1) #% examine pg build & remove limitation puts "\n\nTOO LARGE (TXT - see error log)\n\n" @@ -553,13 +578,13 @@ module SiSU_DB_import if @en_pls[0]; @en_a_plus,@en_z_plus=@en_pls[0].first,@en_pls[0].last end @col[:body]=if txt=~// #watch - SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns]).html_table + SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).html_table elsif txt=~/<:i1>/ - SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns]).indent1 + SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).indent1 elsif txt=~/<:i2>/ - SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns]).indent2 + SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).indent2 else - SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns]).norm + SiSU_Format_Shared::CSS_Format.new(@md,txt,@col).norm end special_character_escape(@col[:body]) @col[:plaintext]=@col[:body].dup @@ -578,7 +603,7 @@ module SiSU_DB_import en,txt,digest_clean=$1,$2,$3 end @id_n+=1 - body=SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns],en).endnote + body=SiSU_Format_Shared::CSS_Format.new(@md,txt,@col,en).endnote special_character_escape(body) special_character_escape(txt) strip_markup(txt) @@ -607,7 +632,7 @@ module SiSU_DB_import en,txt,digest_clean=$1,$2,$3 end @id_n+=1 - body=SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns],en).endnote + body=SiSU_Format_Shared::CSS_Format.new(@md,txt,@col,en).endnote special_character_escape(body) special_character_escape(txt) strip_markup(txt) @@ -636,7 +661,7 @@ module SiSU_DB_import en,txt,digest_clean=$1,$2,$3 end @id_n+=1 - body=SiSU_Format_Shared::CSS_Format.new(txt,@col[:ocn],@col[:ocnd],@col[:ocns],en).endnote + body=SiSU_Format_Shared::CSS_Format.new(@md,txt,@col,en).endnote special_character_escape(body) special_character_escape(txt) strip_markup(txt) diff --git a/lib/sisu/v0/defaults.rb b/lib/sisu/v0/defaults.rb index ef4c9df4..6585e700 100644 --- a/lib/sisu/v0/defaults.rb +++ b/lib/sisu/v0/defaults.rb @@ -67,7 +67,7 @@ module SiSU_Viz #@css=SiSU_Env::CSS_default.new @fonts='verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman' # 'verdana, arial, georgia, tahoma, sans-serif, helvetica, "times new roman", times, roman' @dir=SiSU_Env::Info_env.new - @date=SiSU_Env::Info_date.new + @date=SiSU_Env::Info_date.new #{@date.year} end #% glyph def glyph_bullet # • @@ -1306,7 +1306,6 @@ WOK WOK end def widget_sisu - #{@date.year} v=SiSU_Env::Info_version.new.get_version < @@ -1319,11 +1318,23 @@ WOK

- Generated by + Output generated by - SiSU + #{v[:project]} - #{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]}) + #{v[:version]} #{v[:date]} (#{v[:date_stamp]}) +
+ + #{v[:project]} + + © Ralph Amissah. + 1997, current #{@date.year_static}. + All Rights Reserved. +
+ + #{v[:project]} + + is software for document structuring, publishing and search,
www.jus.uio.no/sisu @@ -1332,7 +1343,6 @@ WOK www.sisudoc.org -

w3 since October 3 1993 @@ -1341,18 +1351,19 @@ WOK

- Using: + #{v[:project]} using:
Standard SiSU markup syntax,
Standard SiSU meta-markup syntax, and the
Standard SiSU object citation numbering and system, (object/text positioning system)
- © Ralph Amissah 1997, current 2007. + © Ralph Amissah 1997, current #{@date.year_static}. All Rights Reserved.

@@ -1363,20 +1374,19 @@ WOK

- SiSU © Ralph Amissah - 1993, current 2007 - All Rights Reserved. -
- SiSU is released under - GPL v3 - or later + + #{v[:project]} + + is released under + GPLv3 + or later, http://www.gnu.org/licenses/gpl.html

- Developed using + #{v[:project]}, developed using Ruby @@ -1385,7 +1395,7 @@ WOK Debian/Gnu/Linux software infrastructure, - & with the usual GPL (or OSS) suspects. + with the usual GPL (or OSS) suspects.
Better - "performance, reliability, scalability, security & total cost of ownership" [not to mention flexibility & choice] @@ -1425,8 +1435,8 @@ WOK def credits_sisu %{#{widgets_open}

- #{widget_way_better} #{widget_sisu} + #{widget_way_better}
} end def credits_splash @@ -1484,8 +1494,7 @@ documents, books, digital libraries in plaintext, html, XHTML, XML, ODF (OpenDocument), LaTeX, PDF, SQL (PostgreSQL and SQLite), and for search - + @@ -1512,7 +1521,7 @@ for search Structured information, Serialized Units

-software for electronic texts, document collections, books, digital libraries, and search +software for electronic texts, document collections, books, digital libraries, and search,

with "atomic search" and text positioning system (shared text citation numbering: "ocn") @@ -1846,7 +1855,7 @@ ralph.amissah@gmail.com

-2007 +#{@date.year_static}

w3 since October 3 1993 diff --git a/lib/sisu/v0/html_format.rb b/lib/sisu/v0/html_format.rb index 442f2b19..cbbcadb4 100644 --- a/lib/sisu/v0/html_format.rb +++ b/lib/sisu/v0/html_format.rb @@ -839,7 +839,6 @@ WOK Endnotes

#{@vz.table_close} -#{table_top_control}

Endnotes

} end def navigation_table diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb index 1221f1f1..96eb0bee 100644 --- a/lib/sisu/v0/html_segments.rb +++ b/lib/sisu/v0/html_segments.rb @@ -190,8 +190,8 @@ module SiSU_HTML_seg def header_art(para) format_head_seg=SiSU_HTML_Format_type::Head_seg.new(@md) if para =~/^[0-6]~/ #2004w27/5 - if @@tracker < @@seg_total-1; @@seg[:dot_nav]=format_head_seg.dot_control_pre_next #if format_head_seg.dot_control_pre_next - else @@seg[:dot_nav]=format_head_seg.dot_control_pre #if format_head_seg.dot_control_pre + if @@tracker < @@seg_total-1; @@seg[:dot_nav]=format_head_seg.dot_control_pre_next + else @@seg[:dot_nav]=format_head_seg.dot_control_pre end end ads=SiSU_HTML_promo::Ad.new(@md) diff --git a/lib/sisu/v0/shared_html_lite.rb b/lib/sisu/v0/shared_html_lite.rb index 5285b6db..76def67d 100644 --- a/lib/sisu/v0/shared_html_lite.rb +++ b/lib/sisu/v0/shared_html_lite.rb @@ -60,18 +60,29 @@ module SiSU_Format_Shared include SiSU_Viz class CSS_Format require "#{SiSU_lib}/defaults" - def initialize(content=nil,id=nil,ocnd='',ocns='',lv='',hname=nil) + @@fns=nil + def initialize(md,content=nil,col=nil,en=nil) content.gsub!(/<:i[12]>/,'') - @content=content - @id=@ocn=id - @ocnd,@ocns=ocnd,ocns - @lv=@notenumber=lv.to_s - @hname=hname.to_s + @md,@content=md,content + @id=@ocn=col[:id] + @ocnd,@ocns=col[:ocnd],col[:ocns] + @notenumber=en + @lv=col[:lev].to_s + @@hname=if @md.fns != @@fns + @@fns=@md.fns + '' + end + @hname=if col[:seg] and not col[:seg].to_s.empty? + @@hname=col[:seg].to_s + else @@hname + end @tab="\t" @url_brace=SiSU_Viz::Skin.new.url_decoration # lots introduced to do html tables in db @@tablehead,@@tablefoot=[],[] @vz=SiSU_Env::Get_init.instance.skin + @env=SiSU_Env::Info_env.new(@md.fns) + @base_url="#{@env.url.root}/#{@md.fnb}/#@hname.html" end def urls(data) @words=[] @@ -128,11 +139,11 @@ module SiSU_Format_Shared def paragraph %{#{@tab*1}

\n#{@tab*2}#@content\n#{@tab*1}

\n} << "\n" end - def endnote + def endnote #used only by db @content=markup(@content) < -#{@tab*2}#@notenumber. #@content +#{@tab*2}#@notenumber. #@content #{@tab*1}

GSUB end diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb index ddd84aaa..e9e39268 100644 --- a/lib/sisu/v0/sysenv.rb +++ b/lib/sisu/v0/sysenv.rb @@ -84,6 +84,9 @@ module SiSU_Env def monthonly @t.month end + def year_static + '2007' + end end class Info_system require 'rbconfig' diff --git a/lib/sisu/v0/texpdf_format.rb b/lib/sisu/v0/texpdf_format.rb index 4d69c1ae..72cd3932 100644 --- a/lib/sisu/v0/texpdf_format.rb +++ b/lib/sisu/v0/texpdf_format.rb @@ -64,7 +64,7 @@ module SiSU_TeX_Pdf def initialize(md,orientation='') @md,@orientation=md,orientation @vz=SiSU_Env::Get_init.instance.skin - @date=SiSU_Env::Info_date.new + @date=SiSU_Env::Info_date.new # #{@date.year} @copymark='{\\begin{footnotesize}\\raisebox{1ex}{\\copyright}\\end{footnotesize}}' #@url_brace=SiSU_Viz::Skin.new.url_decoration end @@ -144,9 +144,9 @@ WOK \\\\ ~ {\\begin{footnotesize}#{base_prog_txt} \\\\ Generated by \\href{http://www.jus.uio.no/sisu}{SiSU} \\begin{tiny}[ #{v[:project]} #{v[:version]} of #{v[:date_stamp]} ]\\end{tiny} \\href{http://www.jus.uio.no/sisu}{www.jus.uio.no/sisu} -\\\\ using SiSU: object citation numbering, markup, meta-markup, and system -\\\\ #@copymark Ralph Amissah 1997, current #{@date.year}, All Rights Reserved. -\\\\ SiSU is released under \\href{http://www.fsf.org/licenses/gpl.html}{GPL 3 } or later, \\href{http://www.fsf.org/licenses/gpl.html}{http://www.fsf.org/licenses/gpl.html}. \\\\ \\href{http://www.sisudoc.org}{www.sisudoc.org} +\\\\ #@copymark Ralph Amissah 1997, current #{@date.year_static}, All Rights Reserved. +\\\\ SiSU is software for document structuring, publishing and search (with object citation numbering), \\href{http://www.sisudoc.org}{www.sisudoc.org} +\\\\ SiSU is released under \\href{http://www.fsf.org/licenses/gpl.html}{GPL 3 } or later, \\href{http://www.fsf.org/licenses/gpl.html}{http://www.fsf.org/licenses/gpl.html}. {\\end{footnotesize} \\\\ WOK @@ -221,10 +221,10 @@ WOK \"Support Open Standards and Software Libre for the Information Technology Infrastructure\" RA\\subsubsection*{Information on this document copy #{site}} \\addcontentsline{toc}{subsection}{Information on this document copy} {\\begin{footnotesize} -\\\\ Generated by \\href{http://www.jus.uio.no/sisu/}{SiSU} found at \\href{http://www.jus.uio.no/sisu/}{www.jus.uio.no/sisu} \\begin{tiny}[ #{v[:project]} #{v[:version]} #{v[:date_stamp]} ]\\end{tiny} \\href{http://www.sisudoc.org}{www.sisudoc.org} (using SiSU: object citation numbering, markup, meta-markup, and system) #@copymark Ralph Amissah 1997, current #{@date.year}, All Rights Reserved. +\\\\ Generated by \\href{http://www.jus.uio.no/sisu/}{SiSU} found at \\href{http://www.jus.uio.no/sisu/}{www.jus.uio.no/sisu} \\begin{tiny}[ #{v[:project]} #{v[:version]} #{v[:date_stamp]} ]\\end{tiny} \\href{http://www.sisudoc.org}{www.sisudoc.org}. SiSU is software for document structuring, publishing and search (using SiSU: object citation numbering, markup, meta-markup, and system) #@copymark Ralph Amissah 1997, current #{@date.year_static}, All Rights Reserved. \\\\ SiSU is released under \\href{http://www.fsf.org/licenses/gpl.html}{GPL 3 } or later (\\href{http://www.fsf.org/licenses/gpl.html}{www.fsf.org/licenses/gpl.html}). {\\end{footnotesize} {\\begin{small} -\\\\ W3 since October 3 1993 \\href{http://www.jus.uio.no/sisu/}{#{sisu_ico}}SiSU 1997, current #{@date.year}. \\\\ #{sitename} presentations at \\begin{bfseries}#{site}\\end{bfseries} \\\\ \\\\ #{@md.title} \\textbf{pdf} versions can be found at: \\\\ +\\\\ W3 since October 3 1993 \\href{http://www.jus.uio.no/sisu/}{#{sisu_ico}}SiSU 1997, current #{@date.year_static}. \\\\ #{sitename} presentations at \\begin{bfseries}#{site}\\end{bfseries} \\\\ \\\\ #{@md.title} \\textbf{pdf} versions can be found at: \\\\ {\\end{small} \\begin{scriptsize}\\href{#{@vz.url_root_http}/#{url}/#{@md.fn[:pdf_p]}}{#{@vz.url_root_http}/#{url}/#{@md.fn[:pdf_p]}}\\end{scriptsize} \\\\ \\begin{scriptsize}\\href{#{@vz.url_root_http}/#{url}/#{@md.fn[:pdf_l]}}{#{@vz.url_root_http}/#{url}/#{@md.fn[:pdf_l]}}\\end{scriptsize} \\\\ -- cgit v1.2.3