aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/sysenv.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-12-03 00:24:33 -0500
committerRalph Amissah <ralph@amissah.com>2013-12-03 00:24:33 -0500
commit6c153f78e75df56bd7c5e04a58124a8d5427d5d7 (patch)
tree7a1b6047bf71db3db59331cfa6638410b83f2927 /lib/sisu/v5/sysenv.rb
parentv5: plaintext, smarttext: markdown (diff)
v5: plaintext, smarttext: rst
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 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'