sisu 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,230 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
=begin
|
3
|
+
|
4
|
+
* Name: SiSU
|
5
|
+
|
6
|
+
** Description: documents, structuring, processing, publishing, search
|
7
|
+
*** html minitoc
|
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/html_minitoc.rb;hb=HEAD>
|
55
|
+
|
56
|
+
=end
|
57
|
+
module SiSU_HTML_MiniToc
|
58
|
+
require_relative 'html_tune' # html_tune.rb
|
59
|
+
include SiSU_HTML_Tune
|
60
|
+
class TocMini
|
61
|
+
@@seg_mini=nil
|
62
|
+
@@seg_url=''
|
63
|
+
@@firstseg=nil
|
64
|
+
def initialize(md,data)
|
65
|
+
@md,@data=md,data
|
66
|
+
@pat_strip_heading_name=/<a name="h?\d.*?">(.+?)<\/a>/
|
67
|
+
@tell=SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set]) if @md
|
68
|
+
end
|
69
|
+
def songsheet
|
70
|
+
if (@md.opt.act[:verbose][:set]==:on \
|
71
|
+
|| @md.opt.act[:verbose_plus][:set]==:on \
|
72
|
+
|| @md.opt.act[:maintenance][:set]==:on)
|
73
|
+
SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set],'Toc').txt_grey
|
74
|
+
end
|
75
|
+
toc=nil
|
76
|
+
@toc=[]
|
77
|
+
@data.each do |txt|
|
78
|
+
if txt.is ==:heading \
|
79
|
+
|| txt.is ==:heading_insert
|
80
|
+
txt.obj=txt.obj.gsub(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/m,''). #remove endnotes from toc
|
81
|
+
gsub(/<a name="-\d+" href="#_\d+"> <sup>\d+<\/sup> <\/a>/,'').
|
82
|
+
gsub(@pat_strip_heading_name,'\1')
|
83
|
+
#gsub(/(.*?)<a name="(\d+)"><\/a>(.*)/,'\1') #2002w42 altered gsub - problematic? - suspect
|
84
|
+
toc=case txt.ln
|
85
|
+
when 0 then SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_0
|
86
|
+
when 1 then SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_1
|
87
|
+
when 2 then SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_2
|
88
|
+
when 3 then SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_3
|
89
|
+
when 4 then SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_4
|
90
|
+
when 5 then SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_5
|
91
|
+
when 6 then SiSU_HTML_MiniToc::TocMini.new(@md,txt).level_6
|
92
|
+
else
|
93
|
+
end
|
94
|
+
@toc << toc
|
95
|
+
end
|
96
|
+
end
|
97
|
+
@toc
|
98
|
+
end
|
99
|
+
protected
|
100
|
+
def level_concordance
|
101
|
+
format_head_toc=SiSU_HTML_Format::HeadToc.new(@md)
|
102
|
+
@@seg_mini << format_head_toc.mini_seg_concordance
|
103
|
+
end
|
104
|
+
def level_metadata
|
105
|
+
format_head_toc=SiSU_HTML_Format::HeadToc.new(@md)
|
106
|
+
@@seg_mini << format_head_toc.mini_seg_metadata
|
107
|
+
end
|
108
|
+
def level_word_index
|
109
|
+
format_head_toc=SiSU_HTML_Format::HeadToc.new(@d0c)
|
110
|
+
@@seg_mini << format_head_toc.mini_concordance
|
111
|
+
end
|
112
|
+
def level_0
|
113
|
+
txt=@data
|
114
|
+
if (txt.is ==:heading \
|
115
|
+
|| txt.is ==:heading_insert) \
|
116
|
+
&& txt.ocn !=0
|
117
|
+
txt.obj=txt.obj.gsub(@pat_strip_heading_name,'\1')
|
118
|
+
end
|
119
|
+
txt_obj={ txt: txt.obj }
|
120
|
+
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
|
121
|
+
toc_mini=format_toc.mini_lev0
|
122
|
+
toc_mini
|
123
|
+
end
|
124
|
+
def level_1
|
125
|
+
txt=@data
|
126
|
+
if (txt.is ==:heading \
|
127
|
+
|| txt.is ==:heading_insert) \
|
128
|
+
&& txt.ocn !=0
|
129
|
+
txt.obj=txt.obj.gsub(@pat_strip_heading_name,'\1')
|
130
|
+
end
|
131
|
+
title=unless txt.obj =~/Document Information/ then txt.obj
|
132
|
+
else
|
133
|
+
link='metadata'
|
134
|
+
%{<b><a href="#{link}#{@md.lang_code_insert}#{Sfx[:html]}">#{txt.obj}</a></b>}
|
135
|
+
end
|
136
|
+
txt_obj={ txt: title }
|
137
|
+
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
|
138
|
+
toc_mini=if txt.name =~/^meta/ \
|
139
|
+
and txt.obj=~/Document Information/
|
140
|
+
format_toc.mini_tail
|
141
|
+
else format_toc.mini_lev1
|
142
|
+
end
|
143
|
+
toc_mini
|
144
|
+
end
|
145
|
+
def level_2
|
146
|
+
txt=@data
|
147
|
+
if (txt.is ==:heading \
|
148
|
+
|| txt.is ==:heading_insert) \
|
149
|
+
&& txt.ocn !=0
|
150
|
+
txt.obj=txt.obj.gsub(@pat_strip_heading_name,'\1')
|
151
|
+
end
|
152
|
+
txt_obj={ txt: txt.obj }
|
153
|
+
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
|
154
|
+
toc_mini=format_toc.mini_lev2
|
155
|
+
toc_mini
|
156
|
+
end
|
157
|
+
def level_3
|
158
|
+
txt=@data
|
159
|
+
txt_obj={ txt: txt.obj }
|
160
|
+
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
|
161
|
+
toc_mini=format_toc.mini_lev3
|
162
|
+
toc_mini
|
163
|
+
end
|
164
|
+
def level_4
|
165
|
+
txt=@data
|
166
|
+
unless txt =~/~metadata/
|
167
|
+
if txt.ln ==4
|
168
|
+
fnh={
|
169
|
+
fn: txt.name,
|
170
|
+
}
|
171
|
+
f=@md.file.base_filename.html_seg(fnh)
|
172
|
+
seg_link=%{ <a href="#{f}" target="_top">
|
173
|
+
#{txt.obj}
|
174
|
+
</a> }
|
175
|
+
@@seg_url=txt.name
|
176
|
+
elsif txt.obj =~/\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+/
|
177
|
+
fn,hd=/^(\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+)(.*)/.match(dob.obj)[1,2]
|
178
|
+
fnh={
|
179
|
+
fn: fn,
|
180
|
+
}
|
181
|
+
f=@md.file.base_filename.html_seg(fnh)
|
182
|
+
seg_link=%{<a href="#{f}" target="_top">#{fn} #{hd}</a> }
|
183
|
+
end
|
184
|
+
txt_obj={ txt: seg_link }
|
185
|
+
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
|
186
|
+
toc_mini=format_toc.mini_lev4
|
187
|
+
toc_mini
|
188
|
+
end
|
189
|
+
end
|
190
|
+
def level_5
|
191
|
+
txt=@data
|
192
|
+
if (txt.is ==:heading \
|
193
|
+
|| txt.is ==:heading_insert) \
|
194
|
+
&& txt.ocn !=0
|
195
|
+
txt.obj=txt.obj.gsub(@pat_strip_heading_name,'\1')
|
196
|
+
end
|
197
|
+
fnh={
|
198
|
+
fn: @@seg_url,
|
199
|
+
}
|
200
|
+
f=@md.file.base_filename.html_seg(fnh)
|
201
|
+
lnk_n_txt=%{ <a href="#{f}##{txt.ocn}">
|
202
|
+
#{txt.obj}
|
203
|
+
</a>}
|
204
|
+
txt_obj={ txt: lnk_n_txt }
|
205
|
+
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
|
206
|
+
toc_mini=format_toc.mini_lev5
|
207
|
+
toc_mini
|
208
|
+
end
|
209
|
+
def level_6
|
210
|
+
txt=@data
|
211
|
+
if (txt.is ==:heading \
|
212
|
+
|| txt.is ==:heading_insert) \
|
213
|
+
&& txt.ocn !=0
|
214
|
+
txt.obj=txt.obj.gsub(@pat_strip_heading_name,'\1')
|
215
|
+
end
|
216
|
+
fnh={
|
217
|
+
fn: @@seg_url,
|
218
|
+
}
|
219
|
+
f=@md.file.base_filename.html_seg(fnh)
|
220
|
+
lnk_n_txt=%{ <a href="#{f}##{txt.ocn}">
|
221
|
+
#{txt.obj}
|
222
|
+
</a>}
|
223
|
+
txt_obj={ txt: lnk_n_txt }
|
224
|
+
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
|
225
|
+
toc_mini=format_toc.mini_lev6
|
226
|
+
toc_mini
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|
230
|
+
__END__
|
@@ -0,0 +1,437 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
=begin
|
3
|
+
|
4
|
+
* Name: SiSU
|
5
|
+
|
6
|
+
** Description: documents, structuring, processing, publishing, search
|
7
|
+
*** shared html parts
|
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/html_parts.rb;hb=HEAD>
|
55
|
+
|
56
|
+
=end
|
57
|
+
module SiSU_Parts_HTML
|
58
|
+
require_relative 'generic_parts' # generic_parts.rb
|
59
|
+
include SiSU_Parts_Generic
|
60
|
+
def the_line_break
|
61
|
+
'<br>'
|
62
|
+
end
|
63
|
+
def the_table_close
|
64
|
+
'</td></tr>
|
65
|
+
</table>'
|
66
|
+
end
|
67
|
+
def the_table_cellpad_box
|
68
|
+
'"20"'
|
69
|
+
end
|
70
|
+
def the_color
|
71
|
+
def white
|
72
|
+
'#ffffff'
|
73
|
+
end
|
74
|
+
def black
|
75
|
+
'#000000'
|
76
|
+
end
|
77
|
+
def grey_pale
|
78
|
+
'#eeeeee'
|
79
|
+
end
|
80
|
+
def grey_medium
|
81
|
+
'#cccccc'
|
82
|
+
end
|
83
|
+
def grey
|
84
|
+
'#999999'
|
85
|
+
end
|
86
|
+
def blue_ink
|
87
|
+
'#003399'
|
88
|
+
end
|
89
|
+
def blue_tinge
|
90
|
+
'#e3ecef'
|
91
|
+
end
|
92
|
+
def yellow_light
|
93
|
+
'#fff3b6'
|
94
|
+
end
|
95
|
+
def table1
|
96
|
+
'ffffcc'
|
97
|
+
end
|
98
|
+
def table2
|
99
|
+
'c0d0f0'
|
100
|
+
end
|
101
|
+
def band1
|
102
|
+
%{"#{white}"}
|
103
|
+
end
|
104
|
+
def band2
|
105
|
+
%{"#{white}"}
|
106
|
+
end
|
107
|
+
self
|
108
|
+
end
|
109
|
+
def the_url_decoration
|
110
|
+
#def tex_open #'{\UseTextSymbol{OML}{<}}'
|
111
|
+
# Dx[:url_o]
|
112
|
+
#end
|
113
|
+
#def tex_close #'{\UseTextSymbol{OML}{>}}'
|
114
|
+
# Dx[:url_c]
|
115
|
+
#end
|
116
|
+
def xml_open #'<'
|
117
|
+
Dx[:url_o]
|
118
|
+
end
|
119
|
+
def xml_close #'>'
|
120
|
+
Dx[:url_c]
|
121
|
+
end
|
122
|
+
def txt_open
|
123
|
+
'<'
|
124
|
+
end
|
125
|
+
def txt_close
|
126
|
+
'>'
|
127
|
+
end
|
128
|
+
self
|
129
|
+
end
|
130
|
+
def the_width
|
131
|
+
def table1
|
132
|
+
'"100%"'
|
133
|
+
end
|
134
|
+
def table2
|
135
|
+
'"99%"'
|
136
|
+
end
|
137
|
+
def table_txt
|
138
|
+
'"94%"'
|
139
|
+
end
|
140
|
+
def table_txt_r
|
141
|
+
'"96%"'
|
142
|
+
end
|
143
|
+
self
|
144
|
+
end
|
145
|
+
def the_png
|
146
|
+
def _url_path_image_base #used for html image display
|
147
|
+
"#{Xx[:html_relative2]}_sisu/image"
|
148
|
+
end
|
149
|
+
def ico
|
150
|
+
%{ <link rel="shortcut icon" href="../_sisu/image/#{the_icon.i_ico}" />}
|
151
|
+
end
|
152
|
+
def png_home
|
153
|
+
%{<img border="0" src="#{_url_path_image_base}/#{the_icon.home_button}" alt="#{the_text.home} -->" />}
|
154
|
+
end
|
155
|
+
def png_home_button
|
156
|
+
rel=@dir.path_rel_links.html_scroll_2
|
157
|
+
%{<img border="0" src="#{rel}/#{the_icon.home_button}" alt="#{the_text.home} -->" />}
|
158
|
+
end
|
159
|
+
self
|
160
|
+
end
|
161
|
+
def the_font
|
162
|
+
def set_fonts
|
163
|
+
'verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman'
|
164
|
+
#'verdana, arial, georgia, tahoma, sans-serif, helvetica, "times new roman", times, roman'
|
165
|
+
end
|
166
|
+
def set_face
|
167
|
+
%{face="#{set_fonts}"}
|
168
|
+
end
|
169
|
+
def set_color
|
170
|
+
'color="#000000"'
|
171
|
+
end
|
172
|
+
def set_size_endnote
|
173
|
+
'size="3"'
|
174
|
+
end
|
175
|
+
def set_small
|
176
|
+
'size="3"'
|
177
|
+
end
|
178
|
+
def set_tiny
|
179
|
+
'size="2"'
|
180
|
+
end
|
181
|
+
def paragraph_font_tiny
|
182
|
+
%{<font #{set_tiny} #{set_face}>}
|
183
|
+
end
|
184
|
+
def paragraph_font_small
|
185
|
+
%{<font #{set_small} #{set_face}>}
|
186
|
+
end
|
187
|
+
self
|
188
|
+
end
|
189
|
+
def the_nav
|
190
|
+
def txt_homepage
|
191
|
+
%{ <font face="#{the_font.set_fonts}" size="2">
|
192
|
+
home
|
193
|
+
</font> }
|
194
|
+
end
|
195
|
+
def txt_toc_link
|
196
|
+
%{ <font face="#{the_font.set_fonts}" size="2">
|
197
|
+
toc
|
198
|
+
</font> }
|
199
|
+
end
|
200
|
+
def txt_doc_link
|
201
|
+
%{ <font face="#{the_font.set_fonts}" size="2">
|
202
|
+
scroll
|
203
|
+
</font> }
|
204
|
+
end
|
205
|
+
def txt_manifest
|
206
|
+
#{png_manifest} document manifest
|
207
|
+
%{ <font face="#{the_font.set_fonts}" size="2">
|
208
|
+
[ document manifest ]
|
209
|
+
</font> }
|
210
|
+
end
|
211
|
+
def txt_concordance
|
212
|
+
%{ <font face="#{the_font.set_fonts}" size="2">
|
213
|
+
A-Z
|
214
|
+
</font> }
|
215
|
+
end
|
216
|
+
self
|
217
|
+
end
|
218
|
+
def the_banner
|
219
|
+
def home_button_only
|
220
|
+
%{<a href="#{url.site}/">
|
221
|
+
#{the_png.png_home_button}
|
222
|
+
</a>}
|
223
|
+
end
|
224
|
+
def banner_band
|
225
|
+
%{<table summary="home button" width="100%" border="0" cellpadding="3" align="center">
|
226
|
+
<tr><td align="left" valign="middle">
|
227
|
+
<a href="#{url.site}/" target="_top">
|
228
|
+
#{the_png.png_home}
|
229
|
+
</a>
|
230
|
+
</td>
|
231
|
+
<td width="90%">
|
232
|
+
#{the_table_close}}
|
233
|
+
end
|
234
|
+
def instrument_cover_band_scr
|
235
|
+
'<table summary="scroll instrument cover band" width="100%" border="0" cellpadding="8" align="center">
|
236
|
+
<tr><td align="center">'
|
237
|
+
end
|
238
|
+
def instrument_cover_band_seg
|
239
|
+
'<table summary="segment instrument cover band, title, author, location" width="100%" border="0" cellpadding="8" align="center">
|
240
|
+
<tr><td align="center">'
|
241
|
+
end
|
242
|
+
self
|
243
|
+
end
|
244
|
+
def the_margin
|
245
|
+
def txt_0
|
246
|
+
%{<table summary="" width=#{the_width.table_txt} border="0" cellpadding="2" align="center">
|
247
|
+
<tr><td width=#{indent_level_0} align="right">
|
248
|
+
</td><td valign="top" align="justify">}
|
249
|
+
end
|
250
|
+
def txt_1
|
251
|
+
%{<table summary="" width=#{the_width.table_txt} border="0" cellpadding="2" align="center">
|
252
|
+
<tr><td width=#{indent_level_1} align="right"></td><td valign="top" align="justify">}
|
253
|
+
end
|
254
|
+
def txt_2
|
255
|
+
%{<table summary="" width=#{the_width.table_txt} border="0" cellpadding="2" align="center">
|
256
|
+
<tr><td width=#{indent_level_2} align="right">
|
257
|
+
</td>
|
258
|
+
<td valign="top" align="justify">}
|
259
|
+
end
|
260
|
+
def txt_3
|
261
|
+
%{<table summary="" width=#{the_width.table_txt} border="0" cellpadding="2" align="center">
|
262
|
+
<tr><td width=#{indent_level_3} align="right">
|
263
|
+
</td>
|
264
|
+
<td valign="top" align="justify">}
|
265
|
+
end
|
266
|
+
def css
|
267
|
+
'<table summary="normal text css" width="100%" border="0" cellpadding="2" align="center">
|
268
|
+
<tr><td valign="top" align="justify"> '
|
269
|
+
end
|
270
|
+
def num
|
271
|
+
'</p> </td><td width="4%" align="right" valign="top">'
|
272
|
+
end
|
273
|
+
def numless
|
274
|
+
'</td><td width="4%" align="right" valign="top">'
|
275
|
+
end
|
276
|
+
def num_css
|
277
|
+
'</td>
|
278
|
+
<td width="2%" align="right" valign="top"> '
|
279
|
+
end
|
280
|
+
self
|
281
|
+
end
|
282
|
+
end
|
283
|
+
module SiSU_Proj_HTML
|
284
|
+
require_relative 'se' # se.rb
|
285
|
+
include SiSU_Env
|
286
|
+
#require_relative 'css' # css.rb
|
287
|
+
# include SiSU_Style
|
288
|
+
class Bits
|
289
|
+
include SiSU_Parts_HTML
|
290
|
+
def initialize
|
291
|
+
@v=SiSU_Env::InfoVersion.instance.get_version
|
292
|
+
#@dir=SiSU_Env::InfoEnv.new
|
293
|
+
#@date=SiSU_Env::InfoDate.new #{@date.year}
|
294
|
+
end
|
295
|
+
def txt_generator
|
296
|
+
%{ <meta name="generator" content="#{@v.project} #{@v.version} of #{@v.date_stamp} (#{@v.date}) (n*x and Ruby!)" />
|
297
|
+
<link rel="generator" href="http://www.sisudoc.org/" />}
|
298
|
+
end
|
299
|
+
def widget_sisu_text
|
300
|
+
<<WOK
|
301
|
+
<p class="tiny"><font color="#666666" size="2">
|
302
|
+
Output generated by
|
303
|
+
<a href="#{the_url.sisu}">
|
304
|
+
#{@v.project}
|
305
|
+
</a>
|
306
|
+
#{@v.version} #{@v.date} (#{@v.date_stamp})
|
307
|
+
</font></p>
|
308
|
+
WOK
|
309
|
+
end
|
310
|
+
def credits_sisu_manifest
|
311
|
+
widget_sisu_text
|
312
|
+
end
|
313
|
+
def widget_sisu
|
314
|
+
<<WOK
|
315
|
+
<!-- widget sisu -->
|
316
|
+
<tr><td valign="top" width="100%">
|
317
|
+
<!-- SiSU Rights -->
|
318
|
+
#{widget_sisu_text}
|
319
|
+
</td></tr>
|
320
|
+
WOK
|
321
|
+
end
|
322
|
+
def credits_sisu
|
323
|
+
%{<div class="substance">
|
324
|
+
<table summary="SiSU summary" cellpadding="4" border="0">
|
325
|
+
<tr><td>
|
326
|
+
#{widget_sisu}
|
327
|
+
</table></div>}
|
328
|
+
''
|
329
|
+
end
|
330
|
+
def widget_promo # Array used to build promo from list.yml and promo.yml
|
331
|
+
# ['sisu_icon','sisu','sisu_search_libre','open_society','fsf','ruby']
|
332
|
+
end
|
333
|
+
end
|
334
|
+
class Home
|
335
|
+
def initialize
|
336
|
+
@v=SiSU_Env::InfoVersion.instance.get_version
|
337
|
+
@dir=SiSU_Env::InfoEnv.new
|
338
|
+
@date=SiSU_Env::InfoDate.new #{@date.year}
|
339
|
+
end
|
340
|
+
def redirect
|
341
|
+
<<WOK
|
342
|
+
<html><head>
|
343
|
+
<title>SiSU</title>
|
344
|
+
<meta http-equiv="refresh" content="0, url=http://www.sisudoc.org/sisu/SiSU/">
|
345
|
+
</head>
|
346
|
+
<body>
|
347
|
+
SiSU informtion provided at <a href="http://www.sisudoc.org/sisu/SiSU/">www.sisudoc.org/sisu/SiSU</a><p />
|
348
|
+
If your browser supports redirection, you will be escorted there shortly.
|
349
|
+
</body>
|
350
|
+
</html>
|
351
|
+
WOK
|
352
|
+
end
|
353
|
+
def homepage
|
354
|
+
<<WOK
|
355
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
356
|
+
<head>
|
357
|
+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
358
|
+
<title>SiSU information Structuring Universe - Structured information, Serialized Units - software for electronic texts, documents, books, digital libraries in plaintext, HTML, EPUB, XHTML, XML, ODF (OpenDocument), LaTeX, PDF, SQL (PostgreSQL and SQLite), and for search</title>
|
359
|
+
<meta name="dc.title" content="SiSU - SiSU information Structuring Universe, Structured information Serialised Units, #{@date.year_static}" />
|
360
|
+
<meta name="dc.creator" content="Ralph Amissah" />
|
361
|
+
<meta name="dc.subject" content= "document structuring, ebook, publishing, PDF, LaTeX, XML, ODF, EPUB, SQL, postgresql, sqlite, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, granular search, digital library" />
|
362
|
+
<meta name="dc.publisher" content= "SiSU http://www.sisudoc.org/" />
|
363
|
+
<meta name="dc.language" content="en" />
|
364
|
+
<meta name="dc.rights" content="Copyright Ralph Amissah" />
|
365
|
+
<meta name="generator" content="#{@v.project} #{@v.version} of #{@v.date_stamp} (#{@v.date}) (n*x and Ruby!)" />
|
366
|
+
<link rel="generator" href="http://www.sisudoc.org/" />
|
367
|
+
<link rel="stylesheet" href="./#{@dir.path.style}/harvest.css" type="text/css" />
|
368
|
+
<link rel="shortcut icon" href="./_sisu/image/rb7.ico" />
|
369
|
+
</head>
|
370
|
+
|
371
|
+
<body lang="en" xml:lang="en">
|
372
|
+
<a name="top" id="top"></a>
|
373
|
+
<a name="up" id="up"></a>
|
374
|
+
<a name="start" id="start"></a>
|
375
|
+
|
376
|
+
<h1>SiSU</h1>
|
377
|
+
<p>
|
378
|
+
[<a href="http://sisudoc.org/sisu_manual/en/html/sisu/toc.html">Manual</a>]
|
379
|
+
</p>
|
380
|
+
<p>
|
381
|
+
[<a href="http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary">Source</a>]
|
382
|
+
[<a href="http://lists.sisudoc.org/listinfo/sisu">List Info (sisu@lists.sisudoc.org)</a>]
|
383
|
+
</p>
|
384
|
+
|
385
|
+
<h1>SiSU Markup Samples</h1>
|
386
|
+
<p>
|
387
|
+
[<a href="http://git.sisudoc.org/gitweb/?p=doc/sisu-markup-samples.git;a=summary">Source</a>]
|
388
|
+
[<a href="http://sisudoc.org/sisu_markup_samples.html">Output</a>]
|
389
|
+
</p>
|
390
|
+
|
391
|
+
<hr />
|
392
|
+
|
393
|
+
<h2 class="top_band_tiny">
|
394
|
+
Structured information, Serialized Units
|
395
|
+
|
396
|
+
<a href="http://www.sisudoc.org" target="_top">
|
397
|
+
<www.sisudoc.org>
|
398
|
+
</a>
|
399
|
+
or
|
400
|
+
<a href="http://www.jus.uio.no/sisu/" target="_top">
|
401
|
+
<www.jus.uio.no/sisu/>
|
402
|
+
</a>
|
403
|
+
software for electronic texts, document collections, books, digital libraries & search, with "atomic search" & text locating system (shared object citation numbering: "<i>ocn</i>").
|
404
|
+
Outputs include: plaintext, HTML, EPUB, ODT (OpenDocumentText), (XHTML, XML,) LaTeX, PDF, SQL (PostgreSQL and SQLite).
|
405
|
+
</h2>
|
406
|
+
<p class="small">
|
407
|
+
<a href="mailto:sisu@lists.sisudoc.org">
|
408
|
+
<sisu@lists.sisudoc.org>
|
409
|
+
</a>
|
410
|
+
<a href="http://lists.sisudoc.org/listinfo/sisu">
|
411
|
+
<http://lists.sisudoc.org/listinfo/sisu>
|
412
|
+
</a>
|
413
|
+
</p>
|
414
|
+
<p class="small">
|
415
|
+
<a href="mailto:ralph@amissah.com">
|
416
|
+
<ralph@amissah.com>
|
417
|
+
</a>
|
418
|
+
<a href="mailto:ralph.amissah@gmail.com">
|
419
|
+
<ralph.amissah@gmail.com>
|
420
|
+
</a>
|
421
|
+
</p>
|
422
|
+
<p class="tiny">
|
423
|
+
#{@v.project} #{@v.version} of #{@v.date_stamp} (#{@v.date}) (n*x and Ruby!), #{@date.year_static}.
|
424
|
+
</p>
|
425
|
+
<p class="tiny">
|
426
|
+
w3 since October 3 1993.
|
427
|
+
</p>
|
428
|
+
</body>
|
429
|
+
</html>
|
430
|
+
WOK
|
431
|
+
end
|
432
|
+
def home_toc
|
433
|
+
' '
|
434
|
+
end
|
435
|
+
end
|
436
|
+
end
|
437
|
+
__END__
|