aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/current/hub_actions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/current/hub_actions.rb')
-rw-r--r--lib/sisu/current/hub_actions.rb192
1 files changed, 158 insertions, 34 deletions
diff --git a/lib/sisu/current/hub_actions.rb b/lib/sisu/current/hub_actions.rb
index 8878855d..1ea67bf4 100644
--- a/lib/sisu/current/hub_actions.rb
+++ b/lib/sisu/current/hub_actions.rb
@@ -56,6 +56,8 @@
=end
module SiSU_Hub_Actions
class HubActions
+ require_relative 'utils_composite' # utils_composite.rb
+ include SiSU_Composite_Doc_Utils # composite doc, .ssm, extract all related insert files, array of filenames test
def initialize(opt)
@opt=opt
end
@@ -65,6 +67,17 @@ module SiSU_Hub_Actions
SiSU_Env::InfoAbout.new(@opt).sisu_version
end
end
+ def version_number_git?
+ if @opt.act[:version_info][:set]==:on \
+ || @opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ ' ' + SiSU_is.git_version_info?
+ ).grey
+ end
+ end
def version_dir?
if @opt.act[:version_info][:set]==:on \
|| @opt.act[:verbose][:set]==:on \
@@ -76,6 +89,25 @@ module SiSU_Hub_Actions
).grey
end
end
+ def version_info_extra?
+ if @opt.act[:version_info][:set]==:on \
+ || @opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on
+ if SiSU_is.git_version_info?
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ ' ' + File.dirname(__FILE__) + \
+ ' vcr: ' + SiSU_is.git_version_info?
+ ).grey
+ else
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ ' ' + File.dirname(__FILE__)
+ ).grey
+ end
+ end
+ end
self
end
def prepare
@@ -156,7 +188,7 @@ module SiSU_Hub_Actions
def abstract_objects?
if @opt.act[:ao][:set]==:on #% --ao --dal, -m
if @opt.f_pths.length > 0
- unless @opt.act[:po4a][:set]==:on # --po4a, -P
+ unless @opt.act[:po4a_shelf][:set]==:on # --po4a-shelf
if @opt.fno =~ /\.ssm$/
require_relative 'ao_composite' # ao_composite.rb #pre-processing
SiSU_Assemble::Composite.new(@opt).read
@@ -278,6 +310,20 @@ module SiSU_Hub_Actions
end
end
end
+ if @opt.act[:txt_orgmode][:set]==:on #% --orgmode
+ if @opt.f_pths.length > 0
+ require_relative 'txt_orgmode' # txt_orgmode.rb
+ SiSU_Txt_OrgMode::Source.new(@opt).read
+ else
+ msg='orgmode request requires sisu markup files'
+ if (@opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
+ mark(msg)
+ else puts msg
+ end
+ end
+ end
end
def html?
if @opt.act[:html][:set]==:on #% --html, -h
@@ -532,15 +578,51 @@ module SiSU_Hub_Actions
end
end
end
+ def po4a_make?
+ if @opt.act[:po4a_sst_ao_sst][:set]==:on #% --po4a-ao
+ if @opt.f_pths.length > 0
+ require_relative 'src_po4a_sst_ao_sst'
+ SiSU_SStm_AO_SStm::Source.new(@opt).read_process_src_files # src_po4a_sst_ao_sst.rb
+ else
+ msg='sst request requires sisu markup files'
+ if (@opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
+ mark(msg)
+ else puts msg
+ end
+ end
+ end
+ end
+ def elasticsearch?
+ if @opt.act[:elasticsearch][:set]==:on #% --elastic, -x
+ if @opt.f_pths.length > 0
+ require_relative 'json_elastic' # json_elastic.rb
+ SiSU_Elastic::Source.new(@opt).read
+ else
+ msg='easticsearch request requires sisu markup files'
+ if (@opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
+ mark(msg)
+ else puts msg
+ end
+ end
+ end
+ end
def manifest?
if @opt.act[:manifest][:set]==:on #% --manifest, -y
if @opt.f_pths.length > 0
- require_relative 'html_manifest' # html_manifest.rb
- ((@opt.act[:sisupod][:set]==:on \
- || @opt.act[:share_source][:set]==:on) \
- && @opt.f_pths.length < 2 ) \
- ? nil
- : SiSU_Manifest::Source.new(@opt).read
+ begin
+ require_relative 'html_manifest' # html_manifest.rb
+ ((@opt.act[:sisupod][:set]==:on \
+ || @opt.act[:share_source][:set]==:on \
+ || @opt.act[:po4a_sstm][:set]==:on) \
+ && @opt.f_pths.length < 2 ) \
+ ? nil
+ : SiSU_Manifest::Source.new(@opt).read
+ rescue
+ end
else
msg='manifest request requires sisu markup files'
if (@opt.act[:verbose_plus][:set]==:on \
@@ -572,8 +654,9 @@ module SiSU_Hub_Actions
end
def loop_files
def share_source?
- if @opt.act[:share_source][:set]==:on \
- or @opt.act[:sisupod][:set]==:on \
+ if @opt.act[:sisupod][:set]==:on \
+ or @opt.act[:share_source][:set]==:on \
+ or @opt.act[:po4a_sstm][:set]==:on \
or @opt.act[:git][:set]==:on
begin
if @opt.f_pths.length > 0
@@ -591,26 +674,6 @@ module SiSU_Hub_Actions
else puts msg
end
end
- if @opt.act[:share_source][:set]==:on
- if @opt.f_pths.length > 0
- require_relative 'src_share' # src_share.rb
- begin
- ensure
- SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
- loop_files_on_given_option_bundle do
- SiSU_Markup::Source.new(@opt).read
- end
- end
- else
- msg='share markup source request requires sisu markup files'
- if (@opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on)
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
- mark(msg)
- else puts msg
- end
- end
- end
if @opt.act[:sisupod][:set]==:on #% --sisupod, -S
if @opt.f_pths.length > 0
require_relative 'src_sisupod_make' # src_sisupod_make.rb
@@ -656,7 +719,8 @@ module SiSU_Hub_Actions
end
end
if (@opt.act[:sisupod][:set]==:on \
- || @opt.act[:share_source][:set]==:on) \
+ || @opt.act[:share_source][:set]==:on \
+ || @opt.act[:po4a_sstm][:set]==:on) \
and @opt.act[:manifest][:set]==:on #% --manifest, -y
if @opt.f_pths.length > 0
require_relative 'html_manifest' # html_manifest.rb
@@ -691,18 +755,78 @@ module SiSU_Hub_Actions
end
end
end
- if @opt.act[:po4a][:set]==:on #% --po4a, -P
+ if @opt.act[:share_source][:set]==:on
+ if @opt.f_pths.length > 0
+ require_relative 'src_sisupod_sstm' # src_sisupod_sstm.rb
+ begin
+ ensure
+ SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
+ loop_files_on_given_option_bundle do
+ SiSU_Markup::Source_Sisupod.new(@opt).read
+ end
+ end
+ else
+ msg='share markup source request requires sisu markup files'
+ if (@opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
+ mark(msg)
+ else puts msg
+ end
+ end
+ end
+ if @opt.act[:po4a_sstm][:set]==:on #% --po4a-sst
+ if @opt.f_pths.length > 0
+ require_relative 'src_po4a_sstm'
+ begin
+ SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
+ loop_files_on_given_option do
+ SiSU_Markup::Source_Po4a.new(@opt).read # src_po4a_sstm.rb
+ end
+ ensure
+ end
+ else
+ msg='sst request requires sisu markup files'
+ if (@opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
+ mark(msg)
+ else puts msg
+ end
+ end
+ end
+ if @opt.act[:po4a_sst_ao_sst][:set]==:on #% --po4a-ao
+ if @opt.f_pths.length > 0
+ require_relative 'src_po4a_sst_ao_sst'
+ begin
+ SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
+ loop_files_on_given_option do
+ SiSU_SStm_AO_SStm::Source.new(@opt).read_setup # src_po4a_sst_ao_sst.rb
+ end
+ ensure
+ end
+ else
+ msg='sst request requires sisu markup files'
+ if (@opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
+ mark(msg)
+ else puts msg
+ end
+ end
+ end
+ if @opt.act[:po4a_shelf][:set]==:on #% --po4a-shelf
if @opt.f_pths.length > 0
- require_relative 'po4a'
+ require_relative 'src_po4a_shelf'
begin
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
loop_files_on_given_option do
- SiSU_Po4a::Source.new(@opt).read # po4a.rb
+ SiSU_Po4a::Source.new(@opt).read # src_po4a_shelf.rb
end
ensure
end
else
- msg='po4a request requires sisu markup files'
+ msg='src_po4a_shelf request requires sisu markup files'
if (@opt.act[:verbose_plus][:set]==:on \
|| @opt.act[:maintenance][:set]==:on)
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).