aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v4/hub.rb6
-rw-r--r--lib/sisu/v4/sysenv.rb24
-rw-r--r--lib/sisu/v4/utils.rb1
-rw-r--r--lib/sisu/v5/hub.rb6
-rw-r--r--lib/sisu/v5/sysenv.rb24
-rw-r--r--lib/sisu/v5/utils.rb1
6 files changed, 22 insertions, 40 deletions
diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb
index 5f80e795..ebe9ccf4 100644
--- a/lib/sisu/v4/hub.rb
+++ b/lib/sisu/v4/hub.rb
@@ -75,9 +75,9 @@ module SiSU
class HubMaster
def initialize(argv)
pwd_the=Dir.pwd
- begin #% select what to do
- opt=SiSU_Commandline::Options.new(argv)
- SiSU::Processing.new(opt).actions
+ begin #% select what to do (set options & start processing (files selected if any))
+ opt=SiSU_Commandline::Options.new(argv) # command line selection of what to do, files & operations set
+ SiSU::Processing.new(opt).actions # do it
rescue
cmd=(opt ? opt.cmd : '')
SiSU_Screen::Ansi.new(cmd,$!,$@).rescue do
diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb
index cfbbc0c1..4db204d8 100644
--- a/lib/sisu/v4/sysenv.rb
+++ b/lib/sisu/v4/sysenv.rb
@@ -281,7 +281,7 @@ module SiSU_Env
@@tx ||=SiSU_Viz::TeX.new
end
def rc_path_options
- @rc_path=[
+ [
"#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_version_dir}",
"#{$sisu_document_markup_directory_base_fixed_path}/.sisu",
"#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_version_dir}",
@@ -297,14 +297,12 @@ module SiSU_Env
S_CONF[:header_make]
end
def makefile
- #if @markup_dir_changed_
- rc_path_options.each do |v|
- if FileTest.exist?("#{v}/#{makefile_name}")
- @sisu_make_path=v
- break
- end
+ rc_path_options.each do |v|
+ if FileTest.exist?("#{v}/#{makefile_name}")
+ @sisu_make_path=v
+ break
end
- #end
+ end
@sisu_make_file_path=@sisu_make_path \
? "#{@sisu_make_path}/#{makefile_name}"
: nil
@@ -552,7 +550,6 @@ module SiSU_Env
n =n + '.' + @fn[:t]
x << { f: "#{@fn[:m]}.#{@fn[:t]}", l: lng_base, n: n }
end
- #x << { f: "#{@fns}", l: lng_base }
langs.each do |l|
lng=SiSU_Env::StandardiseLanguage.new(l)
if FileTest.file?("#{@fn[:m]}~#{lng.code}.#{@fn[:t]}")
@@ -617,16 +614,10 @@ module SiSU_Env
@m=@m.uniq
end
def filename(code,name,suffix)
- #d=SiSU_Env::InfoEnv.new(@fns)
- #fnl=d.i18n.lang_filename(code)
"#{name}#{suffix}"
- #if code
- # "#{fnl[:pre]}#{name}#{fnl[:mid]}#{suffix}#{fnl[:post]}"
- #else "#{name}#{suffix}"
- #end
end
def lang(code)
- @fn={
+ {
html: filename(code,'','.html'),
book_index: filename(code,'book_index','.html'),
concordance: filename(code,'concordance','.html'),
@@ -671,7 +662,6 @@ module SiSU_Env
book_idx_epub: filename(code,'book_index','.xhtml'),
epub_concord: filename(code,'concordance','.xhtml'),
}
- @fn
end
end
class SystemCall
diff --git a/lib/sisu/v4/utils.rb b/lib/sisu/v4/utils.rb
index b120cc01..d18e2180 100644
--- a/lib/sisu/v4/utils.rb
+++ b/lib/sisu/v4/utils.rb
@@ -151,6 +151,7 @@ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark({ m: %{
}}) if t_o=~/^```/m
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark(%{ code: #{@@flag['code']}, open --> "#{t_o}" }) \
if t_o=~/^```/m
+SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark("open -->")
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark("open -->",:green)
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:green,"open -->")
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark("open -->")
diff --git a/lib/sisu/v5/hub.rb b/lib/sisu/v5/hub.rb
index 08ad7b58..fcbaa67a 100644
--- a/lib/sisu/v5/hub.rb
+++ b/lib/sisu/v5/hub.rb
@@ -75,9 +75,9 @@ module SiSU
class HubMaster
def initialize(argv)
pwd_the=Dir.pwd
- begin #% select what to do
- opt=SiSU_Commandline::Options.new(argv)
- SiSU::Processing.new(opt).actions
+ begin #% select what to do (set options & start processing (files selected if any))
+ opt=SiSU_Commandline::Options.new(argv) # command line selection of what to do, files & operations set
+ SiSU::Processing.new(opt).actions # do it
rescue
cmd=(opt ? opt.cmd : '')
SiSU_Screen::Ansi.new(cmd,$!,$@).rescue do
diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb
index 3092532b..62ef451f 100644
--- a/lib/sisu/v5/sysenv.rb
+++ b/lib/sisu/v5/sysenv.rb
@@ -281,7 +281,7 @@ module SiSU_Env
@@tx ||=SiSU_Viz::TeX.new
end
def rc_path_options
- @rc_path=[
+ [
"#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_version_dir}",
"#{$sisu_document_markup_directory_base_fixed_path}/.sisu",
"#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_version_dir}",
@@ -297,14 +297,12 @@ module SiSU_Env
S_CONF[:header_make]
end
def makefile
- #if @markup_dir_changed_
- rc_path_options.each do |v|
- if FileTest.exist?("#{v}/#{makefile_name}")
- @sisu_make_path=v
- break
- end
+ rc_path_options.each do |v|
+ if FileTest.exist?("#{v}/#{makefile_name}")
+ @sisu_make_path=v
+ break
end
- #end
+ end
@sisu_make_file_path=@sisu_make_path \
? "#{@sisu_make_path}/#{makefile_name}"
: nil
@@ -552,7 +550,6 @@ module SiSU_Env
n =n + '.' + @fn[:t]
x << { f: "#{@fn[:m]}.#{@fn[:t]}", l: lng_base, n: n }
end
- #x << { f: "#{@fns}", l: lng_base }
langs.each do |l|
lng=SiSU_Env::StandardiseLanguage.new(l)
if FileTest.file?("#{@fn[:m]}~#{lng.code}.#{@fn[:t]}")
@@ -617,16 +614,10 @@ module SiSU_Env
@m=@m.uniq
end
def filename(code,name,suffix)
- #d=SiSU_Env::InfoEnv.new(@fns)
- #fnl=d.i18n.lang_filename(code)
"#{name}#{suffix}"
- #if code
- # "#{fnl[:pre]}#{name}#{fnl[:mid]}#{suffix}#{fnl[:post]}"
- #else "#{name}#{suffix}"
- #end
end
def lang(code)
- @fn={
+ {
html: filename(code,'','.html'),
book_index: filename(code,'book_index','.html'),
concordance: filename(code,'concordance','.html'),
@@ -671,7 +662,6 @@ module SiSU_Env
book_idx_epub: filename(code,'book_index','.xhtml'),
epub_concord: filename(code,'concordance','.xhtml'),
}
- @fn
end
end
class SystemCall
diff --git a/lib/sisu/v5/utils.rb b/lib/sisu/v5/utils.rb
index 8ebc3647..52ca22d0 100644
--- a/lib/sisu/v5/utils.rb
+++ b/lib/sisu/v5/utils.rb
@@ -151,6 +151,7 @@ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark({ m: %{
}}) if t_o=~/^```/m
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark(%{ code: #{@@flag['code']}, open --> "#{t_o}" }) \
if t_o=~/^```/m
+SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:green).mark("open -->")
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark("open -->",:green)
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:green,"open -->")
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark("open -->")