aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3')
-rw-r--r--lib/sisu/v3/dal.rb2
-rw-r--r--lib/sisu/v3/dbi_discreet.rb4
-rw-r--r--lib/sisu/v3/html.rb8
-rw-r--r--lib/sisu/v3/html_segments.rb13
-rw-r--r--lib/sisu/v3/hub.rb50
-rw-r--r--lib/sisu/v3/manifest.rb2
-rw-r--r--lib/sisu/v3/shared_images.rb3
-rw-r--r--lib/sisu/v3/sysenv.rb3
-rw-r--r--lib/sisu/v3/urls.rb4
9 files changed, 65 insertions, 24 deletions
diff --git a/lib/sisu/v3/dal.rb b/lib/sisu/v3/dal.rb
index 24f29bd3..6c7fef79 100644
--- a/lib/sisu/v3/dal.rb
+++ b/lib/sisu/v3/dal.rb
@@ -265,7 +265,7 @@ module SiSU_DAL
tell=(@opt.cmd=~/[vVM]/) \
? SiSU_Screen::Ansi.new(@opt.cmd,'Document Abstraction')
: SiSU_Screen::Ansi.new(@opt.cmd,'Document Abstraction',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}")
- tell.green_title_hi
+ tell.grey_title_hi
end
fn=(@fnx && @fnx =~/\.ss[tmi]$/) \
? @fnx
diff --git a/lib/sisu/v3/dbi_discreet.rb b/lib/sisu/v3/dbi_discreet.rb
index 810ef49a..49313a93 100644
--- a/lib/sisu/v3/dbi_discreet.rb
+++ b/lib/sisu/v3/dbi_discreet.rb
@@ -114,8 +114,8 @@ module SiSU_DBI_Discreet #% database building
def create_and_populate
db=SiSU_Env::DbOp.new(@md)
conn=db.sqlite_discreet.conn_sqlite3
- sdb=SiSU_DbDBI::Create.new(@opt,conn,@file_maint,'sqlite')
- sdb_index=SiSU_DbDBI::Index.new(@opt,conn,@file_maint,'sqlite')
+ sdb=SiSU_DbDBI::Create.new(@opt,conn,@file,'sqlite')
+ sdb_index=SiSU_DbDBI::Index.new(@opt,conn,@file,'sqlite')
sdb.output_dir?
begin
SiSU_Screen::Ansi.new(@opt.cmd,'SQLite',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").green_title_hi unless @opt.cmd =~/q/
diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb
index a5c1edb1..100916ff 100644
--- a/lib/sisu/v3/html.rb
+++ b/lib/sisu/v3/html.rb
@@ -530,7 +530,9 @@ WOK
@segtoc << format_head_toc.head << ads.div.major
toc_shared << format_head_toc.toc_head_escript if SiSU_HTML_Format::HeadToc.method_defined? :toc_head_escript
@segtoc << format_head_toc.toc_head_escript if SiSU_HTML_Format::HeadToc.method_defined? :toc_head_escript
- toc_shared << format_head_toc.scroll_head_navigation_band
+ if @make.build.html_top_band?
+ toc_shared << format_head_toc.scroll_head_navigation_band
+ end
if defined? @md.rights.all
rights=format_head_toc.rights.all
rights=SiSU_HTML_Tune::CleanHTML.new(rights).clean
@@ -539,7 +541,9 @@ WOK
prefix_b=format_head_toc.notes.prefix_b
prefix_b=SiSU_HTML_Tune::CleanHTML.new(prefix_b).clean
end
- @segtoc << format_head_toc.seg_head_navigation_band
+ if @make.build.html_top_band?
+ @segtoc << format_head_toc.seg_head_navigation_band
+ end
toc_shared << format_head_toc.scroll_head_title_banner_open
@segtoc << format_head_toc.seg_head_title_banner_open
tmp_head=nil
diff --git a/lib/sisu/v3/html_segments.rb b/lib/sisu/v3/html_segments.rb
index cf6f2cfd..b527eaba 100644
--- a/lib/sisu/v3/html_segments.rb
+++ b/lib/sisu/v3/html_segments.rb
@@ -350,11 +350,16 @@ module SiSU_HTML_Seg
def head(dob)
clean=/<!.*?!>|<:.*?>/
format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md)
- if @@tracker < @@seg_total-1
- if @@tracker==0; @@segtocband=format_head_seg.toc_next2 #if format_head_seg.toc_next2
- else @@segtocband=format_head_seg.toc_pre_next2 #if format_head_seg.toc_pre_next2
+ if @make.build.html_navigation?
+ if @@tracker < @@seg_total-1
+ @@segtocband=if @@tracker==0
+ format_head_seg.toc_next2 #if format_head_seg.toc_next2
+ else
+ format_head_seg.toc_pre_next2 #if format_head_seg.toc_pre_next2
+ end
+ else @@segtocband=format_head_seg.toc_pre2 #if format_head_seg.toc_pre2
end
- else @@segtocband=format_head_seg.toc_pre2 #if format_head_seg.toc_pre2
+ else @@segtocband=''
end
@p_num ||= ''
if @@is1==1
diff --git a/lib/sisu/v3/hub.rb b/lib/sisu/v3/hub.rb
index a2902075..d5ab7bdd 100644
--- a/lib/sisu/v3/hub.rb
+++ b/lib/sisu/v3/hub.rb
@@ -64,31 +64,59 @@ module SiSU
class OptionLoopFiles
def initialize(opt)
@opt=opt
+ @r=Px[:lng_lst].join('|')
end
def loop_files_on_given_option
- @opt.files.each_with_index do |fns,i|
- @opt.fns=fns
+ @opt.files.each_with_index do |fno,i|
+ @opt.fns=fno
+ @opt.fno=fno
@opt.f_pth=@opt.f_pths[i]
- if fns !~/\.-sst$/
+ if fno !~/\.-sst$/
@opt.pth=@opt.paths[i]
@opt.lng=@opt.lngs[i]
- else
- @opt.pth=Dir.pwd
- @opt.lng='en'
end
@@pwd=@opt.pth
@opt.pth=@opt.f_pths[i][:pth]
@opt.lng=@opt.f_pths[i][:lng]
Dir.chdir(@opt.f_pth[:pth]) #watch
- @env=SiSU_Env::InfoEnv.new(fns)
+ @env=SiSU_Env::InfoEnv.new(fno)
yield
end
end
+ def loop_files_on_given_option_bundle
+ @files_bundle={}
+ @opt.files.each_with_index do |fno,i|
+ fn_base_bundle=fno.gsub(/(?:~(?:#{@r}))?\.ss[tm]$/,'')
+ unless @files_bundle[fn_base_bundle]
+ @files_bundle[fn_base_bundle]={ status: :todo }
+ end
+ end
+ @opt.files.each_with_index do |fno,i|
+ fn_base_bundle=fno.gsub(/(?:~(?:#{@r}))?\.ss[tm]$/,'')
+ unless @files_bundle[fn_base_bundle][:status] == :done
+ @files_bundle[fn_base_bundle][:status] = :done
+ @opt.fns=fno
+ @opt.fno=fno
+ @opt.f_pth=@opt.f_pths[i]
+ if fno !~/\.-sst$/
+ @opt.pth=@opt.paths[i]
+ @opt.lng=@opt.lngs[i]
+ end
+ @@pwd=@opt.pth
+ @opt.pth=@opt.f_pths[i][:pth]
+ @opt.lng=@opt.f_pths[i][:lng]
+ Dir.chdir(@opt.f_pth[:pth]) #watch
+ @env=SiSU_Env::InfoEnv.new(fno)
+ yield
+ else next
+ end
+ end
+ end
def manifest_on_files_translated
r=Px[:lng_lst].join('|')
number_of_files={}
@opt.files.each_with_index do |fns,i|
- fn=fns.gsub(/(?:\.#{r})?\.ss[tm]$/,'')
+ fn=fns.gsub(/(?:~(?:#{@r}))?\.ss[tm]$/,'')
if number_of_files[fn].class == Array
number_of_files[fn] << i
else
@@ -102,7 +130,7 @@ module SiSU
end
end
if files_translated_idx.flatten.length > 1
- SiSU_Screen::Ansi.new(@opt.cmd,'Manifest re-run on (currently generated) tranlated files',"").grey_title_hi unless @opt.act[:quiet][:set] ==:on
+ SiSU_Screen::Ansi.new(@opt.cmd,'Manifest re-run on (currently generated) translated files',"").grey_title_hi unless @opt.act[:quiet][:set] ==:on
files_translated_idx.flatten.each do |i|
@opt.fns=@opt.files[i]
@opt.f_pth=@opt.f_pths[i]
@@ -447,7 +475,9 @@ p "#{__LINE__}:#{__FILE__}" if @opt.act[:maintenance][:set] ==:on
SiSU_Doc::Source.new(@opt).read
end
ensure
- SiSU_Doc::Source.new(@opt).sisupod_tar_xz
+ OptionLoopFiles.new(@opt).loop_files_on_given_option_bundle do
+ SiSU_Doc::Source.new(@opt).sisupod_tar_xz
+ end
end
end
if @opt.act[:images][:set]==:on #% --images, -j
diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb
index b2982aae..092418fb 100644
--- a/lib/sisu/v3/manifest.rb
+++ b/lib/sisu/v3/manifest.rb
@@ -87,7 +87,7 @@ module SiSU_Manifest
url_html="file://#{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}"
@opt.cmd=~/[MVvz]/ \
? SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',"#{xbrowser} #{url_html}").green_hi_blue
- : SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").green_title_hi
+ : SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").grey_title_hi
SiSU_Screen::Ansi.new(@opt.cmd,"#{browser} #{url_html}").grey_tab if @opt.cmd =~/v/i
end
data=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions
diff --git a/lib/sisu/v3/shared_images.rb b/lib/sisu/v3/shared_images.rb
index 03093c6a..c92719f6 100644
--- a/lib/sisu/v3/shared_images.rb
+++ b/lib/sisu/v3/shared_images.rb
@@ -130,7 +130,8 @@ module SiSU_Images
rgx_rb_image=/["']\S*?([a-zA-Z0-9_-]+?\.(?:png|jpg|gif))["']/
skin_source=SiSU_Env::InfoSkin.new(@md).apply
docskin=nil
- if skin_source[:type] == :dir
+ if skin_source \
+ and skin_source[:type] == :dir
docskin_with_path="#{docskin_place}/skin_#{@env.stub_pwd}.rb"
docskin=[docskin_with_path.gsub(/.+?\/(skin_\S+?)\.rb/,'\1')]
#docskin='skin_sisupod'
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb
index b8dd37b0..5e9533a2 100644
--- a/lib/sisu/v3/sysenv.rb
+++ b/lib/sisu/v3/sysenv.rb
@@ -5647,7 +5647,8 @@ WOK
@env=SiSU_Env::InfoEnv.new
end
def apply
- if @md.make.skin
+ if @m.respond_to?(:make) \
+ and @md.make.respond_to(:skin)
skin_path=unless @md.opt.f_pth[:pth] =~/\/\S+?\/sisupod\/\S+?\/sisupod\/doc/
[
"#{@env.path.pwd}/_sisu/skin",
diff --git a/lib/sisu/v3/urls.rb b/lib/sisu/v3/urls.rb
index a75cfc1a..29c2f791 100644
--- a/lib/sisu/v3/urls.rb
+++ b/lib/sisu/v3/urls.rb
@@ -284,8 +284,8 @@ module SiSU_Urls
unless @opt.cmd =~/q/
i="(output manifest) [#{@opt.f_pth[:lng_is]}] #{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}"
@opt.cmd=~/[MVvz]/ \
- ? SiSU_Screen::Ansi.new(@opt.cmd,'URLs').grey_title_hi
- : SiSU_Screen::Ansi.new(@opt.cmd,'URL',i).green_hi_blue
+ ? SiSU_Screen::Ansi.new(@opt.cmd,'URLs').green_title_hi
+ : SiSU_Screen::Ansi.new(@opt.cmd,'URL',i).grey_title_hi
SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}").flow if @opt.cmd =~/[MVv]/
end
m=/.+\/(?:src\/)?(\S+)/im # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m