diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-02-17 11:02:17 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-02-17 11:02:17 -0500 |
commit | 40e51344170464f45135901b9f239240f9fd468c (patch) | |
tree | 5dbea1e5c928296d3c8d37134c11367013b73ee4 | |
parent | Merge branch 'upstream' into debian/sid (diff) | |
parent | changelog & version update (diff) |
Merge branch 'upstream' into debian/sid
-rw-r--r-- | CHANGELOG | 17 | ||||
-rw-r--r-- | conf/sisu/skin/doc/skin_gnu.rb | 1 | ||||
-rw-r--r-- | conf/sisu/skin/doc/skin_gutenberg.rb | 1 | ||||
-rw-r--r-- | conf/sisu/skin/doc/skin_kdissert.rb | 1 | ||||
-rw-r--r-- | conf/sisu/skin/doc/skin_sisu.rb | 1 | ||||
-rw-r--r-- | conf/sisu/skin/doc/skin_sisu_manual.rb | 99 | ||||
-rw-r--r-- | conf/sisu/v1/version.yml | 6 | ||||
-rw-r--r-- | data/doc/sisu/v1/CHANGELOG | 17 | ||||
-rw-r--r-- | data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_gnu.rb | 1 | ||||
-rw-r--r-- | data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_gutenberg.rb | 1 | ||||
-rw-r--r-- | data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_kdissert.rb | 1 | ||||
-rw-r--r-- | data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_rms.rb | 1 | ||||
-rw-r--r-- | data/doc/sisu/v1/sisu_markup_samples/sisu_manual/_sisu/skin/doc/skin_sisu_manual.rb | 1 | ||||
-rw-r--r-- | lib/sisu/v1/plaintext.rb | 61 | ||||
-rwxr-xr-x | sisu-install | 42 |
15 files changed, 178 insertions, 73 deletions
@@ -10,11 +10,22 @@ Reverse Chronological: %% STABLE MANIFEST +%% 1.0.3.orig.tar.gz (2010-02-17:07/3) +http://www.jus.uio.no/sisu/pkg/src/sisu_1.0.3.orig.tar.gz + sisu_1.0.3.orig.tar.gz + sisu_1.0.3-1.dsc + sisu_1.0.3-1.diff.gz + + * plaintext, footnote / endnote fix, footnotes to occur immediately after + paragraph that contains them (unless endnotes are selected instead) + + * document sample skins, utf-8 specified (in some cases needed by ruby 1.9.1) + %% 1.0.2.orig.tar.gz (2010-02-10:06/3) http://www.jus.uio.no/sisu/pkg/src/sisu_1.0.2.orig.tar.gz - sisu_1.0.2.orig.tar.gz - sisu_1.0.2-1.dsc - sisu_1.0.2-1.diff.gz + 158f3eda47d22eb23ca9fb5e383ae57d366974e3e4c4dec2326021228413a66d 1556982 sisu_1.0.2.orig.tar.gz + 3e32dd8d1dd75042d31897ef961907b52f5e72ca28a1a909ceb041f284b6c1de 1145 sisu_1.0.2-1.dsc + 5e7349e1d51dad712eeab694fcb1237790156ffb51178edeecd4d0ec9e8fc91a 152552 sisu_1.0.2-1.diff.gz * Free as in Freedom (on RMS), Sam Williams, markup sample, markup variation, affects numbering diff --git a/conf/sisu/skin/doc/skin_gnu.rb b/conf/sisu/skin/doc/skin_gnu.rb index 52c9f7af..a41d9c10 100644 --- a/conf/sisu/skin/doc/skin_gnu.rb +++ b/conf/sisu/skin/doc/skin_gnu.rb @@ -1,3 +1,4 @@ +# coding: utf-8 =begin * Name: SiSU - Simple information Structuring Universe - Structured information, Serialized Units * Author: Ralph Amissah diff --git a/conf/sisu/skin/doc/skin_gutenberg.rb b/conf/sisu/skin/doc/skin_gutenberg.rb index 59ee2d2d..88b58cad 100644 --- a/conf/sisu/skin/doc/skin_gutenberg.rb +++ b/conf/sisu/skin/doc/skin_gutenberg.rb @@ -1,3 +1,4 @@ +# coding: utf-8 =begin * Name: SiSU - Simple information Structuring Universe - Structured information, Serialized Units * Author: Ralph Amissah diff --git a/conf/sisu/skin/doc/skin_kdissert.rb b/conf/sisu/skin/doc/skin_kdissert.rb index 55c010f3..f695b908 100644 --- a/conf/sisu/skin/doc/skin_kdissert.rb +++ b/conf/sisu/skin/doc/skin_kdissert.rb @@ -1,3 +1,4 @@ +# coding: utf-8 =begin * Name: SiSU - Simple information Structuring Universe - Structured information, Serialized Units * Author: Ralph Amissah diff --git a/conf/sisu/skin/doc/skin_sisu.rb b/conf/sisu/skin/doc/skin_sisu.rb index ca82f4dc..a52b7b91 100644 --- a/conf/sisu/skin/doc/skin_sisu.rb +++ b/conf/sisu/skin/doc/skin_sisu.rb @@ -1,3 +1,4 @@ +# coding: utf-8 =begin * Name: SiSU information Structuring Universe - Structured information, Serialized Units * Author: Ralph@Amissah.com diff --git a/conf/sisu/skin/doc/skin_sisu_manual.rb b/conf/sisu/skin/doc/skin_sisu_manual.rb new file mode 100644 index 00000000..954be971 --- /dev/null +++ b/conf/sisu/skin/doc/skin_sisu_manual.rb @@ -0,0 +1,99 @@ +# coding: utf-8 +=begin + * Name: SiSU information Structuring Universe - Structured information, Serialized Units + * Author: Ralph@Amissah.com + * http://www.jus.uio.no/sisu + * http://www.jus.uio.no/sisu/SiSU/download + * Description: Document skin for SiSU descriptive pages, ... + * License: Same as SiSU see http://www.jus.uio.no/sisu + * Notes: Site default appearance variables set in defaults.rb + Generic site wide modifications set here scribe_skin.rb, and this file required by other "scribes" instead of defaults.rb +=end +module SiSU_Viz + require SiSU_lib + '/defaults' + class Skin + #% widget + def widget_search + true + end + def widget_promo + ['search_sisu','sisu_manual','sisu'] + #['search_sisu','sisu_manual','sisu','ruby_logo'] + #['sisu_manual_search','sisu_manual'] + #['sisu','ruby','sisu_search_libre','ruby','open_society'] + end + #def ocn_display_off + # false + #end + #% path + def path_root + './sisu/' # the only parameter that cannot be changed here + end + def path_rel + '../' + end + #% url + def url_home + 'http://www.jus.uio.no/sisu/' + end + def url_site # used in pdf header + 'http://www.jus.uio.no/sisu' + end + def url_txt # text to go with url usually stripped url + 'www.jus.uio.no/sisu/' + end + def url_home_url + '../index.html' + end + #def url_root_http + #root server path info, used in document information + #end + #% color + def color_band1 + '"#ffffff"' + end + def color_band2 + '"#ffffff"' + end + #% text + def text_hp + ' SiSU' + end + def text_home + 'SiSU' + end + #% icon + def icon_home_button + 'sisu.png' + end + def icon_home_banner + icon_home_button + end + #% banner + def banner_home_button + %{<table summary="home button" border="0" cellpadding="3" cellspacing="0"><tr><td align="left" bgcolor="#ffffff"><a href="#{url_site}/">#{png_home}</a></td></tr></table>\n} + end + def banner_home_and_index_buttons + %{<table><tr><td width="20%"><table summary="home and index buttons" border="0" cellpadding="3" cellspacing="0"><tr><td align="left" bgcolor="#ffffff"><a href="#{url_site}/" target="_top">#{png_home}</a>#{table_close}</td><td width="60%"><center><center><table summary="buttons" border="1" cellpadding="3" cellspacing="0"><tr><td align="center" bgcolor="#ffffff"><font face="arial" size="2"><a href="toc" target="_top"> This text sub- <br /> Table of Contents </a></font>#{table_close}</center></center></td><td width="20%"> #{table_close}} + end + def banner_band + %{<table summary="band" border="0" cellpadding="3" cellspacing="0"><tr><td align="left" bgcolor="#ffffff"><a href="#{url_site}/" target="_top">#{png_home}</a>#{table_close}} + end + end + class TeX + def header_center + "\\chead{\\href{#{@vz.url_site}/}{www.jus.uio.no/sisu/}}" + end + def home_url + "\\href{#{@vz.url_site}/}{www.jus.uio.no/sisu/}" + end + def home + "\\href{#{@vz.url_site}/}{Ralph Amissah}" + end + def owner_chapter + 'Document owner details' + end + end +end +__END__ +puts "#{__LINE__} #{__FILE__}" diff --git a/conf/sisu/v1/version.yml b/conf/sisu/v1/version.yml index 1c19f09a..9e4538cf 100644 --- a/conf/sisu/v1/version.yml +++ b/conf/sisu/v1/version.yml @@ -1,5 +1,5 @@ --- -:version: 1.0.2 -:date_stamp: 2010w06/3 -:date: "2010-02-10" +:version: 1.0.3 +:date_stamp: 2010w07/3 +:date: "2010-02-17" :project: SiSU diff --git a/data/doc/sisu/v1/CHANGELOG b/data/doc/sisu/v1/CHANGELOG index c81c90fd..7ee8a695 100644 --- a/data/doc/sisu/v1/CHANGELOG +++ b/data/doc/sisu/v1/CHANGELOG @@ -10,11 +10,22 @@ Reverse Chronological: %% STABLE MANIFEST +%% 1.0.3.orig.tar.gz (2010-02-17:07/3) +http://www.jus.uio.no/sisu/pkg/src/sisu_1.0.3.orig.tar.gz + sisu_1.0.3.orig.tar.gz + sisu_1.0.3-1.dsc + sisu_1.0.3-1.diff.gz + + * plaintext, footnote / endnote fix, footnotes to occur immediately after + paragraph that contains them (unless endnotes are selected instead) + + * document sample skins, utf-8 specified (in some cases needed by ruby 1.9.1) + %% 1.0.2.orig.tar.gz (2010-02-10:06/3) http://www.jus.uio.no/sisu/pkg/src/sisu_1.0.2.orig.tar.gz - sisu_1.0.2.orig.tar.gz - sisu_1.0.2-1.dsc - sisu_1.0.2-1.diff.gz + 158f3eda47d22eb23ca9fb5e383ae57d366974e3e4c4dec2326021228413a66d 1556982 sisu_1.0.2.orig.tar.gz + 3e32dd8d1dd75042d31897ef961907b52f5e72ca28a1a909ceb041f284b6c1de 1145 sisu_1.0.2-1.dsc + 5e7349e1d51dad712eeab694fcb1237790156ffb51178edeecd4d0ec9e8fc91a 152552 sisu_1.0.2-1.diff.gz * Free as in Freedom (on RMS), Sam Williams, markup sample, markup variation, affects numbering diff --git a/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_gnu.rb b/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_gnu.rb index e998624b..8ac38227 100644 --- a/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_gnu.rb +++ b/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_gnu.rb @@ -1,3 +1,4 @@ +# coding: utf-8 =begin * Name: SiSU - Simple information Structuring Universe - Structured information, Serialized Units * Author: Ralph Amissah diff --git a/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_gutenberg.rb b/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_gutenberg.rb index 47d2d28f..305f5e61 100644 --- a/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_gutenberg.rb +++ b/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_gutenberg.rb @@ -1,3 +1,4 @@ +# coding: utf-8 =begin * Name: SiSU - Simple information Structuring Universe - Structured information, Serialized Units * Author: Ralph Amissah diff --git a/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_kdissert.rb b/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_kdissert.rb index d1f6a889..a7e08835 100644 --- a/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_kdissert.rb +++ b/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_kdissert.rb @@ -1,3 +1,4 @@ +# coding: utf-8 =begin * Name: SiSU - Simple information Structuring Universe - Structured information, Serialized Units * Author: Ralph Amissah diff --git a/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_rms.rb b/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_rms.rb index 95f936a8..0f3e7d34 100644 --- a/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_rms.rb +++ b/data/doc/sisu/v1/sisu_markup_samples/samples/_sisu/skin/doc/skin_rms.rb @@ -1,3 +1,4 @@ +# coding: utf-8 =begin * Name: SiSU - Simple information Structuring Universe - Structured information, Serialized Units * Author: Ralph Amissah diff --git a/data/doc/sisu/v1/sisu_markup_samples/sisu_manual/_sisu/skin/doc/skin_sisu_manual.rb b/data/doc/sisu/v1/sisu_markup_samples/sisu_manual/_sisu/skin/doc/skin_sisu_manual.rb index 92ee2b34..954be971 100644 --- a/data/doc/sisu/v1/sisu_markup_samples/sisu_manual/_sisu/skin/doc/skin_sisu_manual.rb +++ b/data/doc/sisu/v1/sisu_markup_samples/sisu_manual/_sisu/skin/doc/skin_sisu_manual.rb @@ -1,3 +1,4 @@ +# coding: utf-8 =begin * Name: SiSU information Structuring Universe - Structured information, Serialized Units * Author: Ralph@Amissah.com diff --git a/lib/sisu/v1/plaintext.rb b/lib/sisu/v1/plaintext.rb index dd2964d9..540c1bce 100644 --- a/lib/sisu/v1/plaintext.rb +++ b/lib/sisu/v1/plaintext.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 @@ -73,20 +73,8 @@ module SiSU_Plaintext class Source def initialize(opt) @opt=opt - @@dostype=if @opt.fns =~/(.+?)\.(?:-|ssm\.)?sst$/ - if @opt.mod.inspect =~ /--footnote/ \ - and @opt.mod.inspect =~ /--dos/ - 'msdos footnotes' - elsif @opt.mod.inspect =~ /--endnote/ \ - and @opt.mod.inspect =~ /--dos/ - 'msdos endnotes' - elsif @opt.mod.inspect =~ /--footnote/ - 'unix footnotes' - elsif @opt.mod.inspect =~ /--endnote/ - 'unix endnotes' - else 'unix footnotes' - end - else puts "#{sf} not a processed file type" + unless @opt.fns =~/(.+?)\.(?:-|ssm\.)?sst$/ + puts "#{sf} not a processed file type" end end def read @@ -123,23 +111,15 @@ module SiSU_Plaintext @dp=@@dp ||=SiSU_Env::Info_env.new.digest.pattern @regx=/^(?:(?:#{Mx[:br_page]}\s*|#{Mx[:br_page_new]}\s*)?#{Mx[:lv_o]}\d:(\S*?)#{Mx[:lv_c]})?\s*(.+?)\s*#{Mx[:id_o]}~(\d+);(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/m # 2004w18 pb pn removal added @tab="\t" - @br=if md.mod.inspect =~ /--footnote/ \ - and md.mod.inspect =~ /--dos/ - @@dostype='msdos footnotes' - "\r\n" - elsif md.mod.inspect =~ /--endnote/ \ - and md.mod.inspect =~ /--dos/ - @@dostype='msdos endnotes' - "\r\n" - elsif md.mod.inspect =~ /--footnote/ - @@dostype='unix footnotes' - "\n" - elsif md.mod.inspect =~ /--endnote/ - @@dostype='unix endnotes' - "\n" - else - @@dostype='unix footnotes' - "\n" + @@endnotes_=case md.mod.inspect + when /--footnote/; false + when /--endnote/; true + else true + end + @br=case md.mod.inspect + when /--dos/; "\r\n" + when /--unix/; "\n" + else "\n" end @plaintext={ :body=>[],:open=>[],:close=>[],:head=>[],:metadata=>[],:tail=>[] } end @@ -255,11 +235,11 @@ WOK @plaintext[:body] << wrapped << @br # main text, contents, body KEEP end if @@endnotes[:para] \ - and @@dostype =~/footnote/ #edit out to switch off endnotes following paragraph to which they belong + and not @@endnotes_ @plaintext[:body] << @br @@endnotes[:para].each {|e| @plaintext[:body] << e << @br} elsif @@endnotes[:para] \ - and @@dostype =~/endnote/ + and @@endnotes_ @plaintext[:body] << @br*2 end @@endnotes[:para]=[] @@ -391,11 +371,6 @@ WOK if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ # i don't get the condition for no paranum end - #if para =~/<:center>/ - # one,two=/(.*)<:center>(.*)/.match(para)[1,2] - # format_text=Format_text_object.new(one,two) - # para=format_text.center - #end para.gsub!(/#{Mx[:id_o]}.+?#{Mx[:id_c]}/,' ') if para ## Clean Prepared Text para.gsub!(/<!.+!>/,' ') if para ## Clean Prepared Text para.gsub!(/<:\S+>/,' ') if para ## Clean Prepared Text @@ -409,8 +384,8 @@ WOK content << plaintext[:open] content << plaintext[:head] content << plaintext[:body] - content << @@endnotes[:end] if @@dostype =~/endnotes/ - content << "#@br#{divider*78}#@br" + content << @@endnotes[:end] if @@endnotes_ + content << "#{@br}#{divider*78}#{@br}" content << plaintext[:metadata] content << "#@br#{divider*78}#@br" if @md.stmp =~/\w+/ #not used? content << plaintext[:owner_details] if @md.stmp =~/\w+/ #not used? @@ -430,13 +405,13 @@ WOK file_plaintext=SiSU_Env::SiSU_file.new(@md,@md.fn[:plain]).mkfile @sisu=[] @content.each do |para| # this is a hack - if para.class == Array \ + if para.class==Array \ and para.length > 0 para.each do |line| line.gsub!(/\s+$/m,'') file_plaintext.puts line #unix plaintext end - else file_plaintext.puts para #unix plaintext # /^([*=-]|\.){5}/ + else file_plaintext.puts para #unix plaintext # /^([*=-]|\.){5}/ end end file_plaintext.close diff --git a/sisu-install b/sisu-install index 3d78c6c1..2b981b94 100755 --- a/sisu-install +++ b/sisu-install @@ -631,28 +631,28 @@ module Rant @items.unshift(entry) if entry !~ ignore_rx self end -if Object.method_defined?(:fcall) || Object.method_defined?(:funcall) # in Ruby 1.9 like __send__ - @@__send_private__ = Object.method_defined?(:fcall) ? :fcall : :funcall - def resolve - @pending = false - @actions.each{ |action| self.__send__(@@__send_private__, *action) }.clear - ix = ignore_rx - if ix - @items.reject! { |f| f =~ ix && !@keep[f] } - end - self - end -else - def resolve - @pending = false - @actions.each{ |action| self.__send__(*action) }.clear - ix = ignore_rx - if ix - @items.reject! { |f| f =~ ix && !@keep[f] } - end - self + if Object.method_defined?(:fcall) || Object.method_defined?(:funcall) # in Ruby 1.9 like __send__ + @@__send_private__ = Object.method_defined?(:fcall) ? :fcall : :funcall + def resolve + @pending = false + @actions.each{ |action| self.__send__(@@__send_private__, *action) }.clear + ix = ignore_rx + if ix + @items.reject! { |f| f =~ ix && !@keep[f] } + end + self + end + else + def resolve + @pending = false + @actions.each{ |action| self.__send__(*action) }.clear + ix = ignore_rx + if ix + @items.reject! { |f| f =~ ix && !@keep[f] } + end + self + end end -end def include(*pats) @def_glob_dotfiles ? glob_all(*pats) : glob_unix(*pats) end |