c&d: po4a (& git) revisited, revisit
[software/sisu] / lib / sisu / current / ao.rb
index 633c4442042962e57f21ce211271756aaddbe7d9..e24fd4e95ca3a7365b4d55f526cb19babe623395 100644 (file)
@@ -86,8 +86,8 @@ module SiSU_AO
     @@idx_arr={ sst: [], tex: [], html: [], xhtml: [] }
     @@map_arr={ nametags: [], ocn_htmlseg: [] }
     @@fns=nil
-    def initialize(opt,fnx=nil)
-      @opt,@fnx=opt,fnx
+    def initialize(opt,fnx=nil,process=:complete)
+      @opt,@fnx,@process=opt,fnx,process
       @@fns ||=opt.fns
       fn_use=if fnx \
       and fnx =~/\.ss[tmi]$/
@@ -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,