summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-07-14 11:14:27 +0000
committerRalph Amissah <ralph@amissah.com>2017-07-14 11:15:27 +0000
commit486a84f981c33fd2dcebc0328c4b823a98384032 (patch)
tree1292a21f8d6024c6aaecc4a96b6bbac3b61871a1
parenthtml, minitoc, default off (diff)
downloadsisu-486a84f981c33fd2dcebc0328c4b823a98384032.zip
sisu-486a84f981c33fd2dcebc0328c4b823a98384032.tar.xz
--no-metadata turns off appending metadata to doc
* (Closes: #746742) "please implement --no-metadata similar to --no-manifest"
-rw-r--r--data/doc/sisu/CHANGELOG_v73
-rw-r--r--lib/sisu/ao_doc_str.rb37
-rw-r--r--lib/sisu/hub_options.rb2
3 files changed, 24 insertions, 18 deletions
diff --git a/data/doc/sisu/CHANGELOG_v7 b/data/doc/sisu/CHANGELOG_v7
index 1db85b4..fde010c 100644
--- a/data/doc/sisu/CHANGELOG_v7
+++ b/data/doc/sisu/CHANGELOG_v7
@@ -28,6 +28,9 @@ Reverse Chronological:
(when present minitoc is placed on left part of screen together with
content to its right))
+ * command flag --no-metadata turns off appending metadata to documents
+ (Closes: #746742)
+
* sisu_7.1.10.orig.tar.xz (2017-07-02:26/7)
http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_7.1.10
diff --git a/lib/sisu/ao_doc_str.rb b/lib/sisu/ao_doc_str.rb
index ced4c83..1dbcf9e 100644
--- a/lib/sisu/ao_doc_str.rb
+++ b/lib/sisu/ao_doc_str.rb
@@ -68,6 +68,7 @@ module SiSU_AO_DocumentStructureExtract
@pbn=SiSU_AO_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_new])
@pbl=SiSU_AO_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_line])
@per=SiSU_AO_Persist::PersistDocStructExt.new
+ @make=SiSU_Env::ProcessingSettings.new(@md)
end
def ln_get(lv)
case lv
@@ -1229,23 +1230,25 @@ module SiSU_AO_DocumentStructureExtract
}
end
tuned_file << @pb
- h={
- ln: 1,
- lc: 1,
- obj: 'Metadata',
- autonum_: false,
- ocn_: false,
- }
- tuned_file << SiSU_AO_DocumentStructure::ObjectHeading.new.heading_insert(h)
- h={
- ln: 4,
- lc: 2,
- obj: 'SiSU Metadata, document information',
- name: 'metadata',
- autonum_: false,
- ocn_: false,
- }
- tuned_file << SiSU_AO_DocumentStructure::ObjectHeading.new.heading_insert(h)
+ if @make.build.metadata?
+ h={
+ ln: 1,
+ lc: 1,
+ obj: 'Metadata',
+ autonum_: false,
+ ocn_: false,
+ }
+ tuned_file << SiSU_AO_DocumentStructure::ObjectHeading.new.heading_insert(h)
+ h={
+ ln: 4,
+ lc: 2,
+ obj: 'SiSU Metadata, document information',
+ name: 'metadata',
+ autonum_: false,
+ ocn_: false,
+ }
+ tuned_file << SiSU_AO_DocumentStructure::ObjectHeading.new.heading_insert(h)
+ end
h={
obj: 'eof',
}
diff --git a/lib/sisu/hub_options.rb b/lib/sisu/hub_options.rb
index fe371bd..194858f 100644
--- a/lib/sisu/hub_options.rb
+++ b/lib/sisu/hub_options.rb
@@ -905,7 +905,7 @@ module SiSU_Commandline
else { bool: false, set: :na }
end
act[:metadata]=if select_arr.inspect \
- =~/"--inc-metadata"/
+ =~/"--metadata"|"--inc-metadata"/
{ bool: true, set: :on }
elsif select_arr.inspect \
=~/"--(?:exc|no)-metadata"/ \