aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/sysenv.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-12-03 00:22:22 -0500
committerRalph Amissah <ralph@amissah.com>2013-12-03 00:22:22 -0500
commit66fde27a84a4fca7b93d08cc7ceda19400e8f9ad (patch)
treeef79701befa531e39db4588814204ff641cf800b /lib/sisu/v5/sysenv.rb
parentv5: plaintext, smarttext: asciidoc (diff)
v5: plaintext, smarttext: markdown
Diffstat (limited to 'lib/sisu/v5/sysenv.rb')
-rw-r--r--lib/sisu/v5/sysenv.rb66
1 files changed, 66 insertions, 0 deletions
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'