From d6b596f0108ce66d563e6ea7d2f6bbb8ead27b52 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 5 Nov 2013 23:16:33 -0500 Subject: v5: xml, scaffold, re-activated, split into sisu structure & collapsed structure * --xml-scaffold-sisu (--xml-scaffold) * --xml-scaffold-collapse * output currently to terminal only --- lib/sisu/v5/sysenv.rb | 146 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) (limited to 'lib/sisu/v5/sysenv.rb') diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index f1076c68..d4079f8c 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_scaffold_ocn? + ((defined? @rc['xml_scaffold']['ocn']) \ + && @rc['xml_scaffold']['ocn']==false) \ + ? @rc['xml_scaffold']['ocn'] + : true + end def plaintext_ocn? ((defined? @rc['plaintext']['ocn']) \ && @rc['plaintext']['ocn']==false) \ @@ -3019,6 +3025,12 @@ 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_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu + ft << @md.fn[:xml_scaffold_structure_sisu] + end + if @md.opt.act[:xml_scaffold_structure_collapse][:set]==:on #% --xml-scaffold-collapse + ft << @md.fn[:xml_scaffold_structure_collapse] + end @fnb=@md.fnb else # still needed where/when param is not parsed if @opt.act[:html][:set]==:on #% --html, -h -H @@ -3063,6 +3075,12 @@ 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_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu + ft << 'scaffold.xml' << '??.scaffold.xml' << 'scaffold.??.xml' + end + if @opt.act[:xml_scaffold_structure_collapse][:set]==:on #% --xml-scaffold-collapse + ft << 'scaffold.xml' << '??.scaffold.xml' << 'scaffold.??.xml' + end end ft=ft.uniq filetypes=ft.join(',') @@ -3154,6 +3172,8 @@ WOK deletion(f.place_file.xhtml.dir) deletion(f.place_file.xml_sax.dir) deletion(f.place_file.xml_dom.dir) + deletion(f.place_file.xml_scaffold_structure_sisu.dir) + deletion(f.place_file.xml_scaffold_structure_collapse.dir) deletion(f.place_file.info.dir) deletion(f.place_file.manpage.dir) deletion(f.place_file.sqlite_discrete.dir) @@ -3413,6 +3433,16 @@ WOK && FileTest.file?(f.place_file.xml_dom.dir) inp << f.place_file.xml_dom.rel end + if (@opt.act[:xml_scaffold_structure_sisu][:set]==:on \ + || @opt.cmd =~/^-[mqvVM]*R[mqvVM]*$/) \ + && FileTest.file?(f.place_file.xml_scaffold_structure_sisu.dir) + inp << f.place_file.xml_scaffold_structure_sisu.rel + end + if (@opt.act[:xml_scaffold_structure_collapse][:set]==:on \ + || @opt.cmd =~/^-[mqvVM]*R[mqvVM]*$/) \ + && FileTest.file?(f.place_file.xml_scaffold_structure_collapse.dir) + inp << f.place_file.xml_scaffold_structure_collapse.rel + end if (@opt.act[:txt][:set]==:on \ || @opt.cmd =~/^-[mqvVM]*R[mqvVM]*$/) \ && FileTest.file?(f.place_file.txt.dir) @@ -4385,6 +4415,18 @@ WOK fn=base_filename.xml_dom make_file(path,fn) end + def xml_scaffold_structure_sisu + path=output_path.xml_scaffold_structure_sisu.dir + make_path(path) + fn=base_filename.xml_scaffold_structure_sisu + make_file(path,fn) + end + def xml_scaffold_structure_collapse + path=output_path.xml_scaffold_structure_collapse.dir + make_path(path) + fn=base_filename.xml_scaffold_structure_collapse + make_file(path,fn) + end def manpage path=output_path.manpage.dir make_path(path) @@ -4547,6 +4589,24 @@ WOK end self end + def xml_scaffold_structure_sisu + def dir + output_path.xml.dir + '/' + base_filename.xml_scaffold_structure_sisu + end + def rel + output_path.xml.rel + '/' + base_filename.xml_scaffold_structure_sisu + end + self + end + def xml_scaffold_structure_collapse + def dir + output_path.xml.dir + '/' + base_filename.xml_scaffold_structure_collapse + end + def rel + output_path.xml.rel + '/' + base_filename.xml_scaffold_structure_collapse + end + self + end def sqlite_discrete def dir output_path.sqlite_discrete.dir + '/' + base_filename.sqlite_discrete @@ -4892,6 +4952,42 @@ WOK 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]) + 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_collapse(fh=nil) + fh=default_hash_build(fh,Sfx[:xml_scaffold_structure_collapse]) + 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 pdf_p(fh=nil) fh=default_hash_build(fh,Sfx[:pdf]) fh[:lng]=lang_code?(fh[:lng]) @@ -5663,6 +5759,56 @@ WOK xml self end + def xml_scaffold_structure_sisu + def ft + 'sisu.scaffold.xml' + #'xml' + 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_collapse + def ft + 'collapsed.scaffold.xml' + #'xml' + 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 pdf def ft 'pdf' -- cgit v1.2.3