diff options
author | Ralph Amissah <ralph@amissah.com> | 2007-07-01 11:19:20 +0100 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2007-07-01 11:19:20 +0100 |
commit | 074d3109fd6cdc96b8363e173bb861e82005b0b8 (patch) | |
tree | f3f988d544dfa6541faaa0bdc9ef9eaa9b451b15 /lib/sisu/v0/html.rb | |
parent | minor cleaning of rant file (diff) |
primarily gpl3 changes, license changed, license included, images added
skins cleaned a bit and output info on sisu modified, esp. in html
html no link to concordance if generated on document above word count 260k
odf url match bug fix
dal text block fix for dealing with url to be followed by <br>
minor cosmetic stuff
Diffstat (limited to 'lib/sisu/v0/html.rb')
-rw-r--r-- | lib/sisu/v0/html.rb | 96 |
1 files changed, 45 insertions, 51 deletions
diff --git a/lib/sisu/v0/html.rb b/lib/sisu/v0/html.rb index 9af0f758..62d0a44a 100644 --- a/lib/sisu/v0/html.rb +++ b/lib/sisu/v0/html.rb @@ -1,50 +1,58 @@ =begin - * Name: SiSU information Structuring Universe - Structured information, Serialized Units + + * Name: SiSU + + * Description: a framework for document structuring, publishing and search + * Author: Ralph Amissah - * http://www.jus.uio.no/sisu - * http://www.jus.uio.no/sisu/SiSU/download.html - * Description: html generation, processing + * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007 Ralph Amissah All Rights Reserved. + + * License: GPL 3 or later: - * Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Ralph Amissah + SiSU, a framework for document structuring, publishing and search - * License: GPL 2 or later + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007 Ralph Amissah - Summary of GPL 2 + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation, either version 3 of the License, or (at your option) + any later version. - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. + 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 + more details. - 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 - more details. + You should have received a copy of the GNU General Public License along with + this program. If not, see <http://www.gnu.org/licenses/>. - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + If you have Internet connection, the latest version of the GPL should be + available at these locations: + <http://www.fsf.org/licenses/gpl.html> + <http://www.gnu.org/copyleft/gpl.html> + <http://www.jus.uio.no/sisu/gpl.fsf> - If you have Internet connection, the latest version of the GPL should be - available at these locations: - http://www.fsf.org/licenses/gpl.html - http://www.gnu.org/copyleft/gpl.html - http://www.jus.uio.no/sisu/gpl2.fsf + * SiSU uses: + * Standard SiSU markup syntax, + * Standard SiSU meta-markup syntax, and the + * Standard SiSU object citation numbering and system - SiSU was first released to the public on January 4th 2005 + * Hompages: + <http://www.jus.uio.no/sisu> + <http://www.sisudoc.org> - SiSU uses: + * Download: + <http://www.jus.uio.no/sisu/SiSU/download.html> - * Standard SiSU markup syntax, - * Standard SiSU meta-markup syntax, and the - * Standard SiSU object citation numbering and system + * Ralph Amissah + <ralph@amissah.com> + <ralph.amissah@gmail.com> - © Ralph Amissah 1997, current 2007. - All Rights Reserved. + ** Description: html generation, processing - * Ralph Amissah: ralph@amissah.com - ralph.amissah@gmail.com =end module SiSU_HTML require 'pstore' @@ -118,8 +126,8 @@ module SiSU_HTML SiSU_Env::Create_file.new(@opt.cmd,@opt.fns).param_instantiate @@flag,@@scr,@@seg,@@seg_endnotes,@@seg_subtoc,@@seg_ad={},{},{},{},{},{} @@seg_total,@@tracker,@@loop_count,@@tablehead,@@number_of_cols=0,0,0,0,0 - @@seg_name,@@seg_name_html,@@seg_name_php,@@seg_subtoc_array,@@seg_endnotes_array,@@segtocband,@@tablefoot=Array.new(7){[]} - @@filename_seg,@@seg_url,@@filename_segphp,@@fn,@@to_lev4,@@get_hash_to,@@get_hash_fn='','','','','','','' + @@seg_name,@@seg_name_html,@@seg_subtoc_array,@@seg_endnotes_array,@@segtocband,@@tablefoot=Array.new(7){[]} + @@filename_seg,@@seg_url,@@fn,@@to_lev4,@@get_hash_to,@@get_hash_fn='','','','','','','' @@is4=@@is3=@@is2=@@is1=@@header1=@@header2=@@header3=@@header4=0 end end @@ -149,7 +157,6 @@ module SiSU_HTML @tell=SiSU_Screen::Ansi.new(@md.cmd) if @md @md.sfx='' - @md.file_type='php' if @md.cmd =~/z/ @md.sfx='' if @md.cmd =~/z/ if @md.cmd =~/h/ or @md.fns =~/\~[a-z]{2,3}\.s?/ #multilingual document protection is a bit arbitrary, (needed by existing server configuration), add configuration overide... if @md.cmd =~/H/ and @md.fns =~/\~[a-z]{2,3}\.s?/ @@ -159,7 +166,6 @@ module SiSU_HTML ).warn unless @md.cmd =~/q/ end @md.sfx='.html' - @md.pdf='.pdf' end end @md.cmd=@md.cmd.gsub(/H/,'h') @@ -244,7 +250,6 @@ module SiSU_HTML end s_lnk_url,s_lnk_lnk=l[:url],l[:say] lev_para_ocn=SiSU_HTML_Format_type::Format_toc.new(@md,s_lnk_url,s_lnk_lnk,target) -#p lev_para_ocn.links_guide if s_lnk_lnk @links_guide_toc << lev_para_ocn.links_guide if s_lnk_lnk end end @@ -375,8 +380,8 @@ WOK end para[@pat_heading] linkname,link=$1,$2 if $& - p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,link) if link and link !~/#/ #% keep eye on link - title=unless para =~/Document Information/; linkname + p_num=SiSU_HTML_Format_type::Paragraph_number.new(@md,link) if link and link !~/#/ #% keep eye on link + title=unless para =~/Document Information/; linkname else link='metadata' %{<b><a href="#{@md.fnl[:pre]}#{link}#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}">#{linkname}</a></b>} @@ -560,7 +565,7 @@ WOK SiSU_Screen::Ansi.new(@md.cmd,'Scroll & Segtoc').txt_grey unless @md.cmd =~/q/ format_head_toc=SiSU_HTML_Format_type::Head_toc.new(@md) dochead=format_head_toc.head - dochead.gsub!(/toc\.(html|php)/,'doc.\1') #kludge + dochead.gsub!(/toc\.(html)/,'doc.\1') #kludge ads=SiSU_HTML_promo::Ad.new(@md) toc_shared << dochead << ads.div.major @segtoc << format_head_toc.head << ads.div.major @@ -683,17 +688,6 @@ WOK rescue; SiSU_Errors::Info_error.new($!,$@,@md.cmd,@md.fns).error end end - def seg - begin - @data.each do |para| - para.strip! - unless para =~/\A\s*\Z/ - @newfile.puts para,"\n" - end - end - rescue; SiSU_Errors::Info_error.new($!,$@,@md.cmd,@md.fns).error - end - end end end end |