From 9b51aed57ab048b76cf322c8c56e6b83d68f50d0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 2 Dec 2013 23:43:22 -0500 Subject: v5: renaming files & modules ao & AO (from dal & DAL) * ao (abstract objects) shorter, also easily searched, higher sort location abstract as representation of & extraction of document objects (dal (document abstraction layer)) --- lib/sisu/v5/sysenv.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sisu/v5/sysenv.rb') diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index d4079f8c..19031711 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -142,7 +142,7 @@ module SiSU_Env PROCESSING_PATH=:processing_path PROCESSING_DIR_TMP_ROOT=:processing_dir_tmp_root PROCESSING_PATH_TMP_BASE=:processing_path_tmp_base - PROCESSING_DAL=:processing_dal + PROCESSING_AO=:processing_dal PROCESSING_TUNE=:processing_tune PROCESSING_LATEX=:processing_latex PROCESSING_TEXINFO=:processing_texinfo @@ -186,7 +186,7 @@ module SiSU_Env PROCESSING_PATH => processing_pth, PROCESSING_DIR_TMP_ROOT => prcss_dir_tmp_root, PROCESSING_PATH_TMP_BASE => processing_pth, - PROCESSING_DAL => 'dal', + PROCESSING_AO => 'ao', PROCESSING_TUNE => 'tune', PROCESSING_LATEX => 'tex', PROCESSING_TEXINFO => 'texinfo', -- cgit v1.2.3 From 3d4ec6deee066dec01b9445f9b54f844d9443aae Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 2 Dec 2013 23:59:06 -0500 Subject: v5: some renaming to ao from dal continued --- lib/sisu/v5/sysenv.rb | 134 +++++++++++++++++++++++++------------------------- 1 file changed, 67 insertions(+), 67 deletions(-) (limited to 'lib/sisu/v5/sysenv.rb') diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index 19031711..344a88d3 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -142,7 +142,7 @@ module SiSU_Env PROCESSING_PATH=:processing_path PROCESSING_DIR_TMP_ROOT=:processing_dir_tmp_root PROCESSING_PATH_TMP_BASE=:processing_path_tmp_base - PROCESSING_AO=:processing_dal + PROCESSING_AO=:processing_ao PROCESSING_TUNE=:processing_tune PROCESSING_LATEX=:processing_latex PROCESSING_TEXINFO=:processing_texinfo @@ -2161,7 +2161,7 @@ WOK ? ("#{root_dir}/#{user}/#{stub_pwd}") : ("#{root_dir}/#{stub_pwd}") # see defaults[:processing_path] end - def processing_sisupod(opt=nil) #processing directory, used/needed for sisu work files, has sub-directories (dal,tex etc) + def processing_sisupod(opt=nil) #processing directory, used/needed for sisu work files, has sub-directories (ao,tex etc) @opt=opt def paths processing_path_usr="#{root_dir}/#{user}" @@ -2195,7 +2195,7 @@ WOK end self end - def processing #processing directory, used/needed for sisu work files, has sub-directories (dal,tex etc) + def processing #processing directory, used/needed for sisu work files, has sub-directories (ao,tex etc) unless FileTest.directory?(root_dir) FileUtils::mkdir_p(root_dir) File.chmod(0777,root_dir) @@ -2219,11 +2219,11 @@ WOK end processing end - def dal + def ao pth=if defined? @rc['processing']['dal'] \ and @rc['processing']['dal'].is_a?(String) "#{processing}/#{@rc['processing']['dal']}" - else "#{processing}/#{defaults[:processing_dal]}" + else "#{processing}/#{defaults[:processing_ao]}" end FileUtils::mkdir_p(pth) unless FileTest.directory?(pth) pth @@ -2238,7 +2238,7 @@ WOK pth end def composite_file - pth=processing_path.dal #"#{processing}/composite" + pth=processing_path.ao #"#{processing}/composite" FileUtils::mkdir_p(pth) unless FileTest.directory?(pth) pth end @@ -2978,51 +2978,51 @@ WOK ? (SiSU_Env::InfoEnv.new(@opt.fns)) : (SiSU_Env::InfoEnv.new('dummy.sst'))) ft=[] - if @opt.act[:dal][:set]==:on + if @opt.act[:ao][:set]==:on @md=SiSU_Param::Parameters.new(@opt).get if @md \ and defined? @md.fn \ and @md.fn # used for by_language_code? - if @md.opt.act[:html][:set]==:on #% --html, -h -H + if @md.opt.act[:html][:set]==:on #% --html, -h -H ft << @md.fn[:html] end - if @md.opt.act[:concordance][:set]==:on #% --concordance, -w + if @md.opt.act[:concordance][:set]==:on #% --concordance, -w ft << @md.fn[:concordance] end - if @md.opt.act[:manifest][:set]==:on #% --manifest, -y + if @md.opt.act[:manifest][:set]==:on #% --manifest, -y ft << @md.fn[:manifest] end - if @md.opt.act[:txt][:set]==:on #% --txt, -t -a + if @md.opt.act[:txt][:set]==:on #% --txt, -t -a ft << @md.fn[:plain] end - if @md.opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml + if @md.opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml ft << @md.fn[:xhtml] end - if @md.opt.act[:epub][:set]==:on #% --epub, -e + if @md.opt.act[:epub][:set]==:on #% --epub, -e ft << @md.fn[:epub] end - if @md.opt.act[:manpage][:set]==:on #% --manpage, -i + if @md.opt.act[:manpage][:set]==:on #% --manpage, -i ft << @md.fn[:manpage] end - if @md.opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree + if @md.opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree ft << @md.fn[:digest] end - if @md.opt.act[:odt][:set]==:on #% --odt, -o opendocument + if @md.opt.act[:odt][:set]==:on #% --odt, -o opendocument ft << @md.fn[:odf] end - if @md.opt.act[:pdf][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf + if @md.opt.act[:pdf][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf ft << @md.fn[:pdf_l] << @md.fn[:pdf_p] end if @md.opt.act[:share_source][:set]==:on ft << @md.fns end - if @md.opt.act[:sisupod][:set]==:on #% --sisupod, -S make sisupod + if @md.opt.act[:sisupod][:set]==:on #% --sisupod, -S make sisupod ft << @md.fn[:sisupod] end - if @md.opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type + if @md.opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type ft << @md.fn[:sax] end - if @md.opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type + if @md.opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type ft << @md.fn[:dom] end if @md.opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu @@ -3033,46 +3033,46 @@ WOK end @fnb=@md.fnb else # still needed where/when param is not parsed - if @opt.act[:html][:set]==:on #% --html, -h -H + if @opt.act[:html][:set]==:on #% --html, -h -H ft << '.html' << '.html.??' end - if @opt.act[:concordance][:set]==:on #% --concordance, -w + if @opt.act[:concordance][:set]==:on #% --concordance, -w ft << 'concordance.html' << '??.concordance.html' << 'concordance.??.html' end - if @opt.act[:manifest][:set]==:on #% --manifest, -y + if @opt.act[:manifest][:set]==:on #% --manifest, -y ft << 'sisu_manifest.html' << '??.sisu_manifest.html' << 'sisu_manifest.??.html' end - if @opt.act[:txt][:set]==:on #% --txt, -t -a + if @opt.act[:txt][:set]==:on #% --txt, -t -a ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' end - if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml + if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml ft << 'scroll.xhtml' << '??.scroll.xhtml' << 'scroll.??.xhtml' end - if @opt.act[:epub][:set]==:on #% --epub, -e + if @opt.act[:epub][:set]==:on #% --epub, -e ft << @fnb << '.epub' end - if @opt.act[:manpage][:set]==:on #% --manpage, -i + if @opt.act[:manpage][:set]==:on #% --manpage, -i ft << '.1' << '??.man.1' << 'man.??.1' end - if @opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree + if @opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree ft << 'digest.txt' << '??.digest.txt' << 'digest.??.txt' end - if @opt.act[:odt][:set]==:on #% --odt, -o opendocument + if @opt.act[:odt][:set]==:on #% --odt, -o opendocument ft << 'opendocument.odt' << '??.opendocument.odt' << 'opendocument.??.odt' end - if @opt.act[:pdf][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf + if @opt.act[:pdf][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf ft << 'landscape.pdf' << 'portrait.pdf' << '.pdf' end if @opt.act[:share_source][:set]==:on ft << '.sst' << '.ssi' << '.ssm' end - if @opt.act[:sisupod][:set]==:on #% --sisupod, -S make sisupod + if @opt.act[:sisupod][:set]==:on #% --sisupod, -S make sisupod ft << '.zip' end - if @opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type + if @opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type ft << 'sax.xml' << '??.sax.xml' << 'sax.??.xml' end - if @opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type + if @opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type ft << 'dom.xml' << '??.dom.xml' << 'dom.??.xml' end if @opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu @@ -3139,16 +3139,16 @@ WOK def remove_output if @opt.act[:maintenance][:set] == :on m=InfoFile.new(@opt.fnc) - tell=SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns, 'remove maintenance files from: ' + @env.processing_path.dal) + tell=SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns, 'remove maintenance files from: ' + @env.processing_path.ao) tell.warn unless @opt.cmd =~/q/ - deletion(m.marshal.dal_content) - deletion(m.marshal.dal_idx_sst_rel_html_seg) - deletion(m.dal_idx_sst_rel) - deletion(m.dal_idx_html) - deletion(m.dal_idx_xhtml) - deletion(m.dal_metadata) - deletion(m.dal_map_nametags) - deletion(m.dal_map_ocn_htmlseg) + deletion(m.marshal.ao_content) + deletion(m.marshal.ao_idx_sst_rel_html_seg) + deletion(m.ao_idx_sst_rel) + deletion(m.ao_idx_html) + deletion(m.ao_idx_xhtml) + deletion(m.ao_metadata) + deletion(m.ao_map_nametags) + deletion(m.ao_map_ocn_htmlseg) deletion(m.html_tune) end md=SiSU_Param::Parameters.new(@opt).get @@ -3378,7 +3378,7 @@ WOK end def rsync def document - f=(@opt.act[:dal][:set]==:on) \ + f=(@opt.act[:ao][:set]==:on) \ ? SiSU_Env::FileOp.new(@md) : nil if f @@ -3704,29 +3704,29 @@ WOK FileUtils::mkdir_p(path) unless FileTest.directory?(path) end def marshal - def dal_content - "#{@env.processing_path.dal}/#{@fns}.content.rbm" + def ao_content + "#{@env.processing_path.ao}/#{@fns}.content.rbm" end - def dal_idx_sst_rel_html_seg - "#{@env.processing_path.dal}/#{@fns}.idx_sst.rbm" + def ao_idx_sst_rel_html_seg + "#{@env.processing_path.ao}/#{@fns}.idx_sst.rbm" end - def dal_idx_sst_rel #used by tex & odf - "#{@env.processing_path.dal}/#{@fns}.idx_raw.rbm" + def ao_idx_sst_rel #used by tex & odf + "#{@env.processing_path.ao}/#{@fns}.idx_raw.rbm" end - def dal_idx_html - "#{@env.processing_path.dal}/#{@fns}.idx_html.rbm" + def ao_idx_html + "#{@env.processing_path.ao}/#{@fns}.idx_html.rbm" end - def dal_idx_xhtml - "#{@env.processing_path.dal}/#{@fns}.idx_xhtml.rbm" + def ao_idx_xhtml + "#{@env.processing_path.ao}/#{@fns}.idx_xhtml.rbm" end - def dal_metadata - "#{@env.processing_path.dal}/#{@fns}.metadata.rbm" + def ao_metadata + "#{@env.processing_path.ao}/#{@fns}.metadata.rbm" end - def dal_map_nametags - "#{@env.processing_path.dal}/#{@fns}.map_name_tags.rbm" + def ao_map_nametags + "#{@env.processing_path.ao}/#{@fns}.map_name_tags.rbm" end - def dal_map_ocn_htmlseg - "#{@env.processing_path.dal}/#{@fns}.map_ocn_htmlseg.rbm" + def ao_map_ocn_htmlseg + "#{@env.processing_path.ao}/#{@fns}.map_ocn_htmlseg.rbm" end def html_tune "#{@env.processing_path.tune}/#{@fns}.marshal_tune" @@ -3741,8 +3741,8 @@ WOK end def mkdir #check moved from FileOp, existing mkdir def processing - def dal - FileUtils::mkdir_p(@env.processing_path.dal) unless FileTest.directory?(@env.processing_path.dal) + def ao + FileUtils::mkdir_p(@env.processing_path.ao) unless FileTest.directory?(@env.processing_path.ao) end def tune FileUtils::mkdir_p(@env.processing_path.tune) unless FileTest.directory?(@env.processing_path.tune) @@ -4255,7 +4255,7 @@ WOK FileUtils::mkdir_p(output_path.base.dir) unless FileTest.directory?(output_path.base.dir) FileUtils::mkdir_p("#{output_path.base.dir}/#{@md.fnb}") unless FileTest.directory?("#{output_path.base.dir}/#{@md.fnb}") FileUtils::mkdir_p("#{output_path.base.dir}/#{@env.path.style}") unless FileTest.directory?("#{output_path.base.dir}/#{@env.path.style}") - FileUtils::mkdir_p(@env.processing_path.dal) unless FileTest.directory?(@env.processing_path.dal) + FileUtils::mkdir_p(@env.processing_path.ao) unless FileTest.directory?(@env.processing_path.ao) FileUtils::mkdir_p(@env.processing_path.tune) unless FileTest.directory?(@env.processing_path.tune) end def path_rel_links @@ -6130,17 +6130,17 @@ WOK File.new('/tmp/errorlog.sisu','w+') end def file_txt - File.new("#{@env.processing_path.dal}/#{@fns}.txt",'w+') + File.new("#{@env.processing_path.ao}/#{@fns}.txt",'w+') end def file_debug - File.new("#{@env.processing_path.dal}/#{@fns}.debug.txt",'w+') + File.new("#{@env.processing_path.ao}/#{@fns}.debug.txt",'w+') end def metaverse def file_meta - File.new("#{@env.processing_path.dal}/#{@fns}.meta",'w+') + File.new("#{@env.processing_path.ao}/#{@fns}.meta",'w+') end def file_meta_idx_html - File.new("#{@env.processing_path.dal}/#{@fns}.idx.html",'w+') + File.new("#{@env.processing_path.ao}/#{@fns}.idx.html",'w+') end self end @@ -6148,7 +6148,7 @@ WOK File.new("#{Dir.pwd}/#{@fns}.fn",'w+') end def meta - "#{@env.processing_path.dal}/#{@fns}.meta" + "#{@env.processing_path.ao}/#{@fns}.meta" end def file_semantic filename_semantic="./semantic.yaml" -- cgit v1.2.3 From cdda22f51e4de785502b42fce3cc645e95ffd1d4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 3 Dec 2013 00:15:43 -0500 Subject: v5: plaintext, smarttext: textile --- lib/sisu/v5/sysenv.rb | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'lib/sisu/v5/sysenv.rb') diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index 344a88d3..d89b118f 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -1490,6 +1490,12 @@ module SiSU_Env ? @rc['plaintext']['ocn'] : true end + def textile_ocn? + ((defined? @rc['textile']['ocn']) \ + && @rc['textile']['ocn']==true) \ + ? @rc['textile']['ocn'] + : false + end def widget #needs (md) #move @rc=SiSU_Env::GetInit.new.sisu_yaml.rc @ad=SiSU_Env::GetInit.new.ads @@ -2995,6 +3001,9 @@ WOK if @md.opt.act[:txt][:set]==:on #% --txt, -t -a ft << @md.fn[:plain] end + if @md.opt.act[:txt_textile][:set]==:on #% --textile + ft << @md.fn[:txt_textile] + end if @md.opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml ft << @md.fn[:xhtml] end @@ -3045,6 +3054,9 @@ WOK if @opt.act[:txt][:set]==:on #% --txt, -t -a ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' end + if @opt.act[:txt_textile][:set]==:on #% --textile + ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' + end if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml ft << 'scroll.xhtml' << '??.scroll.xhtml' << 'scroll.??.xhtml' end @@ -4372,6 +4384,12 @@ WOK fn=base_filename.txt make_file(path,fn) end + def textile + path=output_path.textile.dir + make_path(path) + fn=base_filename.textile + make_file(path,fn) + end def html_scroll pth=output_path.html.dir make_path(pth) @@ -4493,6 +4511,15 @@ WOK end self end + def textile + def dir + output_path.textile.dir + '/' + base_filename.textile + end + def rel + output_path.textile.rel + '/' + base_filename.textile + end + self + end def html_scroll def dir output_path.html_scroll.dir + '/' + base_filename.html_scroll @@ -4784,6 +4811,24 @@ WOK end i18n(fnh) end + def textile(fh=nil) + fh=default_hash_build(fh,Sfx[:txt_textile]) + fh[:lng]=lang_code?(fh[:lng]) + fnh=if output_dir_structure.by_filename? + { + fn: 'plain', + ft: fh[:ft], + lng: fh[:lng], + } + else + { + fn: fh[:fn], + ft: fh[:ft], + lng: fh[:lng], + } + end + i18n(fnh) + end def html_scroll(fh=nil) fh=default_hash_build(fh,Sfx[:html]) fh[:lng]=lang_code?(fh[:lng]) @@ -5560,6 +5605,27 @@ WOK end self end + def textile + def ft + 'textile_CONSTRUCTION_ZONE' + end + def dir + set_path(ft).dir.abc + end + def url + set_path(ft).url.abc + end + def rel + set_path(ft).rel.abc + end + def rcp + set_path(ft).rcp.abc + end + def rel_sm + set_path(ft).rel_sm.ab + end + self + end def html_scroll def ft 'html' -- cgit v1.2.3 From ce74f66cf2cd1dae56f7f7f14586bd770a0b32f4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 3 Dec 2013 00:19:46 -0500 Subject: v5: plaintext, smarttext: asciidoc --- lib/sisu/v5/sysenv.rb | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'lib/sisu/v5/sysenv.rb') diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index d89b118f..da992173 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -1496,6 +1496,12 @@ module SiSU_Env ? @rc['textile']['ocn'] : false end + def asciidoc_ocn? + ((defined? @rc['asciidoc']['ocn']) \ + && @rc['asciidoc']['ocn']==true) \ + ? @rc['asciidoc']['ocn'] + : false + end def widget #needs (md) #move @rc=SiSU_Env::GetInit.new.sisu_yaml.rc @ad=SiSU_Env::GetInit.new.ads @@ -3004,6 +3010,9 @@ WOK if @md.opt.act[:txt_textile][:set]==:on #% --textile ft << @md.fn[:txt_textile] end + if @md.opt.act[:txt_asciidoc][:set]==:on #% --asciidoc + ft << @md.fn[:txt_asciidoc] + end if @md.opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml ft << @md.fn[:xhtml] end @@ -3057,6 +3066,9 @@ WOK if @opt.act[:txt_textile][:set]==:on #% --textile ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' end + if @opt.act[:txt_asciidoc][:set]==:on #% --asciidoc + ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' + end if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml ft << 'scroll.xhtml' << '??.scroll.xhtml' << 'scroll.??.xhtml' end @@ -4390,6 +4402,12 @@ WOK fn=base_filename.textile make_file(path,fn) end + def asciidoc + path=output_path.asciidoc.dir + make_path(path) + fn=base_filename.asciidoc + make_file(path,fn) + end def html_scroll pth=output_path.html.dir make_path(pth) @@ -4520,6 +4538,15 @@ WOK end self end + def asciidoc + def dir + output_path.asciidoc.dir + '/' + base_filename.asciidoc + end + def rel + output_path.asciidoc.rel + '/' + base_filename.asciidoc + end + self + end def html_scroll def dir output_path.html_scroll.dir + '/' + base_filename.html_scroll @@ -4829,6 +4856,24 @@ WOK end i18n(fnh) end + def asciidoc(fh=nil) + fh=default_hash_build(fh,Sfx[:txt_asciidoc]) + fh[:lng]=lang_code?(fh[:lng]) + fnh=if output_dir_structure.by_filename? + { + fn: 'plain', + ft: fh[:ft], + lng: fh[:lng], + } + else + { + fn: fh[:fn], + ft: fh[:ft], + lng: fh[:lng], + } + end + i18n(fnh) + end def html_scroll(fh=nil) fh=default_hash_build(fh,Sfx[:html]) fh[:lng]=lang_code?(fh[:lng]) @@ -5626,6 +5671,27 @@ WOK end self end + def asciidoc + def ft + 'asciidoc_CONSTRUCTION_ZONE' + end + def dir + set_path(ft).dir.abc + end + def url + set_path(ft).url.abc + end + def rel + set_path(ft).rel.abc + end + def rcp + set_path(ft).rcp.abc + end + def rel_sm + set_path(ft).rel_sm.ab + end + self + end def html_scroll def ft 'html' -- cgit v1.2.3 From 66fde27a84a4fca7b93d08cc7ceda19400e8f9ad Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 3 Dec 2013 00:22:22 -0500 Subject: v5: plaintext, smarttext: markdown --- lib/sisu/v5/sysenv.rb | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'lib/sisu/v5/sysenv.rb') diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index da992173..410d1a2c 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -1502,6 +1502,12 @@ module SiSU_Env ? @rc['asciidoc']['ocn'] : false end + def markdown_ocn? + ((defined? @rc['markdown']['ocn']) \ + && @rc['markdown']['ocn']==true) \ + ? @rc['markdown']['ocn'] + : false + end def widget #needs (md) #move @rc=SiSU_Env::GetInit.new.sisu_yaml.rc @ad=SiSU_Env::GetInit.new.ads @@ -3013,6 +3019,9 @@ WOK if @md.opt.act[:txt_asciidoc][:set]==:on #% --asciidoc ft << @md.fn[:txt_asciidoc] end + if @md.opt.act[:txt_markdown][:set]==:on #% --markdown + ft << @md.fn[:txt_markdown] + end if @md.opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml ft << @md.fn[:xhtml] end @@ -3069,6 +3078,9 @@ WOK if @opt.act[:txt_asciidoc][:set]==:on #% --asciidoc ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' end + if @opt.act[:txt_markdown][:set]==:on #% --markdown + ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' + end if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml ft << 'scroll.xhtml' << '??.scroll.xhtml' << 'scroll.??.xhtml' end @@ -4408,6 +4420,12 @@ WOK fn=base_filename.asciidoc make_file(path,fn) end + def markdown + path=output_path.markdown.dir + make_path(path) + fn=base_filename.markdown + make_file(path,fn) + end def html_scroll pth=output_path.html.dir make_path(pth) @@ -4547,6 +4565,15 @@ WOK end self end + def markdown + def dir + output_path.markdown.dir + '/' + base_filename.markdown + end + def rel + output_path.markdown.rel + '/' + base_filename.markdown + end + self + end def html_scroll def dir output_path.html_scroll.dir + '/' + base_filename.html_scroll @@ -4874,6 +4901,24 @@ WOK end i18n(fnh) end + def markdown(fh=nil) + fh=default_hash_build(fh,Sfx[:txt_markdown]) + fh[:lng]=lang_code?(fh[:lng]) + fnh=if output_dir_structure.by_filename? + { + fn: 'plain', + ft: fh[:ft], + lng: fh[:lng], + } + else + { + fn: fh[:fn], + ft: fh[:ft], + lng: fh[:lng], + } + end + i18n(fnh) + end def html_scroll(fh=nil) fh=default_hash_build(fh,Sfx[:html]) fh[:lng]=lang_code?(fh[:lng]) @@ -5692,6 +5737,27 @@ WOK end self end + def markdown + def ft + 'markdown_CONSTRUCTION_ZONE' + end + def dir + set_path(ft).dir.abc + end + def url + set_path(ft).url.abc + end + def rel + set_path(ft).rel.abc + end + def rcp + set_path(ft).rcp.abc + end + def rel_sm + set_path(ft).rel_sm.ab + end + self + end def html_scroll def ft 'html' -- cgit v1.2.3 From 6c153f78e75df56bd7c5e04a58124a8d5427d5d7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 3 Dec 2013 00:24:33 -0500 Subject: v5: plaintext, smarttext: rst --- lib/sisu/v5/sysenv.rb | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'lib/sisu/v5/sysenv.rb') diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index 410d1a2c..094df7fd 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -1508,6 +1508,12 @@ module SiSU_Env ? @rc['markdown']['ocn'] : false end + def rst_ocn? + ((defined? @rc['rst']['ocn']) \ + && @rc['rst']['ocn']==true) \ + ? @rc['rst']['ocn'] + : false + end def widget #needs (md) #move @rc=SiSU_Env::GetInit.new.sisu_yaml.rc @ad=SiSU_Env::GetInit.new.ads @@ -3022,6 +3028,9 @@ WOK if @md.opt.act[:txt_markdown][:set]==:on #% --markdown ft << @md.fn[:txt_markdown] end + if @md.opt.act[:txt_rst][:set]==:on #% --rst, --rest + ft << @md.fn[:txt_rst] + end if @md.opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml ft << @md.fn[:xhtml] end @@ -3081,6 +3090,9 @@ WOK if @opt.act[:txt_markdown][:set]==:on #% --markdown ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' end + if @opt.act[:txt_rst][:set]==:on #% --rst, --rest + ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt' + end if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml ft << 'scroll.xhtml' << '??.scroll.xhtml' << 'scroll.??.xhtml' end @@ -4426,6 +4438,12 @@ WOK fn=base_filename.markdown make_file(path,fn) end + def rst + path=output_path.rst.dir + make_path(path) + fn=base_filename.rst + make_file(path,fn) + end def html_scroll pth=output_path.html.dir make_path(pth) @@ -4574,6 +4592,15 @@ WOK end self end + def rst + def dir + output_path.rst.dir + '/' + base_filename.rst + end + def rel + output_path.rst.rel + '/' + base_filename.rst + end + self + end def html_scroll def dir output_path.html_scroll.dir + '/' + base_filename.html_scroll @@ -4919,6 +4946,24 @@ WOK end i18n(fnh) end + def rst(fh=nil) + fh=default_hash_build(fh,Sfx[:txt_rst]) + fh[:lng]=lang_code?(fh[:lng]) + fnh=if output_dir_structure.by_filename? + { + fn: 'plain', + ft: fh[:ft], + lng: fh[:lng], + } + else + { + fn: fh[:fn], + ft: fh[:ft], + lng: fh[:lng], + } + end + i18n(fnh) + end def html_scroll(fh=nil) fh=default_hash_build(fh,Sfx[:html]) fh[:lng]=lang_code?(fh[:lng]) @@ -5758,6 +5803,27 @@ WOK end self end + def rst + def ft + 'rst_CONSTRUCTION_ZONE' + end + def dir + set_path(ft).dir.abc + end + def url + set_path(ft).url.abc + end + def rel + set_path(ft).rel.abc + end + def rcp + set_path(ft).rcp.abc + end + def rel_sm + set_path(ft).rel_sm.ab + end + self + end def html_scroll def ft 'html' -- cgit v1.2.3 From c7f7a26587c9ae9e569eb46b4d90f93ff63984d6 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 3 Dec 2013 00:28:11 -0500 Subject: v5: xml, docbook --- lib/sisu/v5/sysenv.rb | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) (limited to 'lib/sisu/v5/sysenv.rb') diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index 094df7fd..f25cd027 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -1478,6 +1478,12 @@ module SiSU_Env ? @rc['odt']['ocn'] : true end + def xml_docbook_ocn? + ((defined? @rc['xml_docbook']['ocn']) \ + && @rc['xml_docbook']['ocn']==false) \ + ? @rc['xml_docbook']['ocn'] + : true + end def xml_scaffold_ocn? ((defined? @rc['xml_scaffold']['ocn']) \ && @rc['xml_scaffold']['ocn']==false) \ @@ -2760,6 +2766,12 @@ WOK ? @rc['program_select']['xml_viewer'] : text_editor end + def docbook_viewer + ((defined? @rc['program_select']['xml_viewer']) \ + && @rc['program_select']['xml_viewer'] =~/\S\S+/) \ + ? @rc['program_select']['xml_viewer'] + : text_editor + end def xml_editor xml_viewer end @@ -3061,6 +3073,9 @@ WOK if @md.opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type ft << @md.fn[:dom] end + if @md.opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook-book + ft << @md.fn[:xml_docbook_book] + end if @md.opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu ft << @md.fn[:xml_scaffold_structure_sisu] end @@ -3123,6 +3138,9 @@ WOK if @opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type ft << 'dom.xml' << '??.dom.xml' << 'dom.??.xml' end + if @opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook-book + ft << 'docbook.xml' << '??.docbook.xml' << 'docbook.??.xml' + end if @opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu ft << 'scaffold.xml' << '??.scaffold.xml' << 'scaffold.??.xml' end @@ -4487,6 +4505,12 @@ WOK fn=base_filename.xml_dom make_file(path,fn) end + def xml_docbook_book + path=output_path.xml_docbook_book.dir + make_path(path) + fn=base_filename.xml_docbook_book + make_file(path,fn) + end def xml_scaffold_structure_sisu path=output_path.xml_scaffold_structure_sisu.dir make_path(path) @@ -4697,6 +4721,15 @@ WOK end self end + def xml_docbook_book + def dir + output_path.xml_docbook.dir + '/' + base_filename.xml_docbook_book + end + def rel + output_path.xml_docbook.rel + '/' + base_filename.xml_docbook_book + end + self + end def xml_scaffold_structure_sisu def dir output_path.xml.dir + '/' + base_filename.xml_scaffold_structure_sisu @@ -5132,6 +5165,24 @@ WOK end i18n(fnh) end + def xml_docbook_book(fh=nil) + fh=default_hash_build(fh,Sfx[:xml_docbook_book]) + fh[:lng]=lang_code?(fh[:lng]) + fnh=if output_dir_structure.by_filename? + { + fn: 'scroll', + ft: fh[:ft], + lng: fh[:lng], + } + else + { + fn: fh[:fn], + ft: fh[:ft], + lng: fh[:lng], + } + end + i18n(fnh) + end def xml_scaffold_structure_sisu(fh=nil) fh=default_hash_build(fh,Sfx[:xml_scaffold_structure_sisu]) fh[:lng]=lang_code?(fh[:lng]) @@ -6023,6 +6074,54 @@ WOK xml self end + def xml_docbook + def ft + 'docbook_CONSTRUCTION_ZONE' + end + def dir + set_path(ft).dir.abc + end + def url + set_path(ft).url.abc + end + def rel + set_path(ft).rel.abc + end + def rcp + set_path(ft).rcp.abc + end + def rel_sm + set_path(ft).rel_sm.ab + end + def rel_image + '../../_sisu/image' + end + self + end + def xml_docbook_book + def ft + 'docbook_CONSTRUCTION_ZONE' + end + def dir + set_path(ft).dir.abc + end + def url + set_path(ft).url.abc + end + def rel + set_path(ft).rel.abc + end + def rcp + set_path(ft).rcp.abc + end + def rel_sm + set_path(ft).rel_sm.ab + end + def rel_image + '../../_sisu/image' + end + self + end def xml_scaffold_structure_sisu def ft 'sisu.scaffold.xml' -- cgit v1.2.3 From 9700518408f388c9f070894f7986d94d80e4c070 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 3 Dec 2013 00:30:50 -0500 Subject: v5: xml, fictionbook --- lib/sisu/v5/sysenv.rb | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) (limited to 'lib/sisu/v5/sysenv.rb') diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index f25cd027..1f5d7d3a 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -1484,6 +1484,12 @@ module SiSU_Env ? @rc['xml_docbook']['ocn'] : true end + def xml_fictionbook_ocn? + ((defined? @rc['xml_fictionbook']['ocn']) \ + && @rc['xml_fictionbook']['ocn']==false) \ + ? @rc['xml_fictionbook']['ocn'] + : true + end def xml_scaffold_ocn? ((defined? @rc['xml_scaffold']['ocn']) \ && @rc['xml_scaffold']['ocn']==false) \ @@ -2772,6 +2778,12 @@ WOK ? @rc['program_select']['xml_viewer'] : text_editor end + def fictionbook_viewer + ((defined? @rc['program_select']['xml_viewer']) \ + && @rc['program_select']['xml_viewer'] =~/\S\S+/) \ + ? @rc['program_select']['xml_viewer'] + : text_editor + end def xml_editor xml_viewer end @@ -3076,6 +3088,9 @@ WOK if @md.opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook-book ft << @md.fn[:xml_docbook_book] end + if @md.opt.act[:xml_fictionbook][:set]==:on #% --xml-fictionbook + ft << @md.fn[:xml_fictionbook] + end if @md.opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu ft << @md.fn[:xml_scaffold_structure_sisu] end @@ -3141,6 +3156,9 @@ WOK if @opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook-book ft << 'docbook.xml' << '??.docbook.xml' << 'docbook.??.xml' end + if @opt.act[:xml_fictionbook][:set]==:on #% --xml-fictionbook + ft << 'fictionbook.xml' << '??.fictionbook.xml' << 'fictionbook.??.xml' + end if @opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu ft << 'scaffold.xml' << '??.scaffold.xml' << 'scaffold.??.xml' end @@ -4511,6 +4529,12 @@ WOK fn=base_filename.xml_docbook_book make_file(path,fn) end + def xml_fictionbook + path=output_path.xml_fictionbook.dir + make_path(path) + fn=base_filename.xml_fictionbook + make_file(path,fn) + end def xml_scaffold_structure_sisu path=output_path.xml_scaffold_structure_sisu.dir make_path(path) @@ -4730,6 +4754,15 @@ WOK end self end + def xml_fictionbook + def dir + output_path.xml_fictionbook.dir + '/' + base_filename.xml_fictionbook + end + def rel + output_path.xml_fictionbook.rel + '/' + base_filename.xml_fictionbook + end + self + end def xml_scaffold_structure_sisu def dir output_path.xml.dir + '/' + base_filename.xml_scaffold_structure_sisu @@ -5183,6 +5216,24 @@ WOK end i18n(fnh) end + def xml_fictionbook(fh=nil) + fh=default_hash_build(fh,Sfx[:xml_fictionbook]) + fh[:lng]=lang_code?(fh[:lng]) + fnh=if output_dir_structure.by_filename? + { + fn: 'scroll', + ft: fh[:ft], + lng: fh[:lng], + } + else + { + fn: fh[:fn], + ft: fh[:ft], + lng: fh[:lng], + } + end + i18n(fnh) + end def xml_scaffold_structure_sisu(fh=nil) fh=default_hash_build(fh,Sfx[:xml_scaffold_structure_sisu]) fh[:lng]=lang_code?(fh[:lng]) @@ -6098,6 +6149,30 @@ WOK end self end + def xml_docbook_article + def ft + 'docbook' + end + def dir + set_path(ft).dir.abc + end + def url + set_path(ft).url.abc + end + def rel + set_path(ft).rel.abc + end + def rcp + set_path(ft).rcp.abc + end + def rel_sm + set_path(ft).rel_sm.ab + end + def rel_image + '../../_sisu/image' + end + self + end def xml_docbook_book def ft 'docbook_CONSTRUCTION_ZONE' @@ -6122,6 +6197,30 @@ WOK end self end + def xml_fictionbook + def ft + 'fictionbook_CONSTRUCTION_ZONE' + end + def dir + set_path(ft).dir.abc + end + def url + set_path(ft).url.abc + end + def rel + set_path(ft).rel.abc + end + def rcp + set_path(ft).rcp.abc + end + def rel_sm + set_path(ft).rel_sm.ab + end + def rel_image + '../../_sisu/image' + end + self + end def xml_scaffold_structure_sisu def ft 'sisu.scaffold.xml' -- cgit v1.2.3