From f8820c25acc82ee18bd53d8763a58365854414b3 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 14 Mar 2013 23:35:17 -0400 Subject: v4: manifest, links for output_by? alternatives, harvest & qrcode related --- data/doc/sisu/CHANGELOG_v4 | 2 ++ lib/sisu/v4/manifest.rb | 29 ++++++++++++++++++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index dd117c70..fc773627 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -32,6 +32,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.14.orig.tar.xz * v4: harvest, links for output_by? filename +* v4: manifest, links for output_by? alternatives, harvest & qrcode related + %% 4.0.13.orig.tar.xz (2013-03-13:10/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.13 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.13-1 diff --git a/lib/sisu/v4/manifest.rb b/lib/sisu/v4/manifest.rb index c8103a0a..1f5724c5 100644 --- a/lib/sisu/v4/manifest.rb +++ b/lib/sisu/v4/manifest.rb @@ -124,6 +124,9 @@ module SiSU_Manifest @translate=SiSU_Translate::Source.new(md,@language) @brace_url=SiSU_Viz::Defaults.new.url_decoration @stylesheet=SiSU_Style::CSS_HeadInfo.new(md).stylesheet + @fn_lng=(@f.output_dir_structure.by_language_code?) \ + ? '' + : ('.' + md.opt.lng) end def output manifest=@f.write_file.manifest @@ -448,12 +451,15 @@ module SiSU_Manifest end end def qrc_image - fn=@md.fnb - pth=(@o_str.dump_or_redirect?) \ + fn=(@f.output_dir_structure.by_filename?) \ + ? 'sisu_manifest' + : @md.fnb + pth=((@o_str.dump_or_redirect?) \ + || (@f.output_dir_structure.by_filename?)) \ ? '.' : 'qrcode' - img_md="#{pth}/#{fn}.md.png" - img_title="#{pth}/#{fn}.title.png" + img_md="#{pth}/#{fn}#{@fn_lng}.md.png" + img_title="#{pth}/#{fn}#{@fn_lng}.title.png" if FileTest.file?(@f.place_file.qrcode_md.dir)==true @manifest[:html] <<< @@ -823,9 +829,18 @@ WOK
WOK end - harvest=(FileTest.file?("#{@f.output_path.manifest.dir}/authors.html") \ - && FileTest.file?("#{@f.output_path.manifest.dir}/topics.html")) \ - ? %{

other document manifests: [authors] [topics]

} + if @o_str.dump_or_redirect? + elsif @f.output_dir_structure.by_language_code? \ + or @f.output_dir_structure.by_filetype? + pth_local=@f.output_path.manifest.dir + pth_rel='./' + else + pth_local=@f.output_path.base.dir + pth_rel='../' + end + harvest=(FileTest.file?("#{pth_local}/authors#{@fn_lng}.html") \ + && FileTest.file?("#{pth_local}/topics#{@fn_lng}.html")) \ + ? %{

other document manifests: [authors] [topics]

} : '' manifest_title=%{

#{@translate.manifest_description}

#{harvest}} @manifest[:html] <<<