From e481fdd4b3403d621380c43047484aeb3a3a46d2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 17 Mar 2022 11:49:22 -0400 Subject: ruby variable passing breakage, make constant? --- org/env.org | 2 +- org/sisu-bin.org | 2 ++ org/xhtml.org | 8 ++++++++ org/xml.org | 8 ++++---- 4 files changed, 15 insertions(+), 5 deletions(-) (limited to 'org') diff --git a/org/env.org b/org/env.org index 02c5ed29..28df5017 100644 --- a/org/env.org +++ b/org/env.org @@ -392,7 +392,7 @@ module SiSU_Create_Site cp_images(src,dest) if FileTest.directory?(src) end def cp_base_images #fix images - src=SiSU_is.path_base_system_data? + '/image' + src=$sisu_base_data + '/image' # hard fix, revisit dest_arr=[ "#{@env.path.webserv}/_sisu/image_sys", "#{@env.path.webserv}/#{@env.path.base_markup_dir_stub}/_sisu/image_sys" diff --git a/org/sisu-bin.org b/org/sisu-bin.org index a92e7b5e..1ee0d567 100644 --- a/org/sisu-bin.org +++ b/org/sisu-bin.org @@ -288,6 +288,8 @@ class Orient get_processing_info.processing_files.each_pair do |markup_dir,markup_file| begin $sisu_document_markup_directory=markup_dir.gsub(/\/$/,'') + $sisu_base_data=sisu_path_base_system_data # hard fix, revisit + $sisu_called_from=File.expand_path(processing.called_as) argv_sub=get_processing_info.command_line_modifiers + markup_file if FileTest.directory?(markup_dir) system("cd #{markup_dir}") diff --git a/org/xhtml.org b/org/xhtml.org index c24a5411..5c0a5cf0 100644 --- a/org/xhtml.org +++ b/org/xhtml.org @@ -1180,6 +1180,11 @@ module SiSU_XHTML_EPUB2 end end def images +#puts @md.env.path.image_source_include +#puts @md.env.processing_path.epub +#puts @md.env.path.image_source_include_local +puts @md.file.output_path.epub.rel_image + #img_pth=$sisu_base_data + '/image' img_pth=@md.env.path.image_source_include img_src_pth=unless @md.opt.f_pth[:pth] =~/\/\S+?\/sisupod\/\S+?\/sisupod\/doc/ @md.file.output_path.epub.rel_image @@ -1191,6 +1196,9 @@ module SiSU_XHTML_EPUB2 if FileTest.directory?("#{@md.env.processing_path.epub}/#{Ep[:d_oebps]}/image") \ && FileTest.file?("#{img_src_pth}/#{x}") FileUtils::cp("#{img_src_pth}/#{x}","#{@md.env.processing_path.epub}/#{Ep[:d_oebps]}/image") + #elsif FileTest.directory?("#{$sisu_base_data}/image") \ + #&& FileTest.file?("#{img_pth}/#{x}") + # FileUtils::cp("#{img_pth}/#{x}","#{@md.env.processing_path.epub}/#{Ep[:d_oebps]}/image") elsif FileTest.directory?("#{@md.env.processing_path.epub}/#{Ep[:d_oebps]}/image") \ && FileTest.file?("#{img_pth}/#{x}") FileUtils::cp("#{img_pth}/#{x}","#{@md.env.processing_path.epub}/#{Ep[:d_oebps]}/image") diff --git a/org/xml.org b/org/xml.org index 3b6e4085..d3736b85 100644 --- a/org/xml.org +++ b/org/xml.org @@ -3619,15 +3619,15 @@ module SiSU_XML_ODF_ODT @md.opt.act[:color_state][:set], "ERROR - image:", %{"#{i}" missing}, - "search locations: #{@env.path.image_source_include_local}," \ + "search locations: #{$sisu_base_data}/image," \ + "#{@env.path.image_source_include_remote} and" \ + "#{@env.path.image_source_include}" ).error2 unless @md.opt.act[:quiet][:set]==:on nil end elsif @md.fns =~/\.ss[tm]$/ \ - and FileTest.file?("#{@env.path.image_source_include_local}/#{i}") #review - @env.path.image_source_include_local + and FileTest.file?("#{$sisu_base_data}/image/#{i}") #review + $sisu_base_data + '/image' elsif @md.fns =~/\.ss[tm]$/ \ and FileTest.file?("#{@env.path.image_source_sisu_includes(@md)}/#{i}") @env.path.image_source_sisu_includes(@md) @@ -3640,7 +3640,7 @@ module SiSU_XML_ODF_ODT "ERROR - image:", %{"#{i}" missing}, "search locations: " \ - + @env.path.image_source_include_local + ',' \ + + $sisu_base_data + '/image' + ',' \ + @env.path.image_source_include_remote + 'and' \ + @env.path.image_source_include \ + @md.opt.sisu_data_dir? -- cgit v1.2.3