From 5ae32a29d36aecfc6f226de94b237714d8a7a056 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 15 Feb 2011 12:30:23 -0500 Subject: sysenv & sisurc.yml: libreoffice, default odf reader --- lib/sisu/v3/sysenv.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index 00e3f030..ff10849c 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -2068,7 +2068,7 @@ WOK ((defined? @rc['program_select']['odf_viewer']) \ && @rc['program_select']['odf_viewer'] =~/\S\S+/) \ ? @rc['program_select']['odf_viewer'] \ - : 'oowriter' #'odf-viewer','oowriter' + : 'libreoffice' #'odf-viewer','oowriter' end def manpage_viewer 'man' -- cgit v1.2.3 From 9f4166c72780c7dfd9d8aec31646555229a2fb52 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 15 Feb 2011 12:58:51 -0500 Subject: console feedback on selected files being processed, updates & fixes --- lib/sisu/v3/digests.rb | 4 +- lib/sisu/v3/epub.rb | 5 +-- lib/sisu/v3/html.rb | 7 ++-- lib/sisu/v3/manifest.rb | 4 +- lib/sisu/v3/odf.rb | 4 +- lib/sisu/v3/plaintext.rb | 4 +- lib/sisu/v3/texpdf.rb | 4 +- lib/sisu/v3/urls.rb | 99 +++++++++++++++++++++++++++++++----------------- lib/sisu/v3/xhtml.rb | 7 ++-- lib/sisu/v3/xml.rb | 6 +-- lib/sisu/v3/xml_dom.rb | 6 +-- 11 files changed, 89 insertions(+), 61 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3/digests.rb b/lib/sisu/v3/digests.rb index 38b79ae1..26e91528 100644 --- a/lib/sisu/v3/digests.rb +++ b/lib/sisu/v3/digests.rb @@ -76,12 +76,12 @@ module SiSU_Digest_view @env,@md,@dal_array=@particulars.env,@particulars.md,@particulars.dal_array unless @opt.cmd =~/q/ tool=(@opt.cmd =~/[MVv]/) \ - ? "#{@env.program.text_editor} #{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:digest]}" \ + ? "#{@env.program.text_editor} file://#{@md.file.output_path.hash_digest}/#{@md.file.base_filename.hash_digest}" \ : @opt.fns @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,"Document #{@dg} Digests",tool).green_hi_blue \ : SiSU_Screen::Ansi.new(@opt.cmd,"Document #{@dg} Digests",tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{@md.fn[:digest]}").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.hash_digest}/#{@md.file.base_filename.hash_digest}").flow if @opt.cmd =~/[MV]/ end SiSU_Digest_view::Source::Scroll.new(@particulars).songsheet SiSU_Env::Info_skin.new(@md).select diff --git a/lib/sisu/v3/epub.rb b/lib/sisu/v3/epub.rb index 0da90712..22c42980 100644 --- a/lib/sisu/v3/epub.rb +++ b/lib/sisu/v3/epub.rb @@ -85,14 +85,13 @@ module SiSU_EPUB @env=@particulars.env loc=@env.path.url.output_tell unless @opt.cmd =~/q/ - tool=if @opt.cmd =~/z/; "#{@env.program.epub_viewer} #{loc}/epub/#{@fnb}.epub" - elsif @opt.cmd =~/[MVv]/; "#{@env.program.epub_viewer} #{loc}/epub/#{@fnb}.epub" + tool=if @opt.cmd =~/[MVvz]/; "#{@env.program.epub_viewer} #{@md.file.output_path.epub}/#{@md.file.base_filename.epub}" else @opt.fns end @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'EPUB',tool).green_hi_blue \ : SiSU_Screen::Ansi.new(@opt.cmd,'EPUB',tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{loc}/epub/#{@fnb}.epub").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@md.file.output_path.epub}/#{@md.file.base_filename.epub}").flow if @opt.cmd =~/[MV]/ end @env.path.epub_bld #(@md) @env.path.epub_cp_images(@md) diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb index ade1a801..4fc657e8 100644 --- a/lib/sisu/v3/html.rb +++ b/lib/sisu/v3/html.rb @@ -87,14 +87,13 @@ module SiSU_HTML @env=@particulars.env loc=@env.url.output_tell unless @opt.cmd =~/q/ - tool=if @opt.cmd =~/z/; "#{@env.program.web_browser} #{loc}/#{@fnb}/#{@md.fn[:index]}" - elsif @opt.cmd =~/[MVv]/; "#{@env.program.web_browser} #{loc}/#{@fnb}/#{@md.fn[:index]}" - else @opt.fns + tool=if @opt.cmd =~/[MVvz]/; "#{@env.program.web_browser} file://#{@md.file.output_path.html_seg}/#{@md.file.base_filename.html_segtoc}" + else @opt.fns end @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_hi_blue \ : SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@fnb}/#{@md.fn[:index]}").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.html_seg}/#{@md.file.base_filename.html_segtoc}").flow if @opt.cmd =~/[MV]/ end SiSU_Env::Info_skin.new(@md).select data=nil diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb index c9fb8e04..e7fbcfa9 100644 --- a/lib/sisu/v3/manifest.rb +++ b/lib/sisu/v3/manifest.rb @@ -82,9 +82,9 @@ module SiSU_Manifest SiSU_Env::Info_skin.new(@md).select xbrowser=@env.program.web_browser browser=@env.program.console_web_browser - webserv_url=@env.path.url.output_tell +# webserv_url=@env.path.url.output_tell #fix in sysenv unless @opt.cmd =~/q/ - url_html="#{webserv_url}/#{@md.fnb}/#{@md.fn[:manifest]}" + url_html="file://#{@md.file.output_path.manifest}/#{@md.file.base_filename.manifest}" @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',"#{xbrowser} #{url_html}").green_hi_blue \ : SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',@opt.fns).green_title_hi diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb index 8a1c5322..ce696fdd 100644 --- a/lib/sisu/v3/odf.rb +++ b/lib/sisu/v3/odf.rb @@ -86,12 +86,12 @@ module SiSU_ODF path=@env.path.output_tell unless @opt.cmd =~/q/ tool=(@opt.cmd =~/[MVv]/) \ - ? "#{@env.program.odf_viewer} #{path}/#{@md.fnb}/#{opendoc}" \ + ? "#{@env.program.odf_viewer} file://#{@md.file.output_path.odt}/#{@md.file.base_filename.odt}" \ : @opt.fns @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'Opendocument (ODF:ODT)',tool).green_hi_blue \ : SiSU_Screen::Ansi.new(@opt.cmd,'Opendocument (ODF:ODT)',tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.path.output_tell}/#{@md.fnb}/#{opendoc}").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.odt}/#{@md.file.base_filename.odt}").flow if @opt.cmd =~/[MV]/ end SiSU_ODF::Source::Scroll.new(@particulars).songsheet SiSU_Env::Info_skin.new(@md).select diff --git a/lib/sisu/v3/plaintext.rb b/lib/sisu/v3/plaintext.rb index 004705f3..8b910642 100644 --- a/lib/sisu/v3/plaintext.rb +++ b/lib/sisu/v3/plaintext.rb @@ -84,12 +84,12 @@ module SiSU_Plaintext unless @opt.cmd =~/q/ path=env.path.output_tell tool=(@opt.cmd =~/[MVv]/) \ - ? "#{env.program.text_editor} #{path}/#{md.fnb}/#{md.fn[:plain]}" \ + ? "#{env.program.text_editor} #{md.file.output_path.txt}/#{md.file.base_filename.txt}" \ : @opt.fns @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'Plaintext',tool).green_hi_blue \ : SiSU_Screen::Ansi.new(@opt.cmd,'Plaintext',tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{path}/#{md.fnb}/#{md.fn[:plain]}").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{md.file.output_path.txt}/#{md.file.base_filename.txt}").flow if @opt.cmd =~/[MV]/ end dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here wrap_width=if defined? md.make.plaintext_wrap \ diff --git a/lib/sisu/v3/texpdf.rb b/lib/sisu/v3/texpdf.rb index 8b0ba8c6..df03647c 100644 --- a/lib/sisu/v3/texpdf.rb +++ b/lib/sisu/v3/texpdf.rb @@ -106,8 +106,8 @@ module SiSU_TeX SiSU_Screen::Ansi.new(@opt.cmd,'LaTeX/PDF',@md.fns).green_title_hi unless @opt.cmd =~/q/ if @opt.cmd =~/[MVv]/ path=@env.url.output_tell - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{path}/#{@md.fnb}/#{@md.fn[:pdf_l]}").flow - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{path}/#{@md.fnb}/#{@md.fn[:pdf_p]}").flow + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_l}pdf").flow + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_p}pdf").flow end @md=@particulars.md $flag=@md.cmd #introduced to pass 0 for no object citation numbers... to texpdf_format diff --git a/lib/sisu/v3/urls.rb b/lib/sisu/v3/urls.rb index c2b694a2..5cc69e7b 100644 --- a/lib/sisu/v3/urls.rb +++ b/lib/sisu/v3/urls.rb @@ -192,54 +192,54 @@ module SiSU_urls @u.each do |x,y| if @opt.fns =~ @m_regular if @opt.cmd =~/[MVv]/ - if x=~/^([bcNwxXY])/ \ - and @opt.cmd=~/[bcNwxXY]/ \ - and x=~/^[#{@opt.cmd}]/ - m=$1 - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/#{@fnb}/#{y}").result + if (x=~/^a/ and @opt.cmd =~/a/) \ + or (x=~/^t/ and @opt.cmd =~/t/) + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.txt}/#{@md.file.base_filename.txt}").result end - if x=~/^[y]/ \ - and @opt.cmd =~/[y]/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.manifest}/#{@md.file.base_filename.manifest}").result + if x=~/^b/ \ + and @opt.cmd =~/b/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.xhtml}/#{@md.file.base_filename.xhtml}").result end - if x=~/^[at]/ \ - and @opt.cmd =~/[at]/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.txt}/#{@md.file.base_filename.txt}").result +# if x=~/^[c]/ \ +# and @opt.cmd =~/[c]/ +# SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.manifest}/#{@md.file.base_filename.manifest}").result +# end + if x=~/^D/ \ + and @opt.cmd =~/D/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI psql","#{@pwd_stub}::#{@opt.fns}",y).result end - if x=~/^h/ \ - and @opt.cmd =~/h/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_scroll}/#{@md.file.base_filename.html_scroll}").result - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_seg}/#{@md.file.base_filename.html_segtoc}").result + if x=~/^d/ \ + and @opt.cmd =~/d/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI sqlite","sqlite3 #{@env.path.output}/sisu_sqlite.db", "#{y}").result end if x=~/^e/ \ and @opt.cmd =~/e/ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.epub_viewer} #{@md.file.output_path.epub}/#{@md.file.base_filename.epub}").result end - if x=~/^o/ \ - and @opt.cmd =~/o/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.odf_viewer} file://#{@md.file.output_path.odt}/#{@md.file.base_filename.odt}").result - end - if x=~/^p/ \ - and @opt.cmd =~/p/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_p}pdf").result - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_l}pdf").result + if x=~/^h/ \ + and @opt.cmd =~/h/ + if x =~/scroll/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_scroll}/#{@md.file.base_filename.html_scroll}").result + else + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_seg}/#{@md.file.base_filename.html_segtoc}").result + end end if x=~/^I/ \ and @opt.cmd =~/I/ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","cd #{@env.path.texinfo}; pinfo ./#{@fnb}.#{y}; cd -").result end - if x=~/^D/ \ - and @opt.cmd =~/D/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI psql","#{@pwd_stub}::#{@opt.fns}",y).result - end - if x=~/^d/ \ - and @opt.cmd =~/d/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} DBI sqlite","sqlite3 #{@env.path.output}/sisu_sqlite.db", "#{y}").result - end if x=~/^i/ \ and @opt.cmd =~/i/ SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.manpage_viewer} #{@env.path.manpage}/#{@fnb}.1").result end + if x=~/^N/ \ + and @opt.cmd =~/N/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.hash_digest}/#{@md.file.base_filename.hash_digest}").result + end + if x=~/^o/ \ + and @opt.cmd =~/o/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.odf_viewer} file://#{@md.file.output_path.odt}/#{@md.file.base_filename.odt}").result + end if x=~/^P/ \ and @opt.cmd =~/P/ if @opt.fns =~/\S+?~\S{2}(?:_\S{2})?\.ss[mt]/ @@ -250,15 +250,19 @@ module SiSU_urls end #@opt.cmd.gsub!(/P/,'') end + if x=~/^p/ \ + and @opt.cmd =~/p/ + if x =~/portrait/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_p}pdf").result + else + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.pdf_viewer} #{@md.file.output_path.pdf}/#{@md.file.base_filename.pdf_l}pdf").result + end + end #if x=~/^P/ \ #and @opt.cmd =~/P/ # SiSU_Screen::Ansi.new(@opt.cmd,"-#{x} Profile","#{@pwd_stub}::#{@opt.fns}",y).result # @opt.cmd.gsub!(/P/,'') #end - if x=~/^s/ \ - and @opt.cmd =~/s/ - SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@md.file.output_path.src}/#{y}").result - end if x=~/^S/ \ and @opt.cmd =~/S/ zipfile=if @opt.fns =~/\.ssm\.sst$/; y.gsub(/(?:\~\S{2,3})?(\.ssm\.sst\.zip)$/,'.ssm.zip') @@ -266,6 +270,31 @@ module SiSU_urls end SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} #{@env.url.output_tell}/pod/#{y}").result end + if x=~/^s/ \ + and @opt.cmd =~/s/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.text_editor} #{@md.file.output_path.src}/#{y}").result + end + if x=~/^w/ \ + and @opt.cmd =~/w/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.html_concordance}/#{@md.file.base_filename.html_concordance}").result + end + if x=~/^X/ \ + and @opt.cmd =~/X/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}").result + end + if x=~/^x/ \ + and @opt.cmd =~/x/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_sax}").result + end + if x=~/^Y/ \ + and @opt.cmd =~/Y/ #BROKEN + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.sitemap}/#{@md.file.base_filename.sitemap}").result + end + + if x=~/^y/ \ + and @opt.cmd =~/y/ + SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#{@prog.web_browser} file://#{@md.file.output_path.manifest}/#{@md.file.base_filename.manifest}").result + end end urls_maintenance(@opt,x,y) if @opt.cmd =~/[MV]/ end diff --git a/lib/sisu/v3/xhtml.rb b/lib/sisu/v3/xhtml.rb index 94243c48..8710f2da 100644 --- a/lib/sisu/v3/xhtml.rb +++ b/lib/sisu/v3/xhtml.rb @@ -83,14 +83,15 @@ module SiSU_XHTML unless @opt.cmd =~/q/ path=@env.path.output_tell loc=@env.url.output_tell - tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:xhtml]}\n\t#{@env.program.xml_viewer} #{path}/#{@md.fnb}/#{@md.fn[:xhtml]}" - elsif @opt.cmd =~/v/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:xhtml]}" + + tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml}/#{@md.file.base_filename.xhtml}#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xhtml}/#{@md.file.base_filename.xhtml}#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}" + elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml}/#{@md.file.base_filename.xhtml}" else @opt.fns end @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XHTML',tool).colorize \ : SiSU_Screen::Ansi.new(@opt.cmd,'XHTML',tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"/#{@md.file.output_path.xhtml}/#{@md.file.base_filename.xhtml}").flow if @opt.cmd =~/[MV]/ end SiSU_XHTML::Source::Songsheet.new(@particulars).song rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error diff --git a/lib/sisu/v3/xml.rb b/lib/sisu/v3/xml.rb index f0e62de9..5dfd6e7b 100644 --- a/lib/sisu/v3/xml.rb +++ b/lib/sisu/v3/xml.rb @@ -83,14 +83,14 @@ module SiSU_XML_SAX unless @opt.cmd =~/q/ path=@env.path.output_tell loc=@env.url.output_tell - tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:sax]}\n\t#{@env.program.xml_viewer} #{path}/#{@md.fnb}/#{@md.fn[:sax]}" - elsif @opt.cmd =~/v/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:sax]}" + tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_sax}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_sax}" + elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_sax}" else @opt.fns end @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XML SAX',tool).colorize \ : SiSU_Screen::Ansi.new(@opt.cmd,'XML SAX',tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{path}/#{@md.fnb}/#{@md.fn[:sax]}").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.xml_sax}/#{@md.file.base_filename.xml_sax}").flow if @opt.cmd =~/[MV]/ end SiSU_XML_SAX::Source::Songsheet.new(@particulars).song rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error diff --git a/lib/sisu/v3/xml_dom.rb b/lib/sisu/v3/xml_dom.rb index b4feb949..0fe44836 100644 --- a/lib/sisu/v3/xml_dom.rb +++ b/lib/sisu/v3/xml_dom.rb @@ -81,14 +81,14 @@ module SiSU_XML_DOM unless @opt.cmd =~/q/ path=@env.path.output_tell loc=@env.url.output_tell - tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:dom]}\n\t#{@env.program.xml_viewer} #{path}/#{@md.fnb}/#{@md.fn[:dom]}" - elsif @opt.cmd =~/v/; "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:dom]}" + tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}" + elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}" else @opt.fns end @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'invert','XML DOM',tool).colorize \ : SiSU_Screen::Ansi.new(@opt.cmd,'XML DOM',tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{path}/#{@md.fnb}/#{@md.fn[:dom]}").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.xml_dom}/#{@md.file.base_filename.xml_dom}").flow if @opt.cmd =~/[MV]/ end SiSU_XML_DOM::Source::Songsheet.new(@particulars).songsheet rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error -- cgit v1.2.3 From 3a263de6877c27071c2a6f3389b6eaf5c2455ede Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 15 Feb 2011 13:19:16 -0500 Subject: sysenv, sisurc.yml & elsewhere as affected, output_dir_structure (conf & tests) * (by_language_code; by_filetype; by_filename) --- lib/sisu/v3/git.rb | 2 +- lib/sisu/v3/html.rb | 4 +- lib/sisu/v3/html_format.rb | 12 +-- lib/sisu/v3/manifest.rb | 4 +- lib/sisu/v3/sysenv.rb | 185 ++++++++++++++++++++++++++------------------- lib/sisu/v3/texpdf.rb | 12 +-- 6 files changed, 126 insertions(+), 93 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3/git.rb b/lib/sisu/v3/git.rb index 00cd1e67..b14645c9 100644 --- a/lib/sisu/v3/git.rb +++ b/lib/sisu/v3/git.rb @@ -71,7 +71,7 @@ module SiSU_Git unless @md.i18n[0]==l[:c] p "using: #{@md.i18n[0]} (@make: :language:); filename #{@md.fns} filename language: #{l[:c]}, mismatch" end - if @env.multilingual? + if @env.output_dir_structure.multilingual? m=/((.+?)(?:\~\w{2,3})?)\.((?:-|ssm\.)?sst|ssm)$/ #watch added match for sss fnn,fnb,fnt=@opt.fns[m,1],@opt.fns[m,2],@opt.fns[m,3] else m=/(.+?)\.((?:-|ssm\.)?sst|ssm)$/ diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb index 4fc657e8..bad68cde 100644 --- a/lib/sisu/v3/html.rb +++ b/lib/sisu/v3/html.rb @@ -421,8 +421,8 @@ WOK p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) if ocn @file=SiSU_Env::SiSU_file.new(@md) if @md txt_obj=if seg_link=~/sisu_manifest\.html/ - man_link=if @file.by_language? \ - or @file.by_filetype? + man_link=if @file.output_dir_structure.by_language_code? \ + or @file.output_dir_structure.by_filetype? seg_link.gsub(/sisu_manifest\.html/,"../../manifest/#{@file.base_filename.manifest}") else seg_link end diff --git a/lib/sisu/v3/html_format.rb b/lib/sisu/v3/html_format.rb index 15345ca0..76805234 100644 --- a/lib/sisu/v3/html_format.rb +++ b/lib/sisu/v3/html_format.rb @@ -187,8 +187,8 @@ module SiSU_HTML_Format env.widget.search_form('sisusearch',nil,nil,true) end def manifest - manifest_lnk=if @file.by_language? \ - or @file.by_filetype? + manifest_lnk=if @file.output_dir_structure.by_language_code? \ + or @file.output_dir_structure.by_filetype? "#{Xx[:html_relative1]}manifest/#{@file.base_filename.manifest}" else @file.base_filename.manifest end @@ -651,8 +651,8 @@ WOK nxt="#{@md.fnl[:pre]}#{@seg_name_html[@seg_name_html_tracker+1]}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" if nxt=~/sisu_manifest\.html/ @file=SiSU_Env::SiSU_file.new(@md) if @md - if @file.by_language? \ - or @file.by_filetype? + if @file.output_dir_structure.by_language_code? \ + or @file.output_dir_structure.by_filetype? nxt.gsub!(/sisu_manifest\.html/,"../../manifest/#{@file.base_filename.manifest}") end end @@ -713,8 +713,8 @@ WOK } if f_nxt==true if nxt =~/sisu_manifest.html/ @file=SiSU_Env::SiSU_file.new(@md) if @md - if @file.by_language? \ - or @file.by_filetype? + if @file.output_dir_structure.by_language_code? \ + or @file.output_dir_structure.by_filetype? nxt.gsub!(/sisu_manifest\.html/,"../../manifest/#{@file.base_filename.manifest}") end end diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb index e7fbcfa9..58b78c76 100644 --- a/lib/sisu/v3/manifest.rb +++ b/lib/sisu/v3/manifest.rb @@ -646,8 +646,8 @@ SiSU manifest: #{@md.title.full} #{banner_table} WOK if @env.manifest_minitoc? - if @env.by_language? \ - or @env.by_filetype? + if @env.output_dir_structure.by_language_code? \ + or @env.output_dir_structure.by_filetype? minitoc.gsub!(/ Date: Tue, 15 Feb 2011 20:44:41 -0500 Subject: css, fix css paths for xhtml, xml dom & xml sax --- lib/sisu/v3/sysenv.rb | 23 ++++++++++++++++++++++- lib/sisu/v3/xhtml.rb | 4 ++-- lib/sisu/v3/xml.rb | 4 ++-- lib/sisu/v3/xml_dom.rb | 4 ++-- 4 files changed, 28 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index c3d16778..a7105d69 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -2911,7 +2911,7 @@ WOK '/' end end - def html_scroll_css + def default_output_css if @env.output_dir_structure.by_language_code? '../../' elsif @env.output_dir_structure.by_filetype? @@ -2920,6 +2920,15 @@ WOK '../' end end + def html_scroll_css + default_output_css + end + def xhtml_css + default_output_css + end + def xml_css + default_output_css + end def html_seg_css if @env.output_dir_structure.by_language_code? '../../../' @@ -3877,6 +3886,18 @@ WOK def xhtml_epub %{ } end + def epub + xhtml_epub + end + def xhtml + %{} + end + def xml_sax + %{} + end + def xml_dom + %{} + end end class Create_site < Info_env require "#{SiSU_lib}/css" # css.rb diff --git a/lib/sisu/v3/xhtml.rb b/lib/sisu/v3/xhtml.rb index 8710f2da..b1855653 100644 --- a/lib/sisu/v3/xhtml.rb +++ b/lib/sisu/v3/xhtml.rb @@ -353,11 +353,11 @@ WOK rdf=SiSU_XML_tags::RDF.new(@md) dir=SiSU_Env::Info_env.new @@xml[:head],@@xml[:body]=[],[] - css=SiSU_Env::CSS_select.new(@md).xhtml + css=SiSU_Env::CSS_stylesheet.new(@md) encoding=(@sys.locale =~/utf-?8/i) ? '' : '' @@xml[:open] =< +#{css.xhtml} #{rdf.comment_xml} WOK diff --git a/lib/sisu/v3/xml.rb b/lib/sisu/v3/xml.rb index 5dfd6e7b..a3767177 100644 --- a/lib/sisu/v3/xml.rb +++ b/lib/sisu/v3/xml.rb @@ -392,13 +392,13 @@ WOK rdf=SiSU_XML_tags::RDF.new(@md) dir=SiSU_Env::Info_env.new @@xml[:head],@@xml[:body]=[],[] - css=SiSU_Env::CSS_select.new(@md).xml_sax + css=SiSU_Env::CSS_stylesheet.new(@md) encoding=if @sys.locale =~/utf-?8/i; '' else '' end @@xml[:open] =< +#{css.xml_sax} #{rdf.comment_xml} WOK diff --git a/lib/sisu/v3/xml_dom.rb b/lib/sisu/v3/xml_dom.rb index 0fe44836..726e48d5 100644 --- a/lib/sisu/v3/xml_dom.rb +++ b/lib/sisu/v3/xml_dom.rb @@ -467,13 +467,13 @@ WOK def pre rdf=SiSU_XML_tags::RDF.new(@md) dir=SiSU_Env::Info_env.new - css=SiSU_Env::CSS_select.new(@md).xml_dom + css=SiSU_Env::CSS_stylesheet.new(@md) encoding=if @sys.locale =~/utf-?8/i; '' else '' end @@xml[:open] =< +#{css.xml_dom} #{rdf.comment_xml} WOK -- cgit v1.2.3