sisu 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. checksums.yaml +7 -0
  2. data/bin/sisu +367 -0
  3. data/bin/sisugem +367 -0
  4. data/data/sisu/image/arrow_next_red.png +0 -0
  5. data/data/sisu/image/arrow_prev_red.png +0 -0
  6. data/data/sisu/image/arrow_up_red.png +0 -0
  7. data/data/sisu/image/b_bluebell.png +0 -0
  8. data/data/sisu/image/b_doc.png +0 -0
  9. data/data/sisu/image/b_epub.png +0 -0
  10. data/data/sisu/image/b_home.png +0 -0
  11. data/data/sisu/image/b_info.png +0 -0
  12. data/data/sisu/image/b_odf.png +0 -0
  13. data/data/sisu/image/b_pdf.png +0 -0
  14. data/data/sisu/image/b_search.png +0 -0
  15. data/data/sisu/image/b_toc.png +0 -0
  16. data/data/sisu/image/bullet_08.png +0 -0
  17. data/data/sisu/image/bullet_09.png +0 -0
  18. data/data/sisu/image/bullet_10.png +0 -0
  19. data/data/sisu/image/bullet_11.png +0 -0
  20. data/data/sisu/image/bullet_12.png +0 -0
  21. data/data/sisu/image/bullet_doc.png +0 -0
  22. data/data/sisu/image/bullet_red.png +0 -0
  23. data/data/sisu/image/dot_clear.png +0 -0
  24. data/data/sisu/image/dot_white.png +0 -0
  25. data/data/sisu/image/gplv3.png +0 -0
  26. data/data/sisu/image/gplv3_free_software.png +0 -0
  27. data/data/sisu/image/next.png +0 -0
  28. data/data/sisu/image/previous.png +0 -0
  29. data/data/sisu/image/rb7.ico +0 -0
  30. data/data/sisu/image/sisu.png +0 -0
  31. data/data/sisu/image/toctoc.png +0 -0
  32. data/data/sisu/version.yml +5 -0
  33. data/lib/sisu.rb +94 -0
  34. data/lib/sisu/air.rb +80 -0
  35. data/lib/sisu/ao.rb +590 -0
  36. data/lib/sisu/ao_character_check.rb +102 -0
  37. data/lib/sisu/ao_composite.rb +286 -0
  38. data/lib/sisu/ao_doc_objects.rb +565 -0
  39. data/lib/sisu/ao_doc_str.rb +2269 -0
  40. data/lib/sisu/ao_endnotes.rb +136 -0
  41. data/lib/sisu/ao_expand_insertions.rb +514 -0
  42. data/lib/sisu/ao_hash_digest.rb +174 -0
  43. data/lib/sisu/ao_idx.rb +422 -0
  44. data/lib/sisu/ao_images.rb +187 -0
  45. data/lib/sisu/ao_metadata.rb +86 -0
  46. data/lib/sisu/ao_misc_arrange.rb +207 -0
  47. data/lib/sisu/ao_numbering.rb +720 -0
  48. data/lib/sisu/ao_persist.rb +194 -0
  49. data/lib/sisu/ao_references.rb +502 -0
  50. data/lib/sisu/ao_syntax.rb +640 -0
  51. data/lib/sisu/cgi.rb +84 -0
  52. data/lib/sisu/cgi_pgsql.rb +270 -0
  53. data/lib/sisu/cgi_sql_common.rb +986 -0
  54. data/lib/sisu/cgi_sqlite.rb +244 -0
  55. data/lib/sisu/conf.rb +287 -0
  56. data/lib/sisu/constants.rb +388 -0
  57. data/lib/sisu/css.rb +3484 -0
  58. data/lib/sisu/db_columns.rb +1997 -0
  59. data/lib/sisu/db_create.rb +689 -0
  60. data/lib/sisu/db_dbi.rb +90 -0
  61. data/lib/sisu/db_drop.rb +207 -0
  62. data/lib/sisu/db_import.rb +877 -0
  63. data/lib/sisu/db_indexes.rb +146 -0
  64. data/lib/sisu/db_load_tuple.rb +323 -0
  65. data/lib/sisu/db_remove.rb +182 -0
  66. data/lib/sisu/db_select.rb +230 -0
  67. data/lib/sisu/db_sqltxt.rb +173 -0
  68. data/lib/sisu/db_tests.rb +114 -0
  69. data/lib/sisu/dbi.rb +166 -0
  70. data/lib/sisu/dbi_discrete.rb +206 -0
  71. data/lib/sisu/digests.rb +306 -0
  72. data/lib/sisu/dp.rb +1606 -0
  73. data/lib/sisu/dp_identify_markup.rb +161 -0
  74. data/lib/sisu/dp_make.rb +668 -0
  75. data/lib/sisu/embedded.rb +149 -0
  76. data/lib/sisu/errors.rb +84 -0
  77. data/lib/sisu/generic_parts.rb +131 -0
  78. data/lib/sisu/git.rb +277 -0
  79. data/lib/sisu/html.rb +775 -0
  80. data/lib/sisu/html_concordance.rb +391 -0
  81. data/lib/sisu/html_format.rb +1348 -0
  82. data/lib/sisu/html_harvest.rb +109 -0
  83. data/lib/sisu/html_harvest_author_format.rb +111 -0
  84. data/lib/sisu/html_harvest_authors.rb +466 -0
  85. data/lib/sisu/html_harvest_topics.rb +893 -0
  86. data/lib/sisu/html_lite_shared.rb +324 -0
  87. data/lib/sisu/html_manifest.rb +1032 -0
  88. data/lib/sisu/html_minitoc.rb +230 -0
  89. data/lib/sisu/html_parts.rb +437 -0
  90. data/lib/sisu/html_persist.rb +237 -0
  91. data/lib/sisu/html_promo.rb +440 -0
  92. data/lib/sisu/html_scroll.rb +235 -0
  93. data/lib/sisu/html_segments.rb +716 -0
  94. data/lib/sisu/html_shared.rb +62 -0
  95. data/lib/sisu/html_table.rb +64 -0
  96. data/lib/sisu/html_tune.rb +301 -0
  97. data/lib/sisu/hub.rb +277 -0
  98. data/lib/sisu/hub_actions.rb +1122 -0
  99. data/lib/sisu/hub_loop_markup_files.rb +170 -0
  100. data/lib/sisu/hub_options.rb +1695 -0
  101. data/lib/sisu/i18n.rb +702 -0
  102. data/lib/sisu/manpage.rb +377 -0
  103. data/lib/sisu/manpage_format.rb +85 -0
  104. data/lib/sisu/object_munge.rb +307 -0
  105. data/lib/sisu/prog_text_translation.rb +1702 -0
  106. data/lib/sisu/qrcode.rb +754 -0
  107. data/lib/sisu/relaxng.rb +1153 -0
  108. data/lib/sisu/remote.rb +246 -0
  109. data/lib/sisu/rexml.rb +148 -0
  110. data/lib/sisu/se.rb +158 -0
  111. data/lib/sisu/se_cleanoutput.rb +145 -0
  112. data/lib/sisu/se_clear.rb +105 -0
  113. data/lib/sisu/se_createsite.rb +273 -0
  114. data/lib/sisu/se_css.rb +221 -0
  115. data/lib/sisu/se_date.rb +92 -0
  116. data/lib/sisu/se_db.rb +214 -0
  117. data/lib/sisu/se_envcall.rb +326 -0
  118. data/lib/sisu/se_file_op.rb +2758 -0
  119. data/lib/sisu/se_filemap.rb +247 -0
  120. data/lib/sisu/se_get_init.rb +238 -0
  121. data/lib/sisu/se_hub_particulars.rb +234 -0
  122. data/lib/sisu/se_info_env.rb +2179 -0
  123. data/lib/sisu/se_info_port.rb +70 -0
  124. data/lib/sisu/se_info_system.rb +202 -0
  125. data/lib/sisu/se_load.rb +108 -0
  126. data/lib/sisu/se_processing.rb +659 -0
  127. data/lib/sisu/se_programs.rb +394 -0
  128. data/lib/sisu/se_remotes.rb +553 -0
  129. data/lib/sisu/se_standardise_lang.rb +176 -0
  130. data/lib/sisu/se_version.rb +174 -0
  131. data/lib/sisu/shared_images.rb +137 -0
  132. data/lib/sisu/shared_markup_alt.rb +336 -0
  133. data/lib/sisu/shared_metadata.rb +1361 -0
  134. data/lib/sisu/shared_sem.rb +156 -0
  135. data/lib/sisu/sisu_thor_lib.rb +407 -0
  136. data/lib/sisu/sitemaps.rb +224 -0
  137. data/lib/sisu/src_kdissert_share.rb +102 -0
  138. data/lib/sisu/src_po4a_share.rb +309 -0
  139. data/lib/sisu/src_po4a_shelf.rb +1217 -0
  140. data/lib/sisu/src_po4a_shelf_set.rb +297 -0
  141. data/lib/sisu/src_po4a_sst_ao_sst.rb +893 -0
  142. data/lib/sisu/src_po4a_sst_ao_sst_set.rb +284 -0
  143. data/lib/sisu/src_po4a_sstm.rb +135 -0
  144. data/lib/sisu/src_shared.rb +347 -0
  145. data/lib/sisu/src_sisupod_make.rb +171 -0
  146. data/lib/sisu/src_sisupod_sstm.rb +109 -0
  147. data/lib/sisu/sst_convert_markup.rb +323 -0
  148. data/lib/sisu/sst_do_inline_footnotes.rb +440 -0
  149. data/lib/sisu/sst_from_xml.rb +178 -0
  150. data/lib/sisu/sst_identify_markup.rb +482 -0
  151. data/lib/sisu/sst_to_s_xml_sax.rb +471 -0
  152. data/lib/sisu/termsheet.rb +163 -0
  153. data/lib/sisu/texinfo.rb +430 -0
  154. data/lib/sisu/texinfo_format.rb +541 -0
  155. data/lib/sisu/texpdf.rb +1162 -0
  156. data/lib/sisu/texpdf_format.rb +1689 -0
  157. data/lib/sisu/texpdf_parts.rb +235 -0
  158. data/lib/sisu/txt_asciidoc.rb +354 -0
  159. data/lib/sisu/txt_asciidoc_decorate.rb +207 -0
  160. data/lib/sisu/txt_markdown.rb +389 -0
  161. data/lib/sisu/txt_markdown_decorate.rb +207 -0
  162. data/lib/sisu/txt_orgmode.rb +376 -0
  163. data/lib/sisu/txt_orgmode_decorate.rb +186 -0
  164. data/lib/sisu/txt_output.rb +86 -0
  165. data/lib/sisu/txt_plain.rb +410 -0
  166. data/lib/sisu/txt_plain_decorate.rb +189 -0
  167. data/lib/sisu/txt_read.rb +109 -0
  168. data/lib/sisu/txt_rst.rb +371 -0
  169. data/lib/sisu/txt_rst_decorate.rb +186 -0
  170. data/lib/sisu/txt_shared.rb +241 -0
  171. data/lib/sisu/txt_textile.rb +367 -0
  172. data/lib/sisu/txt_textile_decorate.rb +186 -0
  173. data/lib/sisu/update.rb +141 -0
  174. data/lib/sisu/urls.rb +696 -0
  175. data/lib/sisu/utils.rb +232 -0
  176. data/lib/sisu/utils_composite.rb +115 -0
  177. data/lib/sisu/utils_response.rb +114 -0
  178. data/lib/sisu/utils_screen_text_color.rb +472 -0
  179. data/lib/sisu/utils_spell.rb +99 -0
  180. data/lib/sisu/webrick.rb +191 -0
  181. data/lib/sisu/wikispeak.rb +375 -0
  182. data/lib/sisu/xhtml.rb +472 -0
  183. data/lib/sisu/xhtml_epub2.rb +890 -0
  184. data/lib/sisu/xhtml_epub2_concordance.rb +322 -0
  185. data/lib/sisu/xhtml_epub2_format.rb +2272 -0
  186. data/lib/sisu/xhtml_epub2_persist.rb +278 -0
  187. data/lib/sisu/xhtml_epub2_segments.rb +599 -0
  188. data/lib/sisu/xhtml_epub2_tune.rb +330 -0
  189. data/lib/sisu/xhtml_parts.rb +183 -0
  190. data/lib/sisu/xhtml_shared.rb +62 -0
  191. data/lib/sisu/xhtml_table.rb +97 -0
  192. data/lib/sisu/xml_docbook5.rb +376 -0
  193. data/lib/sisu/xml_dom.rb +624 -0
  194. data/lib/sisu/xml_fictionbook2.rb +389 -0
  195. data/lib/sisu/xml_format.rb +865 -0
  196. data/lib/sisu/xml_md_oai_pmh_dc.rb +229 -0
  197. data/lib/sisu/xml_odf_odt.rb +887 -0
  198. data/lib/sisu/xml_odf_odt_format.rb +674 -0
  199. data/lib/sisu/xml_parts.rb +191 -0
  200. data/lib/sisu/xml_persist.rb +126 -0
  201. data/lib/sisu/xml_sax.rb +521 -0
  202. data/lib/sisu/xml_scaffold_structure_collapsed.rb +198 -0
  203. data/lib/sisu/xml_scaffold_structure_sisu.rb +201 -0
  204. data/lib/sisu/xml_shared.rb +665 -0
  205. data/lib/sisu/xml_tables.rb +261 -0
  206. data/lib/sisu/zap.rb +90 -0
  207. metadata +251 -0
@@ -0,0 +1,70 @@
1
+ # encoding: utf-8
2
+ =begin
3
+
4
+ * Name: SiSU
5
+
6
+ ** Description: documents, structuring, processing, publishing, search
7
+ *** system environment, resource control and configuration details
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/se_info_port.rb;hb=HEAD>
55
+
56
+ =end
57
+ module SiSU_Info_Port
58
+ require_relative 'constants' # constants.rb
59
+ require_relative 'utils' # utils.rb
60
+ require_relative 'se_info_env' # se_info_env.rb
61
+ class InfoPort < SiSU_Info_Env::InfoEnv # se_info_env.rb
62
+ def initialize
63
+ @env=SiSU_Env::InfoEnv.new
64
+ end
65
+ def webrick
66
+ @env.port.webrick_port
67
+ end
68
+ end
69
+ end
70
+ __END__
@@ -0,0 +1,202 @@
1
+ # encoding: utf-8
2
+ =begin
3
+
4
+ * Name: SiSU
5
+
6
+ ** Description: documents, structuring, processing, publishing, search
7
+ *** system environment, resource control and configuration details
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/se_info_system.rb;hb=HEAD>
55
+
56
+ =end
57
+ module SiSU_Info_Sys_Gen
58
+ require_relative 'constants' # constants.rb
59
+ require_relative 'utils' # utils.rb
60
+ class InfoSystemGen
61
+ begin
62
+ require 'rbconfig'
63
+ rescue LoadError
64
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
65
+ error('rbconfig NOT FOUND (LoadError)')
66
+ end
67
+ @@user, @@home, @@hostname, @@pwd, @@sisu_etc, @@host, @@arch, @@rbver, @@dir_arch, @@dir_sitearch, @@dir_bin, @@locale, @@rc,@@sisurc_path,@@ad=
68
+ ENV['USER'],ENV['HOME'],ENV['HOSTNAME'],ENV['PWD'],RbConfig::CONFIG['sysconfdir'] + '/sisu',RbConfig::CONFIG['host'],RbConfig::CONFIG['arch'],%x{ruby -v}.strip,RbConfig::CONFIG['archdir'],RbConfig::CONFIG['sitearchdir'],RbConfig::CONFIG['bindir'],%x{locale charmap}.strip,nil, nil, {} # %x{ruby -v}.strip # RbConfig::CONFIG['rb_ver']
69
+ out=RbConfig::CONFIG['localstatedir']
70
+ etc=RbConfig::CONFIG['sysconfdir'] + '/sisu'
71
+ share=RbConfig::CONFIG['datadir'] + '/sisu'
72
+ data=RbConfig::CONFIG['datadir'] + '/doc/sisu'
73
+ m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
74
+ @stub_pwd ||=@@pwd[m,1]
75
+ @base_markup_dir_stub=SiSU_Utils::Path.new.base_markup_stub
76
+ prcss_dir='_sisu_processing_'
77
+ prcss_dir_tmp_root="/tmp/#{prcss_dir}"
78
+ prcss_dir_stub="#{prcss_dir}/#{@stub_pwd}"
79
+ if @@user
80
+ tmp_processing="#{prcss_dir_tmp_root}/#{@@user}/#{@base_markup_dir_stub}"
81
+ tmp_processing_individual="#{prcss_dir_tmp_root}/#{@@user}/#{@base_markup_dir_stub}"
82
+ else #error
83
+ tmp_processing=tmp_processing_individual="/tmp/#{prcss_dir_stub}"
84
+ end
85
+ processing_pth=tmp_processing_individual
86
+ processing_dir=prcss_dir
87
+ processing_git="#{Dir.pwd}/#{Gt[:grotto]}"
88
+ #user=ENV['USER']
89
+ port_pgsql=if defined? ENV['PGPORT'] \
90
+ and not (ENV['PGPORT'].nil? \
91
+ || ENV['PGPORT'].empty?) \
92
+ and ENV['PGPORT']=~/^\d+$/
93
+ ENV['PGPORT']
94
+ else '5432'
95
+ end
96
+ IMAGES=:images
97
+ SISU_ETC=:sisu_etc
98
+ SISU_SHARE=:sisu_share
99
+ SAMPLE_DATA_PATH=:sample_data_path
100
+ IMAGE_STUB=:image_stub
101
+ STYLESHEET_STUB=:stylesheet_stub
102
+ IMAGE_LOCAL=:image_local
103
+ WEBSERV_PATH=:webserv_path
104
+ WEBSERV_MAN=:webserv_man
105
+ WEBSERV_PHP=:webserv_php
106
+ WEBSERV_CGI=:webserv_cgi
107
+ WEBSERV_RSS=:webserv_rss
108
+ WEBSERV_SQLITE=:webserv_sqlite
109
+ OUTPUT_LOCAL=:output_local
110
+ PROCESSING_DIR=:processing_dir
111
+ PROCESSING_PATH=:processing_path
112
+ PROCESSING_DIR_TMP_ROOT=:processing_dir_tmp_root
113
+ PROCESSING_PATH_TMP_BASE=:processing_path_tmp_base
114
+ PROCESSING_AO=:processing_ao
115
+ PROCESSING_TUNE=:processing_tune
116
+ PROCESSING_LATEX=:processing_latex
117
+ PROCESSING_TEXINFO=:processing_texinfo
118
+ PROCESSING_LOUT=:processing_lout
119
+ PROCESSING_SQLITE=:processing_sqlite
120
+ PROCESSING_POSTGRESQL=:processing_postgresql
121
+ PROCESSING_ENCODING=:processing_encoding
122
+ PROCESSING_GIT=:processing_git
123
+ PAPERSIZE=:papersize
124
+ #LANGUAGE=:language
125
+ #LANGUAGE_CODE=:language_code
126
+ MULTILINGUAL=:multilingual
127
+ BUNDLE=:bundle
128
+ CONCORD_MAX=:concord_max
129
+ DIGEST=:digest
130
+ WEBSERV_HOST_CGI=:webserv_host_cgi
131
+ WEBSERV_PORT_CGI=:webserv_port_cgi
132
+ POSTGRESQL_USER=:postgresql_user
133
+ POSTGRESQL_PORT=:postgresql_port
134
+ SQLITE_USER=:sqlite_user
135
+ SQLITE_PATH=:sqlite_path
136
+ SQLITE_PORT=:sqlite_port
137
+ DEFAULT_DIR={
138
+ IMAGES => '_sisu/image',
139
+ SISU_ETC => etc,
140
+ SISU_SHARE => share,
141
+ SAMPLE_DATA_PATH => data,
142
+ IMAGE_STUB => '_sisu/image',
143
+ STYLESHEET_STUB => '_sisu/css',
144
+ IMAGE_LOCAL => @@pwd + '/_sisu/image',
145
+ WEBSERV_PATH => out + '/www',
146
+ #WEBSERV_DIR => www, # uncomment for urls...
147
+ #WEBSERV_IMAGE => out + '/www/_sisu/image',
148
+ WEBSERV_MAN => out + '/www/man', #alter
149
+ WEBSERV_PHP => out + '/www/php',
150
+ WEBSERV_CGI => '/usr/lib/cgi-bin',
151
+ WEBSERV_RSS => out + '/www/feed',
152
+ WEBSERV_SQLITE => out + '/www/sqlite',
153
+ OUTPUT_LOCAL => @@home + '/sisu_www',
154
+ PROCESSING_DIR => processing_dir,
155
+ PROCESSING_PATH => processing_pth,
156
+ PROCESSING_DIR_TMP_ROOT => prcss_dir_tmp_root,
157
+ PROCESSING_PATH_TMP_BASE => processing_pth,
158
+ PROCESSING_AO => 'ao',
159
+ PROCESSING_TUNE => 'tune',
160
+ PROCESSING_LATEX => 'tex',
161
+ PROCESSING_TEXINFO => 'texinfo',
162
+ PROCESSING_SQLITE => 'sqlite',
163
+ PROCESSING_POSTGRESQL=> 'postgresql',
164
+ PROCESSING_ENCODING => 'encoding',
165
+ PROCESSING_GIT => processing_git,
166
+ #TEXINFO_STUB => 'texinfo',
167
+ PAPERSIZE => 'A4', #A4, US_letter, book_b5, book_a5, US_legal
168
+ #LANGUAGE => 'English',
169
+ #LANGUAGE_CODE => 'en', #change, unecessary duplication though currently used
170
+ MULTILINGUAL => false,
171
+ BUNDLE => false,
172
+ CONCORD_MAX => 260000,
173
+ DIGEST => :sha256,
174
+ WEBSERV_HOST_CGI => 'http://localhost',
175
+ WEBSERV_PORT_CGI => 8081, #8111,8123,8081
176
+ POSTGRESQL_USER => @@user, #'ralph', # change user !!!
177
+ POSTGRESQL_PORT => port_pgsql,
178
+ #POSGRESQL_LINKS_PATH => '',
179
+ SQLITE_USER => @@user,
180
+ SQLITE_PATH => @@user, #??
181
+ SQLITE_PORT => '**',
182
+ }
183
+ @@default_dir=DEFAULT_DIR
184
+ m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
185
+ @@pwd=@pwd=SiSU_Utils::Path.new.base_markup
186
+ attr_accessor :user,:home,:hostname,:pwd,:host,:arch,:rbver,:dir_arch,:dir_sitearch,:dir_bin,:locale,:webserv_path,:webserv_host_cgi,:webserv_port_cgi,:default_dir,:rc_path,:ad_path
187
+ def initialize
188
+ @user, @home, @hostname, @pwd, @sisu_etc, @host, @arch, @rbver, @dir_arch, @dir_sitearch, @dir_bin, @locale, @default_dir=
189
+ @@user,@@home,@@hostname,@@pwd,@@sisu_etc,@@host,@@arch,@@rbver,@@dir_arch,@@dir_sitearch,@@dir_bin,@@locale,@@default_dir
190
+ #note rbver is duplicated in InfoVersion
191
+ end
192
+ end
193
+ end
194
+ module SiSU_Info_Sys
195
+ class InfoSystem < SiSU_Info_Sys_Gen::InfoSystemGen
196
+ include Singleton
197
+ def initialize
198
+ super()
199
+ end
200
+ end
201
+ end
202
+ __END__
@@ -0,0 +1,108 @@
1
+ # encoding: utf-8
2
+ =begin
3
+
4
+ * Name: SiSU
5
+
6
+ ** Description: documents, structuring, processing, publishing, search
7
+ *** system environment, resource control and configuration details
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/se_load.rb;hb=HEAD>
55
+
56
+ =end
57
+ module SiSU_Load
58
+ require_relative 'constants' # constants.rb
59
+ require_relative 'utils' # utils.rb
60
+ class Load
61
+ def initialize(prog,mandatory=false)
62
+ @prog,@mandatory=prog,mandatory
63
+ end
64
+ def prog
65
+ load_prog=false
66
+ $:.each do |reqpath|
67
+ if FileTest.exist?("#{reqpath}/#{@prog}.rb")
68
+ load_prog=true
69
+ #SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).ok("#{reqpath}/#{@prog}.rb loaded")
70
+ break
71
+ #else SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).warn("#{reqpath}/#{@prog}.rb not found")
72
+ end
73
+ end
74
+ if load_prog \
75
+ and @prog=~/dbi/
76
+ begin
77
+ require 'dbi'
78
+ rescue LoadError
79
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
80
+ error('dbi NOT FOUND (LoadError)')
81
+ end
82
+ end
83
+ if load_prog
84
+ begin
85
+ require @prog
86
+ rescue LoadError
87
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
88
+ error("#{@prog} NOT FOUND (LoadError)")
89
+ end
90
+ else
91
+ @mandatory \
92
+ ? (SiSU_Screen::Ansi.new(@prog,"*WARN* module required: #{@prog}").warn)
93
+ : '' #(SiSU_Screen::Ansi.new(@prog,"*WARN* #{@prog} load requested").warn)
94
+ end
95
+ load_prog
96
+ end
97
+ def prog?
98
+ load_prog=false
99
+ $:.each do |reqpath|
100
+ if FileTest.exist?("#{reqpath}/#{@prog}.rb"); load_prog=true
101
+ break
102
+ end
103
+ end
104
+ load_prog
105
+ end
106
+ end
107
+ end
108
+ __END__
@@ -0,0 +1,659 @@
1
+ # encoding: utf-8
2
+ =begin
3
+
4
+ * Name: SiSU
5
+
6
+ ** Description: documents, structuring, processing, publishing, search
7
+ *** system environment, resource control and configuration details
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/se_processing.rb;hb=HEAD>
55
+
56
+ =end
57
+ module SiSU_Processing_Settings
58
+ require_relative 'constants' # constants.rb
59
+ require_relative 'utils' # utils.rb
60
+ class ProcessingSettings
61
+ def initialize(md)
62
+ @md=md
63
+ end
64
+ def cnf_rc #sisurc.yml
65
+ @rc=SiSU_Env::GetInit.new.sisu_yaml.rc
66
+ end
67
+ def env_rc #env rc (including sisurc.yml)
68
+ @env_rc ||=SiSU_Env::InfoEnv.new(@md.fns)
69
+ end
70
+ def doc_rc #document rc, make instructions
71
+ (defined? @md.make) \
72
+ ? @md.make
73
+ : nil
74
+ end
75
+ def cmd_rc_act #command-line rc
76
+ @cmd_rc_act=@md.opt.opt_act
77
+ end
78
+ def build
79
+ def ocn?
80
+ if cmd_rc_act[:ocn][:set]==:on
81
+ true
82
+ elsif cmd_rc_act[:ocn][:set]==:off
83
+ false
84
+ elsif doc_rc.is_a?(Method) \
85
+ and defined? doc_rc.ocn? \
86
+ and doc_rc.toc? ==:off
87
+ false
88
+ elsif env_rc.build.ocn? ==:off
89
+ false
90
+ else
91
+ true
92
+ end
93
+ end
94
+ def plaintext_ocn?
95
+ if cmd_rc_act[:txt_ocn][:set]==:on \
96
+ or cmd_rc_act[:ocn][:set]==:on
97
+ true
98
+ elsif cmd_rc_act[:txt_ocn][:set]==:off \
99
+ or cmd_rc_act[:ocn][:set]==:off
100
+ false
101
+ elsif doc_rc.is_a?(Method) \
102
+ and defined? doc_rc.ocn? \
103
+ and doc_rc.toc? ==:off
104
+ false
105
+ elsif env_rc.build.ocn? ==:off
106
+ false
107
+ else
108
+ true
109
+ end
110
+ end
111
+ def odt_ocn?
112
+ if cmd_rc_act[:odt_ocn][:set]==:on \
113
+ or cmd_rc_act[:ocn][:set]==:on
114
+ true
115
+ elsif cmd_rc_act[:odt_ocn][:set]==:off \
116
+ or cmd_rc_act[:ocn][:set]==:off
117
+ false
118
+ elsif doc_rc.is_a?(Method) \
119
+ and defined? doc_rc.ocn? \
120
+ and doc_rc.toc? ==:off
121
+ false
122
+ elsif env_rc.build.ocn? ==:off
123
+ false
124
+ else
125
+ true
126
+ end
127
+ end
128
+ def html_strict?
129
+ if cmd_rc_act[:html_strict][:set]==:on
130
+ true
131
+ elsif cmd_rc_act[:html_strict][:set]==:off
132
+ false
133
+ elsif doc_rc.is_a?(Method) \
134
+ and defined? doc_rc.html_strict? \
135
+ and doc_rc.html_strict? ==:on
136
+ true
137
+ else
138
+ false
139
+ end
140
+ end
141
+ def toc?
142
+ if cmd_rc_act[:toc][:set]==:on
143
+ true
144
+ elsif cmd_rc_act[:toc][:set]==:off
145
+ false
146
+ elsif doc_rc.is_a?(Method) \
147
+ and defined? doc_rc.toc? \
148
+ and doc_rc.toc? ==:off
149
+ false
150
+ elsif env_rc.build.toc? ==:off
151
+ false
152
+ else
153
+ true
154
+ end
155
+ end
156
+ def manifest?
157
+ if cmd_rc_act[:manifest][:set]==:on
158
+ true
159
+ elsif cmd_rc_act[:manifest][:set]==:off
160
+ false
161
+ elsif doc_rc.is_a?(Method) \
162
+ and defined? doc_rc.manifest? \
163
+ and doc_rc.manifest? ==:off
164
+ false
165
+ elsif env_rc.build.manifest? ==:off
166
+ false
167
+ else
168
+ true
169
+ end
170
+ end
171
+ def links_to_manifest?
172
+ if cmd_rc_act[:links_to_manifest][:set]==:on
173
+ true
174
+ elsif cmd_rc_act[:links_to_manifest][:set]==:off
175
+ false
176
+ elsif doc_rc.is_a?(Method) \
177
+ and defined? doc_rc.links_to_manifest? \
178
+ and doc_rc.links_to_manifest? ==:off
179
+ false
180
+ elsif env_rc.build.links_to_manifest? ==:off
181
+ false
182
+ else
183
+ true
184
+ end
185
+ end
186
+ def metadata?
187
+ if cmd_rc_act[:metadata][:set]==:on
188
+ true
189
+ elsif cmd_rc_act[:metadata][:set]==:off
190
+ false
191
+ elsif doc_rc.is_a?(Method) \
192
+ and defined? doc_rc.metadata? \
193
+ and doc_rc.metadata? ==:off
194
+ false
195
+ elsif env_rc.build.metadata? ==:off
196
+ false
197
+ else
198
+ true
199
+ end
200
+ end
201
+ def minitoc?
202
+ if html_top_band? == false #one form of navigation necessary
203
+ true
204
+ elsif cmd_rc_act[:minitoc][:set]==:on
205
+ true
206
+ elsif cmd_rc_act[:minitoc][:set]==:off
207
+ false
208
+ elsif doc_rc.is_a?(Method) \
209
+ and defined? doc_rc.minitoc? \
210
+ and doc_rc.minitoc? ==:off
211
+ false
212
+ elsif env_rc.build.minitoc? ==:off
213
+ false
214
+ else
215
+ true
216
+ end
217
+ end
218
+ def manifest_minitoc?
219
+ if html_top_band? == false #one form of navigation necessary
220
+ true
221
+ elsif cmd_rc_act[:manifest_minitoc][:set]==:on \
222
+ || cmd_rc_act[:minitoc][:set]==:on
223
+ true
224
+ elsif cmd_rc_act[:manifest_minitoc][:set]==:off \
225
+ || cmd_rc_act[:minitoc][:set]==:off
226
+ false
227
+ elsif doc_rc.is_a?(Method) \
228
+ and defined? doc_rc.manifest_minitoc? \
229
+ and (doc_rc.manifest_minitoc? ==:off \
230
+ || doc_rc.minitoc? ==:off)
231
+ false
232
+ elsif env_rc.build.manifest_minitoc? ==:off \
233
+ || env_rc.build.minitoc? ==:off
234
+ false
235
+ elsif minitoc? == false
236
+ false
237
+ else
238
+ true
239
+ end
240
+ end
241
+ def html_minitoc?
242
+ if html_top_band? == false #one form of navigation necessary
243
+ true
244
+ elsif cmd_rc_act[:html_minitoc][:set]==:on \
245
+ || cmd_rc_act[:minitoc][:set]==:on
246
+ true
247
+ elsif cmd_rc_act[:html_minitoc][:set]==:off \
248
+ || cmd_rc_act[:minitoc][:set]==:off
249
+ false
250
+ elsif doc_rc.is_a?(Method) \
251
+ and defined? doc_rc.html_minitoc? \
252
+ and (doc_rc.html_minitoc? ==:off \
253
+ || doc_rc.minitoc? ==:off)
254
+ false
255
+ elsif env_rc.build.html_minitoc? ==:off \
256
+ || env_rc.build.minitoc? ==:off
257
+ false
258
+ elsif minitoc? == false
259
+ false
260
+ else
261
+ true
262
+ end
263
+ end
264
+ def html_top_band?
265
+ if cmd_rc_act[:html_top_band][:set]==:on
266
+ true
267
+ elsif cmd_rc_act[:html_top_band][:set]==:off
268
+ false
269
+ elsif doc_rc.is_a?(Method) \
270
+ and defined? doc_rc.html_top_band? \
271
+ and doc_rc.html_top_band? ==:off
272
+ false
273
+ elsif env_rc.build.html_top_band? ==:off
274
+ false
275
+ else
276
+ true
277
+ end
278
+ end
279
+ def html_navigation?
280
+ if cmd_rc_act[:html_navigation][:set]==:on
281
+ true
282
+ elsif cmd_rc_act[:html_navigation][:set]==:off
283
+ false
284
+ elsif doc_rc.is_a?(Method) \
285
+ and defined? doc_rc.html_navigation? \
286
+ and doc_rc.html_navigation? ==:off
287
+ false
288
+ elsif env_rc.build.html_navigation? ==:off
289
+ false
290
+ else
291
+ true
292
+ end
293
+ end
294
+ def html_navigation_bar?
295
+ if cmd_rc_act[:html_navigation_bar][:set]==:on
296
+ true
297
+ elsif cmd_rc_act[:html_navigation_bar][:set]==:off
298
+ false
299
+ elsif doc_rc.is_a?(Method) \
300
+ and defined? doc_rc.html_navigation_bar? \
301
+ and doc_rc.html_navigation_bar? ==:off
302
+ false
303
+ elsif env_rc.build.html_navigation_bar? ==:off
304
+ false
305
+ else
306
+ false
307
+ end
308
+ end
309
+ def search_form?
310
+ if cmd_rc_act[:search_form][:set]==:on
311
+ true
312
+ elsif cmd_rc_act[:search_form][:set]==:off
313
+ false
314
+ elsif doc_rc.is_a?(Method) \
315
+ and defined? doc_rc.html_search_form? \
316
+ and doc_rc.search_form? ==:off
317
+ false
318
+ elsif env_rc.build.search_form? ==:off
319
+ false
320
+ else
321
+ true
322
+ end
323
+ end
324
+ def html_search_form?
325
+ if cmd_rc_act[:html_search_form][:set]==:on \
326
+ || cmd_rc_act[:search_form][:set]==:on
327
+ true
328
+ elsif cmd_rc_act[:html_search_form][:set]==:off \
329
+ || cmd_rc_act[:search_form][:set]==:off
330
+ false
331
+ elsif doc_rc.is_a?(Method) \
332
+ and defined? doc_rc.html_search_form? \
333
+ and (doc_rc.html_search_form? ==:off \
334
+ || doc_rc.search_form? ==:off)
335
+ false
336
+ elsif env_rc.build.html_search_form? ==:off \
337
+ || env_rc.build.search_form? ==:off
338
+ false
339
+ elsif search_form? == false
340
+ false
341
+ else
342
+ true
343
+ end
344
+ end
345
+ def html_right_pane?
346
+ if cmd_rc_act[:html_right_pane][:set]==:on
347
+ true
348
+ elsif cmd_rc_act[:html_right_pane][:set]==:off
349
+ false
350
+ elsif doc_rc.is_a?(Method) \
351
+ and defined? doc_rc.html_right_pane? \
352
+ and doc_rc.html_right_pane? ==:off
353
+ false
354
+ elsif env_rc.build.html_right_pane? ==:off
355
+ false
356
+ else
357
+ true
358
+ end
359
+ end
360
+ def segsubtoc?
361
+ if cmd_rc_act[:segsubtoc][:set]==:on
362
+ true
363
+ elsif cmd_rc_act[:segsubtoc][:set]==:off
364
+ false
365
+ elsif doc_rc.is_a?(Method) \
366
+ and defined? doc_rc.segsubtoc? \
367
+ and doc_rc.segsubtoc? ==:off
368
+ false
369
+ elsif env_rc.build.segsubtoc? ==:off
370
+ false
371
+ else
372
+ true
373
+ end
374
+ end
375
+ self
376
+ end
377
+ def ocn_html_identifier
378
+ (build.html_strict?) \
379
+ ? Mx[:ocn_id_char]
380
+ : ''
381
+ end
382
+ def output_dir_structure
383
+ def by_language_code?
384
+ if cmd_rc_act[:output_by][:set] == :language
385
+ true
386
+ elsif cmd_rc_act[:output_by][:set] == :filetype \
387
+ or cmd_rc_act[:output_by][:set] == :filename
388
+ false
389
+ elsif cmd_rc_act[:output_by][:set] == :language
390
+ true
391
+ else
392
+ env_rc.output_dir_structure.by_language_code?
393
+ end
394
+ end
395
+ def by_filetype?
396
+ if cmd_rc_act[:output_by][:set] == :filetype
397
+ true
398
+ elsif cmd_rc_act[:output_by][:set] == :language \
399
+ or cmd_rc_act[:output_by][:set] == :filename
400
+ false
401
+ elsif cmd_rc_act[:output_by][:set] == :filetype
402
+ true
403
+ else
404
+ env_rc.output_dir_structure.by_filetype?
405
+ end
406
+ end
407
+ def by_filename?
408
+ if cmd_rc_act[:output_by][:set] == :filename
409
+ true
410
+ elsif cmd_rc_act[:output_by][:set] == :language \
411
+ or cmd_rc_act[:output_by][:set] == :filetype
412
+ false
413
+ elsif cmd_rc_act[:output_by][:set] == :filename
414
+ true
415
+ else
416
+ env_rc.output_dir_structure.by_filename?
417
+ end
418
+ end
419
+ def multilingual?
420
+ by_language_code?
421
+ end
422
+ def dump?
423
+ ((cmd_rc_act[:dump][:bool] \
424
+ && cmd_rc_act[:dump][:inst]) \
425
+ || (env_rc.output_dir_structure.dump?)) \
426
+ ? true
427
+ : false
428
+ end
429
+ def redirect?
430
+ ((cmd_rc_act[:redirect][:bool] \
431
+ && cmd_rc_act[:redirect][:inst]) \
432
+ || (env_rc.output_dir_structure.redirect?)) \
433
+ ? true
434
+ : false
435
+ end
436
+ def dump_or_redirect?
437
+ ((dump?) || (redirect?)) \
438
+ ? true
439
+ : false
440
+ end
441
+ def by?
442
+ if dump?
443
+ :dump
444
+ elsif redirect?
445
+ :redirect
446
+ elsif by_language_code?
447
+ :language
448
+ elsif by_filetype?
449
+ :filetype
450
+ elsif by_filename?
451
+ :filename
452
+ else #recheck current default
453
+ :language
454
+ end
455
+ end
456
+ self
457
+ end
458
+ end
459
+ end
460
+ module SiSU_Info_Processing_Flag
461
+ class InfoProcessingFlag
462
+ attr_accessor :color,:act_0,:act_1,:act_2,:act_3,:act_4,:act_5,:act_6,:act_7,:act_8,:act_9
463
+ def initialize
464
+ @rc=SiSU_Get_Init::GetInit.new.sisu_yaml.rc
465
+ end
466
+ def color #configurable processing flag shortcuts
467
+ (defined? @rc['flag']['color']) \
468
+ ? @rc['flag']['color']
469
+ : false
470
+ end
471
+ def act_0 #configurable processing flag shortcuts
472
+ def default
473
+ '--manifest --digest --qrcode --text --html --epub --concordance --pdf --odf --docbook --xhtml --xml-sax --xml-dom --sqlite --verbose'
474
+ end
475
+ def str
476
+ if defined? @rc['flag']['act0'] \
477
+ and @rc['flag']['act0'].is_a?(String)
478
+ @rc['flag']['act0']
479
+ elsif defined? @rc['flag']['default'] \
480
+ and @rc['flag']['default'].is_a?(String)
481
+ @rc['flag']['default']
482
+ else default
483
+ end
484
+ end
485
+ def arr
486
+ str.scan(/\S+/)
487
+ end
488
+ self
489
+ end
490
+ def act_1 #configurable processing flag shortcuts
491
+ def default
492
+ '--manifest --text --html'
493
+ end
494
+ def str
495
+ if defined? @rc['flag']['act1'] \
496
+ and @rc['flag']['act1'].is_a?(String)
497
+ @rc['flag']['act1']
498
+ elsif defined? @rc['flag']['i'] \
499
+ and @rc['flag']['i'].is_a?(String)
500
+ @rc['flag']['i']
501
+ else default
502
+ end
503
+ end
504
+ def arr
505
+ str.scan(/\S+/)
506
+ end
507
+ self
508
+ end
509
+ def act_2 #configurable processing flag shortcuts
510
+ def default
511
+ '--manifest --text --html --epub --pdf'
512
+ end
513
+ def str
514
+ if defined? @rc['flag']['act2'] \
515
+ and @rc['flag']['act2'].is_a?(String)
516
+ @rc['flag']['act2']
517
+ elsif defined? @rc['flag']['ii'] \
518
+ and @rc['flag']['ii'].is_a?(String)
519
+ @rc['flag']['ii']
520
+ else default
521
+ end
522
+ end
523
+ def arr
524
+ str.scan(/\S+/)
525
+ end
526
+ self
527
+ end
528
+ def act_3 #configurable processing flag shortcuts
529
+ def default
530
+ '--manifest --text --html --epub --pdf --concordance --qrcode'
531
+ end
532
+ def str
533
+ if defined? @rc['flag']['act3'] \
534
+ and @rc['flag']['act3'].is_a?(String)
535
+ @rc['flag']['act3']
536
+ elsif defined? @rc['flag']['iii'] \
537
+ and @rc['flag']['iii'].is_a?(String)
538
+ @rc['flag']['iii']
539
+ else default
540
+ end
541
+ end
542
+ def arr
543
+ str.scan(/\S+/)
544
+ end
545
+ self
546
+ end
547
+ def act_4 #configurable processing flag shortcuts
548
+ def default
549
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook'
550
+ end
551
+ def str
552
+ if defined? @rc['flag']['act4'] \
553
+ and @rc['flag']['act4'].is_a?(String)
554
+ @rc['flag']['act4']
555
+ elsif defined? @rc['flag']['iv'] \
556
+ and @rc['flag']['iv'].is_a?(String)
557
+ @rc['flag']['iv']
558
+ else default
559
+ end
560
+ end
561
+ def arr
562
+ str.scan(/\S+/)
563
+ end
564
+ self
565
+ end
566
+ def act_5 #configurable processing flag shortcuts
567
+ def default
568
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite'
569
+ end
570
+ def str
571
+ if defined? @rc['flag']['act5'] \
572
+ and @rc['flag']['act5'].is_a?(String)
573
+ @rc['flag']['act5']
574
+ elsif defined? @rc['flag']['v'] \
575
+ and @rc['flag']['v'].is_a?(String)
576
+ @rc['flag']['v']
577
+ else default
578
+ end
579
+ end
580
+ def arr
581
+ str.scan(/\S+/)
582
+ end
583
+ self
584
+ end
585
+ def act_6 #configurable processing flag shortcuts
586
+ def default
587
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite --xhtml --xml-sax --xml-dom'
588
+ end
589
+ def str
590
+ if defined? @rc['flag']['act6'] \
591
+ and @rc['flag']['act6'].is_a?(String)
592
+ @rc['flag']['act6']
593
+ else default
594
+ end
595
+ end
596
+ def arr
597
+ str.scan(/\S+/)
598
+ end
599
+ self
600
+ end
601
+ def act_7 #configurable processing flag shortcuts
602
+ def default
603
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite --xhtml --xml-sax --xml-dom --source --sisupod'
604
+ end
605
+ def str
606
+ if defined? @rc['flag']['act7'] \
607
+ and @rc['flag']['act7'].is_a?(String)
608
+ @rc['flag']['act7']
609
+ else default
610
+ end
611
+ end
612
+ def arr
613
+ str.scan(/\S+/)
614
+ end
615
+ self
616
+ end
617
+ def act_8 #configurable processing flag shortcuts
618
+ def default
619
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --xhtml --xml-sax --xml-dom --pg --update'
620
+ end
621
+ def str
622
+ if defined? @rc['flag']['act8'] \
623
+ and @rc['flag']['act8'].is_a?(String)
624
+ @rc['flag']['act8']
625
+ else default
626
+ end
627
+ end
628
+ def arr
629
+ str.scan(/\S+/)
630
+ end
631
+ self
632
+ end
633
+ def act_9 #configurable processing flag shortcuts
634
+ def default
635
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --xhtml --xml-sax --xml-dom --pg --update --source --sisupod'
636
+ end
637
+ def str
638
+ if defined? @rc['flag']['act9'] \
639
+ and @rc['flag']['act9'].is_a?(String)
640
+ @rc['flag']['act9']
641
+ else default
642
+ end
643
+ end
644
+ def arr
645
+ str.scan(/\S+/)
646
+ end
647
+ self
648
+ end
649
+ def act_info
650
+ puts 'current "act" settings:'
651
+ acts=%w[ act_0 act_1 act_2 act_3 act_4 act_5 act_6 act_7 act_8 act_9 ]
652
+ acts.each_with_index do |m,i|
653
+ puts '--act-' + i.to_s + ' == ' \
654
+ + send(m).str
655
+ end
656
+ end
657
+ end
658
+ end
659
+ __END__