c&d: po4a (& git) revisited, revisit
[software/sisu] / lib / sisu / develop / ao.rb
index 0373149e634aad1b83175044407b70327204326f..1ca493383f14703b75eda147829ab50970b6a171 100644 (file)
@@ -83,8 +83,8 @@ module SiSU_AO
     end
   end
   class Source <Instantiate
-    def initialize(opt,fnx=nil)
-      @opt,@fnx=opt,fnx
+    def initialize(opt,fnx=nil,process=:complete)
+      @opt,@fnx,@process=opt,fnx,process
       @per ||=SiSU_AO_Persist::Persist.new.persist_init
       @per.fns ||=opt.fns
       fn_use=if fnx \
@@ -273,6 +273,7 @@ module SiSU_AO
   protected
     def create_ao
       ao_array=[]
+      fnp = @fnx ? "#{@opt.fno} #{@fnx}" : @opt.fno
       unless @opt.act[:quiet][:set]==:on
         tell=(@opt.act[:verbose][:set]==:on \
         || @opt.act[:verbose_plus][:set]==:on \
@@ -283,7 +284,8 @@ module SiSU_AO
           )
         : SiSU_Screen::Ansi.new(
             @opt.act[:color_state][:set],
-            'Document Abstraction',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}"
+            'Document Abstraction',
+            "[#{@opt.f_pth[:lng_is]}] #{fnp}"
           )
         tell.blue_title_hi
       end
@@ -296,7 +298,7 @@ module SiSU_AO
       meta=file_array=@env.source_file_processing_array(fn)
       @md=SiSU_Param::Parameters::Instructions.new(meta,@opt).extract
       meta=nil
-      ao=SiSU_AO::Make.new(fn,@md,file_array).song
+      ao=SiSU_AO::Make.new(fn,@md,file_array,@fnx,@process).song
       if (@opt.act[:verbose][:set]==:on \
       || @opt.act[:verbose_plus][:set]==:on \
       || @opt.act[:maintenance][:set]==:on)
@@ -347,7 +349,7 @@ module SiSU_AO
       ao=[]
       ao=(FileTest.file?(@fnc)) \
       ? (File.open(@fnc,'r:utf-8'){ |f| ao=Marshal.load(f)})
-      : SiSU_AO::Source.new(@opt).create_ao
+      : SiSU_AO::Source.new(@opt,@fnx,@process).create_ao
     end
     def read_idx_sst
       m=[]
@@ -519,8 +521,8 @@ module SiSU_AO
     end
   end
   class Make
-    def initialize(fn,md,data)
-      @fn,@md,@data=fn,md,data
+    def initialize(fn,md,data,fnx,process)
+      @fn,@md,@data,@fnx,@process=fn,md,data,fnx,process
       @env=SiSU_Env::InfoEnv.new(@md.fns)
     end
     def reset
@@ -551,7 +553,7 @@ module SiSU_AO
       data_obj,
         tags_map,
         ocn_html_seg_map=
-          SiSU_AO_Numbering::Numbering.new(@md,data_obj).            # ao_numbering.rb
+          SiSU_AO_Numbering::Numbering.new(@md,data_obj,@fnx,@process). # ao_numbering.rb
             numbering_song
       data_obj,
         book_index_rel,