--no-metadata turns off appending metadata to doc
authorRalph Amissah <ralph@amissah.com>
Fri, 14 Jul 2017 11:14:27 +0000 (07:14 -0400)
committerRalph Amissah <ralph@amissah.com>
Fri, 14 Jul 2017 11:15:27 +0000 (07:15 -0400)
* (Closes: #746742)
  "please implement --no-metadata similar to --no-manifest"

data/doc/sisu/CHANGELOG_v7
lib/sisu/ao_doc_str.rb
lib/sisu/hub_options.rb

index 1db85b4e9e100d0240704a154eb2fa4685d14897..fde010cfe903ab4c49a098376c563cadfa147dd9 100644 (file)
@@ -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
 
index ced4c833c737a339ce8be4179659a30121c5d94b..1dbcf9e804ffbeddb1fd1671ff18550c928571d3 100644 (file)
@@ -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',
       }
index fe371bd1efd41d538600ea3e27b9282371e9593b..194858f77ad639c17a2f29aab0cc2e07d2ea80de 100644 (file)
@@ -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"/ \