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