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,247 @@
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_filemap.rb;hb=HEAD>
55
+
56
+ =end
57
+ module SiSU_File_Map
58
+ require_relative 'constants' # constants.rb
59
+ require_relative 'utils' # utils.rb
60
+ require_relative 'se_info_env' # se_info_env.rb
61
+ class FileMap < SiSU_Info_Env::InfoEnv # se_info_env.rb
62
+ attr_accessor :local_sisu_source
63
+ def initialize(opt='') #watch / REVIEW
64
+ super()
65
+ @opt=opt #,opt.fns,opt.selections.str
66
+ @env=(@opt.fns && !(@opt.fns.empty?) \
67
+ ? (SiSU_Env::InfoEnv.new(@opt.fns))
68
+ : (SiSU_Env::InfoEnv.new('dummy.sst')))
69
+ ft=[]
70
+ if @opt.act[:ao][:set]==:on
71
+ @md=SiSU_Param::Parameters.new(@opt).get
72
+ if @md \
73
+ and defined? @md.fn \
74
+ and @md.fn # used for by_language_code?
75
+ if @md.opt.act[:html][:set]==:on #% --html, -h -H
76
+ ft << @md.fn[:html]
77
+ end
78
+ if @md.opt.act[:concordance][:set]==:on #% --concordance, -w
79
+ ft << @md.fn[:concordance]
80
+ end
81
+ if @md.opt.act[:manifest][:set]==:on #% --manifest, -y
82
+ ft << @md.fn[:manifest]
83
+ end
84
+ if @md.opt.act[:txt][:set]==:on #% --txt, -t -a
85
+ ft << @md.fn[:plain]
86
+ end
87
+ if @md.opt.act[:txt_textile][:set]==:on #% --textile
88
+ ft << @md.fn[:txt_textile]
89
+ end
90
+ if @md.opt.act[:txt_asciidoc][:set]==:on #% --asciidoc
91
+ ft << @md.fn[:txt_asciidoc]
92
+ end
93
+ if @md.opt.act[:txt_markdown][:set]==:on #% --markdown
94
+ ft << @md.fn[:txt_markdown]
95
+ end
96
+ if @md.opt.act[:txt_rst][:set]==:on #% --rst, --rest
97
+ ft << @md.fn[:txt_rst]
98
+ end
99
+ if @md.opt.act[:txt_orgmode][:set]==:on #% --orgmode
100
+ ft << @md.fn[:txt_orgmode]
101
+ end
102
+ if @md.opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml
103
+ ft << @md.fn[:xhtml]
104
+ end
105
+ if @md.opt.act[:epub][:set]==:on #% --epub, -e
106
+ ft << @md.fn[:epub]
107
+ end
108
+ if @md.opt.act[:manpage][:set]==:on #% --manpage, -i
109
+ ft << @md.fn[:manpage]
110
+ end
111
+ if @md.opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree
112
+ ft << @md.fn[:digest]
113
+ end
114
+ if @md.opt.act[:odt][:set]==:on #% --odt, -o opendocument
115
+ ft << @md.fn[:odf]
116
+ end
117
+ if @md.opt.act[:pdf][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf
118
+ ft << @md.fn[:pdf_l] << @md.fn[:pdf_p]
119
+ end
120
+ if @md.opt.act[:share_source][:set]==:on
121
+ ft << @md.fns
122
+ end
123
+ if @md.opt.act[:sisupod][:set]==:on #% --sisupod, -S make sisupod
124
+ ft << @md.fn[:sisupod]
125
+ end
126
+ if @md.opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type
127
+ ft << @md.fn[:sax]
128
+ end
129
+ if @md.opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type
130
+ ft << @md.fn[:dom]
131
+ end
132
+ if @md.opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook-book
133
+ ft << @md.fn[:xml_docbook_book]
134
+ end
135
+ if @md.opt.act[:xml_fictionbook][:set]==:on #% --xml-fictionbook
136
+ ft << @md.fn[:xml_fictionbook]
137
+ end
138
+ if @md.opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu
139
+ ft << @md.fn[:xml_scaffold_structure_sisu]
140
+ end
141
+ if @md.opt.act[:xml_scaffold_structure_collapse][:set]==:on #% --xml-scaffold-collapse
142
+ ft << @md.fn[:xml_scaffold_structure_collapse]
143
+ end
144
+ @fnb=@md.fnb
145
+ else # still needed where/when dp document param is not parsed
146
+ if @opt.act[:html][:set]==:on #% --html, -h -H
147
+ ft << '.html' << '.html.??'
148
+ end
149
+ if @opt.act[:concordance][:set]==:on #% --concordance, -w
150
+ ft << 'concordance.html' << '??.concordance.html' << 'concordance.??.html'
151
+ end
152
+ if @opt.act[:manifest][:set]==:on #% --manifest, -y
153
+ ft << 'sisu_manifest.html' << '??.sisu_manifest.html' << 'sisu_manifest.??.html'
154
+ end
155
+ if @opt.act[:txt][:set]==:on #% --txt, -t -a
156
+ ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt'
157
+ end
158
+ if @opt.act[:txt_textile][:set]==:on #% --textile
159
+ ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt'
160
+ end
161
+ if @opt.act[:txt_asciidoc][:set]==:on #% --asciidoc
162
+ ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt'
163
+ end
164
+ if @opt.act[:txt_markdown][:set]==:on #% --markdown
165
+ ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt'
166
+ end
167
+ if @opt.act[:txt_rst][:set]==:on #% --rst, --rest
168
+ ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt'
169
+ end
170
+ if @opt.act[:txt_orgmode][:set]==:on #% --orgmode
171
+ ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt'
172
+ end
173
+ if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml
174
+ ft << 'scroll.xhtml' << '??.scroll.xhtml' << 'scroll.??.xhtml'
175
+ end
176
+ if @opt.act[:epub][:set]==:on #% --epub, -e
177
+ ft << @fnb << '.epub'
178
+ end
179
+ if @opt.act[:manpage][:set]==:on #% --manpage, -i
180
+ ft << '.1' << '??.man.1' << 'man.??.1'
181
+ end
182
+ if @opt.act[:hash_digests][:set]==:on #% --hash-digests, -N digest tree
183
+ ft << 'digest.txt' << '??.digest.txt' << 'digest.??.txt'
184
+ end
185
+ if @opt.act[:odt][:set]==:on #% --odt, -o opendocument
186
+ ft << 'opendocument.odt' << '??.opendocument.odt' << 'opendocument.??.odt'
187
+ end
188
+ if @opt.act[:pdf][:set]==:on #% --pdf-l --pdf, -p latex/ texpdf
189
+ ft << 'landscape.pdf' << 'portrait.pdf' << '.pdf'
190
+ end
191
+ if @opt.act[:share_source][:set]==:on
192
+ ft << '.sst' << '.ssi' << '.ssm'
193
+ end
194
+ if @opt.act[:sisupod][:set]==:on #% --sisupod, -S make sisupod
195
+ ft << '.zip'
196
+ end
197
+ if @opt.act[:xml_sax][:set]==:on #% --xml-sax, -x xml sax type
198
+ ft << 'sax.xml' << '??.sax.xml' << 'sax.??.xml'
199
+ end
200
+ if @opt.act[:xml_dom][:set]==:on #% --xml-dom, -X xml dom type
201
+ ft << 'dom.xml' << '??.dom.xml' << 'dom.??.xml'
202
+ end
203
+ if @opt.act[:xml_docbook_book][:set]==:on #% --xml-docbook-book
204
+ ft << 'docbook.xml' << '??.docbook.xml' << 'docbook.??.xml'
205
+ end
206
+ if @opt.act[:xml_fictionbook][:set]==:on #% --xml-fictionbook
207
+ ft << 'fictionbook.xml' << '??.fictionbook.xml' << 'fictionbook.??.xml'
208
+ end
209
+ if @opt.act[:xml_scaffold_structure_sisu][:set]==:on #% --xml-scaffold --xml-scaffold-sisu
210
+ ft << 'scaffold.xml' << '??.scaffold.xml' << 'scaffold.??.xml'
211
+ end
212
+ if @opt.act[:xml_scaffold_structure_collapse][:set]==:on #% --xml-scaffold-collapse
213
+ ft << 'scaffold.xml' << '??.scaffold.xml' << 'scaffold.??.xml'
214
+ end
215
+ end
216
+ ft=ft.uniq
217
+ filetypes=ft.join(',')
218
+ @filetypes=if filetypes !~/..+/ then '' # -r called alone, copy all
219
+ elsif @opt.selections.str =~/u/ then '' # -u added, copy all, (used to create remote directory tree see output path), not the usual function of -u
220
+ elsif filetypes =~/\S+?,\S+/ then '*{' + filetypes + '}' # more than one relevant file type
221
+ else '*' + filetypes # one relevant file type
222
+ end
223
+ @source_path=(@fnb && !(@fnb.empty?) \
224
+ ? "#{@env.path.output}/#{@fnb}"
225
+ : @env.path.output)
226
+ @source_path_epub=(@fnb && !(@fnb.empty?) \
227
+ ? "#{@env.path.output}/epub"
228
+ : @env.path.output_epub)
229
+ @source_path_src=(@fnb && !(@fnb.empty?) \
230
+ ? "#{@env.path.output}/src"
231
+ : @env.path.output_src)
232
+ @source_path_pod=(@fnb && !(@fnb.empty?) \
233
+ ? "#{@env.path.output}/pod"
234
+ : @env.path.output_pod)
235
+ @source_path_harvest=(@fnb && !(@fnb.empty?) \
236
+ ? "#{@env.path.output}/manifest"
237
+ : @env.path.output_harvest)
238
+ @local_sisu_source=(@filetypes =~/\S/) \
239
+ ? "#{@source_path}/#{@filetypes}"
240
+ : @source_path
241
+ end
242
+ if @opt.act[:rsync][:set]==:on
243
+ end
244
+ end
245
+ end
246
+ end
247
+ __END__
@@ -0,0 +1,238 @@
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_get_init.rb;hb=HEAD>
55
+
56
+ =end
57
+ module SiSU_Get_Init
58
+ require_relative 'constants' # constants.rb
59
+ require_relative 'utils' # utils.rb
60
+ require_relative 'se_info_system' # se_info_system.rb
61
+ @@noyaml=false
62
+ class GetInit < SiSU_Info_Sys_Gen::InfoSystemGen # se_info_system.rb
63
+ @@noyaml=false
64
+ @@rc,@@sisu_doc_makefile,@@sisurc_path,@@tx=nil,nil,nil,nil
65
+ @@ad={ promo: nil, promo_list: nil, flag_promo: false }
66
+ @@sdmd=nil
67
+ attr_accessor :yaml
68
+ def initialize
69
+ super()
70
+ @markup_dir_changed_=if @@sdmd==$sisu_document_markup_directory
71
+ false
72
+ else
73
+ @@sdmd=$sisu_document_markup_directory
74
+ true
75
+ end
76
+ end
77
+ def tex
78
+ require_relative 'texpdf_parts' # texpdf_parts.rb
79
+ @@tx ||=SiSU_Parts_TeXpdf::TeX.new
80
+ end
81
+ def rc_path_options
82
+ v=SiSU_Env::InfoVersion.instance.get_version
83
+ [
84
+ $sisu_document_markup_directory_base_fixed_path \
85
+ + '/.sisu/v' \
86
+ + v.version_major,
87
+ $sisu_document_markup_directory_base_fixed_path \
88
+ + '/.sisu',
89
+ $sisu_document_markup_directory_base_fixed_path \
90
+ + '/_sisu/v' \
91
+ + v.version_major,
92
+ $sisu_document_markup_directory_base_fixed_path \
93
+ + '/_sisu',
94
+ @@home \
95
+ + '/.sisu/v' \
96
+ + v.version_major,
97
+ @@home \
98
+ + '/.sisu', \
99
+ @@sisu_etc \
100
+ + '/v' \
101
+ + v.version_major,
102
+ @@sisu_etc,
103
+ ]
104
+ end
105
+ def sisu_document_make
106
+ def makefile_name
107
+ S_CONF[:header_make]
108
+ end
109
+ def makefile
110
+ rc_path_options.each do |v|
111
+ if FileTest.exist?("#{v}/#{makefile_name}")
112
+ @sisu_make_path=v
113
+ break
114
+ end
115
+ end
116
+ @sisu_make_file_path=@sisu_make_path \
117
+ ? "#{@sisu_make_path}/#{makefile_name}"
118
+ : nil
119
+ end
120
+ def makefile_read
121
+ if makefile
122
+ sisu_doc_makefile=IO.read(makefile, mode: 'r:utf-8')
123
+ @sisu_doc_makefile=sisu_doc_makefile.split(/\s*\n\s*\n/m)
124
+ end
125
+ @sisu_doc_makefile
126
+ end
127
+ self
128
+ end
129
+ def sisu_yaml
130
+ def rc
131
+ if @markup_dir_changed_
132
+ rc_path_options.each do |v|
133
+ if @@noyaml \
134
+ or FileTest.exist?("#{v}/noyaml")
135
+ STDERR.puts "WARNING - YAML loading switched off, to enable delete the file:\n\t#{v}/noyaml\n\n" unless @@noyaml
136
+ @@noyaml=true
137
+ break
138
+ else
139
+ f=S_CONF[:rc_yml]
140
+ p_f="#{v}/#{f}"
141
+ if FileTest.exist?(p_f)
142
+ begin
143
+ require 'yaml'
144
+ rescue LoadError
145
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
146
+ error('yaml NOT FOUND (LoadError)')
147
+ end
148
+ @@sisurc_path=v
149
+ @@rc=YAML::load(File::open(p_f))
150
+ break
151
+ end
152
+ unless @@rc
153
+ f='sisurc.yaml'
154
+ p_f="#{v}/#{f}"
155
+ if FileTest.exist?(p_f)
156
+ begin
157
+ require 'yaml'
158
+ rescue LoadError
159
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
160
+ error('yaml NOT FOUND (LoadError)')
161
+ end
162
+ @@sisurc_path=v
163
+ @@rc=YAML::load(File::open(p_f))
164
+ break
165
+ end
166
+ end
167
+ end
168
+ end
169
+ end
170
+ @@rc
171
+ end
172
+ def rc_path
173
+ rc
174
+ @@sisurc_path
175
+ end
176
+ self
177
+ end
178
+ def ads #WORK AREA
179
+ tell_no_yaml='WARNING - YAML loading switched off, to enable delete the file:'
180
+ if @markup_dir_changed_
181
+ @ad_path=[
182
+ "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/skin/yml",
183
+ "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/skin/yml",
184
+ "#{@@home}/.sisu/skin/yml",
185
+ "#{@@sisu_etc}/skin/yml",
186
+ ]
187
+ @ad_path.each do |v|
188
+ if @@noyaml \
189
+ or FileTest.exist?("#{v}/noyaml")
190
+ puts tell_no_yaml + "\n\t#{v}/noyaml\n" unless @@noyaml
191
+ @@noyaml=true
192
+ break
193
+ else
194
+ if FileTest.exist?("#{v}/list.yml")
195
+ unless @@ad[:promo_list]
196
+ begin
197
+ require 'yaml'
198
+ rescue LoadError
199
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
200
+ error('yaml NOT FOUND (LoadError)')
201
+ end
202
+ @@ad[:promo_list] ||= YAML::load(File::open("#{v}/list.yml"))
203
+ end
204
+ @@ad[:flag_promo]=true
205
+ break
206
+ end
207
+ @@ad[:flag_promo]=false
208
+ end
209
+ end
210
+ @ad_path.each do |v|
211
+ if @@noyaml \
212
+ or FileTest.exist?("#{v}/noyaml")
213
+ puts tell_no_yaml + "\n\t#{v}/noyaml\n" unless @@noyaml
214
+ @@noyaml=true
215
+ break
216
+ else
217
+ if FileTest.exist?("#{v}/promo.yml")
218
+ unless @@ad[:promo]
219
+ begin
220
+ require 'yaml'
221
+ rescue LoadError
222
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
223
+ error('yaml NOT FOUND (LoadError)')
224
+ end
225
+ @@ad[:promo] ||= YAML::load(File::open("#{v}/promo.yml"))
226
+ end
227
+ @@ad[:flag_promo]=true
228
+ break
229
+ end
230
+ @@ad[:flag_promo]=false
231
+ end
232
+ end
233
+ end
234
+ @@ad
235
+ end
236
+ end
237
+ end
238
+ __END__