summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README111
-rw-r--r--data/doc/sisu/CHANGELOG_v63
-rw-r--r--data/doc/sisu/markup-samples/manual/en/sisu_markup.sst76
-rw-r--r--lib/sisu/v5/param.rb6
-rw-r--r--lib/sisu/v6/ao_doc_str.rb88
-rw-r--r--lib/sisu/v6/composite.rb6
-rw-r--r--lib/sisu/v6/hub.rb226
-rw-r--r--lib/sisu/v6/param.rb9
-rw-r--r--man/man1/sisu.1432
-rw-r--r--sisu.org8
10 files changed, 702 insertions, 263 deletions
diff --git a/README b/README
index 303784c..ef26c28 100644
--- a/README
+++ b/README
@@ -948,6 +948,75 @@ or if for a particular version:
sisu --query-0.38
+MARKUP RULES, DOCUMENT STRUCTURE AND METADATA REQUIREMENTS
+..........................................................
+
+minimal content/structure requirement:
+
+[metadata]
+
+A~ (level A [title])
+1~ (at least one level 1 [segment/(chapter)])
+
+
+structure rules (document heirarchy, heading levels):
+
+there are two sets of heading levels ABCD (title & parts if any) and 123
+(segment & subsegments if any)
+
+sisu has the fllowing levels:
+
+A~ [title] .
+ required (== 1) followed by B~ or 1~
+B~ [part] *
+ followed by C~ or 1~
+C~ [subpart] *
+ followed by D~ or 1~
+D~ [subsubpart] *
+ followed by 1~
+1~ [segment (chapter)] +
+ required (>= 1) followed by text or 2~
+text *
+ followed by more text or 1~, 2~
+ or relevant part *()
+2~ [subsegment] *
+ followed by text or 3~
+text *
+ followed by more text or 1~, 2~ or 3~
+ or relevant part, see *()
+3~ [subsubsegment] *
+ followed by text
+text *
+ followed by more text or 1~, 2~ or 3~ or relevant part, see *()
+
+*(B~ if none other used;
+ if C~ is last used: C~ or B~;
+ if D~ is used: D~, C~ or B~)
+
+
+* level A~ is the tile and is mandatory
+* there can only be one level A~
+* heading levels BCD, are optional and there may be several of each
+ (where all three are used corresponding to e.g. Book Part Section)
+ * sublevels that are used must follow each other sequentially
+ (alphabetically),
+* heading levels A~ B~ C~ D~ are followed by other heading levels rather
+ than substantive text
+ which may be the subsequent sequential (alphabetic) heading part level
+ or a heading (segment) level 1~
+* there must be at least one heading (segment) level 1~
+ (the level on which the text is segmented, in a book would correspond
+ to the Chapter level)
+* additional heading levels 1~ 2~ 3~ are optional and there may be several
+ of each
+* heading levels 1~ 2~ 3~ are followed by text (which may be followed by
+ the same heading level)
+ and/or the next lower numeric heading level (followed by text)
+ or indeed return to the relevant part level
+ (as a corollary to the rules above substantive text/ content
+ must be preceded by a level 1~ (2~ or 3~) heading)
+
+
MARKUP EXAMPLES
...............
@@ -2011,9 +2080,9 @@ Page breaks are only relevant and honored in some output formats. A page break
or a new page may be inserted manually using the following markup on a line on
its own:
-page new =\= or ╋ breaks the page, starts a new page.
+page new =\= breaks the page, starts a new page.
-page break -\- or ┼ breaks a column, starts a new column, if using columns,
+page break -\- breaks a column, starts a new column, if using columns,
else breaks the page, starts a new page.
page break line across page -..- draws a dividing line, dividing paragraphs
@@ -2022,19 +2091,11 @@ page break:
-\\-
-or
-
-<:pb>
-
page (break) new:
=\\=
-or
-
-<:pn>
-
page (break) line across page (dividing paragraphs):
@@ -2191,8 +2252,8 @@ Configure substitution in _sisu/sisu_document_make
Creator: Ralph Amissah
- Rights: Copyright (C) Ralph Amissah 2014;\\ License: GPL 3 (part of SiSU
- documentation)
+ Rights: Copyright: Copyright (C) Ralph Amissah 2014 \\ License: GPL 3
+ (part of SiSU documentation)
Subject: ebook, epublishing, electronic book, electronic publishing,
electronic document, electronic citation, data structure,
@@ -2213,31 +2274,21 @@ Configure substitution in _sisu/sisu_document_make
Filetype: SiSU text insert 5.0,
Source digest: SHA256(README.ssm.sst)=
- e9ee6379dcf3a05c2b0ae19f091f7e2b1579d7b8a683996a8c53eb57249497c4
+ e6badfab7c24f0b217e1ab3b2d8cebb70a7fa9f1a8af9f907f029aa19fca3e74
- Generated by: Generated by: SiSU 6.0.4 of 2014w06/5 (2014-02-14)
+ Generated by: Generated by: SiSU 6.0.5 of 2014w15/3 (2014-04-16)
- Ruby version: ruby 2.1.0p0 (2013-12-25) [i386-linux-gnu]
+ Ruby version: ruby 2.1.1p76 (2014-02-24) [i386-linux-gnu]
- Document (ao) last generated: 2014-02-14 00:05:38 -0500
+ Document (ao) last generated: 2014-05-08 16:40:57 -0400
==============================================================================
plaintext (plain text):
- http://niu/manual/en/txt/README.txt
-
-Other versions of this document:
-
-manifest:
- http://niu/manual/en/manifest/README.html
-
-at:
- http://niu/manual
-
-
+ README
-* Generated by: SiSU 6.0.4 of 2014w06/5 (2014-02-14)
-* Ruby version: ruby 2.1.0p0 (2013-12-25) [i386-linux-gnu]
-* Last Generated on: 2014-02-14 00:05:39 -0500
+* Generated by: SiSU 6.0.5 of 2014w15/3 (2014-04-16)
+* Ruby version: ruby 2.1.1p76 (2014-02-24) [i386-linux-gnu]
+* Last Generated on: 2014-05-08 16:40:59 -0400
* SiSU http://www.sisudoc.org/
diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6
index d2bcea3..be37cbe 100644
--- a/data/doc/sisu/CHANGELOG_v6
+++ b/data/doc/sisu/CHANGELOG_v6
@@ -28,6 +28,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.5.orig.tar.xz
sisu_6.0.5.orig.tar.xz
sisu_6.0.5-1.dsc
+* ao, document structure check, stop processing on major error
+ (with error message & text at location of failure)
+
* ao_syntax, address possible manual use of url delimiters「」
* composite, fix includes, provide extra newline after inserted comment
diff --git a/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst b/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst
index be6d7b9..e3eefba 100644
--- a/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst
+++ b/data/doc/sisu/markup-samples/manual/en/sisu_markup.sst
@@ -65,6 +65,82 @@ or if for a particular version:
_1 sisu --query-0.38
+2~ Markup Rules, document structure and metadata requirements
+
+minimal content/structure requirement:
+
+[metadata]
+
+@title:
+
+@creator:
+
+[levels]
+
+``` code
+A~ (level A [title])
+1~ (at least one level 1 [segment/(chapter)])
+```
+
+structure rules (document heirarchy, heading levels):
+
+there are two sets of heading levels ABCD (title & parts if any) and 123 (segment & subsegments if any)
+
+sisu has the fllowing levels:
+
+``` code
+A~ [title] .
+ required (== 1) followed by B~ or 1~
+B~ [part] *
+ followed by C~ or 1~
+C~ [subpart] *
+ followed by D~ or 1~
+D~ [subsubpart] *
+ followed by 1~
+1~ [segment (chapter)] +
+ required (>= 1) followed by text or 2~
+text *
+ followed by more text or 1~, 2~
+ or relevant part *()
+2~ [subsegment] *
+ followed by text or 3~
+text *
+ followed by more text or 1~, 2~ or 3~
+ or relevant part, see *()
+3~ [subsubsegment] *
+ followed by text
+text *
+ followed by more text or 1~, 2~ or 3~ or relevant part, see *()
+
+*(B~ if none other used;
+ if C~ is last used: C~ or B~;
+ if D~ is used: D~, C~ or B~)
+```
+
+``` code
+* level A~ is the tile and is mandatory
+* there can only be one level A~
+* heading levels BCD, are optional and there may be several of each
+ (where all three are used corresponding to e.g. Book Part Section)
+ * sublevels that are used must follow each other sequentially
+ (alphabetically),
+* heading levels A~ B~ C~ D~ are followed by other heading levels rather
+ than substantive text
+ which may be the subsequent sequential (alphabetic) heading part level
+ or a heading (segment) level 1~
+* there must be at least one heading (segment) level 1~
+ (the level on which the text is segmented, in a book would correspond
+ to the Chapter level)
+* additional heading levels 1~ 2~ 3~ are optional and there may be several
+ of each
+* heading levels 1~ 2~ 3~ are followed by text (which may be followed by
+ the same heading level)
+ and/or the next lower numeric heading level (followed by text)
+ or indeed return to the relevant part level
+ (as a corollary to the rules above substantive text/ content
+ must be preceded by a level 1~ (2~ or 3~) heading)
+```
+
2~ Markup Examples
3~ Online
diff --git a/lib/sisu/v5/param.rb b/lib/sisu/v5/param.rb
index 1167d5e..adc9350 100644
--- a/lib/sisu/v5/param.rb
+++ b/lib/sisu/v5/param.rb
@@ -1311,7 +1311,7 @@ module SiSU_Param
if @en[:note] > 0 \
and @en[:sum] > 0
if @en[:sum] > 0
- else SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'*WARN* both endnote styles used',"~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}").warn unless @opt.act[:unless][:set]==:on
+ else SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'*WARN* both endnote styles used',"~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}").warn unless @opt.act[:quiet][:set]==:on
end
end
if @en[:mark] != @en[:note] \
@@ -1328,7 +1328,7 @@ module SiSU_Param
and @opt.inspect =~/P/
#@title=Md.new('Text Insert',@opt,@env).title
else
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Title missing','please provide @title:').warn unless @opt.act[:unless][:set]==:on
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Title missing','please provide @title:').warn unless @opt.act[:quiet][:set]==:on
end
end
if @author !~/[\S]/
@@ -1336,7 +1336,7 @@ module SiSU_Param
and @opt.inspect =~/P/
#@creator=SiSU_Param::Md.new('Text Insert',@opt,@env).creator
else
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Author missing','please provide @creator: :author:').warn unless @opt.act[:unless][:set]==:on
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Author missing','please provide @creator: :author:').warn unless @opt.act[:quiet][:set]==:on
end
end
@struct={}
diff --git a/lib/sisu/v6/ao_doc_str.rb b/lib/sisu/v6/ao_doc_str.rb
index d8c012f..3eb4a80 100644
--- a/lib/sisu/v6/ao_doc_str.rb
+++ b/lib/sisu/v6/ao_doc_str.rb
@@ -847,18 +847,43 @@ module SiSU_AO_DocumentStructureExtract
if status==:error
node_ln=/^([0-6])/.match(node)[1].to_i
node_parent_ln=/^([0-6])/.match(node_parent)[1].to_i
- puts %{current level: #{structure_info.lv[node_ln]} (possible parent levels: #{structure_info.possible_parents(structure_info.lv[node_ln])})
+ STDERR.puts %{current level: #{structure_info.lv[node_ln]} (possible parent levels: #{structure_info.possible_parents(structure_info.lv[node_ln])})
parent level: #{structure_info.lv[node_parent_ln]} (possible child levels: #{structure_info.possible_children(structure_info.lv[node_parent_ln])})
--- }
+SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"}
+ $process_document = :skip
end
end
end
def warning_incorrect_parent_level_or_level(txt)
- puts %{warning,
-#{txt}
-has incorrect level and/or parent level}
+ puts %{ERROR. There is an error in markup of heading levels either here or in the parent heading.
+The current header reads:
+"#{txt}"
+has incorrect level and/or parent level
+--}
+ end
+ def required_headers_present?
+ unless (defined? @md.title \
+ and @md.title.full)
+ STDERR.puts %{required header missing:
+
+@title:
+SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"
+}
+ $process_document = :skip
+ end
+ unless (defined? @md.creator.author \
+ and @md.creator.author)
+ STDERR.puts %{required header missing:
+
+@creator:
+ :author: anonymous?
+SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"
+}
+ $process_document = :skip
+ end
end
def ocn #and auto segment numbering increment
+ required_headers_present?
data=@data
@o_array=[]
node=ocn=ocn_dv=ocn_sp=ocnh=ocnh0=ocnh1=ocnh2=ocnh3=ocnh4=ocnh5=ocnh6=ocno=ocnp=ocnt=ocnc=ocng=ocni=ocnu=0 # h heading, o other, t table, g group, i image
@@ -866,6 +891,7 @@ has incorrect level and/or parent level}
parent=node1=node2=node3=node4=node5=node6=nil
node0='0:0;0'
@collapsed_lv0=0
+ @lev_occurences={ a: 0, b: 0, c: 0, d: 0, l1: 0, l2: 0, l3: 0 }
data.each do |dob|
h={}
if (dob.obj !~ regex_exclude_ocn_and_node || dob.is==:code) \
@@ -875,7 +901,7 @@ has incorrect level and/or parent level}
&& dob.ocn_
#dob.ln now is determined, and set earlier, check how best to remove this -->
if dob.is==:heading
- ln=case dob.lv
+ @ln=ln=case dob.lv
when 'A' then 0
when 'B' then 1
when 'C' then 2
@@ -905,11 +931,13 @@ has incorrect level and/or parent level}
end
if ln==0 \
or ln=~@md.lv0
+ @lev_occurences[:a] += 1
if not dob.obj =~/~#|-#/
ocn_flag=true
ocnh0+=1 #heading
node0="0:#{ocnh0};#{ocn}"
else
+ #document_structure_check_info(node0,node0,:error) #fix
ocn_flag=false
node0="0:0;0"
end
@@ -919,11 +947,13 @@ has incorrect level and/or parent level}
node,ocn_sp,parent=node0,"h#{ocnh}",'ROOT'
elsif ln==1 \
or ln=~@md.lv1
+ @lev_occurences[:b] += 1
if not dob.obj =~/~#|-#/
ocn_flag=true
ocnh1+=1 #heading
node1="1:#{ocnh1};#{ocn}"
else
+ #document_structure_check_info(node0,node0,:error) #fix
ocn_flag=false
node1="1:0;0"
end
@@ -932,6 +962,7 @@ has incorrect level and/or parent level}
@collapsed_lv1=@collapsed_lv0+1
node0
else
+ warning_incorrect_parent_level_or_level(dob.obj)
document_structure_check_info(node0,node0,:error)
node0
end
@@ -939,11 +970,13 @@ has incorrect level and/or parent level}
node,ocn_sp,parent=node1,"h#{ocnh}",node0 #FIX
elsif ln==2 \
or ln=~@md.lv2
+ @lev_occurences[:c] += 1
if not dob.obj =~/~#|-#/
ocn_flag=true
ocnh2+=1
node2="2:#{ocnh2};#{ocn}"
else
+ #document_structure_check_info(node0,node0,:error) #fix
ocn_flag=false
node2="2:0;0"
end
@@ -952,6 +985,7 @@ has incorrect level and/or parent level}
@collapsed_lv2=@collapsed_lv1+1
node1
else
+ warning_incorrect_parent_level_or_level(dob.obj)
document_structure_check_info(node2,node0,:error)
node0
end
@@ -959,11 +993,13 @@ has incorrect level and/or parent level}
node,ocn_sp=node2,"h#{ocnh}"
elsif ln==3 \
or ln=~@md.lv3
+ @lev_occurences[:d] += 1
if not dob.obj =~/~#|-#/
ocn_flag=true
ocnh3+=1
node3="3:#{ocnh3};#{ocn}"
else
+ #document_structure_check_info(node0,node0,:error) #fix
ocn_flag=false
node3="3:0;0"
end
@@ -988,6 +1024,7 @@ or this level should be level :B~ rather than #{dob.lv}}
node,ocn_sp=node3,"h#{ocnh}"
elsif ln==4 \
or ln=~@md.lv4
+ @lev_occurences[:l1] += 1
if not dob.obj =~/~#|-#/
ocn_flag=true
ocnh4+=1
@@ -1021,6 +1058,7 @@ or this level should be level :B~ rather than #{dob.lv}}
node,ocn_sp=node4,"h#{ocnh}"
elsif ln==5 \
or ln=~@md.lv5
+ @lev_occurences[:l2] += 1
if not dob.obj =~/~#|-#/
ocn_flag=true
ocnh5+=1
@@ -1049,6 +1087,7 @@ or this level should be level :B~ rather than #{dob.lv}}
@collapsed_lv5=@collapsed_lv1+1
node1
else
+ warning_incorrect_parent_level_or_level(dob.obj)
document_structure_check_info(node5,node0,:error)
node0
end
@@ -1056,6 +1095,7 @@ or this level should be level :B~ rather than #{dob.lv}}
node,ocn_sp=node5,"h#{ocnh}"
elsif ln==6 \
or ln=~@md.lv6
+ @lev_occurences[:l3] += 1
if not dob.obj =~/~#|-#/
ocn_flag=true
ocnh6+=1
@@ -1092,6 +1132,7 @@ or this level should be 5~ rather #{dob.lv}" #level 6
@collapsed_lv6=@collapsed_lv1+1
node1
else
+ warning_incorrect_parent_level_or_level(dob.obj)
document_structure_check_info(node6,node0,:error)
node0
end
@@ -1099,6 +1140,29 @@ or this level should be 5~ rather #{dob.lv}" #level 6
node,ocn_sp=node6,"h#{ocnh}"
end
else
+ unless @lev_occurences[:l1] > 0
+ STDERR.puts %{Substantive text objects must follow a level 1~ heading and there are none at this point in processing: #{@lev_occurences[:l1]}
+}
+ end
+ unless @ln >= 4
+ lev=case @ln
+ when 0 then 'A'
+ when 1 then 'B'
+ when 2 then 'C'
+ when 3 then 'D'
+ when 4 then '1'
+ when 5 then '2'
+ when 6 then '3'
+ when 7 then '4'
+ when 8 then '5'
+ when 9 then '6'
+ end
+ STDERR.puts %{Substantive text objects must follow a level 1~ 2~ or 3~ heading: #{lev}~
+SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"}
+ puts dob.obj.gsub(/^(.{1,80})/,'"\1"')
+ $process_document = :skip
+ break
+ end
if not dob.obj =~/~#|-#/
ocn_flag=true
else
@@ -1177,6 +1241,18 @@ or this level should be 5~ rather #{dob.lv}" #level 6
end
@o_array << dob
end
+ unless @lev_occurences[:a] == 1
+ STDERR.puts %{The number of level A~ in this document: #{@lev_occurences[:a]}
+There must be one level A~ (no more and no less)
+SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"}
+ $process_document = :skip
+ end
+ unless @lev_occurences[:l1] > 0
+ STDERR.puts %{The number of level 1~ in this document: #{@lev_occurences[:l1]}
+There must be at least one level 1~ (and as many as required)
+SKIPPED processing file: [#{@md.opt.lng}] "#{@md.fns}"}
+ $process_document = :skip
+ end
@o_array
end
end
diff --git a/lib/sisu/v6/composite.rb b/lib/sisu/v6/composite.rb
index 79603e2..2afff1b 100644
--- a/lib/sisu/v6/composite.rb
+++ b/lib/sisu/v6/composite.rb
@@ -198,7 +198,8 @@ module SiSU_Assemble
file[:prepared]
else
cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX
- STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires an invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}"
+ STDERR.puts %{SKIPPED processing file: [#{@opt.lng}] "#{@opt.fns}" it requires an invalid or non-existent file: "#{loadfile}"}
+ $process_document = :skip; break #remove this line to continue processing documents that have missing include files
para
end
else tuned_file << para
@@ -253,7 +254,8 @@ module SiSU_Assemble
@ssm << loadfile
else
cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX
- STDERR.puts "\t #{cX.fuchsia}ERROR#{cX.off} #{cX.brown}#{@opt.fns}#{cX.off} #{cX.fuchsia}requires an invalid or non-existent file:#{cX.off} #{cX.brown}#{loadfile}#{cX.off}"
+ STDERR.puts %{SKIPPED processing file: [#{@opt.lng}] "#{@opt.fns}" it requires an invalid or non-existent file: "#{loadfile}"}
+ $process_document = :skip; break #remove this line to continue processing documents that have missing include files
para
end
end
diff --git a/lib/sisu/v6/hub.rb b/lib/sisu/v6/hub.rb
index 35e9140..736fa8b 100644
--- a/lib/sisu/v6/hub.rb
+++ b/lib/sisu/v6/hub.rb
@@ -264,12 +264,26 @@ module SiSU
@msg,@msgs='',nil
@tell=lambda { SiSU_Screen::Ansi.new(@opt.cmd,@msg,"#{@msgs.inspect if @msgs}") }
end
+ def remove_skipped_files_if_any_from_processing_files_array
+ if @remove_faulty_markup_files_array.length > 0
+ @opt.files = (@opt.files - @remove_faulty_markup_files_array)
+ end
+ end
+ def print_error_message_if_files_skipped
+ if @remove_faulty_markup_files_array.length > 0
+ puts '---'
+ STDERR.puts 'ERROR with file(s), did not process: ' + @remove_faulty_markup_files_array.join(',')
+ end
+ end
def do_loops
+ @remove_faulty_markup_files_array=[]
if @opt.act[:zap][:set]==:on #% --zap, -Z
do_loop_files_on_given_option_pre
end
do_each_file_loop_options
+ remove_skipped_files_if_any_from_processing_files_array
do_loop_files_on_given_option_post
+ print_error_message_if_files_skipped
end
def do_each_file_loop_options
@opt.files.each_with_index do |fno,i|
@@ -290,6 +304,7 @@ module SiSU
end
@env=SiSU_Env::InfoEnv.new(@opt.fns)
if @opt.act[:ao][:set]==:on #% --ao --dal, -m
+ $process_document = :ok
unless @opt.act[:po4a][:set]==:on # --po4a, -P
if @opt.fno =~ /\.ssm$/
require_relative 'composite' # composite.rb #pre-processing
@@ -299,112 +314,117 @@ module SiSU
SiSU_AO::Source.new(@opt).read
end
end
- if @opt.act[:qrcode][:set]==:on #% --qrcode, -Q
- require_relative 'qrcode' # qrcode.rb
- SiSU_QRcode::Source.new(@opt).read
- end
- if @opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree
- require_relative 'digests' # digests.rb
- SiSU_DigestView::Source.new(@opt).read
- end
- if @opt.act[:txt][:set]==:on #% --txt, -t -a
- 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[:txt_asciidoc][:set]==:on #% --asciidoc
- require_relative 'txt_asciidoc' # txt_asciidoc.rb
- SiSU_Txt_AsciiDoc::Source.new(@opt).read
- end
- if @opt.act[:txt_markdown][:set]==:on #% --markdown
- require_relative 'txt_markdown' # txt_markdown.rb
- SiSU_Txt_Markdown::Source.new(@opt).read
- end
- if @opt.act[:txt_rst][:set]==:on #% --rst, --rest
- require_relative 'txt_rst' # txt_rst.rb
- SiSU_Txt_rST::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
- else
- if @opt.act[:html_seg][:set]==:on #% --html-seg (-h -H)
- require_relative 'html' # html.rb
- SiSU_HTML::Source.new(@opt).read
+ if $process_document == :ok
+ if @opt.act[:qrcode][:set]==:on #% --qrcode, -Q
+ require_relative 'qrcode' # qrcode.rb
+ SiSU_QRcode::Source.new(@opt).read
+ end
+ if @opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree
+ require_relative 'digests' # digests.rb
+ SiSU_DigestView::Source.new(@opt).read
end
- if @opt.act[:html_scroll][:set]==:on #% --html-scroll (-h -H)
- require_relative 'html' # html.rb
+ if @opt.act[:txt][:set]==:on #% --txt, -t -a
+ 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[:txt_asciidoc][:set]==:on #% --asciidoc
+ require_relative 'txt_asciidoc' # txt_asciidoc.rb
+ SiSU_Txt_AsciiDoc::Source.new(@opt).read
+ end
+ if @opt.act[:txt_markdown][:set]==:on #% --markdown
+ require_relative 'txt_markdown' # txt_markdown.rb
+ SiSU_Txt_Markdown::Source.new(@opt).read
+ end
+ if @opt.act[:txt_rst][:set]==:on #% --rst, --rest
+ require_relative 'txt_rst' # txt_rst.rb
+ SiSU_Txt_rST::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
+ else
+ if @opt.act[:html_seg][:set]==:on #% --html-seg (-h -H)
+ require_relative 'html' # html.rb
+ SiSU_HTML::Source.new(@opt).read
+ end
+ if @opt.act[:html_scroll][:set]==:on #% --html-scroll (-h -H)
+ require_relative 'html' # html.rb
+ SiSU_HTML::Source.new(@opt).read
+ end
end
- end
- if @opt.act[:concordance][:set]==:on #% --concordance, -w
- require_relative 'concordance' # concordance.rb
- SiSU_Concordance::Source.new(@opt).read
- end
- if @opt.act[:epub][:set]==:on #% --epub, -e
- require_relative 'xhtml_epub2' # xhtml_epub2.rb
- SiSU_XHTML_EPUB2::Source.new(@opt).read
- end
- if @opt.act[:odt][:set]==:on #% --odt, -o opendocument
- require_relative 'xml_odf_odt' # xml_odf_odt.rb
- SiSU_XML_ODF_ODT::Source.new(@opt).read
- end
- if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml
- require_relative 'xhtml' # xhtml.rb
- SiSU_XHTML::Source.new(@opt).read
- end
- if @opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu
- require_relative 'xml_scaffold_structure_sisu' # xml_scaffold_structure_sisu.rb
- SiSU_XML_Scaffold_Structure_Sisu::Source.new(@opt).read
- end
- if @opt.act[:xml_scaffold_structure_collapse][:set]==:on #% --xml-scaffold-collapse
- require_relative 'xml_scaffold_structure_collapsed' # xml_scaffold_structure_collapsed.rb
- SiSU_XML_Scaffold_Structure_Collapse::Source.new(@opt).read
- end
- if @opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook
- require_relative 'xml_docbook5' # xml_docbook5.rb
- SiSU_XML_Docbook_Book::Source.new(@opt).read
- end
- if @opt.act[:xml_fictionbook][:set]==:on #% --xml-fictionbook
- require_relative 'xml_fictionbook2' # xml_fictionbook2.rb
- SiSU_XML_Fictionbook::Source.new(@opt).read
- end
- if @opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type
- require_relative 'xml_sax' # xml_sax.rb
- SiSU_XML_SAX::Source.new(@opt).read
- end
- if @opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type
- require_relative 'xml_dom' # xml_dom.rb
- SiSU_XML_DOM::Source.new(@opt).read
- end
- if @opt.act[:pdf][:set]==:on \
- or @opt.act[:pdf_p][:set]==:on \
- or @opt.act[:pdf_l][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf
- require_relative 'texpdf' # texpdf.rb
- SiSU_TeX::Source.new(@opt).read
- end
- if @opt.act[:manpage][:set]==:on #% --manpage, -i
- require_relative 'manpage' # manpage.rb
- SiSU_Manpage::Source.new(@opt).read
- end
- if @opt.act[:texinfo][:set]==:on #% --texinfo, -I
- require_relative 'texinfo' # texinfo.rb
- SiSU_TexInfo::Source.new(@opt).read
- end
- if @opt.act[:sqlite_discrete][:set]==:on #% --sqlite, -d DB sqlite
- require_relative 'dbi_discrete' # dbi_discrete.rb
- SiSU_DBI_Discrete::SQL.new(@opt).build
- end
- if @opt.act[:manifest][:set]==:on #% --manifest, -y
- require_relative 'manifest' # manifest.rb
- ((@opt.act[:sisupod][:set]==:on \
- || @opt.act[:share_source][:set]==:on) \
- && @opt.files.length < 2 ) \
- ? nil
- : SiSU_Manifest::Source.new(@opt).read
+ if @opt.act[:concordance][:set]==:on #% --concordance, -w
+ require_relative 'concordance' # concordance.rb
+ SiSU_Concordance::Source.new(@opt).read
+ end
+ if @opt.act[:epub][:set]==:on #% --epub, -e
+ require_relative 'xhtml_epub2' # xhtml_epub2.rb
+ SiSU_XHTML_EPUB2::Source.new(@opt).read
+ end
+ if @opt.act[:odt][:set]==:on #% --odt, -o opendocument
+ require_relative 'xml_odf_odt' # xml_odf_odt.rb
+ SiSU_XML_ODF_ODT::Source.new(@opt).read
+ end
+ if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml
+ require_relative 'xhtml' # xhtml.rb
+ SiSU_XHTML::Source.new(@opt).read
+ end
+ if @opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu
+ require_relative 'xml_scaffold_structure_sisu' # xml_scaffold_structure_sisu.rb
+ SiSU_XML_Scaffold_Structure_Sisu::Source.new(@opt).read
+ end
+ if @opt.act[:xml_scaffold_structure_collapse][:set]==:on #% --xml-scaffold-collapse
+ require_relative 'xml_scaffold_structure_collapsed' # xml_scaffold_structure_collapsed.rb
+ SiSU_XML_Scaffold_Structure_Collapse::Source.new(@opt).read
+ end
+ if @opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook
+ require_relative 'xml_docbook5' # xml_docbook5.rb
+ SiSU_XML_Docbook_Book::Source.new(@opt).read
+ end
+ if @opt.act[:xml_fictionbook][:set]==:on #% --xml-fictionbook
+ require_relative 'xml_fictionbook2' # xml_fictionbook2.rb
+ SiSU_XML_Fictionbook::Source.new(@opt).read
+ end
+ if @opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type
+ require_relative 'xml_sax' # xml_sax.rb
+ SiSU_XML_SAX::Source.new(@opt).read
+ end
+ if @opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type
+ require_relative 'xml_dom' # xml_dom.rb
+ SiSU_XML_DOM::Source.new(@opt).read
+ end
+ if @opt.act[:pdf][:set]==:on \
+ or @opt.act[:pdf_p][:set]==:on \
+ or @opt.act[:pdf_l][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf
+ require_relative 'texpdf' # texpdf.rb
+ SiSU_TeX::Source.new(@opt).read
+ end
+ if @opt.act[:manpage][:set]==:on #% --manpage, -i
+ require_relative 'manpage' # manpage.rb
+ SiSU_Manpage::Source.new(@opt).read
+ end
+ if @opt.act[:texinfo][:set]==:on #% --texinfo, -I
+ require_relative 'texinfo' # texinfo.rb
+ SiSU_TexInfo::Source.new(@opt).read
+ end
+ if @opt.act[:sqlite_discrete][:set]==:on #% --sqlite, -d DB sqlite
+ require_relative 'dbi_discrete' # dbi_discrete.rb
+ SiSU_DBI_Discrete::SQL.new(@opt).build
+ end
+ if @opt.act[:manifest][:set]==:on #% --manifest, -y
+ require_relative 'manifest' # manifest.rb
+ ((@opt.act[:sisupod][:set]==:on \
+ || @opt.act[:share_source][:set]==:on) \
+ && @opt.files.length < 2 ) \
+ ? nil
+ : SiSU_Manifest::Source.new(@opt).read
+ end
+ else
+ @remove_faulty_markup_files_array << fno
+ $process_document=:ok
end
end
end
diff --git a/lib/sisu/v6/param.rb b/lib/sisu/v6/param.rb
index 60c9bb5..1976902 100644
--- a/lib/sisu/v6/param.rb
+++ b/lib/sisu/v6/param.rb
@@ -1115,7 +1115,8 @@ module SiSU_Param
&& @creator.author.is_a?(String)) \
? " #{@creator.author}"
: ''
- title=%{"#{@title.full.gsub(/(<p>|<p \/>|<br>|<br \/>)/,'')}",}
+ title=@title.full.gsub(/\s*(?:<p>|<p \/>|<br>|<br \/>)\s*/,' ').
+ gsub(/~\{.+?\}~/,'')
SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Parameters',%{#{title}#{creator}}).txt_grey if @opt.act[:verbose][:set]==:on
end
if not @book_idx \
@@ -1317,7 +1318,7 @@ module SiSU_Param
if @en[:note] > 0 \
and @en[:sum] > 0
if @en[:sum] > 0
- else SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'*WARN* both endnote styles used',"~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}").warn unless @opt.act[:unless][:set]==:on
+ else SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'*WARN* both endnote styles used',"~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}").warn unless @opt.act[:quiet][:set]==:on
end
end
if @en[:mark] != @en[:note] \
@@ -1334,7 +1335,7 @@ module SiSU_Param
and @opt.inspect =~/P/
#@title=Md.new('Text Insert',@opt,@env).title
else
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Title missing','please provide @title:').warn unless @opt.act[:unless][:set]==:on
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Title missing','please provide @title:').warn unless @opt.act[:quiet][:set]==:on
end
end
if @author !~/[\S]/
@@ -1342,7 +1343,7 @@ module SiSU_Param
and @opt.inspect =~/P/
#@creator=SiSU_Param::Md.new('Text Insert',@opt,@env).creator
else
- SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Author missing','please provide @creator: :author:').warn unless @opt.act[:unless][:set]==:on
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'WARNING: Document Author missing','please provide @creator: :author:').warn unless @opt.act[:quiet][:set]==:on
end
end
@struct={}
diff --git a/man/man1/sisu.1 b/man/man1/sisu.1
index 17a7997..eb43129 100644
--- a/man/man1/sisu.1
+++ b/man/man1/sisu.1
@@ -1,4 +1,4 @@
-.TH "sisu" "1" "2014-02-14" "6.0.4" "SiSU"
+.TH "sisu" "1" "2014-05-12" "6.0.5" "SiSU"
.br
.SH NAME
.br
@@ -97,6 +97,7 @@ Homepages:
.SH DESCRIPTION
+
.BR
.B SiSU
@@ -124,7 +125,6 @@ and
) , which share text object numbers ("object citation numbering") and the same
document structure information. For more see: <http://sisudoc.org> or
<http://www.jus.uio.no/sisu>
-
.SH DOCUMENT PROCESSING COMMAND FLAGS
.TP
@@ -740,10 +740,13 @@ strips output text of editor endnotes[^*2] denoted by asterisk sign
strips output text of editor endnotes[^+1] denoted by dagger/plus sign
.SH DATABASE COMMANDS
+
.BR
+
.B dbi - database interface
.BR
+
.B -D or --pgsql
set for
.I PostgreSQL
@@ -838,9 +841,9 @@ or wildcard]
.BR
consider -u for appended url info or -v for verbose output
-
.SH COMMAND LINE WITH FLAGS - BATCH PROCESSING
+
.BR
In the data directory run sisu -mh filename or wildcard eg. "sisu -h cisg.sst"
or "sisu -h *.{sst,ssm}" to produce html version of all documents.
@@ -849,17 +852,17 @@ or "sisu -h *.{sst,ssm}" to produce html version of all documents.
Running sisu (alone without any flags, filenames or wildcards) brings up the
interactive help, as does any sisu command that is not recognised. Enter to
escape.
-
.SH HELP
.SH SISU MANUAL
+
.BR
The most up to date information on sisu should be contained in the sisu_manual,
available at:
.BR
-<http://sisudoc.org/sisu/sisu_manual/>
+ <http://sisudoc.org/sisu/sisu_manual/>
.BR
The manual can be generated from source, found respectively, either within the
@@ -867,26 +870,26 @@ The manual can be generated from source, found respectively, either within the
tarball or installed locally at:
.BR
-\./data/doc/sisu/markup-samples/sisu_manual
+ ./data/doc/sisu/markup-samples/sisu_manual
.BR
-/usr/share/doc/sisu/markup-samples/sisu_manual
+ /usr/share/doc/sisu/markup-samples/sisu_manual
.BR
move to the respective directory and type e.g.:
.BR
-sisu sisu_manual.ssm
-
+ sisu sisu_manual.ssm
.SH SISU MAN PAGES
+
.BR
If
.B SiSU
is installed on your system usual man commands should be available, try:
.BR
-man sisu
+ man sisu
.BR
Most
@@ -924,13 +927,16 @@ An online version of the sisu man page is available here:
* sisu.1 <http://www.jus.uio.no/sisu/man/sisu.1.html> [^2]
.SH SISU BUILT-IN INTERACTIVE HELP, [DISCONTINUED]
+
.BR
This fell out of date and has been discontinued.
.SH INTRODUCTION TO SISU MARKUP[^3]
.SH SUMMARY
+
.BR
+
.B SiSU
source documents are
.I plaintext
@@ -968,10 +974,10 @@ primary outline of the document structure. Markup of substantive text includes:
* footnotes/endnotes
.BR
-* linked text and images
+ * linked text and images
.BR
-* paragraph actions, such as indent, bulleted, numbered-lists, etc.
+ * paragraph actions, such as indent, bulleted, numbered-lists, etc.
.BR
Some interactive help on markup is available, by typing sisu and selecting
@@ -981,23 +987,100 @@ markup or sisu --help markup
To check the markup in a file:
.BR
-sisu --identify [filename].sst
+ sisu --identify [filename].sst
.BR
For brief descriptive summary of markup history
.BR
-sisu --query-history
+ sisu --query-history
.BR
or if for a particular version:
.BR
-sisu --query-0.38
+ sisu --query-0.38
+.SH MARKUP RULES, DOCUMENT STRUCTURE AND METADATA REQUIREMENTS
+
+
+.BR
+minimal content/structure requirement:
+
+.BR
+[metadata]
+.nf
+A~ (level A [title])
+1~ (at least one level 1 [segment/(chapter)])
+.fi
+
+
+.BR
+structure rules (document heirarchy, heading levels):
+
+.BR
+there are two sets of heading levels ABCD (title & parts if any) and 123
+(segment & subsegments if any)
+
+.BR
+sisu has the fllowing levels:
+.nf
+A~ [title] .
+ required (== 1) followed by B~ or 1~
+B~ [part] *
+ followed by C~ or 1~
+C~ [subpart] *
+ followed by D~ or 1~
+D~ [subsubpart] *
+ followed by 1~
+1~ [segment (chapter)] +
+ required (>= 1) followed by text or 2~
+text *
+ followed by more text or 1~, 2~
+ or relevant part *()
+2~ [subsegment] *
+ followed by text or 3~
+text *
+ followed by more text or 1~, 2~ or 3~
+ or relevant part, see *()
+3~ [subsubsegment] *
+ followed by text
+text *
+ followed by more text or 1~, 2~ or 3~ or relevant part, see *()
+
+*(B~ if none other used;
+ if C~ is last used: C~ or B~;
+ if D~ is used: D~, C~ or B~)
+.fi
+
+.nf
+* level A~ is the tile and is mandatory
+* there can only be one level A~
+* heading levels BCD, are optional and there may be several of each
+ (where all three are used corresponding to e.g. Book Part Section)
+ * sublevels that are used must follow each other sequentially
+ (alphabetically),
+* heading levels A~ B~ C~ D~ are followed by other heading levels rather
+ than substantive text
+ which may be the subsequent sequential (alphabetic) heading part level
+ or a heading (segment) level 1~
+* there must be at least one heading (segment) level 1~
+ (the level on which the text is segmented, in a book would correspond
+ to the Chapter level)
+* additional heading levels 1~ 2~ 3~ are optional and there may be several
+ of each
+* heading levels 1~ 2~ 3~ are followed by text (which may be followed by
+ the same heading level)
+ and/or the next lower numeric heading level (followed by text)
+ or indeed return to the relevant part level
+ (as a corollary to the rules above substantive text/ content
+ must be preceded by a level 1~ (2~ or 3~) heading)
+.fi
+
.SH MARKUP EXAMPLES
.SH ONLINE
+
.BR
Online markup examples are available together with the respective outputs
produced from <http://www.jus.uio.no/sisu/SiSU/examples.html> or from
@@ -1011,16 +1094,15 @@ markup and the respective output produced:
.BR
an alternative presentation of markup syntax:
/usr/share/doc/sisu/on_markup.txt.gz
-
.SH INSTALLED
+
.BR
With
.B SiSU
installed sample skins may be found in: /usr/share/doc/sisu/markup-samples (or
equivalent directory) and if sisu -markup-samples is installed also under:
/usr/share/doc/sisu/markup-samples-non-free
-
.SH MARKUP OF HEADERS
@@ -1033,17 +1115,16 @@ Note: the first line of a document may include information on the markup
version used in the form of a comment. Comments are a percentage mark at the
start of a paragraph (and as the first character in a line of text) followed by
a space and the comment:
-
.nf
% this would be a comment
.fi
.SH SAMPLE HEADER
+
.BR
This current document is loaded by a master document that has a header similar
to this one:
-
.nf
% SiSU master 4.0
@@ -1100,6 +1181,7 @@ to this one:
.SH AVAILABLE HEADERS
+
.BR
Header tags appear at the beginning of a document and provide meta information
on the document (such as the
@@ -1111,7 +1193,8 @@ by once space :subheadername: All
meta tags are available
.BR
-.B @indentifier:
+
+.B @identifier:
information or instructions
.BR
@@ -1125,7 +1208,6 @@ structure, and can be useful to know.
.BR
This is a sample header
-
.nf
% SiSU 2.0 [declared file-type identifier with markup version]
.fi
@@ -1216,6 +1298,7 @@ This is a sample header
.SH HEADING LEVELS
+
.BR
Heading levels are :A~ ,:B~ ,:C~ ,1~ ,2~ ,3~ ... :A - :C being part / section
headings, followed by other heading levels, and 1 -6 being headings followed by
@@ -1223,19 +1306,23 @@ substantive text or sub-headings. :A~ usually the title :A~? conditional level
1 heading (used where a stand-alone document may be imported into another)
.BR
+
.B :A~ [heading text]
Top level heading [this usually has similar content to the title @title: ]
NOTE: the heading levels described here are in 0.38 notation, see heading
.BR
+
.B :B~ [heading text]
Second level heading [this is a heading level divider]
.BR
+
.B :C~ [heading text]
Third level heading [this is a heading level divider]
.BR
+
.B 1~ [heading text]
Top level heading preceding substantive text of document or sub-heading 2, the
heading level that would normally be marked 1. or 2. or 3. etc. in a document,
@@ -1244,16 +1331,17 @@ segments, names are provided automatically if none are given (a number),
otherwise takes the form 1~my_filename_for_this_segment
.BR
+
.B 2~ [heading text]
Second level heading preceding substantive text of document or sub-heading 3 ,
the heading level that would normally be marked 1.1 or 1.2 or 1.3 or 2.1 etc.
in a document.
.BR
+
.B 3~ [heading text]
Third level heading preceding substantive text of document, that would normally
be marked 1.1.1 or 1.1.2 or 1.2.1 or 2.1.1 etc. in a document
-
.nf
1~filename level 1 heading,
@@ -1262,7 +1350,9 @@ be marked 1.1.1 or 1.1.2 or 1.2.1 or 2.1.1 etc. in a document
.SH FONT ATTRIBUTES
+
.BR
+
.B markup example:
.nf
normal text, *{emphasis}*, !{bold text}!, /{italics}/, _{underscore}_, "{citation}",
@@ -1291,7 +1381,9 @@ _{underscore}_
#{monospace}#
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1308,13 +1400,16 @@ monospace
normal text
.BR
+
.B emphasis
[note: can be configured to be represented by bold, italics or underscore]
.BR
+
.B bold text
.BR
+
.I italics
.BR
@@ -1337,10 +1432,11 @@ normal text
.BR
monospace
-
.SH INDENTATION AND BULLETS
+
.BR
+
.B markup example:
.nf
ordinary paragraph
@@ -1352,7 +1448,9 @@ _2 indent paragraph two steps
_9 indent paragraph nine steps
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1368,6 +1466,7 @@ ordinary paragraph
indent paragraph nine steps
.BR
+
.B markup example:
.nf
_* bullet text
@@ -1377,7 +1476,9 @@ _1* bullet text, first indent
_2* bullet text, two step indent
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1393,6 +1494,7 @@ _2* bullet text, two step indent
Numbered List (not to be confused with headings/titles, (document structure))
.BR
+
.B markup example:
.nf
# numbered list numbered list 1., 2., 3, etc.
@@ -1402,7 +1504,9 @@ _# numbered list numbered list indented a., b., c., d., etc.
.SH HANGING INDENTS
+
.BR
+
.B markup example:
.nf
_0_1 first line no indent,
@@ -1414,7 +1518,9 @@ rest of paragraph no indent
in each case level may be 0-9
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1442,15 +1548,16 @@ paragraph no indent first line indented, rest of paragraph no indent
in each case level may be 0-9
.BR
+
.B live-build
A collection of scripts used to build customized
.B Debian
-
Livesystems.
.I live-build
was formerly known as live-helper, and even earlier known as live-package.
.BR
+
.B live-build
A collection of scripts used to build customized
@@ -1458,40 +1565,46 @@ in each case level may be 0-9
Livesystems.
.I live-build
was formerly known as live-helper, and even earlier known as live-package.
-
.SH FOOTNOTES / ENDNOTES
+
.BR
Footnotes and endnotes are marked up at the location where they would be
indicated within a text. They are automatically numbered. The output type
determines whether footnotes or endnotes will be produced
.BR
-.B markup example:
+.B markup example:
.nf
~{ a footnote or endnote }~
.fi
+
.BR
+
.B resulting output:
.BR
[^5]
.BR
+
.B markup example:
.nf
normal text~{ self contained endnote marker & endnote in one }~ continues
.fi
+
.BR
+
.B resulting output:
.BR
normal text[^6] continues
.BR
+
.B markup example:
.nf
normal text ~{* unnumbered asterisk footnote/endnote, insert multiple asterisks if required }~ continues
@@ -1499,7 +1612,9 @@ normal text ~{* unnumbered asterisk footnote/endnote, insert multiple asterisks
normal text ~{** another unnumbered asterisk footnote/endnote }~ continues
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1509,15 +1624,17 @@ normal text [^*] continues
normal text [^**] continues
.BR
-.B markup example:
+.B markup example:
.nf
normal text ~[* editors notes, numbered asterisk footnote/endnote series ]~ continues
normal text ~[+ editors notes, numbered plus symbol footnote/endnote series ]~ continues
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1527,6 +1644,7 @@ normal text [^*3] continues
normal text [^+2] continues
.BR
+
.B Alternative endnote pair notation for footnotes/endnotes:
.nf
% note the endnote marker "~^"
@@ -1536,13 +1654,14 @@ normal text~^ continues
^~ endnote text following the paragraph in which the marker occurs
.fi
+
.BR
the standard and pair notation cannot be mixed in the same document
-
.SH LINKS
.SH NAKED URLS WITHIN TEXT, DEALING WITH URLS
+
.BR
urls found within text are marked up automatically. A url within text is
automatically hyperlinked to itself and by default decorated with angled
@@ -1551,12 +1670,15 @@ passed as normal text), or escaped by a preceding underscore (in which case the
decoration is omitted).
.BR
+
.B markup example:
.nf
normal text http://www.sisudoc.org/ continues
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1566,6 +1688,7 @@ normal text <http://www.sisudoc.org/> continues
An escaped url without decoration
.BR
+
.B markup example:
.nf
normal text _http://www.sisudoc.org/ continues
@@ -1573,7 +1696,9 @@ normal text _http://www.sisudoc.org/ continues
deb _http://www.jus.uio.no/sisu/archive unstable main non-free
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1587,6 +1712,7 @@ where a code block is used there is neither decoration nor hyperlinking, code
blocks are discussed later in this document
.BR
+
.B resulting output:
.nf
deb http://www.jus.uio.no/sisu/archive unstable main non-free
@@ -1595,16 +1721,20 @@ deb-src http://www.jus.uio.no/sisu/archive unstable main non-free
.SH LINKING TEXT
+
.BR
To link text or an image to a url the markup is as follows
.BR
+
.B markup example:
.nf
about { SiSU }http://url.org markup
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1615,12 +1745,15 @@ A shortcut notation is available so the url link may also be provided
automatically as a footnote
.BR
+
.B markup example:
.nf
about {~^ SiSU }http://url.org markup
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1630,12 +1763,15 @@ aboutSiSU <http://www.sisudoc.org/> [^7] markup
Internal document links to a tagged location, including an ocn
.BR
+
.B markup example:
.nf
about { text links }#link_text
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1645,22 +1781,26 @@ about ⌠text links⌡⌈link_text⌋
Shared document collection link
.BR
+
.B markup example:
.nf
about { SiSU book markup examples }:SiSU/examples.html
.fi
+
.BR
+
.B resulting output:
.BR
about ⌠
.B SiSU
book markup examples⌡⌈:SiSU/examples.html⌋
-
.SH LINKING IMAGES
+
.BR
+
.B markup example:
.nf
{ tux.png 64x80 }image
@@ -1674,7 +1814,9 @@ book markup examples⌡⌈:SiSU/examples.html⌋
{~^ ruby_logo.png "Ruby" }http://www.ruby-lang.org/en/
.fi
+
.BR
+
.B resulting output:
.BR
@@ -1691,6 +1833,7 @@ and Ruby" <http://www.sisudoc.org/>
ruby_logo.png 70x90 "Ruby" <http://www.ruby-lang.org/en/> [^8]
.BR
+
.B linked url footnote shortcut
.nf
{~^ [text to link] }http://url.org
@@ -1704,6 +1847,7 @@ ruby_logo.png 70x90 "Ruby" <http://www.ruby-lang.org/en/> [^8]
text marker *~name
.fi
+
.BR
note at a heading level the same is automatically achieved by providing names
to headings 1, 2 and 3 i.e. 2~[name] and 3~[name] or in the case of
@@ -1711,7 +1855,9 @@ auto-heading numbering, without further intervention.
.SH LINK SHORTCUT FOR MULTIPLE VERSIONS OF A SISU DOCUMENT IN THE SAME DIRECTORY
TREE
+
.BR
+
.B markup example:
.nf
!_ /{"Viral Spiral"}/, David Bollier
@@ -1719,7 +1865,9 @@ TREE
{ "Viral Spiral", David Bollier [3sS]}viral_spiral.david_bollier.sst
.fi
+
.BR
+
.B
.I "Viral Spiral",
David Bollier
@@ -1743,10 +1891,12 @@ David Bollier
.SH TABLES
+
.BR
Tables may be prepared in two either of two forms
.BR
+
.B markup example:
.nf
table{ c3; 40; 30; 30;
@@ -1762,16 +1912,19 @@ column three of row two, and so on
}table
.fi
+
.BR
-.B resulting output:
+.B resulting output:
This is a table|this would become column two of row one|column three of row one is here』And here begins another row|column two of row two|column three of row two, and so on』
+
.BR
a second form may be easier to work with in cases where there is not much
information in each column
.BR
+
.B markup example:
[^10]
.nf
@@ -1788,20 +1941,25 @@ No. of articles, all languages | 25| 19,000| 138,000| 490,000| 862,0
* Contributed at least ten times; ** at least 5 times in last month; *** more than 100 times in last month.
.fi
+
.BR
+
.B resulting output:
.BR
+
.B Table 3.1: Contributors to Wikipedia, January 2001 - June 2005
|Jan. 2001|Jan. 2002|Jan. 2003|Jan. 2004|July 2004|June 2006』Contributors*|10|472|2,188|9,653|25,011|48,721』Active contributors**|9|212|846|3,228|8,442|16,945』Very active contributors***|0|31|190|692|1,639|3,016』No. of English language articles|25|16,000|101,000|190,000|320,000|630,000』No. of articles, all languages|25|19,000|138,000|490,000|862,000|1,600,000』
+
.BR
* Contributed at least ten times; ** at least 5 times in last month; *** more
than 100 times in last month.
-
.SH POEM
+
.BR
+
.B basic markup:
.nf
poem{
@@ -1813,7 +1971,9 @@ poem{
Each verse in a poem is given an object number.
.fi
+
.BR
+
.B markup example:
.nf
poem{
@@ -1866,7 +2026,9 @@ poem{
}poem
.fi
+
.BR
+
.B resulting output:
`Fury said to a
mouse, That he
@@ -1913,9 +2075,12 @@ poem{
to
death."'
+
.SH GROUP
+
.BR
+
.B basic markup:
.nf
group{
@@ -1927,7 +2092,9 @@ group{
A group is treated as an object and given a single object number.
.fi
+
.BR
+
.B markup example:
.nf
group{
@@ -1980,7 +2147,9 @@ group{
}group
.fi
+
.BR
+
.B resulting output:
`Fury said to a
mouse, That he
@@ -2029,6 +2198,7 @@ group{
.SH CODE
+
.BR
Code tags code{ ... }code (used as with other group tags described above) are
used to escape regular sisu markup, and have been used extensively within this
@@ -2042,6 +2212,7 @@ A code-block is treated as an object and given a single object number. [an
option to number each line of code may be considered at some later time]
.BR
+
.B use of code tags instead of poem compared, resulting output:
.nf
`Fury said to a
@@ -2090,12 +2261,12 @@ option to number each line of code may be considered at some later time]
death."'
.fi
+
.BR
From
.B SiSU
2.7.7 on you can number codeblocks by placing a hash after the opening code tag
code{# as demonstrated here:
-
.nf
1 | `Fury said to a
2 | mouse, That he
@@ -2147,11 +2318,11 @@ code{# as demonstrated here:
.SH LINE-BREAKS
+
.BR
To break a line within a "paragraph object", two backslashes \e\e
with a space before and a space or newline after them
may be used.
-
.nf
To break a line within a "paragraph object",
two backslashes \e\e with a space before
@@ -2159,6 +2330,7 @@ and a space or newline after them \e\e
may be used.
.fi
+
.BR
The html break br enclosed in angle brackets (though undocumented) is available
in versions prior to 3.0.13 and 2.9.7 (it remains available for the time being,
@@ -2168,16 +2340,17 @@ but is depreciated).
To draw a dividing line dividing paragraphs, see the section on page breaks.
.SH PAGE BREAKS
+
.BR
Page breaks are only relevant and honored in some output formats. A page break
or a new page may be inserted manually using the following markup on a line on
its own:
.BR
-page new =\e= or breaks the page, starts a new page.
+page new =\e= breaks the page, starts a new page.
.BR
-page break -\e- or breaks a column, starts a new column, if using columns,
+page break -\- breaks a column, starts a new column, if using columns,
else breaks the page, starts a new page.
.BR
@@ -2187,17 +2360,13 @@ page break line across page -..- draws a dividing line, dividing paragraphs
page break:
.nf
-\e\e-
-
-or
-<:pb>
.fi
+
.BR
page (break) new:
.nf
=\e\e=
-or
-<:pn>
.fi
@@ -2209,6 +2378,7 @@ page (break) line across page (dividing paragraphs):
.SH BOOK INDEX
+
.BR
To make an index append to paragraph the book index term relates to it, using
an equal sign and curly braces.
@@ -2221,27 +2391,28 @@ Sub-terms are separated from the main term by a colon.
={Main term:sub-term}
.fi
+
.BR
The index syntax starts on a new line, but there should not be an empty line
between paragraph and index markup.
.BR
The structure of the resulting index would be:
-
.nf
Main term, 1
sub-term, 1
.fi
+
.BR
Several terms may relate to a paragraph, they are separated by a semicolon. If
the term refers to more than one paragraph, indicate the number of paragraphs.
-
.nf
Paragraph containing main term, second term and sub-term.
={first term; second term: sub-term}
.fi
+
.BR
The structure of the resulting index would be:
.nf
@@ -2250,6 +2421,7 @@ The structure of the resulting index would be:
sub-term, 1
.fi
+
.BR
If multiple sub-terms appear under one paragraph, they are separated under the
main term heading from each other by a pipe symbol.
@@ -2263,6 +2435,7 @@ main term heading from each other by a pipe symbol.
A paragraph that continues discussion of the first sub-term
.fi
+
.BR
The plus one in the example provided indicates the first sub-term spans one
additional paragraph. The logical structure of the resulting index would be:
@@ -2275,6 +2448,7 @@ additional paragraph. The logical structure of the resulting index would be:
.SH COMPOSITE DOCUMENTS MARKUP
+
.BR
It is possible to build a document by creating a master document that requires
other documents. The documents required may be complete documents that could be
@@ -2296,13 +2470,13 @@ to processing with the same prefix and the suffix
.BR
basic markup for importing a document into a master document
-
.nf
<< filename1.sst
<< filename2.ssi
.fi
+
.BR
The form described above should be relied on. Within the
.I Vim
@@ -2340,12 +2514,13 @@ the next debian will be
Configure substitution in _sisu/sisu_document_make
.SH SISU FILETYPES
+
.BR
+
.B SiSU
has
.I plaintext
and binary filetypes, and can process either type of document.
-
.SH .SST .SSM .SSI MARKED UP PLAIN TEXT
.TP
@@ -2362,28 +2537,30 @@ contents of which are like regular text except these are marked .ssi and are
not processed.
.BR
+
.B SiSU
processing can be done directly against a sisu documents; which may be located
locally or on a remote server for which a url is provided.
.BR
+
.B SiSU
source markup can be shared with the command:
.BR
sisu -s [filename]
-
.SH SISU TEXT - REGULAR FILES (.SST)
+
.BR
The most common form of document in
.B SiSU,
see the section on
.B SiSU
markup.
-
.SH SISU MASTER FILES (.SSM)
+
.BR
Composite documents which incorporate other
.B SiSU
@@ -2411,6 +2588,7 @@ Note: a secondary file of the composite document is built prior to processing
with the same prefix and the suffix ._sst [^11]
.SH SISU INSERT FILES (.SSI)
+
.BR
Inserts are documents prepared solely for the purpose of being incorporated
into one or more master documents. They resemble regular
@@ -2421,6 +2599,7 @@ processor. Making a file a .ssi file is a quick and convenient way of flagging
that it is not intended that the file should be processed on its own.
.SH SISUPOD, ZIPPED BINARY CONTAINER (SISUPOD.ZIP, .SSP)
+
.BR
A sisupod is a zipped
.B SiSU
@@ -2428,7 +2607,6 @@ text file or set of
.B SiSU
text files and any associated images that they contain (this will be extended
to include sound and multimedia-files)
-
.TP
.B SiSU
.I plaintext
@@ -2460,6 +2638,7 @@ Alternatively, make a pod of the contents of a whole directory:
sisu -S
.BR
+
.B SiSU
processing can be done directly against a sisupod; which may be located locally
or on a remote server for which a url is provided.
@@ -2469,14 +2648,15 @@ or on a remote server for which a url is provided.
.BR
<http://www.sisudoc.org/sisu/sisu_manual>
-
.SH CONFIGURATION
.SH CONFIGURATION FILES
.SH CONFIG.YML
+
.BR
+
.B SiSU
configration parameters are adjusted in the configuration file, which can be
used to override the defaults set. This includes such things as which directory
@@ -2489,6 +2669,7 @@ The
configuration file is a yaml file, which means indentation is significant.
.BR
+
.B SiSU
resource configuration is determined by looking at the following files if they
exist:
@@ -2526,9 +2707,9 @@ access details.
If
.B SiSU
is installed a sample sisurc.yml may be found in /etc/sisu/sisurc.yml
-
.SH SISU_DOCUMENT_MAKE
+
.BR
Most sisu document headers relate to metadata, the exception is the @make:
header which provides processing related information. The default contents of
@@ -2558,9 +2739,9 @@ The search order is as for resource configuration:
.BR
A sample sisu_document_make can be found in the _sisu/ directory under along
with the provided sisu markup samples.
-
.SH CSS - CASCADING STYLE SHEETS (FOR HTML, XHTML AND XML)
+
.BR
CSS files to modify the appearance of
.B SiSU
@@ -2578,18 +2759,22 @@ directory _sisu/css or equivalent will result in the default file of that name
being overwritten.
.BR
+
.I HTML:
html. css
.BR
+
.I XML
DOM: dom.css
.BR
+
.I XML
SAX: sax.css
.BR
+
.I XHTML:
xhtml. css
@@ -2599,16 +2784,17 @@ The default homepage may use homepage.css or html. css
.BR
Under consideration is to permit the placement of a CSS file with a different
name in directory _sisu/css directory or equivalent.[^12]
-
.SH ORGANISING CONTENT - DIRECTORY STRUCTURE AND MAPPING
+
.BR
+
.B SiSU
v3 has new options for the source directory tree, and output directory
structures of which there are 3 alternatives.
-
.SH DOCUMENT SOURCE DIRECTORY
+
.BR
The document source directory is the directory in which sisu processing
commands are given. It contains the sisu source files (.sst .ssm .ssi), or (for
@@ -2621,7 +2807,8 @@ supported by XeTeX polyglosia.
.SH GENERAL DIRECTORIES
.nf
-\./subject_name/
+ ./subject_name/
+
% files stored at this level e.g. sisu_manual.sst or
% for sisu v3 may be under language sub-directories
% e.g.
@@ -2643,6 +2830,7 @@ supported by XeTeX polyglosia.
.SH OUTPUT DIRECTORY ROOT
+
.BR
The output directory root can be set in the sisurc.yml file. Under the root,
subdirectories are made for each directory in which a document set resides. If
@@ -2668,13 +2856,12 @@ directory named after each institution, and these would be output to the same
output directory. Skins could be associated with each institution on a
directory basis and resulting documents will take on the appropriate different
appearance.
-
.SH ALTERNATIVE OUTPUT STRUCTURES
+
.BR
There are 3 possibile output structures described as being, by language, by
filetype or by filename, the selection is made in sisurc.yml
-
.nf
#% output_dir_structure_by: language; filetype; or filename
output_dir_structure_by: language #(language & filetype, preferred?)
@@ -2684,6 +2871,7 @@ output_dir_structure_by: language #(language & filetype, preferred?)
.SH BY LANGUAGE
+
.BR
The by language directory structure places output files
@@ -2696,7 +2884,6 @@ Its selection is configured in sisurc.yml
.BR
output_dir_structure_by: language
-
.nf
|-- en
|-- epub
@@ -2726,11 +2913,12 @@ output_dir_structure_by: language
`-- xsd
.fi
+
.BR
#by: language subject_dir/en/manifest/filename.html
-
.SH BY FILETYPE
+
.BR
The by filetype directory structure separates output files by filetype, all
html files in one directory pdfs in another and so on. Filenames are given a
@@ -2741,7 +2929,6 @@ Its selection is configured in sisurc.yml
.BR
output_dir_structure_by: filetype
-
.nf
|-- epub
|-- hashes
@@ -2770,11 +2957,12 @@ output_dir_structure_by: filetype
`-- xml
.fi
+
.BR
#by: filetype subject_dir/html/filename/manifest.en.html
-
.SH BY FILENAME
+
.BR
The by filename directory structure places most output of a particular file
(the different filetypes) in a common directory.
@@ -2784,7 +2972,6 @@ Its selection is configured in sisurc.yml
.BR
output_dir_structure_by: filename
-
.nf
|-- epub
|-- po4a
@@ -2806,9 +2993,9 @@ output_dir_structure_by: filename
`-- viral_spiral.david_bollier
.fi
+
.BR
#by: filename subject_dir/filename/manifest.en.html
-
.SH REMOTE DIRECTORIES
.nf
@@ -2865,7 +3052,9 @@ output_dir_structure_by: filename
.SH HOMEPAGES
+
.BR
+
.B SiSU
is about the ability to auto-generate documents. Home pages are regarded as
custom built items, and are not created by
@@ -2888,9 +3077,9 @@ option)
Document sets are contained in directories, usually organised by site or
subject. Each directory can/should have its own homepage. See the section on
directory structure and organisation of content.
-
.SH HOME PAGE AND OTHER CUSTOM BUILT PAGES IN A SUB-DIRECTORY
+
.BR
Custom built pages, including the home page index.html may be placed within the
configuration directory _sisu/home/ in any of the locations that is searched
@@ -2898,11 +3087,12 @@ for the configuration directory, namely ./_sisu ; ~/_sisu ; /etc/sisu From
there they are copied to the root of the output directory with the command:
.BR
-sisu -CC
+ sisu -CC
.SH MARKUP AND OUTPUT EXAMPLES
.SH MARKUP EXAMPLES
+
.BR
Current markup examples and document output samples are provided off
<http://sisudoc.org> or <http://www.jus.uio.no/sisu> and in the sisu
@@ -2912,9 +3102,9 @@ Current markup examples and document output samples are provided off
For some documents hardly any markup at all is required at all, other than a
header, and an indication that the levels to be taken into account by the
program in generating its output are.
-
.SH SISU MARKUP SAMPLES
+
.BR
A few additional sample books prepared as sisu markup samples, output formats
to be generated using
@@ -2931,116 +3121,138 @@ that the original substantive text remain unchanged, and sometimes that the
works be used only non-commercially.
.BR
+
.I Accelerando,
Charles Stross (2005)
accelerando.charles_stross.sst
.BR
+
.I Alice's Adventures in Wonderland,
Lewis Carroll (1865)
alices_adventures_in_wonderland.lewis_carroll.sst
.BR
+
.I CONTENT,
Cory Doctorow (2008)
content.cory_doctorow.sst
.BR
+
.I Democratizing Innovation,
Eric von Hippel (2005)
democratizing_innovation.eric_von_hippel.sst
.BR
+
.I Down and Out in the Magic Kingdom,
Cory Doctorow (2003)
down_and_out_in_the_magic_kingdom.cory_doctorow.sst
.BR
+
.I For the Win,
Cory Doctorow (2010)
for_the_win.cory_doctorow.sst
.BR
+
.I Free as in Freedom - Richard Stallman's Crusade for Free Software,
Sam Williams (2002)
free_as_in_freedom.richard_stallman_crusade_for_free_software.sam_williams.sst
.BR
+
.I Free as in Freedom 2.0 - Richard Stallman and the Free Software Revolution,
Sam Williams (2002), Richard M. Stallman (2010)
free_as_in_freedom_2.richard_stallman_and_the_free_software_revolution.sam_williams.richard_stallman.sst
.BR
+
.I Free Culture - How Big Media Uses Technology and the Law to Lock Down
Culture and Control Creativity,
Lawrence Lessig (2004)
free_culture.lawrence_lessig.sst
.BR
+
.I Free For All - How Linux and the Free Software Movement Undercut the High
Tech Titans,
Peter Wayner (2002)
free_for_all.peter_wayner.sst
.BR
+
.I GNU GENERAL PUBLIC LICENSE v2,
Free Software Foundation (1991)
gpl2.fsf.sst
.BR
+
.I GNU GENERAL PUBLIC LICENSE v3,
Free Software Foundation (2007)
gpl3.fsf.sst
.BR
+
.I Gulliver's Travels,
Jonathan Swift (1726 / 1735)
gullivers_travels.jonathan_swift.sst
.BR
+
.I Little Brother,
Cory Doctorow (2008)
little_brother.cory_doctorow.sst
.BR
+
.I The Cathederal and the Bazaar,
Eric Raymond (2000)
the_cathedral_and_the_bazaar.eric_s_raymond.sst
.BR
+
.I The Public Domain - Enclosing the Commons of the Mind,
James Boyle (2008)
the_public_domain.james_boyle.sst
.BR
+
.I The Wealth of Networks - How Social Production Transforms Markets and
Freedom,
Yochai Benkler (2006)
the_wealth_of_networks.yochai_benkler.sst
.BR
+
.I Through the Looking Glass,
Lewis Carroll (1871)
through_the_looking_glass.lewis_carroll.sst
.BR
+
.I Two Bits - The Cultural Significance of Free Software,
Christopher Kelty (2008)
two_bits.christopher_kelty.sst
.BR
+
.I UN Contracts for International Sale of Goods,
UN (1980)
un_contracts_international_sale_of_goods_convention_1980.sst
.BR
+
.I Viral Spiral,
David Bollier (2008)
viral_spiral.david_bollier.sst
-
.SH SISU SEARCH - INTRODUCTION
+
.BR
+
.B SiSU
output can easily and conveniently be indexed by a number of standalone
indexing tools, such as Lucene, Hyperestraier.
@@ -3050,24 +3262,25 @@ Because the document structure of sites created is clearly defined, and the
text
.I object citation system
is available hypothetically at least, for all forms of output, it is possible
-to search the sql database, and either read results from that database, or just
-as simply map the results to the html output, which has richer text markup.
+to search the sql database, and either read results from that database, or map
+the results to the html or other output, which has richer text markup.
.BR
-In addition to this
-.B SiSU
-has the ability to populate a relational sql type database with documents at an
-object level, with objects numbers that are shared across different output
-types, which make them searchable with that degree of granularity. Basically,
-your match criteria is met by these documents and at these locations within
-each document, which can be viewed within the database directly or in various
-output formats.
+.B SiSU
+can populate a relational sql type database with documents at an object level,
+including objects numbers that are shared across different output types. Making
+a document corpus searchable with that degree of granularity. Basically, your
+match criteria is met by these documents and at these locations within each
+document, which can be viewed within the database directly or in various output
+formats.
.SH SQL
.SH POPULATING SQL TYPE DATABASES
+
.BR
+
.B SiSU
feeds sisu markupd documents into sql type databases
.I PostgreSQL
@@ -3082,25 +3295,25 @@ should they so choose). All site texts/documents are (currently) streamed to
four tables:
.BR
-* one containing semantic (and other) headers, including, title, author,
+ * one containing semantic (and other) headers, including, title, author,
subject, (the
.I Dublin Core.
..);
.BR
-* another the substantive texts by individual "paragraph" (or object) - along
+ * another the substantive texts by individual "paragraph" (or object) - along
with structural information, each paragraph being identifiable by its
paragraph number (if it has one which almost all of them do), and the
substantive text of each paragraph quite naturally being searchable (both in
formatted and clean text versions for searching); and
.BR
-* a third containing endnotes cross-referenced back to the paragraph from
+ * a third containing endnotes cross-referenced back to the paragraph from
which they are referenced (both in formatted and clean text versions for
searching).
.BR
-* a fourth table with a one to one relation with the headers table contains
+ * a fourth table with a one to one relation with the headers table contains
full text versions of output, eg. pdf, html, xml, and
.I ascii.
@@ -3132,18 +3345,19 @@ database and have headings in which search content appears, or to search only
headings etc. (as the
.I Dublin Core
is incorporated it is easy to make use of that as well).
-
.SH POSTGRESQL
.SH NAME
+
.BR
+
.B SiSU
- Structured information, Serialized Units - a document publishing system,
postgresql dependency package
-
.SH DESCRIPTION
+
.BR
Information related to using postgresql with sisu (and related to the
sisu_postgresql dependency package, which is a dummy package to install
@@ -3152,16 +3366,17 @@ dependencies needed for
to populate a postgresql database, this being part of
.B SiSU
- man sisu) .
-
.SH SYNOPSIS
+
.BR
-sisu -D [instruction] [filename/wildcard if required]
+ sisu -D [instruction] [filename/wildcard if required]
.BR
-sisu -D --pg --[instruction] [filename/wildcard if required]
+ sisu -D --pg --[instruction] [filename/wildcard if required]
.SH COMMANDS
+
.BR
Mappings to two databases are provided by default, postgresql and sqlite, the
same commands are used within sisu to construct and populate databases however
@@ -3169,9 +3384,9 @@ same commands are used within sisu to construct and populate databases however
alternatively --sqlite or --pgsql may be used
.BR
+
.B -D or --pgsql
may be used interchangeably.
-
.SH CREATE AND DESTROY DATABASE
.TP
@@ -3179,50 +3394,44 @@ may be used interchangeably.
initial step, creates required relations (tables, indexes) in existing
(postgresql) database (a database should be created manually and given the same
name as working directory, as requested) (rb.dbi)
-
.TP
.B sisu -D --createdb
creates database where no database existed before
-
.TP
.B sisu -D --create
creates database tables where no database tables existed before
-
.TP
.B sisu -D --Dropall
destroys database (including all its content)! kills data and drops tables,
indexes and database associated with a given directory (and directories of the
same name).
-
.TP
.B sisu -D --recreate
destroys existing database and builds a new empty database structure
-
.SH IMPORT AND REMOVE DOCUMENTS
.TP
.B sisu -D --import -v [filename/wildcard]
populates database with the contents of the file. Imports documents(s)
specified to a postgresql database (at an object level).
-
.TP
.B sisu -D --update -v [filename/wildcard]
updates file contents in database
-
.TP
.B sisu -D --remove -v [filename/wildcard]
removes specified document from postgresql database.
-
.SH SQLITE
.SH NAME
+
.BR
+
.B SiSU
- Structured information, Serialized Units - a document publishing system.
-
.SH DESCRIPTION
+
.BR
Information related to using sqlite with sisu (and related to the sisu_sqlite
dependency package, which is a dummy package to install dependencies needed for
@@ -3230,17 +3439,17 @@ dependency package, which is a dummy package to install dependencies needed for
to populate an sqlite database, this being part of
.B SiSU
- man sisu) .
-
.SH SYNOPSIS
+
.BR
sisu -d [instruction] [filename/wildcard if required]
.BR
sisu -d --(sqlite|pg) --[instruction] [filename/wildcard if required]
-
.SH COMMANDS
+
.BR
Mappings to two databases are provided by default, postgresql and sqlite, the
same commands are used within sisu to construct and populate databases however
@@ -3248,9 +3457,9 @@ same commands are used within sisu to construct and populate databases however
alternatively --sqlite or --pgsql may be used
.BR
+
.B -d or --sqlite
may be used interchangeably.
-
.SH CREATE AND DESTROY DATABASE
.TP
@@ -3258,40 +3467,32 @@ may be used interchangeably.
initial step, creates required relations (tables, indexes) in existing (sqlite)
database (a database should be created manually and given the same name as
working directory, as requested) (rb.dbi)
-
.TP
.B sisu -d --createdb
creates database where no database existed before
-
.TP
.B sisu -d --create
creates database tables where no database tables existed before
-
.TP
.B sisu -d --dropall
destroys database (including all its content)! kills data and drops tables,
indexes and database associated with a given directory (and directories of the
same name).
-
.TP
.B sisu -d --recreate
destroys existing database and builds a new empty database structure
-
.SH IMPORT AND REMOVE DOCUMENTS
.TP
.B sisu -d --import -v [filename/wildcard]
populates database with the contents of the file. Imports documents(s)
specified to an sqlite database (at an object level).
-
.TP
.B sisu -d --update -v [filename/wildcard]
updates file contents in database
-
.TP
.B sisu -d --remove -v [filename/wildcard]
removes specified document from sqlite database.
-
.SH INTRODUCTION
.SH SETUP SEARCH FORM
@@ -3346,6 +3547,7 @@ A sample setup for nginx is provided that assumes data will be stored under
.SH SEARCH - DATABASE FRONTEND SAMPLE, UTILISING DATABASE AND SISU FEATURES,
INCLUDING OBJECT CITATION NUMBERING (BACKEND CURRENTLY POSTGRESQL)
+
.BR
Sample search frontend <http://search.sisudoc.org> [^15] A small database and
sample query front-end (search from) that makes use of the citation system, .I
@@ -3353,6 +3555,7 @@ object citation numbering
to demonstrates functionality.[^16]
.BR
+
.B SiSU
can provide information on which documents are matched and at what locations
within each document the matches are found. These results are relevant across
@@ -3375,7 +3578,6 @@ Note you may set results either for documents matched and object number
locations within each matched document meeting the search criteria; or display
the names of the documents matched along with the objects (paragraphs) that
meet the search criteria.[^17]
-
.TP
.B sisu -F --webserv-webrick
builds a cgi web search frontend for the database created
@@ -3392,11 +3594,13 @@ Postgresql
current db set: SiSU_sisu
port: 5432
dbi connect: DBI:Pg:database=SiSU_sisu;port=5432
+
sqlite
current db set: /home/ralph/sisu_www/sisu/sisu_sqlite.db
dbi connect DBI:SQLite:/home/ralph/sisu_www/sisu/sisu_sqlite.db
.fi
+
.BR
Note on databases built
@@ -3412,12 +3616,10 @@ used. [otherwise a manual mapping for the collection is necessary]
.B sisu -F
generates a sample search form, which must be copied to the web-server cgi
directory
-
.TP
.B sisu -F --webserv-webrick
generates a sample search form for use with the webrick server, which must be
copied to the web-server cgi directory
-
.TP
.B sisu -W
starts the webrick server which should be available wherever sisu is properly
@@ -3426,17 +3628,18 @@ installed
.BR
The generated search form must be copied manually to the webserver directory as
instructed
-
.SH SISU_WEBRICK
.SH NAME
+
.BR
+
.B SiSU
- Structured information, Serialized Units - a document publishing system
-
.SH SYNOPSIS
+
.BR
sisu_webrick [port]
@@ -3445,9 +3648,9 @@ or
.BR
sisu -W [port]
-
.SH DESCRIPTION
+
.BR
sisu_webrick is part of
.B SiSU
@@ -3463,18 +3666,18 @@ is in use and they exist).
The default port for sisu_webrick is set to 8081, this may be modified in the
yaml file: ~/.sisu/sisurc.yml a sample of which is provided as
/etc/sisu/sisurc.yml (or in the equivalent directory on your system).
-
.SH SUMMARY OF MAN PAGE
+
.BR
sisu_webrick, may be started on it's own with the command: sisu_webrick [port]
or using the sisu command with the -W flag: sisu -W [port]
.BR
where no port is given and settings are unchanged the default port is 8081
-
.SH DOCUMENT PROCESSING COMMAND FLAGS
+
.BR
sisu -W [port] starts
.B Ruby
@@ -3482,9 +3685,9 @@ Webrick web-server, serving
.B SiSU
output directories, on the port provided, or if no port is provided and the
defaults have not been changed in ~/.sisu/sisurc.yaml then on port 8081
-
.SH SUMMARY OF FEATURES
+
.BR
* sparse/minimal markup (clean utf-8 source texts). Documents are prepared in a
single
@@ -3656,6 +3859,7 @@ Syntax highlighting for
markup is available for a number of text editors.
.BR
+
.B SiSU
is less about document layout than about finding a way with little markup to be
able to construct an abstract representation of a document that makes it
diff --git a/sisu.org b/sisu.org
index bf47469..9ba0f8b 100644
--- a/sisu.org
+++ b/sisu.org
@@ -935,7 +935,7 @@ footnotes uses marker and endnote, check
*** misc, unclassified
-**** TODO [#B] sisu should give warning when part of minimal essential structure is missing :processing:fix:
+**** DONE (6.0.5) [#B] sisu should give warning when part of minimal essential structure is missing :processing:fix:
work through testing for as many of these as possible
@@ -987,6 +987,12 @@ title missing:
level A missing:
no level 1:
+***** NOTES/COMMENTS
+
+revisit,
+ * check logic, add to if possible
+ * tidy, inelegant solution
+
**** DONE (5.3.5::6.0.5) [#B] victory chals discussed parsing problem caused by use of open-close markers around url
**** TODO [#B] exclude heading where possible marker '-#' not distinguished from unnumbered heading '~#'