diff options
| author | Ralph Amissah <ralph@amissah.com> | 2012-06-03 14:32:09 -0400 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2012-06-03 14:32:09 -0400 | 
| commit | a887643888fb60fdab43ffb968ab9d681884355d (patch) | |
| tree | 4391593d9e3b789a9bbcbef794bcb9e2fcb3de4e | |
| parent | v3: urls, sisupod, fix (diff) | |
v3: manifest, paths, (for command line selection of output type) fix
| -rw-r--r-- | data/doc/sisu/CHANGELOG_v3 | 2 | ||||
| -rw-r--r-- | lib/sisu/v3/manifest.rb | 29 | 
2 files changed, 16 insertions, 15 deletions
| diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index b05c139f..4254d7b6 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -21,6 +21,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.11.orig.tar.xz    sisu_3.2.11-1.dsc    sisu_3.2.11-1.debian.tar.gz +* v3: manifest, paths, (for command line selection of output type) fix +  * v3: urls, sisupod, fix  * v3: warn when files to be copied not found, add diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb index 4d51d76c..b2982aae 100644 --- a/lib/sisu/v3/manifest.rb +++ b/lib/sisu/v3/manifest.rb @@ -72,7 +72,7 @@ module SiSU_Manifest      def initialize(opt)        @opt=opt        @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) -      l=SiSU_Env::StandardiseLanguage.new(@opt.lng).language +      l=SiSU_Env::StandardiseLanguage.new(opt.lng).language        @doc_language=l[:n]      end      def read @@ -105,12 +105,11 @@ module SiSU_Manifest        def initialize(md)          @manifest={ txt: [], html: [] }          @md,@fns=md,md.fns -        @env=SiSU_Env::InfoEnv.new(@md.fns) -        @make=SiSU_Env::ProcessingSettings.new(@md) -        @fnb=@md.fnb +        @env=SiSU_Env::InfoEnv.new(md.fns) +        @f=SiSU_Env::FileOp.new(md) +        @fnb=md.fnb          @base_url="#{@env.url.root}/#{@fnb}" -        @f=SiSU_Env::FileOp.new(@md) -        @o_str=SiSU_Env::ProcessingSettings.new(md).output_dir_structure +        @o_str=SiSU_Env::FileOp.new(md).output_dir_structure          @image_path=if @o_str.dump_or_redirect?            %{./image}          else @@ -119,9 +118,9 @@ module SiSU_Manifest          @base_path=@f.output_path.manifest.dir          @@dg ||=SiSU_Env::InfoEnv.new.digest.type          @dg=@@dg -        l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language +        l=SiSU_Env::StandardiseLanguage.new(md.opt.lng).language          @language=l[:n] -        @translate=SiSU_Translate::Source.new(@md,@language) +        @translate=SiSU_Translate::Source.new(md,@language)          @brace_url=SiSU_Viz::Skin.new.url_decoration          @stylesheet=SiSU_Style::CSS_HeadInfo.new(md).stylesheet        end @@ -179,13 +178,13 @@ module SiSU_Manifest              mt="#{mp}/#{mn}"              mr="../../#{lc}/manifest/#{mn}"              mu="#{url}/#{mn}" -          elsif @env.output_dir_structure.by_language_code? +          elsif @f.output_dir_structure.by_language_code?              mp="#{@f.output_path.base.dir}/#{lc}/manifest"              mn="#{@md.fnb}.html"              mt="#{mp}/#{mn}"              mr="../../#{lc}/manifest/#{mn}"              mu="#{url}/#{lc}/manifest/#{mn}" -          elsif @env.output_dir_structure.by_filetype? +          elsif @f.output_dir_structure.by_filetype?              mp="#{@f.output_path.base.dir}/manifest"              mn="#{@md.fnb}.#{lc}.html"              mt="#{mp}/#{mn}" @@ -497,7 +496,7 @@ WOK          end          if FileTest.file?(@f.place_file.sisupod.dir)==true            pth=@f.output_path.sisupod.dir -          rel=@f.output_path.sisupod.rel_sm +          rel=@f.output_path.sisupod.ab_pod            url=@f.output_path.sisupod.url            id,file='SiSU doc (tar.xz)',@f.base_filename.sisupod            summarize_sources(id,file,pth,rel,url) @@ -769,7 +768,7 @@ WOK            minitoc=SiSU_HTML_MiniToc::TocMini.new(@md,data).songsheet.join("\n")            id,file='',''            vz=SiSU_Env::GetInit.instance.skin -          search_form=if @make.build.search_form? +          search_form=if @f.build.search_form?              "<td>#{@env.widget_static.search_form}</td>"            else ''            end @@ -808,10 +807,10 @@ SiSU manifest: #{@md.title.full}  <body bgcolor="#ffffff" text="#000000" link="#003090" lang="en" xml:lang="en">  #{banner_table}  WOK -          if @make.build.manifest_minitoc? +          if @f.build.manifest_minitoc?              if @o_str.dump_or_redirect? -            elsif @env.output_dir_structure.by_language_code? \ -            or @env.output_dir_structure.by_filetype? +            elsif @f.output_dir_structure.by_language_code? \ +            or @f.output_dir_structure.by_filetype?                minitoc=minitoc.gsub(/<a href="(\S+?)"/m,%{<a href="../html/#{@md.fnb}/\\1"}).                  gsub(/<a href="\.\.\/html\/#{@md.fnb}\/(?:sisu_manifest\.html|#{@f.base_filename.manifest})"/m,                %{<a href="#{@f.base_filename.manifest}"}) | 
