aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-12-03 00:15:43 -0500
committerRalph Amissah <ralph@amissah.com>2013-12-03 00:17:41 -0500
commitcdda22f51e4de785502b42fce3cc645e95ffd1d4 (patch)
tree492593d0fe3805a3db9f206661627d498f0fd3bd
parentv5: plaintext, rename & simplify (diff)
v5: plaintext, smarttext: textile
-rw-r--r--data/doc/sisu/CHANGELOG_v54
-rw-r--r--lib/sisu/v5/constants.rb1
-rw-r--r--lib/sisu/v5/hub.rb5
-rw-r--r--lib/sisu/v5/manifest.rb8
-rw-r--r--lib/sisu/v5/options.rb5
-rw-r--r--lib/sisu/v5/sysenv.rb66
-rw-r--r--lib/sisu/v5/txt_textile.rb543
-rw-r--r--lib/sisu/v5/urls.rb8
8 files changed, 640 insertions, 0 deletions
diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5
index b84664c8..f88321fd 100644
--- a/data/doc/sisu/CHANGELOG_v5
+++ b/data/doc/sisu/CHANGELOG_v5
@@ -52,6 +52,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.1.0.orig.tar.xz
* odf becomes xml_odf_odt
* xml sax file renamed xml_sax.rb (from xml.rb)
+* new outputs under development, CONSTRUCTION_ZONE
+ * plaintext, smarttext
+ * textile
+
* xmlns xlink using xl
* rake create build & install sisu gemspec; bin/sisugem (add .gitignore)
diff --git a/lib/sisu/v5/constants.rb b/lib/sisu/v5/constants.rb
index a21f01b7..e160fada 100644
--- a/lib/sisu/v5/constants.rb
+++ b/lib/sisu/v5/constants.rb
@@ -64,6 +64,7 @@
YEAR='2013'
Sfx={
txt: '.txt',
+ txt_textile: '.textile',
html: '.html',
xhtml: '.xhtml',
xml: '.xml',
diff --git a/lib/sisu/v5/hub.rb b/lib/sisu/v5/hub.rb
index a4fd408f..82036c87 100644
--- a/lib/sisu/v5/hub.rb
+++ b/lib/sisu/v5/hub.rb
@@ -302,6 +302,10 @@ module SiSU
require_relative 'txt_plain' # txt_plain.rb
SiSU_Txt_Plain::Source.new(@opt).read
end
+ if @opt.act[:txt_textile][:set]==:on #% --textile
+ require_relative 'txt_textile' # txt_textile.rb
+ SiSU_Txt_Textile::Source.new(@opt).read
+ end
if @opt.act[:html][:set]==:on #% --html, -h -H
require_relative 'html' # html.rb
SiSU_HTML::Source.new(@opt).read
@@ -637,6 +641,7 @@ module SiSU
|| @opt.act[:manpage][:set]==:on \
|| @opt.act[:texinfo][:set]==:on \
|| @opt.act[:txt][:set]==:on \
+ || @opt.act[:txt_textile][:set]==:on \
|| @opt.act[:html][:set]==:on \
|| @opt.act[:html_scroll][:set]==:on \
|| @opt.act[:html_seg][:set]==:on \
diff --git a/lib/sisu/v5/manifest.rb b/lib/sisu/v5/manifest.rb
index fc4bd5b9..9eb2aecb 100644
--- a/lib/sisu/v5/manifest.rb
+++ b/lib/sisu/v5/manifest.rb
@@ -439,6 +439,14 @@ module SiSU_Manifest
file=@f.base_filename.txt
summarize(id,file,pth,rel,url)
end
+ if FileTest.file?(@f.place_file.textile.dir)==true
+ id='Textile text (UTF-8)'
+ pth=@f.output_path.textile.dir
+ rel=@f.output_path.textile.rel_sm
+ url=@f.output_path.textile.url
+ file=@f.base_filename.textile
+ summarize(id,file,pth,rel,url)
+ end
if FileTest.file?("#{@base_path}/#{@md.fns}.tex")==true
id,file='LaTeX (portrait)',"#{@md.fns}.tex"
pth,rel,url='','',''
diff --git a/lib/sisu/v5/options.rb b/lib/sisu/v5/options.rb
index 650105fa..ccea95aa 100644
--- a/lib/sisu/v5/options.rb
+++ b/lib/sisu/v5/options.rb
@@ -875,6 +875,9 @@ module SiSU_Commandline
|| mod.inspect =~/"--txt"/) \
? { bool: true, set: :on }
: { bool: false, set: :na }
+ act[:txt_textile]=(mod.inspect =~/"--textile"/) \
+ ? { bool: true, set: :on }
+ : { bool: false, set: :na }
act[:manpage]=(cmd =~/i/ \
|| mod.inspect =~/"--manpage"|"--man"/) \
? { bool: true, set: :on }
@@ -964,6 +967,7 @@ module SiSU_Commandline
|| mod.inspect =~/"--ao"|"--dal"/)
{ bool: true, set: :on }
elsif (act[:txt][:set]==:on \
+ || act[:txt_textile][:set]==:on \
|| act[:xhtml][:set]==:on \
|| act[:epub][:set]==:on \
|| act[:html][:set]==:on \
@@ -1008,6 +1012,7 @@ module SiSU_Commandline
|| mod.inspect =~/"--manifest"/)
{ bool: true, set: :on }
elsif (act[:txt][:set]==:on \
+ || act[:txt_textile][:set]==:on \
|| act[:xhtml][:set]==:on \
|| act[:epub][:set]==:on \
|| act[:html][:set]==:on \
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