diff options
author | Ralph Amissah <ralph@amissah.com> | 2007-09-23 05:16:21 +0100 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2007-09-23 05:16:21 +0100 |
commit | 50d45c6deb0afd2e4222d2e33a45487a9d1fa676 (patch) | |
tree | 100c62d678f009139999bf77c26c81653a721eeb /lib/sisu/v0/hub.rb | |
parent | sisu-0.58.3 + md5s (diff) |
primarily todo with sisu documentation, changelog reproduced below:
* start documenting sisu using sisu
* sisu markup source files in
data/doc/sisu/sisu_markup_samples/sisu_manual/
/usr/share/doc/sisu/sisu_markup_samples/sisu_manual/
* default output [sisu -3] in
data/doc/manuals_generated/sisu_manual/
/usr/share/doc/manuals_generated/sisu_manual/
(adds substantially to the size of sisu package!)
* help related edits
* manpage, work on ability to generate manpages, improved
* param, exclude footnote mark count when occurs within code block
* plaintext changes made
* shared_txt, line wrap visited
* file:// link option introduced (in addition to existing https?:// and
ftp://) a bit arbitrarily, diff here, [double check changes in sysenv and
hub]
* minor adjustments
* html url match refinement
* css added tiny_center
* plaintext
* endnotes fix
* footnote adjustment to make more easily distinguishable from substantive
text
* flag -a only [flags -A -e -E dropped]
controlled by modifiers --unix/msdos --footnote/endnote
* defaults, homepage
* renamed homepage (instead of index) implications for modifying skins,
which need likewise to have any homepage entry renamed
* added link to sisu_manual in homepage
* css the css for the default homepage is renamed homepage.css (instead of
index.css) [consider removing this and relying on html.css]
* ruby version < ruby1.9
* place stop on installation and working with for now [ruby String.strip
broken in ruby 1.9.0 (2007-09-10 patchlevel 0) [i486-linux],
2007-09-18:38/2]
* debian/control restrict use to ruby > 1.8.4 and ruby < 1.9
* debian
* debian/control restrict use to ruby > 1.8.4 and ruby < 1.9
* sisu-doc new sub-package for sisu documentation
debian/control and sisu-doc.install
Diffstat (limited to 'lib/sisu/v0/hub.rb')
-rw-r--r-- | lib/sisu/v0/hub.rb | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/lib/sisu/v0/hub.rb b/lib/sisu/v0/hub.rb index 12e477c0..52937b8e 100644 --- a/lib/sisu/v0/hub.rb +++ b/lib/sisu/v0/hub.rb @@ -152,7 +152,10 @@ module SiSU when /^odf$/; SiSU_ODF::Source.new(@opt).read # -o when /^xml_md_oai_pmh_dc$/; SiSU_XML_metadata::OAI_PMH.new(@opt).read # -O when /^texpdf$/; SiSU_TeX::Source.new(@opt).read # -p + when /^manpage$/; SiSU_manpage::Source.new(@opt).read # -i when /^texinfo$/; SiSU_TexInfo::Source.new(@opt).read # -I + #when /^plaintext_exp$/; SiSU_Plaintext_exp::Source.new(@opt).read # -j + #when /^manpage_exp$/; SiSU_manpage_exp::Source.new(@opt).read # -J #when /^docbook$/; SiSU_Docbook::Source.new(@opt).read # -B when /^html$/; SiSU_HTML::Source.new(@opt).read # -h -H when /^xml$/; SiSU_XML_SAX::Source.new(@opt).read # -x @@ -287,7 +290,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ def actions if @opt.mod.inspect =~/--convert|--to|--from/; require "#{SiSU_lib}/sst_convert_markup" end - if @opt.cmd =~/([AabCcDdEeFfgGHhIiLMmNnOoprRSsTtQqUuVvwWXxYyZ_0-9])/ and + if @opt.cmd =~/([AabCcDdEeFfgGHhIiJjLMmNnOopQqrRSsTtUuVvwWXxYyZ_0-9])/ and @opt.cmd =~/^-/ and @opt.mod.inspect !~/--(?:sitemaps|query|identify)/ or @opt.mod.inspect =~/--(?:(?:sq)?lite|pg(?:sql)?)/ #and @@ -296,7 +299,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ flag=SiSU_Env::Info_processing_flag.new extra='' if @opt.cmd !~/[mn]/ - extra+=if @opt.cmd =~/[abeghHhINOoptTwXxz]/ and @opt.cmd !~/[mn]/; 'm' #% add dal + extra+=if @opt.cmd =~/[abeghHhIiJjNOoptTwXxz]/ and @opt.cmd !~/[mn]/; 'm' #% add dal elsif ((@opt.cmd =~/[Dd]/ or (@opt.mod.inspect =~/--(?:(?:sq)?lite|pg(?:sql)?)/)) \ and @opt.mod.inspect !~/(?:remove|(?:(?:re)?create(?:all)?|dropall|drop)$)/) \ and @opt.cmd !~/[mn]/ @@ -305,7 +308,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ end end if @opt.cmd !~/y/ - extra+=if @opt.cmd =~/[abehHhINopsSstwXxz]/ and @opt.cmd !~/y/; 'y' #% add manifest + extra+=if @opt.cmd =~/[abehHhIiJjNopsSstwXxz]/ and @opt.cmd !~/y/; 'y' #% add manifest elsif (@opt.cmd =~/[Dd]/ or @opt.mod.inspect =~/--(?:(?:sq)?lite|pg(?:sql)?)/) and @opt.files[0] !~/^remove$/ and @opt.cmd !~/y/; 'y' #% add manifest else '' end @@ -375,8 +378,8 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ path_image='./_sisu/processing/external_document/image' path_skin='./_sisu/processing/external_document/skin/doc' @get_s,@get_p=[],[] - re_s=/(http:\/\/\S+?\.sst)/ - re_p=/(http:\/\/\S+?(?:\/sisupod(?:\.zip)?|\.ssp))/ + re_s=/((?:https?|file):\/\/\S+?\.sst)/ + re_p=/((?:https?|file):\/\/\S+?(?:\/sisupod(?:\.zip)?|\.ssp))/ @opt.files.each do |fns| if fns =~re_s @get_s << re_s.match(fns)[1] if re_s @@ -396,10 +399,10 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ threads << Thread.new(requested_page) do |url| open(url) do |f| raise "#{url} not found" unless f - re_fnb=/(http:\/\/[^\/ ]+?\/[^\/ ]+?)\/\S+?\/([^\/]+?)\.ss(t)/ #revisit and remove DO + re_fnb=/((?:https?|file):\/\/[^\/ ]+?\/[^\/ ]+?)\/\S+?\/([^\/]+?)\.ss(t)/ #revisit and remove DO base_uri,fnb,instr=re_fnb.match(url)[1..3] if re_fnb imagedir= base_uri + '/_sisu/image_local' #check on - doc_skin_dir = /(http:\/\/\S+?)\/[^\/]+?\.sst$/.match(url).captures.join + '/_sisu/skin/doc' + doc_skin_dir = /((?:https?|file):\/\/\S+?)\/[^\/]+?\.sst$/.match(url).captures.join + '/_sisu/skin/doc' #"Got file, and ready to process: #{fnb}.t#{instr}" downloaded_file=File.new("#{fnb}.-sst",'w+') images=SiSU_Assemble::Remote_image.new.image(imagedir) @@ -445,7 +448,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ retry unless @retry_count > 1 ensure end - @opt.files=@opt.files.collect {|x| x=x.gsub(/http:\/\/\S+\/(\S+)\.sst/,'\1.-sst') } + @opt.files=@opt.files.collect {|x| x=x.gsub(/(?:https?|file):\/\/\S+\/(\S+)\.sst/,'\1.-sst') } end if @opt.cmd=~/m/; op('dal','dal') #% -m dal end @@ -496,8 +499,14 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ end if @opt.cmd =~/p/; op('texpdf','LaTeX pdf') #% -p latex/ texpdf end + if @opt.cmd =~/i/; op('manpage','manpage') #% -i manpage + end if @opt.cmd =~/I/; op('texinfo','TeX Info') #% -I texinfo (i taken by db import) end + #if @opt.cmd =~/j/; op('plaintext_exp','plaintext exp') #% -j plaintext + #end + #if @opt.cmd =~/J/; op('manpage_exp','manpage exp') #% -J manpage + #end if @opt.cmd =~/D/ or @opt.mod.inspect =~/--pgsql/; op('dbi','postgresql') #% -D DB postgresql end if @opt.cmd =~/d/ or @opt.mod.inspect =~/--sqlite/; op('dbi','sqlite') #% -d DB sqlite |