diff options
| author | Ralph Amissah <ralph@amissah.com> | 2014-10-12 10:26:15 -0400 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2014-10-12 10:26:15 -0400 | 
| commit | 1f0232a256c2b64404d4be85af29c1bf9bde3bce (patch) | |
| tree | 7ebbee01da1a3b9e45c11cb5d119d5397e8744ea | |
| parent | v5 v6: db, --maintenance sql, separated out postgresql & sqlite (diff) | |
v5 v6: bin/sisu, hub, urls --maintenance, fix
| -rw-r--r-- | bin/sisu | 20 | ||||
| -rw-r--r-- | data/doc/sisu/CHANGELOG_v5 | 2 | ||||
| -rw-r--r-- | data/doc/sisu/CHANGELOG_v6 | 2 | ||||
| -rw-r--r-- | lib/sisu/v5/hub.rb | 15 | ||||
| -rw-r--r-- | lib/sisu/v5/hub_actions.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v5/hub_options.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v5/urls.rb | 182 | ||||
| -rw-r--r-- | lib/sisu/v6/hub.rb | 15 | ||||
| -rw-r--r-- | lib/sisu/v6/hub_actions.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v6/hub_options.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v6/urls.rb | 198 | 
11 files changed, 176 insertions, 266 deletions
| @@ -94,22 +94,22 @@ class Orient      if sisu_run_from == :full_path_to_sisu_bin_in_sisu_dir_tree \      or sisu_run_from == :system_install        case processing.called_as -      when processing.stable_bin_file_regex         then processing.stable -      when processing.unstable_bin_file_regex       then processing.unstable +      when processing.stable_bin_file_regex      then processing.stable +      when processing.unstable_bin_file_regex    then processing.unstable        else          case processing.argv_str -        when processing.stable_modifier_regex       then processing.stable -        when processing.unstable_modifier_regex     then processing.unstable -        else                                             processing.default +        when processing.stable_modifier_regex    then processing.stable +        when processing.unstable_modifier_regex  then processing.unstable +        else                                          processing.default          end        end      elsif sisu_run_from == :gem_install        case processing.file_full_path -      when processing.stable_gem_regex              then processing.stable -      when processing.unstable_gem_regex            then processing.unstable -      else                                               processing.default +      when processing.stable_gem_regex           then processing.stable +      when processing.unstable_gem_regex         then processing.unstable +      else                                            processing.default        end -    else                                                 processing.default +    else                                              processing.default      end    end    def paths_set @@ -263,7 +263,7 @@ class Orient        end      rescue      ensure -      SiSU::HubClose.new(sisu_called_from_directory) +      SiSU::HubClose.new(sisu_called_from_directory,@argv)        Dir.chdir(sisu_called_from_directory)        system("cd #{sisu_called_from_directory}")      end diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 7f2700bc..133a621a 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -38,6 +38,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.7.0.orig.tar.xz    sisu_5.7.0.orig.tar.xz    sisu_5.7.0-1.dsc +* --maintenance revisited, bin/sisu, hub, urls --maintenance, fix required +  * db, --maintenance sql, separated out postgresql & sqlite    could share "maintenance" db import sql file (as done previously), consider diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index ffa7908b..4d2a70e0 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -28,6 +28,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.3.0.orig.tar.xz    sisu_6.3.0.orig.tar.xz    sisu_6.3.0-1.dsc +* --maintenance revisited, bin/sisu, hub, urls --maintenance, fix required +  * db, --maintenance sql, separated out postgresql & sqlite    could share "maintenance" db import sql file (as done previously), consider diff --git a/lib/sisu/v5/hub.rb b/lib/sisu/v5/hub.rb index 10ac6f23..70a4e360 100644 --- a/lib/sisu/v5/hub.rb +++ b/lib/sisu/v5/hub.rb @@ -257,16 +257,17 @@ module SiSU      end    end    class HubClose -    def initialize(call_path) +    def initialize(call_path,argv)        begin -        @env=SiSU_Env::InfoEnv.new +        env=SiSU_Env::InfoEnv.new        rescue        ensure -        if FileTest.directory?(@env.processing_path.processing) \ -        and FileTest.directory?(@env.processing_path.processing_base_tmp) \ -        and @env.processing_path.processing_base_tmp =~/#{@env.processing_path.processing}/ \ -        and @env.processing_path.processing_base_tmp =~/^\/tmp\/\S+/ -          FileUtils::cd(@env.processing_path.processing_base_tmp) do +        if FileTest.directory?(env.processing_path.processing) \ +        and FileTest.directory?(env.processing_path.processing_base_tmp) \ +        and env.processing_path.processing_base_tmp =~/#{env.processing_path.processing}/ \ +        and env.processing_path.processing_base_tmp =~/^\/tmp\/\S+/ \ +        and not argv.inspect =~/"--maintenance"|"-M"/ +          FileUtils::cd(env.processing_path.processing_base_tmp) do              FileUtils::rm_rf('.')            end          end diff --git a/lib/sisu/v5/hub_actions.rb b/lib/sisu/v5/hub_actions.rb index 3d2e112b..6c97aa4b 100644 --- a/lib/sisu/v5/hub_actions.rb +++ b/lib/sisu/v5/hub_actions.rb @@ -839,7 +839,7 @@ module SiSU_Hub_Actions            end          end          def urls? -          if @opt.act[:urls_selected][:set]==:on         #% --sitemap, -Y +          if @opt.act[:urls_selected][:set]==:on         #% --urls              if @opt.f_pths.length > 0                require_relative 'urls'                SiSU_Hub_Loops::OptionLoopFiles.new(@opt). diff --git a/lib/sisu/v5/hub_options.rb b/lib/sisu/v5/hub_options.rb index 9e35cc36..d267cb74 100644 --- a/lib/sisu/v5/hub_options.rb +++ b/lib/sisu/v5/hub_options.rb @@ -1384,7 +1384,7 @@ module SiSU_Commandline          =~/"--harvest/            { bool: false, set: :off }          elsif select_arr.inspect \ -        =~/"--verbose"/ +        =~/"--verbose"|"--maintenance"/            { bool: true, set: :on }          else            { bool: false, set: :na } diff --git a/lib/sisu/v5/urls.rb b/lib/sisu/v5/urls.rb index 6c8cb1ec..33781603 100644 --- a/lib/sisu/v5/urls.rb +++ b/lib/sisu/v5/urls.rb @@ -124,85 +124,24 @@ module SiSU_Urls            + x[:f_pth]          ).result        end -      self -    end -    def urls_maintenance(opt,x,y) -      if x=~/^([abcehHmNoptwxXy])/ \ -      and opt.cmd =~/[abcehHmNoptwxXy]/ \ -      and x=~/^[#{opt.cmd}]/ \ -      and (@opt.act[:verbose_plus][:set]==:on \ -      || @opt.act[:maintenance][:set]==:on) -        tool=@prog.text_editor -        if x =~/^m/ \ -        and @opt.cmd=~/m/ \ -        and x=~/^[#{opt.cmd}]/ -          SiSU_Screen::Ansi.new( -            @opt.act[:color_state][:set], -            "-#{x}", -            "#{@prog.text_editor} #{@env.processing_path.ao}/#{@opt.fns}.meta" -          ).maintenance -        end -        if x=~/^([hw])/ \ -        and @opt.cmd=~/[hw]/ \ -        and x=~/^[#{@opt.cmd}]/ \ -        and x !~/segmented/ -          SiSU_Screen::Ansi.new( -            @opt.act[:color_state][:set], -            "-#{x}", -            "#{@prog.text_editor} #{@env.processing_path.tune}/#{@md.fns}.tune" -          ).maintenance -        end -        if x=~/^p/ \ -        and @opt.cmd=~/p/ \ -        and x=~/^[#{@opt.cmd}]/ -          tool=@prog.pdf_viewer -          fns=@opt.fns.gsub(/~/,'-') -          unless @opt.cmd =~/q/ -            tell=if x =~/landscape/ -              SiSU_Screen::Ansi.new( -                @opt.act[:color_state][:set], -                "-#{x}", -                "#{@prog.text_editor} #{@env.processing_path.tex}/#{fns}.landscape.tex" -              ) -            else -              SiSU_Screen::Ansi.new( -                @opt.act[:color_state][:set], -                "-#{x}", -                "#{@prog.text_editor} #{@env.processing_path.tex}/#{fns}.tex" -              ) -            end -            tell.maintenance -          end -        end -        if x=~/^o/ \ -        and @opt.cmd=~/o/ \ -        and x=~/^[#{@opt.cmd}]/ -          tool=@prog.odf_viewer -        end -        if x=~/^e/ \ -        and @opt.cmd=~/e/ \ -        and x=~/^[#{@opt.cmd}]/ +      def maintenance(x) +        if @opt.act[:maintenance][:set]==:on            SiSU_Screen::Ansi.new(              @opt.act[:color_state][:set], -            "-#{x}", -            "#{@prog.text_editor} #{@env.processing_path.epub}/#{Ep[:d_oebps]}/toc.xhtml" -          ).maintenance -        end -        if x=~/^o/ \ -        and @opt.cmd=~/o/ \ -        and x=~/^[#{@opt.cmd}]/ -          SiSU_Screen::Ansi.new( -            @opt.act[:color_state][:set], -            "-#{x}", -            "#{@prog.text_editor} #{@env.processing_path.odf}/#{@opt.fns}/odt/content.xml" +            "[#{@opt.f_pth[:lng_is]}]", +            x[:cmd], +            x[:p_pth]            ).maintenance          end        end +      self      end      def report_info        def dal          {            cmd: '--ao', +          p_pth: @env.processing_path.ao + '/' \ +          + @opt.fns + '.meta',            fn: 'ao',           }        end @@ -270,6 +209,8 @@ module SiSU_Urls              viewer: @prog.web_browser,              f_pth: @md.file.output_path.html_seg.dir + '/' \              + @md.file.base_filename.html_segtoc, +            p_pth: @env.processing_path.tune + '/' \ +            + @md.fns + '.tune',              fn: @fn[:toc],             }          end @@ -279,6 +220,8 @@ module SiSU_Urls              viewer: @prog.web_browser,              f_pth: @md.file.output_path.html_scroll.dir + '/' \              + @md.file.base_filename.html_scroll, +            p_pth: @env.processing_path.tune + '/' \ +            + @md.fns + '.tune',              fn: @fn[:doc],             }          end @@ -300,6 +243,8 @@ module SiSU_Urls              viewer: @prog.web_browser,              f_pth: @md.file.output_path.xhtml.dir + '/' \              + @md.file.base_filename.xhtml, +            p_pth: @env.processing_path.tune + '/' \ +            + @md.fns + '.tune',              fn: @fn[:xhtml],             }          end @@ -309,6 +254,9 @@ module SiSU_Urls              viewer: @prog.epub_viewer,              f_pth: @md.file.output_path.epub.dir + '/' \              + @md.file.base_filename.epub, +            p_pth: @env.processing_path.epub + '/' \ +            + Ep[:d_oebps] + '/' \ +            + 'index.xhtml',              fn: @fn[:epub],             }          end @@ -321,6 +269,9 @@ module SiSU_Urls              viewer: @prog.odf_viewer,              f_pth: @md.file.output_path.odt.dir + '/' \              + @md.file.base_filename.odt, +            p_pth: @env.processing_path.odf + '/' \ +            + @opt.fns + '/' \ +            + 'odt/content.xml',              fn: @fn[:odf],             }          end @@ -388,6 +339,10 @@ module SiSU_Urls              f_pth: @md.file.output_path.pdf.dir + '/' \              + @md.file.base_filename.pdf_l \              + @md.papersize_array[0] + '.pdf', +            p_pth: @env.processing_path.tex + '/' \ +            + @opt.fns.gsub(/~/,'-') + '.' \ +            + @md.papersize_array[0] \ +            + '.landscape.tex',              fn: @fn[:pdf_l],             }          end @@ -398,6 +353,10 @@ module SiSU_Urls              f_pth: @md.file.output_path.pdf.dir + '/' \              + @md.file.base_filename.pdf_p \              + @md.papersize_array[0] + '.pdf', +            p_pth: @env.processing_path.tex + '/' \ +            + @opt.fns.gsub(/~/,'-') + '.' \ +            + @md.papersize_array[0] \ +            + '.tex',              fn: @fn[:pdf_p],             }          end @@ -432,6 +391,9 @@ module SiSU_Urls              f_pth: @pwd_stub + '::' \              + @opt.fns \              + 'dbi psql', +            p_pth: @env.processing_path.postgresql + '/' \ +            + @md.fns \ +            + '.sql',              fn: 'dbi psql',             }          end @@ -442,15 +404,21 @@ module SiSU_Urls              f_pth: @env.path.webserv + '/' \              + @md.opt.f_pth[:pth_stub] + '/' \              + 'sisu_sqlite.db', +            p_pth: @env.processing_path.sqlite + '/' \ +            + @md.fns \ +            + '.sql',              fn: 'dbi sqlite3',             }          end          def sqlite_discrete            { -            cmd: '--sqlite --update/--import', +            cmd: '--sqlite',              viewer: 'sqlite3 ',              f_pth: @md.file.output_path.sqlite_discrete.dir + '/' \              + @md.file.base_filename.sqlite_discrete, +            p_pth: @env.processing_path.sqlite + '/' \ +            + @md.fns \ +            + '.sql',              fn: 'dbi sqlite3',             }          end @@ -485,15 +453,21 @@ module SiSU_Urls            viewer: @prog.text_editor,            f_pth: @md.file.output_path.src.dir + '/' \            + @opt.fno, +          p_pth: @md.file.output_path.src.dir + '/' \ +          + @opt.fno,            fn: @opt.fno,           }        end        def sisupod          {            cmd: '--sisupod', -          viewer: @prog.web_browser, +          viewer: '',            f_pth: @md.file.output_path.sisupod.dir + '/' \ -          + @opt.fno, +          + @opt.fno \ +          + '.txz', +          p_pth: @md.file.output_path.sisupod.dir + '/' \ +          + @opt.fno + '/' \ +          + 'sisupod/',            fn: @fn[:sisupod],           }        end @@ -559,7 +533,7 @@ module SiSU_Urls            ).flow          end        end -      m=/.+\/(?:src\/)?(\S+)/im # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m +      m=/.+\/(?:src\/)?(\S+)/im        @pwd_stub="#{@env.url.output_tell}"[m,1]        unless @opt.act[:quiet][:set]==:on          if @opt.fns =~ @m_regular @@ -586,9 +560,11 @@ module SiSU_Urls              or @opt.act[:html_seg][:set]==:on)                if @opt.act[:html_scroll][:set]==:on                  show.report(report_info.html.scroll) +                show.maintenance(report_info.html.scroll)                end                if @opt.act[:html_seg][:set]==:on                  show.report(report_info.html.seg) +                show.maintenance(report_info.html.seg)                end              end              if @opt.act[:concordance][:set]==:on @@ -596,12 +572,15 @@ module SiSU_Urls              end              if @opt.act[:xhtml][:set]==:on                show.report(report_info.xhtml.xhtml) +              show.maintenance(report_info.xhtml.xhtml)              end              if @opt.act[:epub][:set]==:on                show.report(report_info.xhtml.epub) +              show.maintenance(report_info.xhtml.epub)              end              if @opt.act[:odt][:set]==:on                show.report(report_info.xml.odt) +              show.maintenance(report_info.xml.odt)              end              if @opt.act[:xml_dom][:set]==:on                show.report(report_info.xml.dom) @@ -626,19 +605,24 @@ module SiSU_Urls              or @opt.act[:pdf_l][:set]==:on)                if @opt.act[:pdf_p][:set]==:on                  show.report(report_info.pdf.portrait) +                show.maintenance(report_info.pdf.portrait)                end                if @opt.act[:pdf_l][:set]==:on                  show.report(report_info.pdf.landscape) +                show.maintenance(report_info.pdf.landscape)                end              end              if @opt.act[:psql][:set]==:on                show.report(report_info.db.psql) +              show.maintenance(report_info.db.psql)              end              if @opt.act[:sqlite_discrete][:set]==:on                show.report(report_info.db.sqlite_discrete) +              show.maintenance(report_info.db.sqlite_discrete)              end              if @opt.act[:sqlite][:set]==:on                show.report(report_info.db.sqlite) +              show.maintenance(report_info.db.sqlite)              end              if @opt.act[:texinfo][:set]==:on                show.report(report_info.texinfo) @@ -650,30 +634,26 @@ module SiSU_Urls                show.report(report_info.hash_digests)              end              if @opt.act[:po4a][:set]==:on -              if @opt.fns =~/\S+?~\S{2}(?:_\S{2})?\.ss[mt]/ -                f=y.gsub(/\.pot$/,'.po') -                show.po4a.po(x,f) -              else -                show.po4a.pot(x,f) -              end +              #if @opt.fns =~/\S+?~\S{2}(?:_\S{2})?\.ss[mt]/ +              #else +              #end              end              if @opt.act[:share_source][:set]==:on                show.report(report_info.source) +              show.maintenance(report_info.source)              end              if @opt.act[:sisupod][:set]==:on                show.report(report_info.sisupod) +              show.maintenance(report_info.sisupod)              end              if @opt.act[:qrcode][:set]==:on                show.report(report_info.qrcode)              end              if @opt.act[:manifest][:set]==:on                show.report(report_info.manifest) +              show.maintenance(report_info.manifest)              end            end -          if (@opt.act[:verbose_plus][:set]==:on \ -          || @opt.act[:maintenance][:set]==:on) -            urls_maintenance(@opt,x,y) -          end          end        end      end @@ -684,42 +664,6 @@ module SiSU_Urls          'URLs',          i        ).grey_title_hi -      @u.each do |x,y| -        case x -        when /^m/ -          show.meta(x,y) -        when /^[BcdNsxXy]/ -          show.generic(x,y) -        when /^[at]/ -          show.text(x) -        when /^b/ -          show.xhtml(x) -        when /^e/ -          show.epub(x) -        when /^h/ -          if x =~/scroll/ -            show.html.scroll(x) -          else -            show.html.toc(x) -          end -        when /^o/ -          show.odt(x) -        when /^p/ -          if x =~/portrait/ -            show.pdf.portrait(x) -          else -            show.pdf.landscape(x) -          end -        when /^w/ -          show.html.concordance(x) -        when /^Y/ -          show.xml.sitemap(x) -        when /^I/ -          show.pinfo(x,y) -        when /^i/ -          show.manpage(x) -        end -      end      end    end  end diff --git a/lib/sisu/v6/hub.rb b/lib/sisu/v6/hub.rb index 87c7040e..a5425528 100644 --- a/lib/sisu/v6/hub.rb +++ b/lib/sisu/v6/hub.rb @@ -257,16 +257,17 @@ module SiSU      end    end    class HubClose -    def initialize(call_path) +    def initialize(call_path,argv)        begin -        @env=SiSU_Env::InfoEnv.new +        env=SiSU_Env::InfoEnv.new        rescue        ensure -        if FileTest.directory?(@env.processing_path.processing) \ -        and FileTest.directory?(@env.processing_path.processing_base_tmp) \ -        and @env.processing_path.processing_base_tmp =~/#{@env.processing_path.processing}/ \ -        and @env.processing_path.processing_base_tmp =~/^\/tmp\/\S+/ -          FileUtils::cd(@env.processing_path.processing_base_tmp) do +        if FileTest.directory?(env.processing_path.processing) \ +        and FileTest.directory?(env.processing_path.processing_base_tmp) \ +        and env.processing_path.processing_base_tmp =~/#{env.processing_path.processing}/ \ +        and env.processing_path.processing_base_tmp =~/^\/tmp\/\S+/ \ +        and not argv.inspect =~/"--maintenance"|"-M"/ +          FileUtils::cd(env.processing_path.processing_base_tmp) do              FileUtils::rm_rf('.')            end          end diff --git a/lib/sisu/v6/hub_actions.rb b/lib/sisu/v6/hub_actions.rb index 3b3201d6..e7e42bd2 100644 --- a/lib/sisu/v6/hub_actions.rb +++ b/lib/sisu/v6/hub_actions.rb @@ -839,7 +839,7 @@ module SiSU_Hub_Actions            end          end          def urls? -          if @opt.act[:urls_selected][:set]==:on         #% --sitemap, -Y +          if @opt.act[:urls_selected][:set]==:on         #% --urls              if @opt.f_pths.length > 0                require_relative 'urls'                SiSU_Hub_Loops::OptionLoopFiles.new(@opt). diff --git a/lib/sisu/v6/hub_options.rb b/lib/sisu/v6/hub_options.rb index f8085c6c..fb58f396 100644 --- a/lib/sisu/v6/hub_options.rb +++ b/lib/sisu/v6/hub_options.rb @@ -1384,7 +1384,7 @@ module SiSU_Commandline          =~/"--harvest/            { bool: false, set: :off }          elsif select_arr.inspect \ -        =~/"--verbose"/ +        =~/"--verbose"|"--maintenance"/            { bool: true, set: :on }          else            { bool: false, set: :na } diff --git a/lib/sisu/v6/urls.rb b/lib/sisu/v6/urls.rb index c89bbafa..b4bf9d23 100644 --- a/lib/sisu/v6/urls.rb +++ b/lib/sisu/v6/urls.rb @@ -124,85 +124,24 @@ module SiSU_Urls            + x[:f_pth]          ).result        end -      self -    end -    def urls_maintenance(opt,x,y) -      if x=~/^([abcehHmNoptwxXy])/ \ -      and opt.cmd =~/[abcehHmNoptwxXy]/ \ -      and x=~/^[#{opt.cmd}]/ \ -      and (@opt.act[:verbose_plus][:set]==:on \ -      || @opt.act[:maintenance][:set]==:on) -        tool=@prog.text_editor -        if x =~/^m/ \ -        and @opt.cmd=~/m/ \ -        and x=~/^[#{opt.cmd}]/ -          SiSU_Screen::Ansi.new( -            @opt.act[:color_state][:set], -            "-#{x}", -            "#{@prog.text_editor} #{@env.processing_path.ao}/#{@opt.fns}.meta" -          ).maintenance -        end -        if x=~/^([hw])/ \ -        and @opt.cmd=~/[hw]/ \ -        and x=~/^[#{@opt.cmd}]/ \ -        and x !~/segmented/ -          SiSU_Screen::Ansi.new( -            @opt.act[:color_state][:set], -            "-#{x}", -            "#{@prog.text_editor} #{@env.processing_path.tune}/#{@md.fns}.tune" -          ).maintenance -        end -        if x=~/^p/ \ -        and @opt.cmd=~/p/ \ -        and x=~/^[#{@opt.cmd}]/ -          tool=@prog.pdf_viewer -          fns=@opt.fns.gsub(/~/,'-') -          unless @opt.cmd =~/q/ -            tell=if x =~/landscape/ -              SiSU_Screen::Ansi.new( -                @opt.act[:color_state][:set], -                "-#{x}", -                "#{@prog.text_editor} #{@env.processing_path.tex}/#{fns}.landscape.tex" -              ) -            else -              SiSU_Screen::Ansi.new( -                @opt.act[:color_state][:set], -                "-#{x}", -                "#{@prog.text_editor} #{@env.processing_path.tex}/#{fns}.tex" -              ) -            end -            tell.maintenance -          end -        end -        if x=~/^o/ \ -        and @opt.cmd=~/o/ \ -        and x=~/^[#{@opt.cmd}]/ -          tool=@prog.odf_viewer -        end -        if x=~/^e/ \ -        and @opt.cmd=~/e/ \ -        and x=~/^[#{@opt.cmd}]/ +      def maintenance(x) +        if @opt.act[:maintenance][:set]==:on            SiSU_Screen::Ansi.new(              @opt.act[:color_state][:set], -            "-#{x}", -            "#{@prog.text_editor} #{@env.processing_path.epub}/#{Ep[:d_oebps]}/toc.xhtml" -          ).maintenance -        end -        if x=~/^o/ \ -        and @opt.cmd=~/o/ \ -        and x=~/^[#{@opt.cmd}]/ -          SiSU_Screen::Ansi.new( -            @opt.act[:color_state][:set], -            "-#{x}", -            "#{@prog.text_editor} #{@env.processing_path.odf}/#{@opt.fns}/odt/content.xml" +            "[#{@opt.f_pth[:lng_is]}]", +            x[:cmd], +            x[:p_pth]            ).maintenance          end        end +      self      end      def report_info        def dal          {            cmd: '--ao', +          p_pth: @env.processing_path.ao + '/' \ +          + @opt.fns + '.meta',            fn: 'ao',           }        end @@ -270,6 +209,8 @@ module SiSU_Urls              viewer: @prog.web_browser,              f_pth: @md.file.output_path.html_seg.dir + '/' \              + @md.file.base_filename.html_segtoc, +            p_pth: @env.processing_path.tune + '/' \ +            + @md.fns + '.tune',              fn: @fn[:toc],             }          end @@ -279,6 +220,8 @@ module SiSU_Urls              viewer: @prog.web_browser,              f_pth: @md.file.output_path.html_scroll.dir + '/' \              + @md.file.base_filename.html_scroll, +            p_pth: @env.processing_path.tune + '/' \ +            + @md.fns + '.tune',              fn: @fn[:doc],             }          end @@ -300,6 +243,8 @@ module SiSU_Urls              viewer: @prog.web_browser,              f_pth: @md.file.output_path.xhtml.dir + '/' \              + @md.file.base_filename.xhtml, +            p_pth: @env.processing_path.tune + '/' \ +            + @md.fns + '.tune',              fn: @fn[:xhtml],             }          end @@ -309,6 +254,9 @@ module SiSU_Urls              viewer: @prog.epub_viewer,              f_pth: @md.file.output_path.epub.dir + '/' \              + @md.file.base_filename.epub, +            p_pth: @env.processing_path.epub + '/' \ +            + Ep[:d_oebps] + '/' \ +            + 'index.xhtml',              fn: @fn[:epub],             }          end @@ -321,6 +269,9 @@ module SiSU_Urls              viewer: @prog.odf_viewer,              f_pth: @md.file.output_path.odt.dir + '/' \              + @md.file.base_filename.odt, +            p_pth: @env.processing_path.odf + '/' \ +            + @opt.fns + '/' \ +            + 'odt/content.xml',              fn: @fn[:odf],             }          end @@ -388,6 +339,10 @@ module SiSU_Urls              f_pth: @md.file.output_path.pdf.dir + '/' \              + @md.file.base_filename.pdf_l \              + @md.papersize_array[0] + '.pdf', +            p_pth: @env.processing_path.tex + '/' \ +            + @opt.fns.gsub(/~/,'-') + '.' \ +            + @md.papersize_array[0] \ +            + '.landscape.tex',              fn: @fn[:pdf_l],             }          end @@ -398,6 +353,10 @@ module SiSU_Urls              f_pth: @md.file.output_path.pdf.dir + '/' \              + @md.file.base_filename.pdf_p \              + @md.papersize_array[0] + '.pdf', +            p_pth: @env.processing_path.tex + '/' \ +            + @opt.fns.gsub(/~/,'-') + '.' \ +            + @md.papersize_array[0] \ +            + '.tex',              fn: @fn[:pdf_p],             }          end @@ -432,6 +391,9 @@ module SiSU_Urls              f_pth: @pwd_stub + '::' \              + @opt.fns \              + 'dbi psql', +            p_pth: @env.processing_path.postgresql + '/' \ +            + @md.fns \ +            + '.sql',              fn: 'dbi psql',             }          end @@ -442,15 +404,21 @@ module SiSU_Urls              f_pth: @env.path.webserv + '/' \              + @md.opt.f_pth[:pth_stub] + '/' \              + 'sisu_sqlite.db', +            p_pth: @env.processing_path.sqlite + '/' \ +            + @md.fns \ +            + '.sql',              fn: 'dbi sqlite3',             }          end          def sqlite_discrete            { -            cmd: '--sqlite --update/--import', +            cmd: '--sqlite',              viewer: 'sqlite3 ',              f_pth: @md.file.output_path.sqlite_discrete.dir + '/' \              + @md.file.base_filename.sqlite_discrete, +            p_pth: @env.processing_path.sqlite + '/' \ +            + @md.fns \ +            + '.sql',              fn: 'dbi sqlite3',             }          end @@ -485,15 +453,21 @@ module SiSU_Urls            viewer: @prog.text_editor,            f_pth: @md.file.output_path.src.dir + '/' \            + @opt.fno, +          p_pth: @md.file.output_path.src.dir + '/' \ +          + @opt.fno,            fn: @opt.fno,           }        end        def sisupod          {            cmd: '--sisupod', -          viewer: @prog.web_browser, +          viewer: '',            f_pth: @md.file.output_path.sisupod.dir + '/' \ -          + @opt.fno, +          + @opt.fno \ +          + '.txz', +          p_pth: @md.file.output_path.sisupod.dir + '/' \ +          + @opt.fno + '/' \ +          + 'sisupod/',            fn: @fn[:sisupod],           }        end @@ -559,7 +533,7 @@ module SiSU_Urls            ).flow          end        end -      m=/.+\/(?:src\/)?(\S+)/im # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m +      m=/.+\/(?:src\/)?(\S+)/im        @pwd_stub="#{@env.url.output_tell}"[m,1]        unless @opt.act[:quiet][:set]==:on          if @opt.fns =~ @m_regular @@ -568,112 +542,134 @@ module SiSU_Urls            || @opt.act[:maintenance][:set]==:on)              if @opt.act[:txt][:set]==:on                show.report(report_info.text.txt) +              #show.maintenance(report_info.text.txt)              end              if @opt.act[:txt_textile][:set]==:on                show.report(report_info.text.textile) +              #show.maintenance(report_info.text.textile)              end              if @opt.act[:txt_asciidoc][:set]==:on                show.report(report_info.text.asciidoc) +              #show.maintenance(report_info.text.asciidoc)              end              if @opt.act[:txt_markdown][:set]==:on                show.report(report_info.text.markdown) +              #show.maintenance(report_info.text.markdown)              end              if @opt.act[:txt_rst][:set]==:on                show.report(report_info.text.rst) +              #show.maintenance(report_info.text.rst)              end              if (@opt.act[:html][:set]==:on \              or @opt.act[:html_scroll][:set]==:on \              or @opt.act[:html_seg][:set]==:on)                if @opt.act[:html_scroll][:set]==:on                  show.report(report_info.html.scroll) +                show.maintenance(report_info.html.scroll)                end                if @opt.act[:html_seg][:set]==:on                  show.report(report_info.html.seg) +                show.maintenance(report_info.html.seg)                end              end              if @opt.act[:concordance][:set]==:on                show.report(report_info.html.concordance) +              #show.maintenance(report_info.html.concordance)              end              if @opt.act[:xhtml][:set]==:on                show.report(report_info.xhtml.xhtml) +              show.maintenance(report_info.xhtml.xhtml)              end              if @opt.act[:epub][:set]==:on                show.report(report_info.xhtml.epub) +              show.maintenance(report_info.xhtml.epub)              end              if @opt.act[:odt][:set]==:on                show.report(report_info.xml.odt) +              show.maintenance(report_info.xml.odt)              end              if @opt.act[:xml_dom][:set]==:on                show.report(report_info.xml.dom) +              #show.maintenance(report_info.xml.dom)              end              if @opt.act[:xml_sax][:set]==:on                show.report(report_info.xml.sax) +              #show.maintenance(report_info.xml.sax)              end              if @opt.act[:xml_docbook_book][:set]==:on                show.report(report_info.xml.docbook) +              #show.maintenance(report_info.xml.docbook)              end              if @opt.act[:xml_fictionbook][:set]==:on                show.report(report_info.xml.fictionbook) +              #show.maintenance(report_info.xml.fictionbook)              end              if @opt.act[:xml_scaffold_structure_sisu][:set]==:on                show.report(report_info.xml.scaffold_structure_sisu) +              #show.maintenance(report_info.xml.scaffold_structure_sisu)              end              if @opt.act[:xml_scaffold_structure_collapse][:set]==:on                show.report(report_info.xml.scaffold_collapse) +              #show.maintenance(report_info.xml.scaffold_collapse)              end              if (@opt.act[:pdf][:set]==:on \              or @opt.act[:pdf_p][:set]==:on \              or @opt.act[:pdf_l][:set]==:on)                if @opt.act[:pdf_p][:set]==:on                  show.report(report_info.pdf.portrait) +                show.maintenance(report_info.pdf.portrait)                end                if @opt.act[:pdf_l][:set]==:on                  show.report(report_info.pdf.landscape) +                show.maintenance(report_info.pdf.landscape)                end              end              if @opt.act[:psql][:set]==:on                show.report(report_info.db.psql) +              show.maintenance(report_info.db.psql)              end              if @opt.act[:sqlite_discrete][:set]==:on                show.report(report_info.db.sqlite_discrete) +              show.maintenance(report_info.db.sqlite_discrete)              end              if @opt.act[:sqlite][:set]==:on                show.report(report_info.db.sqlite) +              show.maintenance(report_info.db.sqlite)              end              if @opt.act[:texinfo][:set]==:on                show.report(report_info.texinfo) +              #show.maintenance(report_info.texinfo)              end              if @opt.act[:manpage][:set]==:on                show.report(report_info.manpage) +              #show.maintenance(report_info.manpage)              end              if @opt.act[:hash_digests][:set]==:on                show.report(report_info.hash_digests) +              #show.maintenance(report_info.hash_digests)              end              if @opt.act[:po4a][:set]==:on -              if @opt.fns =~/\S+?~\S{2}(?:_\S{2})?\.ss[mt]/ -                f=y.gsub(/\.pot$/,'.po') -                show.po4a.po(x,f) -              else -                show.po4a.pot(x,f) -              end +              #if @opt.fns =~/\S+?~\S{2}(?:_\S{2})?\.ss[mt]/ +              #else +              #end              end              if @opt.act[:share_source][:set]==:on                show.report(report_info.source) +              show.maintenance(report_info.source)              end              if @opt.act[:sisupod][:set]==:on                show.report(report_info.sisupod) +              show.maintenance(report_info.sisupod)              end              if @opt.act[:qrcode][:set]==:on                show.report(report_info.qrcode) +              #show.maintenance(report_info.qrcode)              end              if @opt.act[:manifest][:set]==:on                show.report(report_info.manifest) +              show.maintenance(report_info.manifest)              end            end -          if (@opt.act[:verbose_plus][:set]==:on \ -          || @opt.act[:maintenance][:set]==:on) -            urls_maintenance(@opt,x,y) -          end          end        end      end @@ -684,42 +680,6 @@ module SiSU_Urls          'URLs',          i        ).grey_title_hi -      @u.each do |x,y| -        case x -        when /^m/ -          show.meta(x,y) -        when /^[BcdNsxXy]/ -          show.generic(x,y) -        when /^[at]/ -          show.text(x) -        when /^b/ -          show.xhtml(x) -        when /^e/ -          show.epub(x) -        when /^h/ -          if x =~/scroll/ -            show.html.scroll(x) -          else -            show.html.toc(x) -          end -        when /^o/ -          show.odt(x) -        when /^p/ -          if x =~/portrait/ -            show.pdf.portrait(x) -          else -            show.pdf.landscape(x) -          end -        when /^w/ -          show.html.concordance(x) -        when /^Y/ -          show.xml.sitemap(x) -        when /^I/ -          show.pinfo(x,y) -        when /^i/ -          show.manpage(x) -        end -      end      end    end  end | 
