sisu 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bin/sisu +367 -0
- data/bin/sisugem +367 -0
- data/data/sisu/image/arrow_next_red.png +0 -0
- data/data/sisu/image/arrow_prev_red.png +0 -0
- data/data/sisu/image/arrow_up_red.png +0 -0
- data/data/sisu/image/b_bluebell.png +0 -0
- data/data/sisu/image/b_doc.png +0 -0
- data/data/sisu/image/b_epub.png +0 -0
- data/data/sisu/image/b_home.png +0 -0
- data/data/sisu/image/b_info.png +0 -0
- data/data/sisu/image/b_odf.png +0 -0
- data/data/sisu/image/b_pdf.png +0 -0
- data/data/sisu/image/b_search.png +0 -0
- data/data/sisu/image/b_toc.png +0 -0
- data/data/sisu/image/bullet_08.png +0 -0
- data/data/sisu/image/bullet_09.png +0 -0
- data/data/sisu/image/bullet_10.png +0 -0
- data/data/sisu/image/bullet_11.png +0 -0
- data/data/sisu/image/bullet_12.png +0 -0
- data/data/sisu/image/bullet_doc.png +0 -0
- data/data/sisu/image/bullet_red.png +0 -0
- data/data/sisu/image/dot_clear.png +0 -0
- data/data/sisu/image/dot_white.png +0 -0
- data/data/sisu/image/gplv3.png +0 -0
- data/data/sisu/image/gplv3_free_software.png +0 -0
- data/data/sisu/image/next.png +0 -0
- data/data/sisu/image/previous.png +0 -0
- data/data/sisu/image/rb7.ico +0 -0
- data/data/sisu/image/sisu.png +0 -0
- data/data/sisu/image/toctoc.png +0 -0
- data/data/sisu/version.yml +5 -0
- data/lib/sisu.rb +94 -0
- data/lib/sisu/air.rb +80 -0
- data/lib/sisu/ao.rb +590 -0
- data/lib/sisu/ao_character_check.rb +102 -0
- data/lib/sisu/ao_composite.rb +286 -0
- data/lib/sisu/ao_doc_objects.rb +565 -0
- data/lib/sisu/ao_doc_str.rb +2269 -0
- data/lib/sisu/ao_endnotes.rb +136 -0
- data/lib/sisu/ao_expand_insertions.rb +514 -0
- data/lib/sisu/ao_hash_digest.rb +174 -0
- data/lib/sisu/ao_idx.rb +422 -0
- data/lib/sisu/ao_images.rb +187 -0
- data/lib/sisu/ao_metadata.rb +86 -0
- data/lib/sisu/ao_misc_arrange.rb +207 -0
- data/lib/sisu/ao_numbering.rb +720 -0
- data/lib/sisu/ao_persist.rb +194 -0
- data/lib/sisu/ao_references.rb +502 -0
- data/lib/sisu/ao_syntax.rb +640 -0
- data/lib/sisu/cgi.rb +84 -0
- data/lib/sisu/cgi_pgsql.rb +270 -0
- data/lib/sisu/cgi_sql_common.rb +986 -0
- data/lib/sisu/cgi_sqlite.rb +244 -0
- data/lib/sisu/conf.rb +287 -0
- data/lib/sisu/constants.rb +388 -0
- data/lib/sisu/css.rb +3484 -0
- data/lib/sisu/db_columns.rb +1997 -0
- data/lib/sisu/db_create.rb +689 -0
- data/lib/sisu/db_dbi.rb +90 -0
- data/lib/sisu/db_drop.rb +207 -0
- data/lib/sisu/db_import.rb +877 -0
- data/lib/sisu/db_indexes.rb +146 -0
- data/lib/sisu/db_load_tuple.rb +323 -0
- data/lib/sisu/db_remove.rb +182 -0
- data/lib/sisu/db_select.rb +230 -0
- data/lib/sisu/db_sqltxt.rb +173 -0
- data/lib/sisu/db_tests.rb +114 -0
- data/lib/sisu/dbi.rb +166 -0
- data/lib/sisu/dbi_discrete.rb +206 -0
- data/lib/sisu/digests.rb +306 -0
- data/lib/sisu/dp.rb +1606 -0
- data/lib/sisu/dp_identify_markup.rb +161 -0
- data/lib/sisu/dp_make.rb +668 -0
- data/lib/sisu/embedded.rb +149 -0
- data/lib/sisu/errors.rb +84 -0
- data/lib/sisu/generic_parts.rb +131 -0
- data/lib/sisu/git.rb +277 -0
- data/lib/sisu/html.rb +775 -0
- data/lib/sisu/html_concordance.rb +391 -0
- data/lib/sisu/html_format.rb +1348 -0
- data/lib/sisu/html_harvest.rb +109 -0
- data/lib/sisu/html_harvest_author_format.rb +111 -0
- data/lib/sisu/html_harvest_authors.rb +466 -0
- data/lib/sisu/html_harvest_topics.rb +893 -0
- data/lib/sisu/html_lite_shared.rb +324 -0
- data/lib/sisu/html_manifest.rb +1032 -0
- data/lib/sisu/html_minitoc.rb +230 -0
- data/lib/sisu/html_parts.rb +437 -0
- data/lib/sisu/html_persist.rb +237 -0
- data/lib/sisu/html_promo.rb +440 -0
- data/lib/sisu/html_scroll.rb +235 -0
- data/lib/sisu/html_segments.rb +716 -0
- data/lib/sisu/html_shared.rb +62 -0
- data/lib/sisu/html_table.rb +64 -0
- data/lib/sisu/html_tune.rb +301 -0
- data/lib/sisu/hub.rb +277 -0
- data/lib/sisu/hub_actions.rb +1122 -0
- data/lib/sisu/hub_loop_markup_files.rb +170 -0
- data/lib/sisu/hub_options.rb +1695 -0
- data/lib/sisu/i18n.rb +702 -0
- data/lib/sisu/manpage.rb +377 -0
- data/lib/sisu/manpage_format.rb +85 -0
- data/lib/sisu/object_munge.rb +307 -0
- data/lib/sisu/prog_text_translation.rb +1702 -0
- data/lib/sisu/qrcode.rb +754 -0
- data/lib/sisu/relaxng.rb +1153 -0
- data/lib/sisu/remote.rb +246 -0
- data/lib/sisu/rexml.rb +148 -0
- data/lib/sisu/se.rb +158 -0
- data/lib/sisu/se_cleanoutput.rb +145 -0
- data/lib/sisu/se_clear.rb +105 -0
- data/lib/sisu/se_createsite.rb +273 -0
- data/lib/sisu/se_css.rb +221 -0
- data/lib/sisu/se_date.rb +92 -0
- data/lib/sisu/se_db.rb +214 -0
- data/lib/sisu/se_envcall.rb +326 -0
- data/lib/sisu/se_file_op.rb +2758 -0
- data/lib/sisu/se_filemap.rb +247 -0
- data/lib/sisu/se_get_init.rb +238 -0
- data/lib/sisu/se_hub_particulars.rb +234 -0
- data/lib/sisu/se_info_env.rb +2179 -0
- data/lib/sisu/se_info_port.rb +70 -0
- data/lib/sisu/se_info_system.rb +202 -0
- data/lib/sisu/se_load.rb +108 -0
- data/lib/sisu/se_processing.rb +659 -0
- data/lib/sisu/se_programs.rb +394 -0
- data/lib/sisu/se_remotes.rb +553 -0
- data/lib/sisu/se_standardise_lang.rb +176 -0
- data/lib/sisu/se_version.rb +174 -0
- data/lib/sisu/shared_images.rb +137 -0
- data/lib/sisu/shared_markup_alt.rb +336 -0
- data/lib/sisu/shared_metadata.rb +1361 -0
- data/lib/sisu/shared_sem.rb +156 -0
- data/lib/sisu/sisu_thor_lib.rb +407 -0
- data/lib/sisu/sitemaps.rb +224 -0
- data/lib/sisu/src_kdissert_share.rb +102 -0
- data/lib/sisu/src_po4a_share.rb +309 -0
- data/lib/sisu/src_po4a_shelf.rb +1217 -0
- data/lib/sisu/src_po4a_shelf_set.rb +297 -0
- data/lib/sisu/src_po4a_sst_ao_sst.rb +893 -0
- data/lib/sisu/src_po4a_sst_ao_sst_set.rb +284 -0
- data/lib/sisu/src_po4a_sstm.rb +135 -0
- data/lib/sisu/src_shared.rb +347 -0
- data/lib/sisu/src_sisupod_make.rb +171 -0
- data/lib/sisu/src_sisupod_sstm.rb +109 -0
- data/lib/sisu/sst_convert_markup.rb +323 -0
- data/lib/sisu/sst_do_inline_footnotes.rb +440 -0
- data/lib/sisu/sst_from_xml.rb +178 -0
- data/lib/sisu/sst_identify_markup.rb +482 -0
- data/lib/sisu/sst_to_s_xml_sax.rb +471 -0
- data/lib/sisu/termsheet.rb +163 -0
- data/lib/sisu/texinfo.rb +430 -0
- data/lib/sisu/texinfo_format.rb +541 -0
- data/lib/sisu/texpdf.rb +1162 -0
- data/lib/sisu/texpdf_format.rb +1689 -0
- data/lib/sisu/texpdf_parts.rb +235 -0
- data/lib/sisu/txt_asciidoc.rb +354 -0
- data/lib/sisu/txt_asciidoc_decorate.rb +207 -0
- data/lib/sisu/txt_markdown.rb +389 -0
- data/lib/sisu/txt_markdown_decorate.rb +207 -0
- data/lib/sisu/txt_orgmode.rb +376 -0
- data/lib/sisu/txt_orgmode_decorate.rb +186 -0
- data/lib/sisu/txt_output.rb +86 -0
- data/lib/sisu/txt_plain.rb +410 -0
- data/lib/sisu/txt_plain_decorate.rb +189 -0
- data/lib/sisu/txt_read.rb +109 -0
- data/lib/sisu/txt_rst.rb +371 -0
- data/lib/sisu/txt_rst_decorate.rb +186 -0
- data/lib/sisu/txt_shared.rb +241 -0
- data/lib/sisu/txt_textile.rb +367 -0
- data/lib/sisu/txt_textile_decorate.rb +186 -0
- data/lib/sisu/update.rb +141 -0
- data/lib/sisu/urls.rb +696 -0
- data/lib/sisu/utils.rb +232 -0
- data/lib/sisu/utils_composite.rb +115 -0
- data/lib/sisu/utils_response.rb +114 -0
- data/lib/sisu/utils_screen_text_color.rb +472 -0
- data/lib/sisu/utils_spell.rb +99 -0
- data/lib/sisu/webrick.rb +191 -0
- data/lib/sisu/wikispeak.rb +375 -0
- data/lib/sisu/xhtml.rb +472 -0
- data/lib/sisu/xhtml_epub2.rb +890 -0
- data/lib/sisu/xhtml_epub2_concordance.rb +322 -0
- data/lib/sisu/xhtml_epub2_format.rb +2272 -0
- data/lib/sisu/xhtml_epub2_persist.rb +278 -0
- data/lib/sisu/xhtml_epub2_segments.rb +599 -0
- data/lib/sisu/xhtml_epub2_tune.rb +330 -0
- data/lib/sisu/xhtml_parts.rb +183 -0
- data/lib/sisu/xhtml_shared.rb +62 -0
- data/lib/sisu/xhtml_table.rb +97 -0
- data/lib/sisu/xml_docbook5.rb +376 -0
- data/lib/sisu/xml_dom.rb +624 -0
- data/lib/sisu/xml_fictionbook2.rb +389 -0
- data/lib/sisu/xml_format.rb +865 -0
- data/lib/sisu/xml_md_oai_pmh_dc.rb +229 -0
- data/lib/sisu/xml_odf_odt.rb +887 -0
- data/lib/sisu/xml_odf_odt_format.rb +674 -0
- data/lib/sisu/xml_parts.rb +191 -0
- data/lib/sisu/xml_persist.rb +126 -0
- data/lib/sisu/xml_sax.rb +521 -0
- data/lib/sisu/xml_scaffold_structure_collapsed.rb +198 -0
- data/lib/sisu/xml_scaffold_structure_sisu.rb +201 -0
- data/lib/sisu/xml_shared.rb +665 -0
- data/lib/sisu/xml_tables.rb +261 -0
- data/lib/sisu/zap.rb +90 -0
- metadata +251 -0
|
@@ -0,0 +1,1122 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
=begin
|
|
3
|
+
|
|
4
|
+
* Name: SiSU
|
|
5
|
+
|
|
6
|
+
** Description: documents, structuring, processing, publishing, search
|
|
7
|
+
*** hub, perform selected actions
|
|
8
|
+
|
|
9
|
+
** Author: Ralph Amissah
|
|
10
|
+
<ralph@amissah.com>
|
|
11
|
+
<ralph.amissah@gmail.com>
|
|
12
|
+
|
|
13
|
+
** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
|
14
|
+
2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
|
|
15
|
+
All Rights Reserved.
|
|
16
|
+
|
|
17
|
+
** License: GPL 3 or later:
|
|
18
|
+
|
|
19
|
+
SiSU, a framework for document structuring, publishing and search
|
|
20
|
+
|
|
21
|
+
Copyright (C) Ralph Amissah
|
|
22
|
+
|
|
23
|
+
This program is free software: you can redistribute it and/or modify it
|
|
24
|
+
under the terms of the GNU General Public License as published by the Free
|
|
25
|
+
Software Foundation, either version 3 of the License, or (at your option)
|
|
26
|
+
any later version.
|
|
27
|
+
|
|
28
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
29
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
30
|
+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
31
|
+
more details.
|
|
32
|
+
|
|
33
|
+
You should have received a copy of the GNU General Public License along with
|
|
34
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
35
|
+
|
|
36
|
+
If you have Internet connection, the latest version of the GPL should be
|
|
37
|
+
available at these locations:
|
|
38
|
+
<http://www.fsf.org/licensing/licenses/gpl.html>
|
|
39
|
+
<http://www.gnu.org/licenses/gpl.html>
|
|
40
|
+
|
|
41
|
+
<http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
|
|
42
|
+
|
|
43
|
+
** SiSU uses:
|
|
44
|
+
* Standard SiSU markup syntax,
|
|
45
|
+
* Standard SiSU meta-markup syntax, and the
|
|
46
|
+
* Standard SiSU object citation numbering and system
|
|
47
|
+
|
|
48
|
+
** Hompages:
|
|
49
|
+
<http://www.jus.uio.no/sisu>
|
|
50
|
+
<http://www.sisudoc.org>
|
|
51
|
+
|
|
52
|
+
** Git
|
|
53
|
+
<http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
|
|
54
|
+
<http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/hub_actions.rb;hb=HEAD>
|
|
55
|
+
|
|
56
|
+
=end
|
|
57
|
+
module SiSU_Hub_Actions
|
|
58
|
+
class HubActions
|
|
59
|
+
require_relative 'utils_composite' # utils_composite.rb
|
|
60
|
+
include SiSU_Composite_Doc_Utils # composite doc, .ssm, extract all related insert files, array of filenames test
|
|
61
|
+
def initialize(opt)
|
|
62
|
+
@opt=opt
|
|
63
|
+
end
|
|
64
|
+
def report
|
|
65
|
+
def version_info?
|
|
66
|
+
if @opt.act[:version_info][:set]==:on
|
|
67
|
+
SiSU_Env::InfoAbout.new(@opt).sisu_version
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
def version_number_git?
|
|
71
|
+
if @opt.act[:version_info][:set]==:on \
|
|
72
|
+
|| @opt.act[:verbose][:set]==:on \
|
|
73
|
+
|| @opt.act[:verbose_plus][:set]==:on \
|
|
74
|
+
|| @opt.act[:maintenance][:set]==:on
|
|
75
|
+
SiSU_Screen::Ansi.new(
|
|
76
|
+
@opt.act[:color_state][:set],
|
|
77
|
+
' ' + SiSU_is.git_version_info?
|
|
78
|
+
).grey
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
def version_dir?
|
|
82
|
+
if @opt.act[:version_info][:set]==:on \
|
|
83
|
+
|| @opt.act[:verbose][:set]==:on \
|
|
84
|
+
|| @opt.act[:verbose_plus][:set]==:on \
|
|
85
|
+
|| @opt.act[:maintenance][:set]==:on
|
|
86
|
+
SiSU_Screen::Ansi.new(
|
|
87
|
+
@opt.act[:color_state][:set],
|
|
88
|
+
' ' + File.dirname(__FILE__)
|
|
89
|
+
).grey
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
def version_info_extra?
|
|
93
|
+
if @opt.act[:version_info][:set]==:on \
|
|
94
|
+
|| @opt.act[:verbose][:set]==:on \
|
|
95
|
+
|| @opt.act[:verbose_plus][:set]==:on \
|
|
96
|
+
|| @opt.act[:maintenance][:set]==:on
|
|
97
|
+
if SiSU_is.git_version_info?
|
|
98
|
+
SiSU_Screen::Ansi.new(
|
|
99
|
+
@opt.act[:color_state][:set],
|
|
100
|
+
' ' + File.dirname(__FILE__) + \
|
|
101
|
+
' vcr: ' + SiSU_is.git_version_info?
|
|
102
|
+
).grey
|
|
103
|
+
else
|
|
104
|
+
SiSU_Screen::Ansi.new(
|
|
105
|
+
@opt.act[:color_state][:set],
|
|
106
|
+
' ' + File.dirname(__FILE__)
|
|
107
|
+
).grey
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
self
|
|
112
|
+
end
|
|
113
|
+
def prepare
|
|
114
|
+
def site?
|
|
115
|
+
if @opt.act[:site_init][:set]==:on #% --init-site, -C initialize/configure
|
|
116
|
+
require_relative 'conf' #% --init-site, -C initialize/configure
|
|
117
|
+
SiSU_Initialize::Source.new(@opt).read
|
|
118
|
+
if @opt.act[:rsync][:set]==:on
|
|
119
|
+
if @opt.selections.str =~/--init(?:ialize)?=site/ \
|
|
120
|
+
and @opt.selections.str =~/RZ/
|
|
121
|
+
SiSU_Hub_Actions::Operations.new(@opt).remote_put_base_site_rsync_match
|
|
122
|
+
else SiSU_Hub_Actions::Operations.new(@opt).remote_put_base_site_rsync
|
|
123
|
+
end
|
|
124
|
+
elsif @opt.act[:scp][:set]==:on
|
|
125
|
+
if @opt.selections.str =~/--init(?:ialize)?=site/ \
|
|
126
|
+
and @opt.selections.str =~/CCr/
|
|
127
|
+
SiSU_Hub_Actions::Operations.new(@opt).remote_put_base_site_all
|
|
128
|
+
else SiSU_Hub_Actions::Operations.new(@opt).remote_put_base_site
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
def remote_site?
|
|
134
|
+
if @opt.act[:site_init][:set]==:on
|
|
135
|
+
if @opt.act[:site_init][:set]==:on #% --init-site, -C initialize/configure
|
|
136
|
+
#require_relative 'conf' #% --init-site, -C initialize/configure
|
|
137
|
+
#SiSU_Initialize::Source.new(@opt).read
|
|
138
|
+
#if @opt.act[:rsync][:set]==:on
|
|
139
|
+
# if @opt.selections.str =~/--init(?:ialize)?=site/ \
|
|
140
|
+
# and @opt.selection =~/RZ/
|
|
141
|
+
# SiSU_Hub_Actions::Operations.new(@opt).remote_put_base_site_rsync_match
|
|
142
|
+
# else SiSU_Hub_Actions::Operations.new(@opt).remote_put_base_site_rsync
|
|
143
|
+
# end
|
|
144
|
+
#elsif @opt.act[:scp][:set]==:on
|
|
145
|
+
# if @opt.selections.str =~/--init(?:ialize)?=site/ \
|
|
146
|
+
# and @opt.selection =~/CCr/
|
|
147
|
+
# SiSU_Hub_Actions::Operations.new(@opt).remote_put_base_site_all
|
|
148
|
+
# else SiSU_Hub_Actions::Operations.new(@opt).remote_put_base_site
|
|
149
|
+
# end
|
|
150
|
+
#end
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
def sql?
|
|
155
|
+
if @opt.act[:psql_createdb][:set]==:on \
|
|
156
|
+
or @opt.act[:psql_create][:set]==:on \
|
|
157
|
+
or @opt.act[:psql_drop][:set]==:on
|
|
158
|
+
done=:ok
|
|
159
|
+
if @opt.act[:psql][:set]==:on
|
|
160
|
+
require_relative 'dbi'
|
|
161
|
+
SiSU_DBI::SQL.new(@opt).connect
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
if @opt.act[:sqlite_createdb][:set]==:on \
|
|
165
|
+
or @opt.act[:sqlite_create][:set]==:on \
|
|
166
|
+
or @opt.act[:sqlite_drop][:set]==:on
|
|
167
|
+
done=:ok
|
|
168
|
+
if @opt.act[:sqlite][:set]==:on
|
|
169
|
+
require_relative 'dbi'
|
|
170
|
+
SiSU_DBI::SQL.new(@opt).connect
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
def search_form?
|
|
175
|
+
if @opt.act[:sample_search_form][:set]==:on #% --sample-search-form, -F cgi sample search form
|
|
176
|
+
SiSU_Hub_Actions::Operations.new(@opt).cgi
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
def webrick?
|
|
180
|
+
if @opt.act[:webrick][:set]==:on #% --webrick, -W webrick
|
|
181
|
+
SiSU_Hub_Actions::Operations.new(@opt).webrick
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
self
|
|
185
|
+
end
|
|
186
|
+
def outputs
|
|
187
|
+
def each_file
|
|
188
|
+
def abstract_objects?
|
|
189
|
+
if @opt.act[:ao][:set]==:on #% --ao --dal, -m
|
|
190
|
+
if @opt.f_pths.length > 0
|
|
191
|
+
unless @opt.act[:po4a_shelf][:set]==:on # --po4a-shelf
|
|
192
|
+
if @opt.fno =~ /\.ssm$/
|
|
193
|
+
require_relative 'ao_composite' # ao_composite.rb #pre-processing
|
|
194
|
+
SiSU_Assemble::Composite.new(@opt).read
|
|
195
|
+
end
|
|
196
|
+
require_relative 'ao' # ao.rb
|
|
197
|
+
SiSU_AO::Source.new(@opt).read
|
|
198
|
+
end
|
|
199
|
+
else
|
|
200
|
+
msg='document abstraction request requires sisu markup files'
|
|
201
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
202
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
203
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
204
|
+
mark(msg)
|
|
205
|
+
else puts msg
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
def qrcode?
|
|
211
|
+
if @opt.act[:qrcode][:set]==:on #% --qrcode, -Q
|
|
212
|
+
if @opt.f_pths.length > 0
|
|
213
|
+
require_relative 'qrcode' # qrcode.rb
|
|
214
|
+
SiSU_QRcode::Source.new(@opt).read
|
|
215
|
+
else
|
|
216
|
+
msg='qrcode request requires sisu markup files'
|
|
217
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
218
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
219
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
220
|
+
mark(msg)
|
|
221
|
+
else puts msg
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
def hash_digests?
|
|
227
|
+
if @opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree
|
|
228
|
+
if @opt.f_pths.length > 0
|
|
229
|
+
require_relative 'digests' # digests.rb
|
|
230
|
+
SiSU_DigestView::Source.new(@opt).read
|
|
231
|
+
else
|
|
232
|
+
msg='hash digest request requires sisu markup files'
|
|
233
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
234
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
235
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
236
|
+
mark(msg)
|
|
237
|
+
else puts msg
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
def text?
|
|
243
|
+
if @opt.act[:txt][:set]==:on #% --txt, -t -a
|
|
244
|
+
if @opt.f_pths.length > 0
|
|
245
|
+
require_relative 'txt_plain' # txt_plain.rb
|
|
246
|
+
SiSU_Txt_Plain::Source.new(@opt).read
|
|
247
|
+
else
|
|
248
|
+
msg='text request requires sisu markup files'
|
|
249
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
250
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
251
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
252
|
+
mark(msg)
|
|
253
|
+
else puts msg
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
if @opt.act[:txt_textile][:set]==:on #% --textile
|
|
258
|
+
if @opt.f_pths.length > 0
|
|
259
|
+
require_relative 'txt_textile' #txt_textile.rb
|
|
260
|
+
SiSU_Txt_Textile::Source.new(@opt).read
|
|
261
|
+
else
|
|
262
|
+
msg='textile request requires sisu markup files'
|
|
263
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
264
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
265
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
266
|
+
mark(msg)
|
|
267
|
+
else puts msg
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
if @opt.act[:txt_asciidoc][:set]==:on #% --asciidoc
|
|
272
|
+
if @opt.f_pths.length > 0
|
|
273
|
+
require_relative 'txt_asciidoc' # txt_asciidoc.rb
|
|
274
|
+
SiSU_Txt_AsciiDoc::Source.new(@opt).read
|
|
275
|
+
else
|
|
276
|
+
msg='asciidoc request requires sisu markup files'
|
|
277
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
278
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
279
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
280
|
+
mark(msg)
|
|
281
|
+
else puts msg
|
|
282
|
+
end
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
if @opt.act[:txt_markdown][:set]==:on #% --markdown
|
|
286
|
+
if @opt.f_pths.length > 0
|
|
287
|
+
require_relative 'txt_markdown' # txt_markdown.rb
|
|
288
|
+
SiSU_Txt_Markdown::Source.new(@opt).read
|
|
289
|
+
else
|
|
290
|
+
msg='markdown request requires sisu markup files'
|
|
291
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
292
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
293
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
294
|
+
mark(msg)
|
|
295
|
+
else puts msg
|
|
296
|
+
end
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
if @opt.act[:txt_rst][:set]==:on #% --rst, --rest
|
|
300
|
+
if @opt.f_pths.length > 0
|
|
301
|
+
require_relative 'txt_rst' # txt_rst.rb
|
|
302
|
+
SiSU_Txt_rST::Source.new(@opt).read
|
|
303
|
+
else
|
|
304
|
+
msg='rst request requires sisu markup files'
|
|
305
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
306
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
307
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
308
|
+
mark(msg)
|
|
309
|
+
else puts msg
|
|
310
|
+
end
|
|
311
|
+
end
|
|
312
|
+
end
|
|
313
|
+
if @opt.act[:txt_orgmode][:set]==:on #% --orgmode
|
|
314
|
+
if @opt.f_pths.length > 0
|
|
315
|
+
require_relative 'txt_orgmode' # txt_orgmode.rb
|
|
316
|
+
SiSU_Txt_OrgMode::Source.new(@opt).read
|
|
317
|
+
else
|
|
318
|
+
msg='orgmode request requires sisu markup files'
|
|
319
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
320
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
321
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
322
|
+
mark(msg)
|
|
323
|
+
else puts msg
|
|
324
|
+
end
|
|
325
|
+
end
|
|
326
|
+
end
|
|
327
|
+
end
|
|
328
|
+
def html?
|
|
329
|
+
if @opt.act[:html][:set]==:on #% --html, -h
|
|
330
|
+
if @opt.f_pths.length > 0
|
|
331
|
+
require_relative 'html' # html.rb
|
|
332
|
+
SiSU_HTML::Source.new(@opt).read
|
|
333
|
+
else
|
|
334
|
+
msg='html request requires sisu markup files'
|
|
335
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
336
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
337
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
338
|
+
mark(msg)
|
|
339
|
+
else puts msg
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
else
|
|
343
|
+
if @opt.act[:html_seg][:set]==:on #% --html-seg
|
|
344
|
+
if @opt.f_pths.length > 0
|
|
345
|
+
require_relative 'html' # html.rb
|
|
346
|
+
SiSU_HTML::Source.new(@opt).read
|
|
347
|
+
else
|
|
348
|
+
msg='html seg request requires sisu markup files'
|
|
349
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
350
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
351
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
352
|
+
mark(msg)
|
|
353
|
+
else puts msg
|
|
354
|
+
end
|
|
355
|
+
end
|
|
356
|
+
end
|
|
357
|
+
if @opt.act[:html_scroll][:set]==:on #% --html-scroll
|
|
358
|
+
if @opt.f_pths.length > 0
|
|
359
|
+
require_relative 'html' # html.rb
|
|
360
|
+
SiSU_HTML::Source.new(@opt).read
|
|
361
|
+
else
|
|
362
|
+
msg='html scroll request requires sisu markup files'
|
|
363
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
364
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
365
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
366
|
+
mark(msg)
|
|
367
|
+
else puts msg
|
|
368
|
+
end
|
|
369
|
+
end
|
|
370
|
+
end
|
|
371
|
+
end
|
|
372
|
+
if @opt.act[:concordance][:set]==:on #% --concordance, -w
|
|
373
|
+
if @opt.f_pths.length > 0
|
|
374
|
+
require_relative 'html_concordance' # html_concordance.rb
|
|
375
|
+
SiSU_Concordance::Source.new(@opt).read
|
|
376
|
+
else
|
|
377
|
+
msg='concordance request requires sisu markup files'
|
|
378
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
379
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
380
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
381
|
+
mark(msg)
|
|
382
|
+
else puts msg
|
|
383
|
+
end
|
|
384
|
+
end
|
|
385
|
+
end
|
|
386
|
+
end
|
|
387
|
+
def xhtml?
|
|
388
|
+
if @opt.act[:xhtml][:set]==:on #% --xhtml, -b
|
|
389
|
+
if @opt.f_pths.length > 0
|
|
390
|
+
require_relative 'xhtml' # xhtml.rb
|
|
391
|
+
SiSU_XHTML::Source.new(@opt).read
|
|
392
|
+
else
|
|
393
|
+
msg='xhtml request requires sisu markup files'
|
|
394
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
395
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
396
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
397
|
+
mark(msg)
|
|
398
|
+
else puts msg
|
|
399
|
+
end
|
|
400
|
+
end
|
|
401
|
+
end
|
|
402
|
+
if @opt.act[:epub][:set]==:on #% --epub, -e
|
|
403
|
+
if @opt.f_pths.length > 0
|
|
404
|
+
require_relative 'xhtml_epub2' # xhtml_epub2.rb
|
|
405
|
+
SiSU_XHTML_EPUB2::Source.new(@opt).read
|
|
406
|
+
else
|
|
407
|
+
msg='epub request requires sisu markup files'
|
|
408
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
409
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
410
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
411
|
+
mark(msg)
|
|
412
|
+
else puts msg
|
|
413
|
+
end
|
|
414
|
+
end
|
|
415
|
+
end
|
|
416
|
+
end
|
|
417
|
+
def xml?
|
|
418
|
+
if @opt.act[:odt][:set]==:on #% --odt, -o
|
|
419
|
+
if @opt.f_pths.length > 0
|
|
420
|
+
require_relative 'xml_odf_odt' # xml_odf_odt.rb
|
|
421
|
+
SiSU_XML_ODF_ODT::Source.new(@opt).read
|
|
422
|
+
else
|
|
423
|
+
msg='odt request requires sisu markup files'
|
|
424
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
425
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
426
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
427
|
+
mark(msg)
|
|
428
|
+
else puts msg
|
|
429
|
+
end
|
|
430
|
+
end
|
|
431
|
+
end
|
|
432
|
+
if @opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu
|
|
433
|
+
if @opt.f_pths.length > 0
|
|
434
|
+
require_relative 'xml_scaffold_structure_sisu' # xml_scaffold_structure_sisu.rb
|
|
435
|
+
SiSU_XML_Scaffold_Structure_Sisu::Source.new(@opt).read
|
|
436
|
+
else
|
|
437
|
+
msg='xml scaffold request requires sisu markup files'
|
|
438
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
439
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
440
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
441
|
+
mark(msg)
|
|
442
|
+
else puts msg
|
|
443
|
+
end
|
|
444
|
+
end
|
|
445
|
+
end
|
|
446
|
+
if @opt.act[:xml_scaffold_structure_collapse][:set]==:on #% --xml-scaffold-collapse
|
|
447
|
+
if @opt.f_pths.length > 0
|
|
448
|
+
require_relative 'xml_scaffold_structure_collapsed' # xml_scaffold_structure_collapsed.rb
|
|
449
|
+
SiSU_XML_Scaffold_Structure_Collapse::Source.new(@opt).read
|
|
450
|
+
else
|
|
451
|
+
msg='xml scaffold request requires sisu markup files'
|
|
452
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
453
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
454
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
455
|
+
mark(msg)
|
|
456
|
+
else puts msg
|
|
457
|
+
end
|
|
458
|
+
end
|
|
459
|
+
end
|
|
460
|
+
if @opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook
|
|
461
|
+
if @opt.f_pths.length > 0
|
|
462
|
+
require_relative 'xml_docbook5' # xml_docbook5.rb
|
|
463
|
+
SiSU_XML_Docbook_Book::Source.new(@opt).read
|
|
464
|
+
else
|
|
465
|
+
msg='docbook request requires sisu markup files'
|
|
466
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
467
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
468
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
469
|
+
mark(msg)
|
|
470
|
+
else puts msg
|
|
471
|
+
end
|
|
472
|
+
end
|
|
473
|
+
end
|
|
474
|
+
if @opt.act[:xml_fictionbook][:set]==:on #% --xml-fictionbook
|
|
475
|
+
if @opt.f_pths.length > 0
|
|
476
|
+
require_relative 'xml_fictionbook2' # xml_fictionbook2.rb
|
|
477
|
+
SiSU_XML_Fictionbook::Source.new(@opt).read
|
|
478
|
+
else
|
|
479
|
+
msg='fictionbook request requires sisu markup files'
|
|
480
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
481
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
482
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
483
|
+
mark(msg)
|
|
484
|
+
else puts msg
|
|
485
|
+
end
|
|
486
|
+
end
|
|
487
|
+
end
|
|
488
|
+
if @opt.act[:xml_sax][:set]==:on #% --xml-sax, -x
|
|
489
|
+
if @opt.f_pths.length > 0
|
|
490
|
+
require_relative 'xml_sax' # xml_sax.rb
|
|
491
|
+
SiSU_XML_SAX::Source.new(@opt).read
|
|
492
|
+
else
|
|
493
|
+
msg='xml sax request requires sisu markup files'
|
|
494
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
495
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
496
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
497
|
+
mark(msg)
|
|
498
|
+
else puts msg
|
|
499
|
+
end
|
|
500
|
+
end
|
|
501
|
+
end
|
|
502
|
+
if @opt.act[:xml_dom][:set]==:on #% --xml-dom, -X
|
|
503
|
+
if @opt.f_pths.length > 0
|
|
504
|
+
require_relative 'xml_dom' # xml_dom.rb
|
|
505
|
+
SiSU_XML_DOM::Source.new(@opt).read
|
|
506
|
+
else
|
|
507
|
+
msg='xml dom request requires sisu markup files'
|
|
508
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
509
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
510
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
511
|
+
mark(msg)
|
|
512
|
+
else puts msg
|
|
513
|
+
end
|
|
514
|
+
end
|
|
515
|
+
end
|
|
516
|
+
end
|
|
517
|
+
def pdf?
|
|
518
|
+
if @opt.act[:pdf][:set]==:on \
|
|
519
|
+
or @opt.act[:pdf_p][:set]==:on \
|
|
520
|
+
or @opt.act[:pdf_l][:set]==:on #% --pdf-l --pdf, -p
|
|
521
|
+
if @opt.f_pths.length > 0
|
|
522
|
+
require_relative 'texpdf' # texpdf.rb
|
|
523
|
+
SiSU_TeX::Source.new(@opt).read
|
|
524
|
+
else
|
|
525
|
+
msg='pdf request requires sisu markup files'
|
|
526
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
527
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
528
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
529
|
+
mark(msg)
|
|
530
|
+
else puts msg
|
|
531
|
+
end
|
|
532
|
+
end
|
|
533
|
+
end
|
|
534
|
+
end
|
|
535
|
+
def man_or_info?
|
|
536
|
+
if @opt.act[:manpage][:set]==:on #% --manpage, -i
|
|
537
|
+
if @opt.f_pths.length > 0
|
|
538
|
+
require_relative 'manpage' # manpage.rb
|
|
539
|
+
SiSU_Manpage::Source.new(@opt).read
|
|
540
|
+
else
|
|
541
|
+
msg='manpage request requires sisu markup files'
|
|
542
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
543
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
544
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
545
|
+
mark(msg)
|
|
546
|
+
else puts msg
|
|
547
|
+
end
|
|
548
|
+
end
|
|
549
|
+
end
|
|
550
|
+
if @opt.act[:texinfo][:set]==:on #% --texinfo, -I
|
|
551
|
+
if @opt.f_pths.length > 0
|
|
552
|
+
require_relative 'texinfo' # texinfo.rb
|
|
553
|
+
SiSU_TexInfo::Source.new(@opt).read
|
|
554
|
+
else
|
|
555
|
+
msg='texinfo request requires sisu markup files'
|
|
556
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
557
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
558
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
559
|
+
mark(msg)
|
|
560
|
+
else puts msg
|
|
561
|
+
end
|
|
562
|
+
end
|
|
563
|
+
end
|
|
564
|
+
end
|
|
565
|
+
def sqlite_discrete?
|
|
566
|
+
if @opt.act[:sqlite_discrete][:set]==:on #% --sqlite, -d
|
|
567
|
+
if @opt.f_pths.length > 0
|
|
568
|
+
require_relative 'dbi_discrete' # dbi_discrete.rb
|
|
569
|
+
SiSU_DBI_Discrete::SQL.new(@opt).build
|
|
570
|
+
else
|
|
571
|
+
msg='sqlite (discrete) request requires sisu markup files'
|
|
572
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
573
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
574
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
575
|
+
mark(msg)
|
|
576
|
+
else puts msg
|
|
577
|
+
end
|
|
578
|
+
end
|
|
579
|
+
end
|
|
580
|
+
end
|
|
581
|
+
def po4a_make?
|
|
582
|
+
if @opt.act[:po4a_sst_ao_sst][:set]==:on #% --po4a-ao
|
|
583
|
+
if @opt.f_pths.length > 0
|
|
584
|
+
require_relative 'src_po4a_sst_ao_sst'
|
|
585
|
+
SiSU_SStm_AO_SStm::Source.new(@opt).read_process_src_files # src_po4a_sst_ao_sst.rb
|
|
586
|
+
else
|
|
587
|
+
msg='sst request requires sisu markup files'
|
|
588
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
589
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
590
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
591
|
+
mark(msg)
|
|
592
|
+
else puts msg
|
|
593
|
+
end
|
|
594
|
+
end
|
|
595
|
+
end
|
|
596
|
+
end
|
|
597
|
+
def elasticsearch?
|
|
598
|
+
if @opt.act[:elasticsearch][:set]==:on #% --elastic, -x
|
|
599
|
+
if @opt.f_pths.length > 0
|
|
600
|
+
require_relative 'json_elastic' # json_elastic.rb
|
|
601
|
+
SiSU_Elastic::Source.new(@opt).read
|
|
602
|
+
else
|
|
603
|
+
msg='easticsearch request requires sisu markup files'
|
|
604
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
605
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
606
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
607
|
+
mark(msg)
|
|
608
|
+
else puts msg
|
|
609
|
+
end
|
|
610
|
+
end
|
|
611
|
+
end
|
|
612
|
+
end
|
|
613
|
+
def manifest?
|
|
614
|
+
if @opt.act[:manifest][:set]==:on #% --manifest, -y
|
|
615
|
+
if @opt.f_pths.length > 0
|
|
616
|
+
begin
|
|
617
|
+
require_relative 'html_manifest' # html_manifest.rb
|
|
618
|
+
((@opt.act[:sisupod][:set]==:on \
|
|
619
|
+
|| @opt.act[:share_source][:set]==:on \
|
|
620
|
+
|| @opt.act[:po4a_sstm][:set]==:on) \
|
|
621
|
+
&& @opt.f_pths.length < 2 ) \
|
|
622
|
+
? nil
|
|
623
|
+
: SiSU_Manifest::Source.new(@opt).read
|
|
624
|
+
rescue
|
|
625
|
+
end
|
|
626
|
+
else
|
|
627
|
+
msg='manifest request requires sisu markup files'
|
|
628
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
629
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
630
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
631
|
+
mark(msg)
|
|
632
|
+
else puts msg
|
|
633
|
+
end
|
|
634
|
+
end
|
|
635
|
+
end
|
|
636
|
+
end
|
|
637
|
+
def harvest?
|
|
638
|
+
if @opt.act[:harvest][:set]==:on #% --harvest
|
|
639
|
+
if @opt.f_pths.length > 0
|
|
640
|
+
require_relative 'html_harvest' # html_harvest.rb
|
|
641
|
+
SiSU_Harvest::Source.new(@opt).read
|
|
642
|
+
else
|
|
643
|
+
msg='harvest request requires sisu markup files'
|
|
644
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
645
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
646
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
|
|
647
|
+
mark(msg)
|
|
648
|
+
else puts msg
|
|
649
|
+
end
|
|
650
|
+
end
|
|
651
|
+
end
|
|
652
|
+
end
|
|
653
|
+
self
|
|
654
|
+
end
|
|
655
|
+
def loop_files
|
|
656
|
+
def share_source?
|
|
657
|
+
if @opt.act[:sisupod][:set]==:on \
|
|
658
|
+
or @opt.act[:share_source][:set]==:on \
|
|
659
|
+
or @opt.act[:po4a_sstm][:set]==:on \
|
|
660
|
+
or @opt.act[:git][:set]==:on
|
|
661
|
+
begin
|
|
662
|
+
if @opt.f_pths.length > 0
|
|
663
|
+
require_relative 'src_shared'
|
|
664
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
665
|
+
loop_files_on_given_option do
|
|
666
|
+
SiSU_Source::SiSUpodSource.new(@opt).read
|
|
667
|
+
end
|
|
668
|
+
else
|
|
669
|
+
msg='share markup source request requires sisu markup files'
|
|
670
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
671
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
672
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
673
|
+
mark(msg)
|
|
674
|
+
else puts msg
|
|
675
|
+
end
|
|
676
|
+
end
|
|
677
|
+
if @opt.act[:sisupod][:set]==:on #% --sisupod, -S
|
|
678
|
+
if @opt.f_pths.length > 0
|
|
679
|
+
require_relative 'src_sisupod_make' # src_sisupod_make.rb
|
|
680
|
+
begin
|
|
681
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
682
|
+
loop_files_on_given_option_bundle do
|
|
683
|
+
SiSU_Doc::Source.new(@opt).sisupod_tar_xz
|
|
684
|
+
end
|
|
685
|
+
ensure
|
|
686
|
+
end
|
|
687
|
+
else
|
|
688
|
+
msg='sisupod (share markup source) request requires sisu markup files'
|
|
689
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
690
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
691
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
692
|
+
mark(msg)
|
|
693
|
+
else puts msg
|
|
694
|
+
end
|
|
695
|
+
end
|
|
696
|
+
end
|
|
697
|
+
if @opt.act[:git][:set]==:on #% --git, -g
|
|
698
|
+
if @opt.f_pths.length > 0
|
|
699
|
+
require_relative 'git' # git.rb
|
|
700
|
+
begin
|
|
701
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
702
|
+
loop_files_on_given_option do
|
|
703
|
+
SiSU_Git::Source.new(@opt).read
|
|
704
|
+
end
|
|
705
|
+
ensure
|
|
706
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
707
|
+
loop_files_on_given_option_bundle do
|
|
708
|
+
SiSU_Git::Source.new(@opt).git_commit
|
|
709
|
+
end
|
|
710
|
+
end
|
|
711
|
+
else
|
|
712
|
+
msg='git request requires sisu markup files'
|
|
713
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
714
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
715
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
716
|
+
mark(msg)
|
|
717
|
+
else puts msg
|
|
718
|
+
end
|
|
719
|
+
end
|
|
720
|
+
end
|
|
721
|
+
if (@opt.act[:sisupod][:set]==:on \
|
|
722
|
+
|| @opt.act[:share_source][:set]==:on \
|
|
723
|
+
|| @opt.act[:po4a_sstm][:set]==:on) \
|
|
724
|
+
and @opt.act[:manifest][:set]==:on #% --manifest, -y
|
|
725
|
+
if @opt.f_pths.length > 0
|
|
726
|
+
require_relative 'html_manifest' # html_manifest.rb
|
|
727
|
+
begin
|
|
728
|
+
ensure
|
|
729
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
730
|
+
loop_files_on_given_option_bundle do
|
|
731
|
+
SiSU_Manifest::Source.new(@opt).read
|
|
732
|
+
end
|
|
733
|
+
end
|
|
734
|
+
else
|
|
735
|
+
msg='manifest request requires sisu markup files'
|
|
736
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
737
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
738
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
739
|
+
mark(msg)
|
|
740
|
+
else puts msg
|
|
741
|
+
end
|
|
742
|
+
end
|
|
743
|
+
end
|
|
744
|
+
ensure
|
|
745
|
+
if @opt.f_pths.length > 0
|
|
746
|
+
env=SiSU_Env::InfoEnv.new(@opt.fns)
|
|
747
|
+
path_pod=env.processing_path.processing_sisupod(@opt).paths
|
|
748
|
+
unless @opt.act[:maintenance][:set]==:on
|
|
749
|
+
FileUtils::rm_rf("#{path_pod[:sisupod]}/*") \
|
|
750
|
+
if FileTest.directory?(path_pod[:sisupod])
|
|
751
|
+
end
|
|
752
|
+
else
|
|
753
|
+
#SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
754
|
+
# mark('*** request requires sisu markup files')
|
|
755
|
+
end
|
|
756
|
+
end
|
|
757
|
+
end
|
|
758
|
+
if @opt.act[:share_source][:set]==:on
|
|
759
|
+
if @opt.f_pths.length > 0
|
|
760
|
+
require_relative 'src_sisupod_sstm' # src_sisupod_sstm.rb
|
|
761
|
+
begin
|
|
762
|
+
ensure
|
|
763
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
764
|
+
loop_files_on_given_option_bundle do
|
|
765
|
+
SiSU_Markup::Source_Sisupod.new(@opt).read
|
|
766
|
+
end
|
|
767
|
+
end
|
|
768
|
+
else
|
|
769
|
+
msg='share markup source request requires sisu markup files'
|
|
770
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
771
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
772
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
773
|
+
mark(msg)
|
|
774
|
+
else puts msg
|
|
775
|
+
end
|
|
776
|
+
end
|
|
777
|
+
end
|
|
778
|
+
if @opt.act[:po4a_sstm][:set]==:on #% --po4a-sst
|
|
779
|
+
if @opt.f_pths.length > 0
|
|
780
|
+
require_relative 'src_po4a_sstm'
|
|
781
|
+
begin
|
|
782
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
783
|
+
loop_files_on_given_option do
|
|
784
|
+
SiSU_Markup::Source_Po4a.new(@opt).read # src_po4a_sstm.rb
|
|
785
|
+
end
|
|
786
|
+
ensure
|
|
787
|
+
end
|
|
788
|
+
else
|
|
789
|
+
msg='sst request requires sisu markup files'
|
|
790
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
791
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
792
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
793
|
+
mark(msg)
|
|
794
|
+
else puts msg
|
|
795
|
+
end
|
|
796
|
+
end
|
|
797
|
+
end
|
|
798
|
+
if @opt.act[:po4a_sst_ao_sst][:set]==:on #% --po4a-ao
|
|
799
|
+
if @opt.f_pths.length > 0
|
|
800
|
+
require_relative 'src_po4a_sst_ao_sst'
|
|
801
|
+
begin
|
|
802
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
803
|
+
loop_files_on_given_option do
|
|
804
|
+
SiSU_SStm_AO_SStm::Source.new(@opt).read_setup # src_po4a_sst_ao_sst.rb
|
|
805
|
+
end
|
|
806
|
+
ensure
|
|
807
|
+
end
|
|
808
|
+
else
|
|
809
|
+
msg='sst request requires sisu markup files'
|
|
810
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
811
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
812
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
813
|
+
mark(msg)
|
|
814
|
+
else puts msg
|
|
815
|
+
end
|
|
816
|
+
end
|
|
817
|
+
end
|
|
818
|
+
if @opt.act[:po4a_shelf][:set]==:on #% --po4a-shelf
|
|
819
|
+
if @opt.f_pths.length > 0
|
|
820
|
+
require_relative 'src_po4a_shelf'
|
|
821
|
+
begin
|
|
822
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
823
|
+
loop_files_on_given_option do
|
|
824
|
+
SiSU_Po4a::Source.new(@opt).read # src_po4a_shelf.rb
|
|
825
|
+
end
|
|
826
|
+
ensure
|
|
827
|
+
end
|
|
828
|
+
else
|
|
829
|
+
msg='src_po4a_shelf request requires sisu markup files'
|
|
830
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
831
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
832
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
833
|
+
mark(msg)
|
|
834
|
+
else puts msg
|
|
835
|
+
end
|
|
836
|
+
end
|
|
837
|
+
end
|
|
838
|
+
if @opt.act[:images][:set]==:on #% --images, -j
|
|
839
|
+
if @opt.f_pths.length > 0
|
|
840
|
+
require_relative 'shared_images'
|
|
841
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
842
|
+
loop_files_on_given_option do
|
|
843
|
+
SiSU_Images::Source.new(@opt).read # shared_images.rb
|
|
844
|
+
end
|
|
845
|
+
else
|
|
846
|
+
msg='place images request requires sisu markup files'
|
|
847
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
848
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
849
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
850
|
+
mark(msg)
|
|
851
|
+
else puts msg
|
|
852
|
+
end
|
|
853
|
+
end
|
|
854
|
+
end
|
|
855
|
+
end
|
|
856
|
+
def run_termsheet? #broken, revisit later
|
|
857
|
+
if @opt.selections.str =~/--termsheet/ #% -T termsheet/standard form #fix later
|
|
858
|
+
if @opt.f_pths.length > 0
|
|
859
|
+
@opt.files.each do |fns|
|
|
860
|
+
if FileTest.file?(fns)
|
|
861
|
+
@opt.fns=fns
|
|
862
|
+
case @opt.fns
|
|
863
|
+
when /\.(termsheet.rb)$/
|
|
864
|
+
SiSU_Hub_Actions::Operations.new(@opt).termsheet
|
|
865
|
+
else #print "not processed --> ", fns, "\n"
|
|
866
|
+
end
|
|
867
|
+
else SiSU_Hub_Actions::Operations.new(@opt).not_found
|
|
868
|
+
end
|
|
869
|
+
end
|
|
870
|
+
else
|
|
871
|
+
msg='process termsheet request requires sisu markup files'
|
|
872
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
873
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
874
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
875
|
+
mark(msg)
|
|
876
|
+
else puts msg
|
|
877
|
+
end
|
|
878
|
+
end
|
|
879
|
+
end
|
|
880
|
+
end
|
|
881
|
+
def sql?
|
|
882
|
+
if @opt.act[:psql][:set]==:on #% --pg, -D
|
|
883
|
+
if @opt.f_pths.length > 0
|
|
884
|
+
require_relative 'dbi'
|
|
885
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
886
|
+
loop_files_on_given_option do
|
|
887
|
+
SiSU_DBI::SQL.new(@opt).connect # dbi.rb
|
|
888
|
+
end
|
|
889
|
+
else
|
|
890
|
+
msg='pgsql request requires sisu markup files'
|
|
891
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
892
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
893
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
894
|
+
mark(msg)
|
|
895
|
+
else puts msg
|
|
896
|
+
end
|
|
897
|
+
end
|
|
898
|
+
end
|
|
899
|
+
if @opt.act[:sqlite][:set]==:on #% --sqlite, -d
|
|
900
|
+
if @opt.f_pths.length > 0
|
|
901
|
+
require_relative 'dbi'
|
|
902
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
903
|
+
loop_files_on_given_option do
|
|
904
|
+
SiSU_DBI::SQL.new(@opt).connect # dbi.rb
|
|
905
|
+
end
|
|
906
|
+
else
|
|
907
|
+
msg='sqlite request requires sisu markup files'
|
|
908
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
909
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
910
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
911
|
+
mark(msg)
|
|
912
|
+
else puts msg
|
|
913
|
+
end
|
|
914
|
+
end
|
|
915
|
+
end
|
|
916
|
+
end
|
|
917
|
+
def manifest?
|
|
918
|
+
if @opt.act[:manifest][:set]==:on #% --manifest, -y
|
|
919
|
+
if @opt.f_pths.length > 1
|
|
920
|
+
require_relative 'html_manifest'
|
|
921
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).manifest_on_files_translated do
|
|
922
|
+
SiSU_Manifest::Source.new(@opt).read # html_manifest.rb
|
|
923
|
+
end
|
|
924
|
+
end
|
|
925
|
+
end
|
|
926
|
+
end
|
|
927
|
+
def sitemaps?
|
|
928
|
+
if @opt.act[:sitemap][:set]==:on #% --sitemap, -Y
|
|
929
|
+
if @opt.f_pths.length > 0
|
|
930
|
+
require_relative 'sitemaps'
|
|
931
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
932
|
+
loop_files_on_given_option do
|
|
933
|
+
SiSU_Sitemaps::Source.new(@opt).read # sitemaps.rb
|
|
934
|
+
end
|
|
935
|
+
end
|
|
936
|
+
end
|
|
937
|
+
end
|
|
938
|
+
def remote_placement?
|
|
939
|
+
if @opt.act[:harvest][:set] !=:on
|
|
940
|
+
if @opt.act[:scp][:set]==:on #% -r copy to remote server
|
|
941
|
+
if @opt.f_pths.length > 0
|
|
942
|
+
require_relative 'remote' # remote.rb
|
|
943
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
944
|
+
loop_files_on_given_option do
|
|
945
|
+
SiSU_Remote::Put.new(@opt).scp
|
|
946
|
+
end
|
|
947
|
+
end
|
|
948
|
+
end
|
|
949
|
+
if @opt.act[:rsync][:set]==:on #% -R copy to remote server
|
|
950
|
+
if @opt.f_pths.length > 0
|
|
951
|
+
require_relative 'remote' # remote.rb
|
|
952
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
953
|
+
loop_files_on_given_option do
|
|
954
|
+
SiSU_Remote::Put.new(@opt).rsync
|
|
955
|
+
end
|
|
956
|
+
end
|
|
957
|
+
end
|
|
958
|
+
else
|
|
959
|
+
end
|
|
960
|
+
end
|
|
961
|
+
def urls?
|
|
962
|
+
if @opt.act[:urls_selected][:set]==:on #% --urls
|
|
963
|
+
if @opt.f_pths.length > 0
|
|
964
|
+
require_relative 'urls'
|
|
965
|
+
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
|
|
966
|
+
loop_files_on_given_option do
|
|
967
|
+
SiSU_Urls::Source.new(@opt).read #% urls.rb
|
|
968
|
+
end
|
|
969
|
+
else
|
|
970
|
+
msg='urls request requires sisu markup files'
|
|
971
|
+
if (@opt.act[:verbose_plus][:set]==:on \
|
|
972
|
+
|| @opt.act[:maintenance][:set]==:on)
|
|
973
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
|
|
974
|
+
mark(msg)
|
|
975
|
+
else puts msg
|
|
976
|
+
end
|
|
977
|
+
end
|
|
978
|
+
end
|
|
979
|
+
end
|
|
980
|
+
self
|
|
981
|
+
end
|
|
982
|
+
def init?
|
|
983
|
+
SiSU_Env::InfoProcessingFlag.new
|
|
984
|
+
if @opt.act[:ao][:set]==:on \
|
|
985
|
+
or @opt.act[:maintenance][:set]==:on #% --maintenance, -M
|
|
986
|
+
env=SiSU_Env::InfoEnv.new(@opt.fns)
|
|
987
|
+
path={}
|
|
988
|
+
path[:css]=env.path.output + '/_sisu/css'
|
|
989
|
+
path[:xml]=env.path.output + '/_sisu/xml'
|
|
990
|
+
path[:xsd]=path[:xml] + '/xsd'
|
|
991
|
+
path[:xsd]=path[:xml] + '/rnc'
|
|
992
|
+
path[:xsd]=path[:xml] + '/rng'
|
|
993
|
+
re_p3=/(sisupod(?:\.txz)?|\S+?\.ss[mt]\.txz|[^\/]+?\.ssp)$/
|
|
994
|
+
unless @opt.files.join(',') =~ re_p3 #do not mix pods with source markup files in command line
|
|
995
|
+
if @opt.act[:maintenance][:set] ==:on
|
|
996
|
+
$VERBOSE=false #debug $VERBOSE=true
|
|
997
|
+
end
|
|
998
|
+
end
|
|
999
|
+
re_p2=/(sisupod(?:\.zip)?|\S+?\.ss[mt]\.zip)$/
|
|
1000
|
+
unless @opt.files.join(',') =~ re_p2 #do not mix pods with source markup files in command line
|
|
1001
|
+
if @opt.act[:maintenance][:set] ==:on
|
|
1002
|
+
$VERBOSE=false #debug $VERBOSE=true
|
|
1003
|
+
end
|
|
1004
|
+
end
|
|
1005
|
+
end
|
|
1006
|
+
if @opt.act[:ao][:set]==:on
|
|
1007
|
+
@retry_count= -1
|
|
1008
|
+
begin
|
|
1009
|
+
@get_s,@get_p,@get_pl=[],[],[]
|
|
1010
|
+
re_s=/(\S+?\.-sst)$/
|
|
1011
|
+
re_p3=/((?:https?|file):\/\/\S+?(?:\/\S+?\.ss[mt]\.txz|sisupod(?:\.txz)?|\.ssp))/
|
|
1012
|
+
re_pl3=/^(\/\S+?\.ss[mt]\.txz)/
|
|
1013
|
+
@opt.files.each do |fns|
|
|
1014
|
+
if fns =~re_s
|
|
1015
|
+
@get_s << @opt.f_pths[0][:url]
|
|
1016
|
+
end
|
|
1017
|
+
if fns =~re_p3
|
|
1018
|
+
@get_p << re_p3.match(fns)[1] if re_p3
|
|
1019
|
+
end
|
|
1020
|
+
if fns =~re_pl3
|
|
1021
|
+
@get_pl << re_pl3.match(fns)[1] if re_p3
|
|
1022
|
+
end
|
|
1023
|
+
end
|
|
1024
|
+
if @get_s.length > 0 #% remote markup file .sst
|
|
1025
|
+
require_relative 'remote' # remote.rb
|
|
1026
|
+
SiSU_Remote::Get.new(@opt,@get_s).fns
|
|
1027
|
+
SiSU_Hub_Actions::Operations.new.counter
|
|
1028
|
+
end
|
|
1029
|
+
if @get_p.length > 0 #% remote sisupod
|
|
1030
|
+
require_relative 'remote' # remote.rb
|
|
1031
|
+
SiSU_Remote::Get.new(@opt,@get_p).sisupod
|
|
1032
|
+
end
|
|
1033
|
+
rescue
|
|
1034
|
+
SiSU_Errors::Rescued.new($!,$@,@opt,@fns).location do
|
|
1035
|
+
__LINE__.to_s + ':' + __FILE__
|
|
1036
|
+
end
|
|
1037
|
+
@retry_count +=1
|
|
1038
|
+
retry unless @retry_count > 1
|
|
1039
|
+
ensure
|
|
1040
|
+
end
|
|
1041
|
+
end
|
|
1042
|
+
end
|
|
1043
|
+
self
|
|
1044
|
+
end
|
|
1045
|
+
end
|
|
1046
|
+
class Operations
|
|
1047
|
+
@@n_do=0
|
|
1048
|
+
def initialize(opt='')
|
|
1049
|
+
@opt=opt
|
|
1050
|
+
@cX=SiSU_Screen::Ansi.new(@opt).cX
|
|
1051
|
+
end
|
|
1052
|
+
def counter
|
|
1053
|
+
@@n_do=0
|
|
1054
|
+
end
|
|
1055
|
+
def remote_put_base_site_rsync # -CR
|
|
1056
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) \
|
|
1057
|
+
if @opt.act[:maintenance][:set] ==:on
|
|
1058
|
+
require_relative 'remote' # remote.rb
|
|
1059
|
+
SiSU_Remote::Put.new(@opt).rsync_base
|
|
1060
|
+
end
|
|
1061
|
+
def remote_put_base_site_rsync_match # -CCRZ
|
|
1062
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) \
|
|
1063
|
+
if @opt.act[:maintenance][:set] ==:on
|
|
1064
|
+
require_relative 'remote' # remote.rb
|
|
1065
|
+
SiSU_Remote::Put.new(@opt).rsync_base_sync
|
|
1066
|
+
end
|
|
1067
|
+
def remote_put_base_site # -Cr
|
|
1068
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) \
|
|
1069
|
+
if @opt.act[:maintenance][:set] ==:on
|
|
1070
|
+
require_relative 'remote' # remote.rb
|
|
1071
|
+
SiSU_Remote::Put.new(@opt).scp_base
|
|
1072
|
+
end
|
|
1073
|
+
def remote_put_base_site_all # -CCr
|
|
1074
|
+
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).mark(:cyan) \
|
|
1075
|
+
if @opt.act[:maintenance][:set] ==:on
|
|
1076
|
+
require_relative 'remote' # remote.rb
|
|
1077
|
+
SiSU_Remote::Put.new(@opt).scp_base_all
|
|
1078
|
+
end
|
|
1079
|
+
def cgi # -F
|
|
1080
|
+
require_relative 'cgi' # cgi.rb
|
|
1081
|
+
SiSU_CGI::SearchSQL.new(@opt).read
|
|
1082
|
+
end
|
|
1083
|
+
def termsheet # -t
|
|
1084
|
+
system("sisu_termsheet #{@opt.selections.str} #{@opt.fns}\n")
|
|
1085
|
+
@@n_do=@@n_do+1
|
|
1086
|
+
SiSU_Screen::Ansi.new(
|
|
1087
|
+
@opt.selections.str,@@n_do,
|
|
1088
|
+
'Termsheet(s) processed'
|
|
1089
|
+
).term_sheet_title unless @opt.act[:quiet][:set] ==:on
|
|
1090
|
+
end
|
|
1091
|
+
def webrick # -W
|
|
1092
|
+
prt=SiSU_Env::InfoEnv.new(@fns).port.webrick_port
|
|
1093
|
+
puts %{#{@cX.blue}<<#{@cX.off}#{@cX.green}Start Webrick web server on port: #{prt}#{@cX.off}#{@cX.blue}>> #{@cX.off*2} }
|
|
1094
|
+
require_relative 'webrick'
|
|
1095
|
+
SiSU_Webserv::WebrickStart.new
|
|
1096
|
+
end
|
|
1097
|
+
def not_found
|
|
1098
|
+
puts "\n#{@cX.fuchsia}FILE NOT FOUND:#{@cX.off} << #{@opt.fns} >> - requested #{@opt.selections.str} processing skipped\n"
|
|
1099
|
+
end
|
|
1100
|
+
def convert_name_message(fns,type,i,o,rune)
|
|
1101
|
+
%{\nIn filename: "#{@cX.fuchsia}#{fns}#{@cX.off}" << #{type} >> #{@cX.fuchsia}is apre 0.36 markup filename.#{@cX.off} #{@cX.brown}Please rename your file.#{@cX.off}\n\tAs of sisu-0.37, SiSU markup files with #{@cX.brown}the extensions #{i} should be re-named #{o}#{@cX.off}\n\tif you have the program called 'rename' installed, the following rune should do the trick:\n\t\t#{rune}\n\talternatively try:\n\t\tsisu --convert --36to37 #{fns}\n\trequested #{@opt.selections.str} processing skipped\n}
|
|
1102
|
+
end
|
|
1103
|
+
def not_recognised
|
|
1104
|
+
case @opt.fns
|
|
1105
|
+
when /(\.s[123])$/
|
|
1106
|
+
type=@opt.fns.gsub(/\S+?(#{$1})/,'\1')
|
|
1107
|
+
rune=%q{rename 's/\.s[123]$/\.sst/' *.s{1,2,3}}
|
|
1108
|
+
puts convert_name_message(@opt.fns,type,'.s1 .s2 and .s3','.sst',rune)
|
|
1109
|
+
when /(\.r[123])$/
|
|
1110
|
+
type=@opt.fns.gsub(/\S+?(#{$1})/,'\1')
|
|
1111
|
+
rune=%q{rename 's/\.r[123]$/\.ssm/' *.r{1,2,3}}
|
|
1112
|
+
puts convert_name_message(@opt.fns,type,'.r1 .r2 and .r3','.sst',rune)
|
|
1113
|
+
puts %{\n\tNote also that you will need to change the names of the files called/required\n\twithin the document text to build the composite document\n\t\t.s1 .s2 .s3 should be .sst \n\t\t.si should be .ssi\n\trequested #{@opt.selections.str} processing skipped\n}
|
|
1114
|
+
when /(\.ssi)$/
|
|
1115
|
+
puts "\n#{@cX.fuchsia}component filetype:#{@cX.off} << #{@opt.fns} >> - is not a processed filetype, (it may be used as a component of a .ssm markup file)\n\trequested #{@opt.selections.str} processing skipped\n"
|
|
1116
|
+
else
|
|
1117
|
+
puts "\n#{@cX.fuchsia}FILETYPE NOT RECOGNISED:#{@cX.off} << #{@opt.fns} >> - is not a recognized filetype,\n\trequested #{@opt.selections.str} processing skipped\n"
|
|
1118
|
+
end
|
|
1119
|
+
end
|
|
1120
|
+
end
|
|
1121
|
+
end
|
|
1122
|
+
__END__
|