aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu')
-rw-r--r--lib/sisu/current/air.rb80
-rw-r--r--lib/sisu/current/ao.rb (renamed from lib/sisu/v5/ao.rb)118
-rw-r--r--lib/sisu/current/ao_character_check.rb (renamed from lib/sisu/v6/ao_character_check.rb)77
-rw-r--r--lib/sisu/current/ao_composite.rb (renamed from lib/sisu/v6/ao_composite.rb)79
-rw-r--r--lib/sisu/current/ao_doc_objects.rb (renamed from lib/sisu/v5/ao_doc_objects.rb)77
-rw-r--r--lib/sisu/current/ao_doc_str.rb (renamed from lib/sisu/v6/ao_doc_str.rb)767
-rw-r--r--lib/sisu/current/ao_endnotes.rb (renamed from lib/sisu/v5/ao_endnotes.rb)77
-rw-r--r--lib/sisu/current/ao_expand_insertions.rb (renamed from lib/sisu/v6/ao_expand_insertions.rb)77
-rw-r--r--lib/sisu/current/ao_hash_digest.rb (renamed from lib/sisu/v5/ao_hash_digest.rb)77
-rw-r--r--lib/sisu/current/ao_idx.rb (renamed from lib/sisu/v6/ao_idx.rb)77
-rw-r--r--lib/sisu/current/ao_images.rb (renamed from lib/sisu/v5/ao_images.rb)81
-rw-r--r--lib/sisu/current/ao_metadata.rb86
-rw-r--r--lib/sisu/current/ao_misc_arrange.rb (renamed from lib/sisu/v5/ao_misc_arrange.rb)77
-rw-r--r--lib/sisu/current/ao_numbering.rb (renamed from lib/sisu/v5/ao_numbering.rb)87
-rw-r--r--lib/sisu/current/ao_syntax.rb (renamed from lib/sisu/v5/ao_syntax.rb)87
-rw-r--r--lib/sisu/current/cgi.rb84
-rw-r--r--lib/sisu/current/cgi_pgsql.rb (renamed from lib/sisu/v5/cgi_pgsql.rb)77
-rw-r--r--lib/sisu/current/cgi_sql_common.rb (renamed from lib/sisu/v5/cgi_sql_common.rb)83
-rw-r--r--lib/sisu/current/cgi_sqlite.rb (renamed from lib/sisu/v6/cgi_sqlite.rb)77
-rw-r--r--lib/sisu/current/conf.rb (renamed from lib/sisu/v6/conf.rb)77
-rw-r--r--lib/sisu/current/constants.rb (renamed from lib/sisu/v5/constants.rb)86
-rw-r--r--lib/sisu/current/css.rb (renamed from lib/sisu/v5/css.rb)95
-rw-r--r--lib/sisu/current/db_columns.rb (renamed from lib/sisu/v5/db_columns.rb)85
-rw-r--r--lib/sisu/current/db_create.rb (renamed from lib/sisu/v6/db_create.rb)78
-rw-r--r--lib/sisu/current/db_dbi.rb (renamed from lib/sisu/v5/db_dbi.rb)78
-rw-r--r--lib/sisu/current/db_drop.rb (renamed from lib/sisu/v6/db_drop.rb)78
-rw-r--r--lib/sisu/current/db_import.rb (renamed from lib/sisu/v5/db_import.rb)78
-rw-r--r--lib/sisu/current/db_indexes.rb (renamed from lib/sisu/v6/db_indexes.rb)78
-rw-r--r--lib/sisu/current/db_load_tuple.rb (renamed from lib/sisu/v5/db_load_tuple.rb)78
-rw-r--r--lib/sisu/current/db_remove.rb (renamed from lib/sisu/v6/db_remove.rb)78
-rw-r--r--lib/sisu/current/db_select.rb (renamed from lib/sisu/v6/db_select.rb)78
-rw-r--r--lib/sisu/current/db_sqltxt.rb (renamed from lib/sisu/v6/db_sqltxt.rb)78
-rw-r--r--lib/sisu/current/db_tests.rb (renamed from lib/sisu/v6/db_tests.rb)78
-rw-r--r--lib/sisu/current/dbi.rb (renamed from lib/sisu/v5/dbi.rb)77
-rw-r--r--lib/sisu/current/dbi_discrete.rb (renamed from lib/sisu/v5/dbi_discrete.rb)77
-rw-r--r--lib/sisu/current/digests.rb (renamed from lib/sisu/v5/digests.rb)77
-rw-r--r--lib/sisu/current/dp.rb (renamed from lib/sisu/v6/dp.rb)131
-rw-r--r--lib/sisu/current/dp_identify_markup.rb (renamed from lib/sisu/v5/dp_identify_markup.rb)81
-rw-r--r--lib/sisu/current/dp_make.rb (renamed from lib/sisu/v6/dp_make.rb)79
-rw-r--r--lib/sisu/current/embedded.rb (renamed from lib/sisu/v5/embedded.rb)77
-rw-r--r--lib/sisu/current/errors.rb84
-rw-r--r--lib/sisu/current/generic_parts.rb131
-rw-r--r--lib/sisu/current/git.rb (renamed from lib/sisu/v6/git.rb)83
-rw-r--r--lib/sisu/current/html.rb (renamed from lib/sisu/v6/html.rb)77
-rw-r--r--lib/sisu/current/html_concordance.rb (renamed from lib/sisu/v5/html_concordance.rb)78
-rw-r--r--lib/sisu/current/html_format.rb (renamed from lib/sisu/v5/html_format.rb)83
-rw-r--r--lib/sisu/current/html_harvest.rb109
-rw-r--r--lib/sisu/current/html_harvest_author_format.rb111
-rw-r--r--lib/sisu/current/html_harvest_authors.rb (renamed from lib/sisu/v6/html_harvest_authors.rb)78
-rw-r--r--lib/sisu/current/html_harvest_topics.rb (renamed from lib/sisu/v6/html_harvest_topics.rb)80
-rw-r--r--lib/sisu/current/html_lite_shared.rb (renamed from lib/sisu/v5/html_lite_shared.rb)79
-rw-r--r--lib/sisu/current/html_manifest.rb (renamed from lib/sisu/v6/html_manifest.rb)77
-rw-r--r--lib/sisu/current/html_minitoc.rb (renamed from lib/sisu/v6/html_minitoc.rb)78
-rw-r--r--lib/sisu/current/html_parts.rb (renamed from lib/sisu/v5/html_parts.rb)77
-rw-r--r--lib/sisu/current/html_promo.rb (renamed from lib/sisu/v6/html_promo.rb)77
-rw-r--r--lib/sisu/current/html_scroll.rb (renamed from lib/sisu/v5/html_scroll.rb)77
-rw-r--r--lib/sisu/current/html_segments.rb (renamed from lib/sisu/v6/html_segments.rb)77
-rw-r--r--lib/sisu/current/html_shared.rb62
-rw-r--r--lib/sisu/current/html_table.rb64
-rw-r--r--lib/sisu/current/html_tune.rb (renamed from lib/sisu/v6/html_tune.rb)77
-rw-r--r--lib/sisu/current/hub.rb (renamed from lib/sisu/v5/hub.rb)82
-rw-r--r--lib/sisu/current/hub_actions.rb (renamed from lib/sisu/v6/hub_actions.rb)78
-rw-r--r--lib/sisu/current/hub_loop_markup_files.rb (renamed from lib/sisu/v5/hub_loop_markup_files.rb)78
-rw-r--r--lib/sisu/current/hub_options.rb (renamed from lib/sisu/v5/hub_options.rb)110
-rw-r--r--lib/sisu/current/i18n.rb (renamed from lib/sisu/v5/i18n.rb)77
-rw-r--r--lib/sisu/current/manpage.rb (renamed from lib/sisu/v6/manpage.rb)78
-rw-r--r--lib/sisu/current/manpage_format.rb85
-rw-r--r--lib/sisu/current/po4a.rb (renamed from lib/sisu/v6/po4a.rb)424
-rw-r--r--lib/sisu/current/po4a_set.rb (renamed from lib/sisu/v6/po4a_set.rb)77
-rw-r--r--lib/sisu/current/prog_text_translation.rb (renamed from lib/sisu/v5/prog_text_translation.rb)77
-rw-r--r--lib/sisu/current/qrcode.rb (renamed from lib/sisu/v5/qrcode.rb)77
-rw-r--r--lib/sisu/current/relaxng.rb (renamed from lib/sisu/v5/relaxng.rb)77
-rw-r--r--lib/sisu/current/remote.rb (renamed from lib/sisu/v5/remote.rb)77
-rw-r--r--lib/sisu/current/rexml.rb (renamed from lib/sisu/v5/rexml.rb)81
-rw-r--r--lib/sisu/current/se.rb (renamed from lib/sisu/v5/se.rb)77
-rw-r--r--lib/sisu/current/se_cleanoutput.rb (renamed from lib/sisu/v5/se_cleanoutput.rb)77
-rw-r--r--lib/sisu/current/se_clear.rb106
-rw-r--r--lib/sisu/current/se_createsite.rb (renamed from lib/sisu/v6/se_createsite.rb)79
-rw-r--r--lib/sisu/current/se_css.rb (renamed from lib/sisu/v6/se_css.rb)77
-rw-r--r--lib/sisu/current/se_date.rb92
-rw-r--r--lib/sisu/current/se_db.rb (renamed from lib/sisu/v6/se_db.rb)77
-rw-r--r--lib/sisu/current/se_envcall.rb (renamed from lib/sisu/v5/se_envcall.rb)77
-rw-r--r--lib/sisu/current/se_file_op.rb (renamed from lib/sisu/v5/se_file_op.rb)105
-rw-r--r--lib/sisu/current/se_filemap.rb (renamed from lib/sisu/v6/se_filemap.rb)77
-rw-r--r--lib/sisu/current/se_get_init.rb (renamed from lib/sisu/v6/se_get_init.rb)93
-rw-r--r--lib/sisu/current/se_hub_particulars.rb (renamed from lib/sisu/v5/se_hub_particulars.rb)78
-rw-r--r--lib/sisu/current/se_info_env.rb (renamed from lib/sisu/v6/se_info_env.rb)126
-rw-r--r--lib/sisu/current/se_info_port.rb70
-rw-r--r--lib/sisu/current/se_info_system.rb (renamed from lib/sisu/v6/se_info_system.rb)89
-rw-r--r--lib/sisu/current/se_load.rb108
-rw-r--r--lib/sisu/current/se_processing.rb (renamed from lib/sisu/v6/se_processing.rb)77
-rw-r--r--lib/sisu/current/se_programs.rb (renamed from lib/sisu/v5/se_programs.rb)81
-rw-r--r--lib/sisu/current/se_remotes.rb (renamed from lib/sisu/v5/se_remotes.rb)77
-rw-r--r--lib/sisu/current/se_standardise_lang.rb (renamed from lib/sisu/v6/se_standardise_lang.rb)77
-rw-r--r--lib/sisu/current/se_version.rb (renamed from lib/sisu/v5/se_version.rb)88
-rw-r--r--lib/sisu/current/shared_images.rb (renamed from lib/sisu/v5/shared_images.rb)78
-rw-r--r--lib/sisu/current/shared_markup_alt.rb (renamed from lib/sisu/v6/shared_markup_alt.rb)77
-rw-r--r--lib/sisu/current/shared_metadata.rb (renamed from lib/sisu/v6/shared_metadata.rb)77
-rw-r--r--lib/sisu/current/shared_sem.rb (renamed from lib/sisu/v6/shared_sem.rb)78
-rw-r--r--lib/sisu/current/sisu_thor_lib.rb407
-rw-r--r--lib/sisu/current/sitemaps.rb (renamed from lib/sisu/v5/sitemaps.rb)77
-rw-r--r--lib/sisu/current/src_kdissert_share.rb102
-rw-r--r--lib/sisu/current/src_share.rb109
-rw-r--r--lib/sisu/current/src_shared.rb (renamed from lib/sisu/v6/src_shared.rb)77
-rw-r--r--lib/sisu/current/src_sisupod_make.rb (renamed from lib/sisu/v5/src_sisupod_make.rb)77
-rw-r--r--lib/sisu/current/sst_convert_markup.rb (renamed from lib/sisu/v6/sst_convert_markup.rb)81
-rw-r--r--lib/sisu/current/sst_do_inline_footnotes.rb (renamed from lib/sisu/v6/sst_do_inline_footnotes.rb)79
-rw-r--r--lib/sisu/current/sst_from_xml.rb (renamed from lib/sisu/v5/sst_from_xml.rb)78
-rw-r--r--lib/sisu/current/sst_identify_markup.rb (renamed from lib/sisu/v6/sst_identify_markup.rb)81
-rw-r--r--lib/sisu/current/sst_to_s_xml_sax.rb (renamed from lib/sisu/v6/sst_to_s_xml_sax.rb)77
-rw-r--r--lib/sisu/current/termsheet.rb (renamed from lib/sisu/v6/termsheet.rb)82
-rw-r--r--lib/sisu/current/texinfo.rb (renamed from lib/sisu/v6/texinfo.rb)77
-rw-r--r--lib/sisu/current/texinfo_format.rb (renamed from lib/sisu/v6/texinfo_format.rb)77
-rw-r--r--lib/sisu/current/texpdf.rb (renamed from lib/sisu/v6/texpdf.rb)77
-rw-r--r--lib/sisu/current/texpdf_format.rb (renamed from lib/sisu/v6/texpdf_format.rb)77
-rw-r--r--lib/sisu/current/texpdf_parts.rb (renamed from lib/sisu/v5/texpdf_parts.rb)77
-rw-r--r--lib/sisu/current/txt_asciidoc.rb (renamed from lib/sisu/v6/txt_asciidoc.rb)77
-rw-r--r--lib/sisu/current/txt_markdown.rb (renamed from lib/sisu/v6/txt_markdown.rb)77
-rw-r--r--lib/sisu/current/txt_plain.rb (renamed from lib/sisu/v6/txt_plain.rb)78
-rw-r--r--lib/sisu/current/txt_rst.rb (renamed from lib/sisu/v5/txt_rst.rb)77
-rw-r--r--lib/sisu/current/txt_shared.rb (renamed from lib/sisu/v5/txt_shared.rb)77
-rw-r--r--lib/sisu/current/txt_textile.rb (renamed from lib/sisu/v5/txt_textile.rb)77
-rw-r--r--lib/sisu/current/update.rb (renamed from lib/sisu/v5/update.rb)77
-rw-r--r--lib/sisu/current/urls.rb (renamed from lib/sisu/v5/urls.rb)77
-rw-r--r--lib/sisu/current/utils.rb (renamed from lib/sisu/v6/utils.rb)83
-rw-r--r--lib/sisu/current/utils_response.rb113
-rw-r--r--lib/sisu/current/utils_screen_text_color.rb (renamed from lib/sisu/v5/utils_screen_text_color.rb)77
-rw-r--r--lib/sisu/current/utils_spell.rb99
-rw-r--r--lib/sisu/current/webrick.rb (renamed from lib/sisu/v6/webrick.rb)79
-rw-r--r--lib/sisu/current/wikispeak.rb (renamed from lib/sisu/v5/wikispeak.rb)76
-rw-r--r--lib/sisu/current/xhtml.rb (renamed from lib/sisu/v5/xhtml.rb)79
-rw-r--r--lib/sisu/current/xhtml_epub2.rb (renamed from lib/sisu/v5/xhtml_epub2.rb)77
-rw-r--r--lib/sisu/current/xhtml_epub2_concordance.rb (renamed from lib/sisu/v5/xhtml_epub2_concordance.rb)78
-rw-r--r--lib/sisu/current/xhtml_epub2_format.rb (renamed from lib/sisu/v5/xhtml_epub2_format.rb)77
-rw-r--r--lib/sisu/current/xhtml_epub2_segments.rb (renamed from lib/sisu/v5/xhtml_epub2_segments.rb)103
-rw-r--r--lib/sisu/current/xhtml_epub2_tune.rb (renamed from lib/sisu/v5/xhtml_epub2_tune.rb)77
-rw-r--r--lib/sisu/current/xhtml_parts.rb (renamed from lib/sisu/v6/xhtml_parts.rb)77
-rw-r--r--lib/sisu/current/xhtml_shared.rb62
-rw-r--r--lib/sisu/current/xhtml_table.rb98
-rw-r--r--lib/sisu/current/xml_docbook5.rb (renamed from lib/sisu/v6/xml_docbook5.rb)77
-rw-r--r--lib/sisu/current/xml_dom.rb (renamed from lib/sisu/v6/xml_dom.rb)78
-rw-r--r--lib/sisu/current/xml_fictionbook2.rb (renamed from lib/sisu/v5/xml_fictionbook2.rb)77
-rw-r--r--lib/sisu/current/xml_format.rb (renamed from lib/sisu/v6/xml_format.rb)79
-rw-r--r--lib/sisu/current/xml_md_oai_pmh_dc.rb (renamed from lib/sisu/v5/xml_md_oai_pmh_dc.rb)77
-rw-r--r--lib/sisu/current/xml_odf_odt.rb (renamed from lib/sisu/v5/xml_odf_odt.rb)77
-rw-r--r--lib/sisu/current/xml_odf_odt_format.rb (renamed from lib/sisu/v5/xml_odf_odt_format.rb)77
-rw-r--r--lib/sisu/current/xml_parts.rb (renamed from lib/sisu/v5/xml_parts.rb)77
-rw-r--r--lib/sisu/current/xml_sax.rb (renamed from lib/sisu/v5/xml_sax.rb)77
-rw-r--r--lib/sisu/current/xml_scaffold_structure_collapsed.rb (renamed from lib/sisu/v5/xml_scaffold_structure_collapsed.rb)77
-rw-r--r--lib/sisu/current/xml_scaffold_structure_sisu.rb (renamed from lib/sisu/v5/xml_scaffold_structure_sisu.rb)77
-rw-r--r--lib/sisu/current/xml_shared.rb (renamed from lib/sisu/v6/xml_shared.rb)76
-rw-r--r--lib/sisu/current/xml_tables.rb (renamed from lib/sisu/v5/xml_tables.rb)77
-rw-r--r--lib/sisu/current/zap.rb90
-rw-r--r--lib/sisu/develop/air.rb80
-rw-r--r--lib/sisu/develop/ao.rb (renamed from lib/sisu/v6/ao.rb)222
-rw-r--r--lib/sisu/develop/ao_character_check.rb102
-rw-r--r--lib/sisu/develop/ao_composite.rb (renamed from lib/sisu/v5/ao_composite.rb)109
-rw-r--r--lib/sisu/develop/ao_doc_objects.rb (renamed from lib/sisu/v6/ao_doc_objects.rb)89
-rw-r--r--lib/sisu/develop/ao_doc_str.rb (renamed from lib/sisu/v5/ao_doc_str.rb)1173
-rw-r--r--lib/sisu/develop/ao_endnotes.rb (renamed from lib/sisu/v6/ao_endnotes.rb)92
-rw-r--r--lib/sisu/develop/ao_expand_insertions.rb (renamed from lib/sisu/v5/ao_expand_insertions.rb)93
-rw-r--r--lib/sisu/develop/ao_hash_digest.rb (renamed from lib/sisu/v6/ao_hash_digest.rb)85
-rw-r--r--lib/sisu/develop/ao_idx.rb (renamed from lib/sisu/v5/ao_idx.rb)102
-rw-r--r--lib/sisu/develop/ao_images.rb (renamed from lib/sisu/v6/ao_images.rb)87
-rw-r--r--lib/sisu/develop/ao_metadata.rb86
-rw-r--r--lib/sisu/develop/ao_misc_arrange.rb (renamed from lib/sisu/v6/ao_misc_arrange.rb)85
-rw-r--r--lib/sisu/develop/ao_numbering.rb (renamed from lib/sisu/v6/ao_numbering.rb)103
-rw-r--r--lib/sisu/develop/ao_persist.rb194
-rw-r--r--lib/sisu/develop/ao_references.rb502
-rw-r--r--lib/sisu/develop/ao_syntax.rb (renamed from lib/sisu/v6/ao_syntax.rb)109
-rw-r--r--lib/sisu/develop/cgi.rb84
-rw-r--r--lib/sisu/develop/cgi_pgsql.rb (renamed from lib/sisu/v6/cgi_pgsql.rb)77
-rw-r--r--lib/sisu/develop/cgi_sql_common.rb (renamed from lib/sisu/v6/cgi_sql_common.rb)103
-rw-r--r--lib/sisu/develop/cgi_sqlite.rb (renamed from lib/sisu/v5/cgi_sqlite.rb)77
-rw-r--r--lib/sisu/develop/conf.rb (renamed from lib/sisu/v5/conf.rb)77
-rw-r--r--lib/sisu/develop/constants.rb (renamed from lib/sisu/v6/constants.rb)119
-rw-r--r--lib/sisu/develop/css.rb (renamed from lib/sisu/v6/css.rb)95
-rw-r--r--lib/sisu/develop/db_columns.rb (renamed from lib/sisu/v6/db_columns.rb)85
-rw-r--r--lib/sisu/develop/db_create.rb (renamed from lib/sisu/v5/db_create.rb)78
-rw-r--r--lib/sisu/develop/db_dbi.rb (renamed from lib/sisu/v6/db_dbi.rb)78
-rw-r--r--lib/sisu/develop/db_drop.rb (renamed from lib/sisu/v5/db_drop.rb)86
-rw-r--r--lib/sisu/develop/db_import.rb (renamed from lib/sisu/v6/db_import.rb)78
-rw-r--r--lib/sisu/develop/db_indexes.rb (renamed from lib/sisu/v5/db_indexes.rb)78
-rw-r--r--lib/sisu/develop/db_load_tuple.rb (renamed from lib/sisu/v6/db_load_tuple.rb)78
-rw-r--r--lib/sisu/develop/db_remove.rb (renamed from lib/sisu/v5/db_remove.rb)78
-rw-r--r--lib/sisu/develop/db_select.rb (renamed from lib/sisu/v5/db_select.rb)78
-rw-r--r--lib/sisu/develop/db_sqltxt.rb (renamed from lib/sisu/v5/db_sqltxt.rb)102
-rw-r--r--lib/sisu/develop/db_tests.rb (renamed from lib/sisu/v5/db_tests.rb)78
-rw-r--r--lib/sisu/develop/dbi.rb (renamed from lib/sisu/v6/dbi.rb)77
-rw-r--r--lib/sisu/develop/dbi_discrete.rb (renamed from lib/sisu/v6/dbi_discrete.rb)77
-rw-r--r--lib/sisu/develop/digests.rb (renamed from lib/sisu/v6/digests.rb)77
-rw-r--r--lib/sisu/develop/dp.rb (renamed from lib/sisu/v5/dp.rb)180
-rw-r--r--lib/sisu/develop/dp_identify_markup.rb (renamed from lib/sisu/v6/dp_identify_markup.rb)81
-rw-r--r--lib/sisu/develop/dp_make.rb (renamed from lib/sisu/v5/dp_make.rb)79
-rw-r--r--lib/sisu/develop/embedded.rb (renamed from lib/sisu/v6/embedded.rb)77
-rw-r--r--lib/sisu/develop/errors.rb84
-rw-r--r--lib/sisu/develop/generic_parts.rb131
-rw-r--r--lib/sisu/develop/git.rb (renamed from lib/sisu/v5/git.rb)155
-rw-r--r--lib/sisu/develop/html.rb (renamed from lib/sisu/v5/html.rb)96
-rw-r--r--lib/sisu/develop/html_concordance.rb (renamed from lib/sisu/v6/html_concordance.rb)78
-rw-r--r--lib/sisu/develop/html_format.rb (renamed from lib/sisu/v6/html_format.rb)131
-rw-r--r--lib/sisu/develop/html_harvest.rb109
-rw-r--r--lib/sisu/develop/html_harvest_author_format.rb111
-rw-r--r--lib/sisu/develop/html_harvest_authors.rb (renamed from lib/sisu/v5/html_harvest_authors.rb)80
-rw-r--r--lib/sisu/develop/html_harvest_topics.rb (renamed from lib/sisu/v5/html_harvest_topics.rb)88
-rw-r--r--lib/sisu/develop/html_lite_shared.rb (renamed from lib/sisu/v6/html_lite_shared.rb)82
-rw-r--r--lib/sisu/develop/html_manifest.rb (renamed from lib/sisu/v5/html_manifest.rb)458
-rw-r--r--lib/sisu/develop/html_minitoc.rb (renamed from lib/sisu/v5/html_minitoc.rb)83
-rw-r--r--lib/sisu/develop/html_parts.rb (renamed from lib/sisu/v6/html_parts.rb)87
-rw-r--r--lib/sisu/develop/html_persist.rb237
-rw-r--r--lib/sisu/develop/html_promo.rb (renamed from lib/sisu/v5/html_promo.rb)77
-rw-r--r--lib/sisu/develop/html_scroll.rb (renamed from lib/sisu/v6/html_scroll.rb)77
-rw-r--r--lib/sisu/develop/html_segments.rb (renamed from lib/sisu/v5/html_segments.rb)433
-rw-r--r--lib/sisu/develop/html_shared.rb62
-rw-r--r--lib/sisu/develop/html_table.rb64
-rw-r--r--lib/sisu/develop/html_tune.rb (renamed from lib/sisu/v5/html_tune.rb)92
-rw-r--r--lib/sisu/develop/hub.rb (renamed from lib/sisu/v6/hub.rb)88
-rw-r--r--lib/sisu/develop/hub_actions.rb (renamed from lib/sisu/v5/hub_actions.rb)270
-rw-r--r--lib/sisu/develop/hub_loop_markup_files.rb (renamed from lib/sisu/v6/hub_loop_markup_files.rb)81
-rw-r--r--lib/sisu/develop/hub_options.rb (renamed from lib/sisu/v6/hub_options.rb)187
-rw-r--r--lib/sisu/develop/i18n.rb (renamed from lib/sisu/v6/i18n.rb)77
-rw-r--r--lib/sisu/develop/manpage.rb (renamed from lib/sisu/v5/manpage.rb)181
-rw-r--r--lib/sisu/develop/manpage_format.rb85
-rw-r--r--lib/sisu/develop/object_munge.rb307
-rw-r--r--lib/sisu/develop/prog_text_translation.rb (renamed from lib/sisu/v6/prog_text_translation.rb)77
-rw-r--r--lib/sisu/develop/qrcode.rb (renamed from lib/sisu/v6/qrcode.rb)77
-rw-r--r--lib/sisu/develop/relaxng.rb (renamed from lib/sisu/v6/relaxng.rb)77
-rw-r--r--lib/sisu/develop/remote.rb (renamed from lib/sisu/v6/remote.rb)77
-rw-r--r--lib/sisu/develop/rexml.rb (renamed from lib/sisu/v6/rexml.rb)81
-rw-r--r--lib/sisu/develop/se.rb (renamed from lib/sisu/v6/se.rb)77
-rw-r--r--lib/sisu/develop/se_cleanoutput.rb (renamed from lib/sisu/v6/se_cleanoutput.rb)77
-rw-r--r--lib/sisu/develop/se_clear.rb105
-rw-r--r--lib/sisu/develop/se_createsite.rb (renamed from lib/sisu/v5/se_createsite.rb)79
-rw-r--r--lib/sisu/develop/se_css.rb (renamed from lib/sisu/v5/se_css.rb)77
-rw-r--r--lib/sisu/develop/se_date.rb92
-rw-r--r--lib/sisu/develop/se_db.rb (renamed from lib/sisu/v5/se_db.rb)77
-rw-r--r--lib/sisu/develop/se_envcall.rb (renamed from lib/sisu/v6/se_envcall.rb)77
-rw-r--r--lib/sisu/develop/se_file_op.rb (renamed from lib/sisu/v6/se_file_op.rb)221
-rw-r--r--lib/sisu/develop/se_filemap.rb (renamed from lib/sisu/v5/se_filemap.rb)83
-rw-r--r--lib/sisu/develop/se_get_init.rb (renamed from lib/sisu/v5/se_get_init.rb)129
-rw-r--r--lib/sisu/develop/se_hub_particulars.rb (renamed from lib/sisu/v6/se_hub_particulars.rb)78
-rw-r--r--lib/sisu/develop/se_info_env.rb (renamed from lib/sisu/v5/se_info_env.rb)136
-rw-r--r--lib/sisu/develop/se_info_port.rb70
-rw-r--r--lib/sisu/develop/se_info_system.rb (renamed from lib/sisu/v5/se_info_system.rb)89
-rw-r--r--lib/sisu/develop/se_load.rb108
-rw-r--r--lib/sisu/develop/se_processing.rb (renamed from lib/sisu/v5/se_processing.rb)77
-rw-r--r--lib/sisu/develop/se_programs.rb (renamed from lib/sisu/v6/se_programs.rb)91
-rw-r--r--lib/sisu/develop/se_remotes.rb (renamed from lib/sisu/v6/se_remotes.rb)77
-rw-r--r--lib/sisu/develop/se_standardise_lang.rb (renamed from lib/sisu/v5/se_standardise_lang.rb)77
-rw-r--r--lib/sisu/develop/se_version.rb183
-rw-r--r--lib/sisu/develop/shared_images.rb (renamed from lib/sisu/v6/shared_images.rb)78
-rw-r--r--lib/sisu/develop/shared_markup_alt.rb (renamed from lib/sisu/v5/shared_markup_alt.rb)80
-rw-r--r--lib/sisu/develop/shared_metadata.rb (renamed from lib/sisu/v5/shared_metadata.rb)117
-rw-r--r--lib/sisu/develop/shared_sem.rb (renamed from lib/sisu/v5/shared_sem.rb)78
-rw-r--r--lib/sisu/develop/sisu_thor_lib.rb407
-rw-r--r--lib/sisu/develop/sitemaps.rb (renamed from lib/sisu/v6/sitemaps.rb)77
-rw-r--r--lib/sisu/develop/src_kdissert_share.rb102
-rw-r--r--lib/sisu/develop/src_po4a_share.rb309
-rw-r--r--lib/sisu/develop/src_po4a_shelf.rb1217
-rw-r--r--lib/sisu/develop/src_po4a_shelf_set.rb (renamed from lib/sisu/v5/po4a_set.rb)85
-rw-r--r--lib/sisu/develop/src_po4a_sst_ao_sst.rb893
-rw-r--r--lib/sisu/develop/src_po4a_sst_ao_sst_set.rb284
-rw-r--r--lib/sisu/develop/src_po4a_sstm.rb135
-rw-r--r--lib/sisu/develop/src_shared.rb (renamed from lib/sisu/v5/src_shared.rb)179
-rw-r--r--lib/sisu/develop/src_sisupod_make.rb (renamed from lib/sisu/v6/src_sisupod_make.rb)77
-rw-r--r--lib/sisu/develop/src_sisupod_sstm.rb109
-rw-r--r--lib/sisu/develop/sst_convert_markup.rb (renamed from lib/sisu/v5/sst_convert_markup.rb)86
-rw-r--r--lib/sisu/develop/sst_do_inline_footnotes.rb (renamed from lib/sisu/v5/sst_do_inline_footnotes.rb)79
-rw-r--r--lib/sisu/develop/sst_from_xml.rb (renamed from lib/sisu/v6/sst_from_xml.rb)80
-rw-r--r--lib/sisu/develop/sst_identify_markup.rb (renamed from lib/sisu/v5/sst_identify_markup.rb)81
-rw-r--r--lib/sisu/develop/sst_to_s_xml_sax.rb (renamed from lib/sisu/v5/sst_to_s_xml_sax.rb)79
-rw-r--r--lib/sisu/develop/termsheet.rb (renamed from lib/sisu/v5/termsheet.rb)82
-rw-r--r--lib/sisu/develop/texinfo.rb (renamed from lib/sisu/v5/texinfo.rb)77
-rw-r--r--lib/sisu/develop/texinfo_format.rb (renamed from lib/sisu/v5/texinfo_format.rb)79
-rw-r--r--lib/sisu/develop/texpdf.rb (renamed from lib/sisu/v5/texpdf.rb)77
-rw-r--r--lib/sisu/develop/texpdf_format.rb (renamed from lib/sisu/v5/texpdf_format.rb)85
-rw-r--r--lib/sisu/develop/texpdf_parts.rb (renamed from lib/sisu/v6/texpdf_parts.rb)77
-rw-r--r--lib/sisu/develop/txt_asciidoc.rb (renamed from lib/sisu/v5/txt_asciidoc.rb)314
-rw-r--r--lib/sisu/develop/txt_asciidoc_decorate.rb207
-rw-r--r--lib/sisu/develop/txt_markdown.rb (renamed from lib/sisu/v5/txt_markdown.rb)317
-rw-r--r--lib/sisu/develop/txt_markdown_decorate.rb207
-rw-r--r--lib/sisu/develop/txt_orgmode.rb376
-rw-r--r--lib/sisu/develop/txt_orgmode_decorate.rb186
-rw-r--r--lib/sisu/develop/txt_output.rb86
-rw-r--r--lib/sisu/develop/txt_plain.rb (renamed from lib/sisu/v5/txt_plain.rb)319
-rw-r--r--lib/sisu/develop/txt_plain_decorate.rb189
-rw-r--r--lib/sisu/develop/txt_read.rb109
-rw-r--r--lib/sisu/develop/txt_rst.rb (renamed from lib/sisu/v6/txt_rst.rb)293
-rw-r--r--lib/sisu/develop/txt_rst_decorate.rb186
-rw-r--r--lib/sisu/develop/txt_shared.rb (renamed from lib/sisu/v6/txt_shared.rb)77
-rw-r--r--lib/sisu/develop/txt_textile.rb (renamed from lib/sisu/v6/txt_textile.rb)315
-rw-r--r--lib/sisu/develop/txt_textile_decorate.rb186
-rw-r--r--lib/sisu/develop/update.rb (renamed from lib/sisu/v6/update.rb)77
-rw-r--r--lib/sisu/develop/urls.rb (renamed from lib/sisu/v6/urls.rb)92
-rw-r--r--lib/sisu/develop/utils.rb (renamed from lib/sisu/v5/utils.rb)83
-rw-r--r--lib/sisu/develop/utils_composite.rb115
-rw-r--r--lib/sisu/develop/utils_response.rb114
-rw-r--r--lib/sisu/develop/utils_screen_text_color.rb (renamed from lib/sisu/v6/utils_screen_text_color.rb)77
-rw-r--r--lib/sisu/develop/utils_spell.rb99
-rw-r--r--lib/sisu/develop/webrick.rb (renamed from lib/sisu/v5/webrick.rb)79
-rw-r--r--lib/sisu/develop/wikispeak.rb (renamed from lib/sisu/v6/wikispeak.rb)80
-rw-r--r--lib/sisu/develop/xhtml.rb (renamed from lib/sisu/v6/xhtml.rb)199
-rw-r--r--lib/sisu/develop/xhtml_epub2.rb (renamed from lib/sisu/v6/xhtml_epub2.rb)555
-rw-r--r--lib/sisu/develop/xhtml_epub2_concordance.rb (renamed from lib/sisu/v6/xhtml_epub2_concordance.rb)78
-rw-r--r--lib/sisu/develop/xhtml_epub2_format.rb (renamed from lib/sisu/v6/xhtml_epub2_format.rb)84
-rw-r--r--lib/sisu/develop/xhtml_epub2_persist.rb278
-rw-r--r--lib/sisu/develop/xhtml_epub2_segments.rb (renamed from lib/sisu/v6/xhtml_epub2_segments.rb)454
-rw-r--r--lib/sisu/develop/xhtml_epub2_tune.rb (renamed from lib/sisu/v6/xhtml_epub2_tune.rb)77
-rw-r--r--lib/sisu/develop/xhtml_parts.rb (renamed from lib/sisu/v5/xhtml_parts.rb)79
-rw-r--r--lib/sisu/develop/xhtml_shared.rb62
-rw-r--r--lib/sisu/develop/xhtml_table.rb97
-rw-r--r--lib/sisu/develop/xml_docbook5.rb (renamed from lib/sisu/v5/xml_docbook5.rb)77
-rw-r--r--lib/sisu/develop/xml_dom.rb (renamed from lib/sisu/v5/xml_dom.rb)212
-rw-r--r--lib/sisu/develop/xml_fictionbook2.rb (renamed from lib/sisu/v6/xml_fictionbook2.rb)81
-rw-r--r--lib/sisu/develop/xml_format.rb (renamed from lib/sisu/v5/xml_format.rb)79
-rw-r--r--lib/sisu/develop/xml_md_oai_pmh_dc.rb (renamed from lib/sisu/v6/xml_md_oai_pmh_dc.rb)77
-rw-r--r--lib/sisu/develop/xml_odf_odt.rb (renamed from lib/sisu/v6/xml_odf_odt.rb)125
-rw-r--r--lib/sisu/develop/xml_odf_odt_format.rb (renamed from lib/sisu/v6/xml_odf_odt_format.rb)81
-rw-r--r--lib/sisu/develop/xml_parts.rb (renamed from lib/sisu/v6/xml_parts.rb)77
-rw-r--r--lib/sisu/develop/xml_persist.rb126
-rw-r--r--lib/sisu/develop/xml_sax.rb (renamed from lib/sisu/v6/xml_sax.rb)222
-rw-r--r--lib/sisu/develop/xml_scaffold_structure_collapsed.rb (renamed from lib/sisu/v6/xml_scaffold_structure_collapsed.rb)77
-rw-r--r--lib/sisu/develop/xml_scaffold_structure_sisu.rb (renamed from lib/sisu/v6/xml_scaffold_structure_sisu.rb)77
-rw-r--r--lib/sisu/develop/xml_shared.rb (renamed from lib/sisu/v5/xml_shared.rb)78
-rw-r--r--lib/sisu/develop/xml_tables.rb (renamed from lib/sisu/v6/xml_tables.rb)77
-rw-r--r--lib/sisu/develop/zap.rb90
-rw-r--r--lib/sisu/v5/air.rb83
-rw-r--r--lib/sisu/v5/ao_character_check.rb106
-rw-r--r--lib/sisu/v5/ao_metadata.rb89
-rw-r--r--lib/sisu/v5/cgi.rb88
-rw-r--r--lib/sisu/v5/errors.rb87
-rw-r--r--lib/sisu/v5/generic_parts.rb134
-rw-r--r--lib/sisu/v5/html_harvest.rb114
-rw-r--r--lib/sisu/v5/html_harvest_author_format.rb114
-rw-r--r--lib/sisu/v5/html_shared.rb65
-rw-r--r--lib/sisu/v5/html_table.rb67
-rw-r--r--lib/sisu/v5/manpage_format.rb88
-rw-r--r--lib/sisu/v5/po4a.rb984
-rw-r--r--lib/sisu/v5/se_clear.rb109
-rw-r--r--lib/sisu/v5/se_date.rb95
-rw-r--r--lib/sisu/v5/se_info_port.rb73
-rw-r--r--lib/sisu/v5/se_load.rb111
-rw-r--r--lib/sisu/v5/src_kdissert_share.rb105
-rw-r--r--lib/sisu/v5/src_share.rb112
-rw-r--r--lib/sisu/v5/utils_response.rb76
-rw-r--r--lib/sisu/v5/utils_spell.rb102
-rw-r--r--lib/sisu/v5/xhtml_shared.rb65
-rw-r--r--lib/sisu/v5/xhtml_table.rb101
-rw-r--r--lib/sisu/v5/zap.rb93
-rw-r--r--lib/sisu/v6/air.rb83
-rw-r--r--lib/sisu/v6/ao_metadata.rb89
-rw-r--r--lib/sisu/v6/cgi.rb88
-rw-r--r--lib/sisu/v6/errors.rb87
-rw-r--r--lib/sisu/v6/generic_parts.rb134
-rw-r--r--lib/sisu/v6/html_harvest.rb114
-rw-r--r--lib/sisu/v6/html_harvest_author_format.rb114
-rw-r--r--lib/sisu/v6/html_shared.rb65
-rw-r--r--lib/sisu/v6/html_table.rb67
-rw-r--r--lib/sisu/v6/manpage_format.rb88
-rw-r--r--lib/sisu/v6/se_clear.rb109
-rw-r--r--lib/sisu/v6/se_date.rb95
-rw-r--r--lib/sisu/v6/se_info_port.rb73
-rw-r--r--lib/sisu/v6/se_load.rb111
-rw-r--r--lib/sisu/v6/se_version.rb155
-rw-r--r--lib/sisu/v6/src_kdissert_share.rb105
-rw-r--r--lib/sisu/v6/src_share.rb112
-rw-r--r--lib/sisu/v6/utils_response.rb76
-rw-r--r--lib/sisu/v6/utils_spell.rb102
-rw-r--r--lib/sisu/v6/xhtml_shared.rb65
-rw-r--r--lib/sisu/v6/xhtml_table.rb101
-rw-r--r--lib/sisu/v6/zap.rb93
371 files changed, 24514 insertions, 19433 deletions
diff --git a/lib/sisu/current/air.rb b/lib/sisu/current/air.rb
new file mode 100644
index 00000000..1876a0ec
--- /dev/null
+++ b/lib/sisu/current/air.rb
@@ -0,0 +1,80 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/air.rb;hb=HEAD>
+
+=end
+module SiSU_Air
+ require_relative 'se_hub_particulars' # se_hub_particulars.rb
+ class Source
+ @@ao_array=[]
+ @@fns=nil
+ def initialize(opt)
+ @opt=opt
+ @@fns||@opt.fns
+ @particulars=SiSU_Particulars::Combined.new(opt)
+ #@env=@particulars.env
+ #@md=@particulars.md
+ #@ao_array=@particulars.ao_array
+ end
+ def read
+ end
+ protected
+ def print
+ puts @particulars.md.inspect
+ puts @particulars.env.inspect
+ puts @particulars.ao_array
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/ao.rb b/lib/sisu/current/ao.rb
index ebb17a8f..3467c4c6 100644
--- a/lib/sisu/v5/ao.rb
+++ b/lib/sisu/current/ao.rb
@@ -1,61 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** preprocessing, (document abstraction), data abstraction used in subsequent
+ processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/ao.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: preprocessing, (document abstraction), data abstraction used
- in subsequent processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/ao.rb;hb=HEAD>
=end
module SiSU_AO
@@ -63,7 +60,7 @@ module SiSU_AO
include SiSU_Env
require_relative 'dp' # dp.rb
include SiSU_Param
- require_relative 'ao_doc_objects' # ao.rb
+ require_relative 'ao_doc_objects' # ao_doc_objects.rb
require_relative 'ao_syntax' # ao_syntax.rb
include SiSU_AO_Syntax
require_relative 'ao_doc_str' # ao_doc_str.rb
@@ -89,8 +86,8 @@ module SiSU_AO
@@idx_arr={ sst: [], tex: [], html: [], xhtml: [] }
@@map_arr={ nametags: [], ocn_htmlseg: [] }
@@fns=nil
- def initialize(opt,fnx=nil)
- @opt,@fnx=opt,fnx
+ def initialize(opt,fnx=nil,process=:complete)
+ @opt,@fnx,@process=opt,fnx,process
@@fns ||=opt.fns
fn_use=if fnx \
and fnx =~/\.ss[tmi]$/
@@ -119,7 +116,7 @@ module SiSU_AO
: @opt.fns
create_ao
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@@fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@@fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -140,7 +137,7 @@ module SiSU_AO
? read_fnc
: @@ao_array.dup
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -161,7 +158,7 @@ module SiSU_AO
? read_idx_sst
: @@idx_arr[:sst].dup #check
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -182,7 +179,7 @@ module SiSU_AO
? read_idx_raw
: @@idx_arr[:tex].dup #check
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -203,7 +200,7 @@ module SiSU_AO
? read_idx_html
: @@idx_arr[:html].dup
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -224,7 +221,7 @@ module SiSU_AO
? read_idx_xhtml
: @@idx_arr[:xhtml].dup
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -245,7 +242,7 @@ module SiSU_AO
? read_map_nametags
: @@map_arr[:nametags].dup
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -266,7 +263,7 @@ module SiSU_AO
? read_map_ocn_htmlseg
: @@map_arr[:ocn_htmlseg].dup
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -276,6 +273,7 @@ module SiSU_AO
protected
def create_ao
ao_array=[]
+ fnp = @fnx ? "#{@opt.fno} #{@fnx}" : @opt.fno
unless @opt.act[:quiet][:set]==:on
tell=(@opt.act[:verbose][:set]==:on \
|| @opt.act[:verbose_plus][:set]==:on \
@@ -286,7 +284,8 @@ module SiSU_AO
)
: SiSU_Screen::Ansi.new(
@opt.act[:color_state][:set],
- 'Document Abstraction',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}"
+ 'Document Abstraction',
+ "[#{@opt.f_pth[:lng_is]}] #{fnp}"
)
tell.blue_title_hi
end
@@ -299,7 +298,7 @@ module SiSU_AO
meta=file_array=@env.source_file_processing_array(fn)
@md=SiSU_Param::Parameters::Instructions.new(meta,@opt).extract
meta=nil
- ao=SiSU_AO::Make.new(fn,@md,file_array).song
+ ao=SiSU_AO::Make.new(fn,@md,file_array,@fnx,@process).song
if (@opt.act[:verbose][:set]==:on \
|| @opt.act[:verbose_plus][:set]==:on \
|| @opt.act[:maintenance][:set]==:on)
@@ -350,7 +349,7 @@ module SiSU_AO
ao=[]
ao=(FileTest.file?(@fnc)) \
? (File.open(@fnc,'r:utf-8'){ |f| ao=Marshal.load(f)})
- : SiSU_AO::Source.new(@opt).create_ao
+ : SiSU_AO::Source.new(@opt,@fnx,@process).create_ao
end
def read_idx_sst
m=[]
@@ -522,8 +521,8 @@ module SiSU_AO
end
end
class Make
- def initialize(fn,md,data)
- @fn,@md,@data=fn,md,data
+ def initialize(fn,md,data,fnx,process)
+ @fn,@md,@data,@fnx,@process=fn,md,data,fnx,process
@env=SiSU_Env::InfoEnv.new(@md.fns)
end
def reset
@@ -554,12 +553,13 @@ module SiSU_AO
data_obj,
tags_map,
ocn_html_seg_map=
- SiSU_AO_Numbering::Numbering.new(@md,data_obj). # ao_numbering.rb
+ SiSU_AO_Numbering::Numbering.new(@md,data_obj,@fnx,@process). # ao_numbering.rb
numbering_song
data_obj,
book_index_rel,
book_index_rel_html_seg,
- html_idx,xhtml_idx=
+ html_idx,
+ xhtml_idx=
SiSU_AO_BookIndex::BookIndex.new(@md,data_obj,@env). # ao_idx.rb
indexing_song if @md.book_idx
data_obj=
diff --git a/lib/sisu/v6/ao_character_check.rb b/lib/sisu/current/ao_character_check.rb
index 6f47432e..faee5924 100644
--- a/lib/sisu/v6/ao_character_check.rb
+++ b/lib/sisu/current/ao_character_check.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/ao_character_check.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/ao_character_check.rb;hb=HEAD>
=end
module SiSU_AO_CharacterCheck
diff --git a/lib/sisu/v6/ao_composite.rb b/lib/sisu/current/ao_composite.rb
index 1cf7b45d..611dd70c 100644
--- a/lib/sisu/v6/ao_composite.rb
+++ b/lib/sisu/current/ao_composite.rb
@@ -1,61 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** composite documents, assemble/build documents from other documents
+ or parts of marked up text
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/ao_composite.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: composite documents, assemble/build documents from other
- documents or parts of marked up text
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/ao_composite.rb;hb=HEAD>
=end
module SiSU_Assemble
diff --git a/lib/sisu/v5/ao_doc_objects.rb b/lib/sisu/current/ao_doc_objects.rb
index a07357e5..ac528b90 100644
--- a/lib/sisu/v5/ao_doc_objects.rb
+++ b/lib/sisu/current/ao_doc_objects.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** document abstraction
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/ao_doc_objects.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: document abstraction
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/ao_doc_objects.rb;hb=HEAD>
=end
module SiSU_AO_DocumentStructure
diff --git a/lib/sisu/v6/ao_doc_str.rb b/lib/sisu/current/ao_doc_str.rb
index e8b15cd6..50916d10 100644
--- a/lib/sisu/v6/ao_doc_str.rb
+++ b/lib/sisu/current/ao_doc_str.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** document abstraction
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/ao_doc_str.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: document abstraction
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/ao_doc_str.rb;hb=HEAD>
=end
module SiSU_AO_DocumentStructureExtract
@@ -1260,8 +1257,8 @@ module SiSU_AO_DocumentStructureExtract
end
end
class OCN
- def initialize(md,data)
- @md,@data=md,data
+ def initialize(md,data,fnx,process)
+ @md,@data,@fnx,@process=md,data,fnx,process
end
def structure_info
def lv
@@ -1321,31 +1318,33 @@ has incorrect level and/or parent level
--}
end
def required_headers_present?
- unless (defined? @md.title \
- and @md.title.full)
- STDERR.puts %{required header missing:
+ if @process == :complete
+ unless (defined? @md.title \
+ and @md.title.full)
+ STDERR.puts %{required header missing:
@title:
SKIPPED processing file:
[#{@md.opt.lng}] "#{@md.fns}"
}
- if @md.opt.act[:no_stop][:set]==:on
- $process_document = :skip
- else exit
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ else exit
+ end
end
- end
- unless (defined? @md.creator.author \
- and @md.creator.author)
- STDERR.puts %{required header missing:
+ unless (defined? @md.creator.author \
+ and @md.creator.author)
+ STDERR.puts %{required header missing:
@creator:
:author: anonymous?
SKIPPED processing file:
[#{@md.opt.lng}] "#{@md.fns}"
}
- if @md.opt.act[:no_stop][:set]==:on
- $process_document = :skip
- else exit
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ else exit
+ end
end
end
end
@@ -1384,337 +1383,341 @@ SKIPPED processing file:
if not dob.obj =~/~#|-#/
ocn+=1
end
- if dob.is==:heading \
- and (ln.to_s =~/^[0-9]/ \
- or ln.to_s =~@md.lv0 \
- or ln.to_s =~@md.lv1 \
- or ln.to_s =~@md.lv2 \
- or ln.to_s =~@md.lv3 \
- or ln.to_s =~@md.lv4 \
- or ln.to_s =~@md.lv5 \
- or ln.to_s =~@md.lv6 \
- or ln.to_s =~@md.lv7)
- if not dob.obj =~/~#|-#/
- ocnh+=1
- end
- if ln==0 \
- or ln=~@md.lv0
- @lev_occurences[:a] += 1
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh0+=1 #heading
- node0="0:#{ocnh0};#{ocn}"
- else
- #document_structure_check_info(node0,node0,:error) #fix
- ocn_flag=false
- node0="0:0;0"
- end
- document_structure_check_info(node0,node0)
- @collapsed_lv0=0
- collapsed_level=@collapsed_lv0
- node,ocn_sp,parent=node0,"h#{ocnh}",'ROOT'
- elsif ln==1 \
- or ln=~@md.lv1
- @lev_occurences[:b] += 1
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh1+=1 #heading
- node1="1:#{ocnh1};#{ocn}"
- else
- #document_structure_check_info(node0,node0,:error) #fix
- ocn_flag=false
- node1="1:0;0"
- end
- parent=if node0
- document_structure_check_info(node1,node0)
- @collapsed_lv1=@collapsed_lv0+1
- node0
- else
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node0,node0,:error)
- node0
- end
- collapsed_level=@collapsed_lv1
- node,ocn_sp,parent=node1,"h#{ocnh}",node0 #FIX
- elsif ln==2 \
- or ln=~@md.lv2
- @lev_occurences[:c] += 1
+ if @process == :complete \
+ or (@fnx == @md.opt.fns \
+ && @md.opt.fns =~/.sst$/)
+ if dob.is==:heading \
+ and (ln.to_s =~/^[0-9]/ \
+ or ln.to_s =~@md.lv0 \
+ or ln.to_s =~@md.lv1 \
+ or ln.to_s =~@md.lv2 \
+ or ln.to_s =~@md.lv3 \
+ or ln.to_s =~@md.lv4 \
+ or ln.to_s =~@md.lv5 \
+ or ln.to_s =~@md.lv6 \
+ or ln.to_s =~@md.lv7)
if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh2+=1
- node2="2:#{ocnh2};#{ocn}"
- else
- #document_structure_check_info(node0,node0,:error) #fix
- ocn_flag=false
- node2="2:0;0"
+ ocnh+=1
end
- parent=if node1
- document_structure_check_info(node2,node1)
- @collapsed_lv2=@collapsed_lv1+1
- node1
- else
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node2,node0,:error)
- node0
- end
- collapsed_level=@collapsed_lv2
- node,ocn_sp=node2,"h#{ocnh}"
- elsif ln==3 \
- or ln=~@md.lv3
- @lev_occurences[:d] += 1
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh3+=1
- node3="3:#{ocnh3};#{ocn}"
- else
- #document_structure_check_info(node0,node0,:error) #fix
- ocn_flag=false
- node3="3:0;0"
- end
- parent=if node2
- document_structure_check_info(node3,node2)
- @collapsed_lv3=@collapsed_lv2+1
- node2
- elsif node1
- warning_incorrect_parent_level_or_level(dob.obj)
- puts %{parent is :A~ & this level #{dob.lv}
+ if ln==0 \
+ or ln=~@md.lv0
+ @lev_occurences[:a] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh0+=1 #heading
+ node0="0:#{ocnh0};#{ocn}"
+ else
+ #document_structure_check_info(node0,node0,:error) #fix
+ ocn_flag=false
+ node0="0:0;0"
+ end
+ document_structure_check_info(node0,node0)
+ @collapsed_lv0=0
+ collapsed_level=@collapsed_lv0
+ node,ocn_sp,parent=node0,"h#{ocnh}",'ROOT'
+ elsif ln==1 \
+ or ln=~@md.lv1
+ @lev_occurences[:b] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh1+=1 #heading
+ node1="1:#{ocnh1};#{ocn}"
+ else
+ #document_structure_check_info(node0,node0,:error) #fix
+ ocn_flag=false
+ node1="1:0;0"
+ end
+ parent=if node0
+ document_structure_check_info(node1,node0)
+ @collapsed_lv1=@collapsed_lv0+1
+ node0
+ else
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node0,node0,:error)
+ node0
+ end
+ collapsed_level=@collapsed_lv1
+ node,ocn_sp,parent=node1,"h#{ocnh}",node0 #FIX
+ elsif ln==2 \
+ or ln=~@md.lv2
+ @lev_occurences[:c] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh2+=1
+ node2="2:#{ocnh2};#{ocn}"
+ else
+ #document_structure_check_info(node0,node0,:error) #fix
+ ocn_flag=false
+ node2="2:0;0"
+ end
+ parent=if node1
+ document_structure_check_info(node2,node1)
+ @collapsed_lv2=@collapsed_lv1+1
+ node1
+ else
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node2,node0,:error)
+ node0
+ end
+ collapsed_level=@collapsed_lv2
+ node,ocn_sp=node2,"h#{ocnh}"
+ elsif ln==3 \
+ or ln=~@md.lv3
+ @lev_occurences[:d] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh3+=1
+ node3="3:#{ocnh3};#{ocn}"
+ else
+ #document_structure_check_info(node0,node0,:error) #fix
+ ocn_flag=false
+ node3="3:0;0"
+ end
+ parent=if node2
+ document_structure_check_info(node3,node2)
+ @collapsed_lv3=@collapsed_lv2+1
+ node2
+ elsif node1
+ warning_incorrect_parent_level_or_level(dob.obj)
+ puts %{parent is :A~ & this level #{dob.lv}
either parent should be level :B~
or this level should be level :B~ rather than #{dob.lv}}
- document_structure_check_info(node3,node1,:error)
- @collapsed_lv3=@collapsed_lv1+1
- node1
- else
- document_structure_check_info(node3,node0,:error)
- warning_incorrect_parent_level_or_level(dob.obj)
- node0
- end
- collapsed_level=@collapsed_lv3
- node,ocn_sp=node3,"h#{ocnh}"
- elsif ln==4 \
- or ln=~@md.lv4
- @lev_occurences[:l1] += 1
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh4+=1
- node4="4:#{ocnh4};#{ocn}"
- else
- ocn_flag=false
- node4="4:0;0"
- end
- parent=if node3
- document_structure_check_info(node4,node3)
- @collapsed_lv4=@collapsed_lv3+1
- node3
- elsif node2
- document_structure_check_info(node4,node2)
- @collapsed_lv4=@collapsed_lv2+1
- node2
- elsif node1
- document_structure_check_info(node4,node1)
- @collapsed_lv4=@collapsed_lv1+1
- node1
- elsif node0
- document_structure_check_info(node4,node0)
- @collapsed_lv4=@collapsed_lv0+1
- node0
- else
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node4,node0,:error)
- node0
- end
- collapsed_level=@collapsed_lv4
- node,ocn_sp=node4,"h#{ocnh}"
- elsif ln==5 \
- or ln=~@md.lv5
- @lev_occurences[:l2] += 1
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh5+=1
- node5="5:#{ocnh5};#{ocn}"
- else
- ocn_flag=false
- node5="5:0;0"
- end
- parent=if node4
- document_structure_check_info(node5,node4)
- @collapsed_lv5=@collapsed_lv4+1
- node4
- elsif node3
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node5,node3,:error)
- @collapsed_lv5=@collapsed_lv3+1
- node3
- elsif node2
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node5,node2,:error)
- @collapsed_lv5=@collapsed_lv2+1
- node2
- elsif node1
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node5,node1,:error)
- @collapsed_lv5=@collapsed_lv1+1
- node1
- else
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node5,node0,:error)
- node0
- end
- collapsed_level=@collapsed_lv5
- node,ocn_sp=node5,"h#{ocnh}"
- elsif ln==6 \
- or ln=~@md.lv6
- @lev_occurences[:l3] += 1
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh6+=1
- node6="6:#{ocnh6};#{ocn}"
- else
- ocn_flag=false
- node6="6:0;0"
- end
- parent=if node5
- document_structure_check_info(node6,node5)
- @collapsed_lv6=@collapsed_lv5+1
- node5
- elsif node4
- warning_incorrect_parent_level_or_level(dob.obj)
- puts "parent is level #4 (1~) & this level ##{dob.ln} (#{dob.lv}~)
+ document_structure_check_info(node3,node1,:error)
+ @collapsed_lv3=@collapsed_lv1+1
+ node1
+ else
+ document_structure_check_info(node3,node0,:error)
+ warning_incorrect_parent_level_or_level(dob.obj)
+ node0
+ end
+ collapsed_level=@collapsed_lv3
+ node,ocn_sp=node3,"h#{ocnh}"
+ elsif ln==4 \
+ or ln=~@md.lv4
+ @lev_occurences[:l1] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh4+=1
+ node4="4:#{ocnh4};#{ocn}"
+ else
+ ocn_flag=false
+ node4="4:0;0"
+ end
+ parent=if node3
+ document_structure_check_info(node4,node3)
+ @collapsed_lv4=@collapsed_lv3+1
+ node3
+ elsif node2
+ document_structure_check_info(node4,node2)
+ @collapsed_lv4=@collapsed_lv2+1
+ node2
+ elsif node1
+ document_structure_check_info(node4,node1)
+ @collapsed_lv4=@collapsed_lv1+1
+ node1
+ elsif node0
+ document_structure_check_info(node4,node0)
+ @collapsed_lv4=@collapsed_lv0+1
+ node0
+ else
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node4,node0,:error)
+ node0
+ end
+ collapsed_level=@collapsed_lv4
+ node,ocn_sp=node4,"h#{ocnh}"
+ elsif ln==5 \
+ or ln=~@md.lv5
+ @lev_occurences[:l2] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh5+=1
+ node5="5:#{ocnh5};#{ocn}"
+ else
+ ocn_flag=false
+ node5="5:0;0"
+ end
+ parent=if node4
+ document_structure_check_info(node5,node4)
+ @collapsed_lv5=@collapsed_lv4+1
+ node4
+ elsif node3
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node5,node3,:error)
+ @collapsed_lv5=@collapsed_lv3+1
+ node3
+ elsif node2
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node5,node2,:error)
+ @collapsed_lv5=@collapsed_lv2+1
+ node2
+ elsif node1
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node5,node1,:error)
+ @collapsed_lv5=@collapsed_lv1+1
+ node1
+ else
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node5,node0,:error)
+ node0
+ end
+ collapsed_level=@collapsed_lv5
+ node,ocn_sp=node5,"h#{ocnh}"
+ elsif ln==6 \
+ or ln=~@md.lv6
+ @lev_occurences[:l3] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh6+=1
+ node6="6:#{ocnh6};#{ocn}"
+ else
+ ocn_flag=false
+ node6="6:0;0"
+ end
+ parent=if node5
+ document_structure_check_info(node6,node5)
+ @collapsed_lv6=@collapsed_lv5+1
+ node5
+ elsif node4
+ warning_incorrect_parent_level_or_level(dob.obj)
+ puts "parent is level #4 (1~) & this level ##{dob.ln} (#{dob.lv}~)
either parent should be level #5 (2~)
or this level should be #5 (2~) rather ##{dob.ln} (#{dob.lv}~)"
- document_structure_check_info(node6,node4,:error)
- @collapsed_lv6=@collapsed_lv4+1
- node4
- elsif node3
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node6,node3,:error)
- @collapsed_lv6=@collapsed_lv3+1
- node3
- elsif node2
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node6,node2,:error)
- @collapsed_lv6=@collapsed_lv2+1
- node2
- elsif node1
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node6,node1,:error)
- @collapsed_lv6=@collapsed_lv1+1
- node1
- else
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node6,node0,:error)
- node0
- end
- collapsed_level=@collapsed_lv6
- node,ocn_sp=node6,"h#{ocnh}"
- elsif ln==7 \
- or ln=~@md.lv7
- @lev_occurences[:l4] += 1
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh7+=1
- node7="7:#{ocnh7};#{ocn}"
- else
- ocn_flag=false
- node7="7:0;0"
- end
- parent=if node6
- document_structure_check_info(node7,node6)
- @collapsed_lv7=@collapsed_lv6+1
- node5
- elsif node5
- warning_incorrect_parent_level_or_level(dob.obj)
- puts "parent is level #5 (2~) & this level ##{dob.ln} (#{dob.lv}~)
+ document_structure_check_info(node6,node4,:error)
+ @collapsed_lv6=@collapsed_lv4+1
+ node4
+ elsif node3
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node6,node3,:error)
+ @collapsed_lv6=@collapsed_lv3+1
+ node3
+ elsif node2
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node6,node2,:error)
+ @collapsed_lv6=@collapsed_lv2+1
+ node2
+ elsif node1
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node6,node1,:error)
+ @collapsed_lv6=@collapsed_lv1+1
+ node1
+ else
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node6,node0,:error)
+ node0
+ end
+ collapsed_level=@collapsed_lv6
+ node,ocn_sp=node6,"h#{ocnh}"
+ elsif ln==7 \
+ or ln=~@md.lv7
+ @lev_occurences[:l4] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh7+=1
+ node7="7:#{ocnh7};#{ocn}"
+ else
+ ocn_flag=false
+ node7="7:0;0"
+ end
+ parent=if node6
+ document_structure_check_info(node7,node6)
+ @collapsed_lv7=@collapsed_lv6+1
+ node5
+ elsif node5
+ warning_incorrect_parent_level_or_level(dob.obj)
+ puts "parent is level #5 (2~) & this level ##{dob.ln} (#{dob.lv}~)
either parent should be level #6 (3~)
or this level should be #6 (3~) rather ##{dob.ln} (#{dob.lv}~)"
- document_structure_check_info(node7,node5,:error)
- @collapsed_lv6=@collapsed_lv5+1
- node5
- elsif node4
- warning_incorrect_parent_level_or_level(dob.obj)
- puts "parent is level #4 (1~) & this level ##{dob.ln} (#{dob.lv}~)
+ document_structure_check_info(node7,node5,:error)
+ @collapsed_lv6=@collapsed_lv5+1
+ node5
+ elsif node4
+ warning_incorrect_parent_level_or_level(dob.obj)
+ puts "parent is level #4 (1~) & this level ##{dob.ln} (#{dob.lv}~)
either parent should be level 6~
or this level should be #6 (3~) rather ##{dob.ln} (#{dob.lv}~)"
- document_structure_check_info(node7,node4,:error)
- @collapsed_lv6=@collapsed_lv4+1
- node4
- elsif node3
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node7,node3,:error)
- @collapsed_lv6=@collapsed_lv3+1
- node3
- elsif node2
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node7,node2,:error)
- @collapsed_lv6=@collapsed_lv2+1
- node2
- elsif node1
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node7,node1,:error)
- @collapsed_lv6=@collapsed_lv1+1
- node1
- else
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node7,node0,:error)
- node0
+ document_structure_check_info(node7,node4,:error)
+ @collapsed_lv6=@collapsed_lv4+1
+ node4
+ elsif node3
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node7,node3,:error)
+ @collapsed_lv6=@collapsed_lv3+1
+ node3
+ elsif node2
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node7,node2,:error)
+ @collapsed_lv6=@collapsed_lv2+1
+ node2
+ elsif node1
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node7,node1,:error)
+ @collapsed_lv6=@collapsed_lv1+1
+ node1
+ else
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node7,node0,:error)
+ node0
+ end
+ collapsed_level=@collapsed_lv7
+ node,ocn_sp=node7,"h#{ocnh}"
end
- collapsed_level=@collapsed_lv7
- node,ocn_sp=node7,"h#{ocnh}"
- end
- else
- unless @lev_occurences[:l1] > 0
- STDERR.puts %{Substantive text objects must follow a level 1~ heading and there are none at this point in processing: #{@lev_occurences[:l1]}
+ else
+ unless @lev_occurences[:l1] > 0
+ STDERR.puts %{Substantive text objects must follow a level 1~ heading and there are none at this point in processing: #{@lev_occurences[:l1]}
SKIPPED processing file:
[#{@md.opt.lng}] "#{@md.fns}"}
- puts dob.obj #.gsub(/^(.{1,80})/,'"\1"')
- exit
- end
- unless @ln >= 4
- lev=case @ln
- when 0 then 'A'
- when 1 then 'B'
- when 2 then 'C'
- when 3 then 'D'
- when 4 then '1'
- when 5 then '2'
- when 6 then '3'
- when 7 then '4'
- when 8 then '5'
- when 9 then '6'
+ puts dob.obj #.gsub(/^(.{1,80})/,'"\1"')
+ exit
end
- STDERR.puts %{Substantive text objects must follow a level 1~ 2~ or 3~ heading: #{lev}~
+ unless @ln >= 4
+ lev=case @ln
+ when 0 then 'A'
+ when 1 then 'B'
+ when 2 then 'C'
+ when 3 then 'D'
+ when 4 then '1'
+ when 5 then '2'
+ when 6 then '3'
+ when 7 then '4'
+ when 8 then '5'
+ when 9 then '6'
+ end
+ STDERR.puts %{Substantive text objects must follow a level 1~ 2~ or 3~ heading: #{lev}~
SKIPPED processing file:
[#{@md.opt.lng}] "#{@md.fns}"}
- puts dob.obj.gsub(/^(.{1,80})/,'"\1"')
- if @md.opt.act[:no_stop][:set]==:on
- $process_document = :skip
- break
- else exit
+ puts dob.obj.gsub(/^(.{1,80})/,'"\1"')
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ break
+ else exit
+ end
+ end
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ else
+ ocn_flag=false
+ end
+ ocno+=1
+ if dob.is==:table
+ ocnt+=1
+ ocn_sp,parent="t#{ocnt}",node
+ elsif dob.is==:code
+ ocnc+=1
+ ocn_sp,parent="c#{ocnc}",node
+ elsif dob.is==:group \
+ || dob.is==:box \
+ || dob.is==:block \
+ || dob.is==:alt \
+ || dob.is==:verse
+ ocng+=1 #group, poem
+ ocn_sp,parent="g#{ocng}",node
+ elsif dob.is==:image #check
+ ocni+=1
+ ocn_sp,parent="i#{ocni}",node
+ else ocnp+=1 #paragraph
+ ocn_sp,parent="p#{ocnp}",node
end
- end
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- else
- ocn_flag=false
- end
- ocno+=1
- if dob.is==:table
- ocnt+=1
- ocn_sp,parent="t#{ocnt}",node
- elsif dob.is==:code
- ocnc+=1
- ocn_sp,parent="c#{ocnc}",node
- elsif dob.is==:group \
- || dob.is==:box \
- || dob.is==:block \
- || dob.is==:alt \
- || dob.is==:verse
- ocng+=1 #group, poem
- ocn_sp,parent="g#{ocng}",node
- elsif dob.is==:image #check
- ocni+=1
- ocn_sp,parent="i#{ocni}",node
- else ocnp+=1 #paragraph
- ocn_sp,parent="p#{ocnp}",node
end
end
if dob.is==:heading
@@ -1763,24 +1766,28 @@ SKIPPED processing file:
end
@o_array << dob
end
- unless @lev_occurences[:a] == 1
- STDERR.puts %{The number of level A~ in this document: #{@lev_occurences[:a]}
+ if @process == :complete \
+ or (@fnx == @md.opt.fns \
+ && @md.opt.fns =~/.sst$/)
+ unless @lev_occurences[:a] == 1
+ STDERR.puts %{The number of level A~ in this document: #{@lev_occurences[:a]}
There must be one level A~ (no more and no less)
SKIPPED processing file:
[#{@md.opt.lng}] "#{@md.fns}"}
- if @md.opt.act[:no_stop][:set]==:on
- $process_document = :skip
- else exit
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ else exit
+ end
end
- end
- unless @lev_occurences[:l1] > 0
- STDERR.puts %{The number of level 1~ in this document: #{@lev_occurences[:l1]}
+ unless @lev_occurences[:l1] > 0
+ STDERR.puts %{The number of level 1~ in this document: #{@lev_occurences[:l1]}
There must be at least one level 1~ (and as many as required)
SKIPPED processing file:
[#{@md.opt.lng}] "#{@md.fns}"}
- if @md.opt.act[:no_stop][:set]==:on
- $process_document = :skip
- else exit
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ else exit
+ end
end
end
@o_array
diff --git a/lib/sisu/v5/ao_endnotes.rb b/lib/sisu/current/ao_endnotes.rb
index 65726d84..7c9ae067 100644
--- a/lib/sisu/v5/ao_endnotes.rb
+++ b/lib/sisu/current/ao_endnotes.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/ao_doc_endnotes.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/ao_doc_endnotes.rb;hb=HEAD>
=end
module SiSU_AO_Endnotes
diff --git a/lib/sisu/v6/ao_expand_insertions.rb b/lib/sisu/current/ao_expand_insertions.rb
index a1566da2..3a749df3 100644
--- a/lib/sisu/v6/ao_expand_insertions.rb
+++ b/lib/sisu/current/ao_expand_insertions.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/ao_expand_insertions.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/ao_expand_insertions.rb;hb=HEAD>
=end
module SiSU_AO_Insertions
diff --git a/lib/sisu/v5/ao_hash_digest.rb b/lib/sisu/current/ao_hash_digest.rb
index f732cc63..bc86a485 100644
--- a/lib/sisu/v5/ao_hash_digest.rb
+++ b/lib/sisu/current/ao_hash_digest.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/ao_hash_digest.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/ao_hash_digest.rb;hb=HEAD>
=end
module SiSU_AO_Hash
diff --git a/lib/sisu/v6/ao_idx.rb b/lib/sisu/current/ao_idx.rb
index 6d53367b..0c9c8a43 100644
--- a/lib/sisu/v6/ao_idx.rb
+++ b/lib/sisu/current/ao_idx.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/ao_idx.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/ao_idx.rb;hb=HEAD>
=end
module SiSU_AO_BookIndex
diff --git a/lib/sisu/v5/ao_images.rb b/lib/sisu/current/ao_images.rb
index 26694501..c0c45712 100644
--- a/lib/sisu/v5/ao_images.rb
+++ b/lib/sisu/current/ao_images.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/ao_images.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/ao_images.rb;hb=HEAD>
=end
module SiSU_AO_Images
@@ -122,7 +119,7 @@ module SiSU_AO_Images
).warn
end
imgk=SiSU_Env::SystemCall.new.imagemagick
- gmgk=SiSU_Env::SystemCall.new.graphicksmagick
+ gmgk=SiSU_Env::SystemCall.new.graphicsmagick
if imgk or gmgk
if imgk
imgsys=`identify #{image_path}/#{image}`.strip #system call
@@ -132,7 +129,7 @@ module SiSU_AO_Images
img_col,img_row=/(\d+)x(\d+)/m.match(imgsys)[1,2]
img_col,img_row=img_col.to_i,img_row.to_i
else
- errmsg='imagemagick or graphicksmagick are required to process images'
+ errmsg='imagemagick or graphicsmagick are required to process images'
if @md.opt.act[:no_stop][:set]==:on
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
error("#{errmsg}, proceeding (as requested) without image processing")
diff --git a/lib/sisu/current/ao_metadata.rb b/lib/sisu/current/ao_metadata.rb
new file mode 100644
index 00000000..46e80a7d
--- /dev/null
+++ b/lib/sisu/current/ao_metadata.rb
@@ -0,0 +1,86 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/ao_metadata.rb;hb=HEAD>
+
+=end
+module SiSU_AO_Metadata
+ class Metadata
+ def initialize(md,metad)
+ @md,@metadata=md,metad
+ l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language
+ language=l[:n]
+ @tr=SiSU_Translate::Source.new(md,language)
+ end
+ def make_para(obj,ocn)
+ h={
+ obj: obj,
+ ocn: 0
+ }
+ SiSU_AO_DocumentStructure::ObjectPara.new.paragraph(h)
+ end
+ def make_heading(obj,ocn,name,lv,ln)
+ h={
+ lv: lv,
+ ln: ln,
+ name: name,
+ obj: obj,
+ ocn: 0
+ }
+ SiSU_AO_DocumentStructure::ObjectHeading.new.heading(h)
+ end
+ def metadata
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/ao_misc_arrange.rb b/lib/sisu/current/ao_misc_arrange.rb
index 6c340004..e010eaca 100644
--- a/lib/sisu/v5/ao_misc_arrange.rb
+++ b/lib/sisu/current/ao_misc_arrange.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/ao_misc_arrange.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/ao_misc_arrange.rb;hb=HEAD>
=end
module SiSU_AO_MiscArrangeText
diff --git a/lib/sisu/v5/ao_numbering.rb b/lib/sisu/current/ao_numbering.rb
index 06588159..31986a86 100644
--- a/lib/sisu/v5/ao_numbering.rb
+++ b/lib/sisu/current/ao_numbering.rb
@@ -1,68 +1,65 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/ao_numbering.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/ao_numbering.rb;hb=HEAD>
=end
module SiSU_AO_Numbering
class Numbering
attr_accessor :obj,:osp,:ocn,:lv,:name,:index,:comment
@@segments_count=0
- def initialize(md,data)
- @md,@data=md,data
+ def initialize(md,data,fnx,process)
+ @md,@data,@fnx,@process=md,data,fnx,process
@obj=@type=@ocn=@lv=@name=@index=@comment=nil
@chosen_seg_names=[]
end
@@ -107,7 +104,9 @@ module SiSU_AO_Numbering
data=ocn(data.compact) #watch
data=xml(data.compact)
data=minor_numbering(data.compact)
- data,tags_map,ocn_html_seg_map=name_para_seg_filename(data)
+ if @process==:complete
+ data,tags_map,ocn_html_seg_map=name_para_seg_filename(data)
+ end
data=set_heading_top(data) unless @md.set_heading_top
[data,tags_map,ocn_html_seg_map]
ensure
@@ -280,7 +279,7 @@ module SiSU_AO_Numbering
@tuned_file=@tuned_file.flatten
end
def ocn(data) #and auto segment numbering increment
- @tuned_file=SiSU_AO_DocumentStructureExtract::OCN.new(@md,data).ocn
+ @tuned_file=SiSU_AO_DocumentStructureExtract::OCN.new(@md,data,@fnx,@process).ocn
@tuned_file
end
def xml(data)
diff --git a/lib/sisu/v5/ao_syntax.rb b/lib/sisu/current/ao_syntax.rb
index f5608d97..554daae5 100644
--- a/lib/sisu/v5/ao_syntax.rb
+++ b/lib/sisu/current/ao_syntax.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** Syntax for markup, input markup syntaxes, determined here
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/ao_syntax.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: Syntax for markup, input markup syntaxes, determined here
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/ao_syntax.rb;hb=HEAD>
=end
module SiSU_AO_Syntax
@@ -91,8 +88,8 @@ module SiSU_AO_Syntax
@manmkp_ital=emph_italics \
? '[i/*]\\{.+?\\}[i/*]'
: '[i/]\\{.+?\\}[i/]'
- tail_m_ital=%q{(?:\s|[.,;:?!'")]|~\^|~\\\{\s|$)}
- tail_m_bold=%{(?:(?:#{Mx[:fa_italics_c]})?(?:\s|[.,;:?!'")]|~\^|~\\\{\s|$))?}
+ tail_m_ital=%q{(?:\s|'s\b|[.,;:?!'")]|~\^|~\\\{\s|$)}
+ tail_m_bold=%{(?:(?:#{Mx[:fa_italics_c]})?(?:\s|'s\b|[.,;:?!'")]|~\^|~\\\{\s|$))?}
bold_line=%{^!_\s.+?(?:#{Mx[:br_line]}|\n|$)}
#ital_line=%{^/_\s.+?(?:#{Mx[:br_line]}|\n|$)} #not implemented
@line_scan_ital=if defined? @md.italics_match_list[:str]
@@ -360,7 +357,7 @@ module SiSU_AO_Syntax
# {url address}:url
# {image.png}imageurl
# {image.png}png
- # ~{endnote}~ <!e endnote !>
+ # ~{endnote}~
# !_ #bold/emphasise paragraph
# _" #blockquote paragraph
# _1 <:i1> #indent paragraph 1 step
@@ -392,7 +389,7 @@ module SiSU_AO_Syntax
dob.obj=dob.obj.strip
end
dob.obj=dob.obj.
- gsub(/^([*#-.]{1,12})$/,'\1 ~#'). #ocn off for these paragraph separators
+ gsub(/^([*#.-]{1,12})$/,'\1 ~#'). #ocn off for these paragraph separators
gsub(/~\{(.+?)\}~/m,Mx[:en_a_o] + '\1' + Mx[:en_a_c]).
gsub(/~\[([^*+].+?)\]~/m,Mx[:en_b_o] + '* \1' + Mx[:en_b_c]). #default if markup does not specify
gsub(/~\[(.+?)\]~/m,Mx[:en_b_o] + '\1' + Mx[:en_b_c])
@@ -555,7 +552,7 @@ module SiSU_AO_Syntax
# {url address}:url
# {image.png}imageurl
# {image.png}png
- # ~{endnote}~ <!e endnote !>
+ # ~{endnote}~
# +1 <!i1!>
# +2 <!i2!>
puts 'tech'
diff --git a/lib/sisu/current/cgi.rb b/lib/sisu/current/cgi.rb
new file mode 100644
index 00000000..99f2e987
--- /dev/null
+++ b/lib/sisu/current/cgi.rb
@@ -0,0 +1,84 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** generates naive cgi search form for search of sisu database (pgsql sqlite)
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/cgi.rb;hb=HEAD>
+
+=end
+module SiSU_CGI #% database building documents
+ require_relative 'se' # se.rb
+ require_relative 'cgi_pgsql' # cgi_pgsql.rb
+ require_relative 'cgi_sqlite' # cgi_sqlite.rb
+ class SearchSQL
+ def initialize(opt)
+ @opt=opt
+ @webserv=@opt.files[0].to_s.strip
+ end
+ def read
+ if @opt.act[:sample_search_form][:db]==:pg # cgi_pgsql.rb
+ SiSU_CGI_PgSQL::SearchPgSQL.new(@opt,@webserv).pgsql
+ elsif @opt.act[:sample_search_form][:db]==:sqlite # cgi_sqlite.rb
+ SiSU_CGI_SQLite::SearchSQLite.new(@opt,@webserv).sqlite
+ else
+ puts <<-WOK
+ please select database type for which sample search form should be built (pgsql or sqlite)
+ sisu --sample-search-form --db=sqlite
+ sisu --sample-search-form --db=pg
+ other options include
+ --webserv-cgi='[cgi-server-name]'
+ --webserv-output='[sisu-output-server-with-base-path]'
+ WOK
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/cgi_pgsql.rb b/lib/sisu/current/cgi_pgsql.rb
index 3ae98ffe..9a4c555b 100644
--- a/lib/sisu/v5/cgi_pgsql.rb
+++ b/lib/sisu/current/cgi_pgsql.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** generates naive cgi search form for search of sisu database (pgsql)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/cgi_pgsql.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: generates naive cgi search form for search of sisu database (pgsql)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/cgi_pgsql.rb;hb=HEAD>
=end
module SiSU_CGI_PgSQL #% database building documents
diff --git a/lib/sisu/v5/cgi_sql_common.rb b/lib/sisu/current/cgi_sql_common.rb
index 4d2304ba..94f6126e 100644
--- a/lib/sisu/v5/cgi_sql_common.rb
+++ b/lib/sisu/current/cgi_sql_common.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** generates naive cgi search form for search of sisu database (pgsql sqlite)
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * License: GPL 3 or later:
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- SiSU, a framework for document structuring, publishing and search
+** License: GPL 3 or later:
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ SiSU, a framework for document structuring, publishing and search
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ Copyright (C) Ralph Amissah
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/cgi_sql_common.rb;hb=HEAD>
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- ** Description: generates naive cgi search form for search of sisu database (pgsql sqlite)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/cgi_sql_common.rb;hb=HEAD>
=end
module SiSU_CGI_SQL
@@ -927,7 +924,7 @@ module SiSU_CGI_SQL
matched_para=(@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) \
? (c['body'].gsub(/(<a\s+href="https?:\/\/[^><\s]+#{@search_regx}[^>]+?>|#{@search_regx})/mi,%{<span style="background-color: #{@color_match}">\\1</span>}))
: c['body']
- %{<hr><p><font size="2">ocn <b><a href="#{path_filename(location,c['seg'],c['language_document_char'])}#o#{c['ocn']}">#{c['ocn']}</a></b>:</font></p>#{matched_para}}
+ %{<hr><p><font size="2">ocn <b><a href="#{path_filename(location,c['seg'],c['language_document_char'])}##{c['ocn']}">#{c['ocn']}</a></b>:</font></p>#{matched_para}}
elsif c['suffix'] =~/1/ #doc
%{#{title}<hr><p><font size="2">ocn #{c['ocn']}:#{c['body']}}
end
@@ -935,9 +932,9 @@ module SiSU_CGI_SQL
output=title+text
else #elsif cgi['view']=~/index/ #% idx body
if c['suffix'] !~/1/ #seg
- index=%{<a href="#{path_filename(location,c['seg'],c['language_document_char'])}#o#{c['ocn']}">#{c['ocn']}</a>, } if @text_search_flag
+ index=%{<a href="#{path_filename(location,c['seg'],c['language_document_char'])}##{c['ocn']}">#{c['ocn']}</a>, } if @text_search_flag
elsif c['suffix'] =~/1/ #doc #FIX
- index=%{<a href="#{path_html_doc(location,c['language_document_char'])}#o#{c['ocn']}">#{c['ocn']}</a>, }
+ index=%{<a href="#{path_html_doc(location,c['language_document_char'])}##{c['ocn']}">#{c['ocn']}</a>, }
end
if c['seg'] =~/\S+/
if @text_search_flag
diff --git a/lib/sisu/v6/cgi_sqlite.rb b/lib/sisu/current/cgi_sqlite.rb
index d11d4c30..91444237 100644
--- a/lib/sisu/v6/cgi_sqlite.rb
+++ b/lib/sisu/current/cgi_sqlite.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** generates naive cgi search form for search of sisu database (sqlite)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/cgi_sql_sqlite.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: generates naive cgi search form for search of sisu database (sqlite)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/cgi_sql_sqlite.rb;hb=HEAD>
=end
module SiSU_CGI_SQLite #% database building documents
diff --git a/lib/sisu/v6/conf.rb b/lib/sisu/current/conf.rb
index ea0ea387..2bc71ce7 100644
--- a/lib/sisu/v6/conf.rb
+++ b/lib/sisu/current/conf.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** configuration
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/conf.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: configuration
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/conf.rb;hb=HEAD>
=end
module SiSU_Initialize
diff --git a/lib/sisu/v5/constants.rb b/lib/sisu/current/constants.rb
index 1e5a4dfe..7a23027d 100644
--- a/lib/sisu/v5/constants.rb
+++ b/lib/sisu/current/constants.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
- constants
+** Description: documents, structuring, processing, publishing, search
+*** constants, system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/constants.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/constants.rb;hb=HEAD>
=end
#Ax,Xx,Mx,Rx,Hx,Dx,Px,Ep,Db,Gt,Tex=Array.new(11){{}}
@@ -234,8 +230,8 @@ Px={
po_subscript_o: ',{', po_subscript_c: '},',
po_hilite_o: '*{', po_hilite_c: '}*',
po_monospace_o: '#{', po_monospace_c: '}#',
- lng_lst: SiSU_is[:language_list],
- lng_lst_rgx: SiSU_is[:language_list_regex],
+ lng_lst: SiSU_is.language_list?,
+ lng_lst_rgx: SiSU_is.language_list_regex?,
lv1: '*',
lv2: '=',
lv3: '=',
@@ -264,8 +260,8 @@ else
}
end
Db={
- name_prefix: "SiSU#{SiSU_is[:version_dir]}c_",
- name_prefix_db: "sisu_#{SiSU_is[:version_dir]}c_",
+ name_prefix: "SiSU#{SiSU_is.branch_version?}c_",
+ name_prefix_db: "sisu_#{SiSU_is.branch_version?}c_",
col_title: 800,
col_title_part: 400,
col_title_edition: 10,
diff --git a/lib/sisu/v5/css.rb b/lib/sisu/current/css.rb
index b70d3edd..1832b66c 100644
--- a/lib/sisu/v5/css.rb
+++ b/lib/sisu/current/css.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** css stylesheets
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/css.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: css stylesheets
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/css.rb;hb=HEAD>
=end
module SiSU_Style
@@ -358,16 +355,6 @@ WOK
color: #000000;
background-color: #f9f9aa;
}
- a.lnkocn:link {
- color: #777777;
- text-decoration: none;
- }
-/*
- a:hover {
- border-bottom: 2px solid #777777;
- background-color: #fff3b6;
- }
-*/
a:hover img {
background-color: #ffffff;
}
@@ -375,6 +362,14 @@ WOK
color: #003399;
text-decoration: underline;
}
+ a.lnkocn:link {
+ color: #777777;
+ text-decoration: none;
+ }
+ a.lnkocn:visited {
+ color: #555555;
+ text-decoration: none;
+ }
div {
margin-left: 0;
margin-right: 0;
diff --git a/lib/sisu/v5/db_columns.rb b/lib/sisu/current/db_columns.rb
index 158a1ba2..35491e94 100644
--- a/lib/sisu/v5/db_columns.rb
+++ b/lib/sisu/current/db_columns.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/db_columns.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/db_columns.rb;hb=HEAD>
=end
module SiSU_DbColumns
@@ -373,7 +369,6 @@ module SiSU_DbColumns
if defined? @md.creator.editor_detail \
and @md.creator.editor_detail.is_a?(Array) \
and @md.creator.editor_detail.length > 0
- txt=@md.creator.editor_detail #dc
txt=''
@md.creator.editor_detail.each do |h|
txt=txt + %{#{h[:the]}, #{h[:others]}; }
@@ -401,7 +396,6 @@ module SiSU_DbColumns
if defined? @md.creator.contributor_detail \
and @md.creator.contributor_detail.is_a?(Array) \
and @md.creator.contributor_detail.length > 0
- txt=@md.creator.contributor_detail #dc
txt=''
@md.creator.contributor_detail.each do |h|
txt=txt + %{#{h[:the]}, #{h[:others]}; }
@@ -429,7 +423,6 @@ module SiSU_DbColumns
if defined? @md.creator.illustrator_detail \
and @md.creator.illustrator_detail.is_a?(Array) \
and @md.creator.illustrator_detail.length > 0
- txt=@md.creator.illustrator_detail
txt=''
@md.creator.illustrator_detail.each do |h|
txt=txt + %{#{h[:the]}, #{h[:others]}; }
@@ -457,7 +450,6 @@ module SiSU_DbColumns
if defined? @md.creator.photographer_detail \
and @md.creator.photographer_detail.is_a?(Array) \
and @md.creator.photographer_detail.length > 0
- txt=@md.creator.photographer_detail
txt=''
@md.creator.photographer_detail.each do |h|
txt=txt + %{#{h[:the]}, #{h[:others]}; }
@@ -512,7 +504,6 @@ module SiSU_DbColumns
if defined? @md.creator.prepared_by_detail \
and @md.creator.prepared_by_detail.is_a?(Array) \
and @md.creator.prepared_by_detail.length > 0
- txt=@md.creator.prepared_by_detail
txt=''
@md.creator.prepared_by_detail.each do |h|
txt=txt + %{#{h[:the]}, #{h[:others]}; }
@@ -540,7 +531,6 @@ module SiSU_DbColumns
if defined? @md.creator.digitized_by_detail \
and @md.creator.digitized_by_detail.is_a?(Array) \
and @md.creator.digitized_by_detail.length > 0
- txt=@md.creator.digitized_by_detail
txt=''
@md.creator.digitized_by_detail.each do |h|
txt=txt + %{#{h[:the]}, #{h[:others]}; }
@@ -568,7 +558,6 @@ module SiSU_DbColumns
if defined? @md.creator.audio_detail \
and @md.creator.audio_detail.is_a?(Array) \
and @md.creator.audio_detail.length > 0
- txt=@md.creator.audio_detail
txt=''
@md.creator.audio_detail.each do |h|
txt=txt + %{#{h[:the]}, #{h[:others]}; }
diff --git a/lib/sisu/v6/db_create.rb b/lib/sisu/current/db_create.rb
index 861e3b56..df8983d2 100644
--- a/lib/sisu/v6/db_create.rb
+++ b/lib/sisu/current/db_create.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/db_create.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/db_create.rb;hb=HEAD>
=end
module SiSU_DbCreate
diff --git a/lib/sisu/v5/db_dbi.rb b/lib/sisu/current/db_dbi.rb
index 88ebb5ac..9824a6c5 100644
--- a/lib/sisu/v5/db_dbi.rb
+++ b/lib/sisu/current/db_dbi.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/db_dbi.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/db_dbi.rb;hb=HEAD>
=end
module SiSU_DbDBI
diff --git a/lib/sisu/v6/db_drop.rb b/lib/sisu/current/db_drop.rb
index c8e00bde..acdae9da 100644
--- a/lib/sisu/v6/db_drop.rb
+++ b/lib/sisu/current/db_drop.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/db_drop.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/db_drop.rb;hb=HEAD>
=end
module SiSU_DbDrop
diff --git a/lib/sisu/v5/db_import.rb b/lib/sisu/current/db_import.rb
index 72fb3753..43da9c44 100644
--- a/lib/sisu/v5/db_import.rb
+++ b/lib/sisu/current/db_import.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/db_import.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/db_import.rb;hb=HEAD>
=end
module SiSU_DbImport
diff --git a/lib/sisu/v6/db_indexes.rb b/lib/sisu/current/db_indexes.rb
index c3717a83..25373bf5 100644
--- a/lib/sisu/v6/db_indexes.rb
+++ b/lib/sisu/current/db_indexes.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/db_indexes.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/db_indexes.rb;hb=HEAD>
=end
module SiSU_DbIndex
diff --git a/lib/sisu/v5/db_load_tuple.rb b/lib/sisu/current/db_load_tuple.rb
index ef21f62b..ebf7a45e 100644
--- a/lib/sisu/v5/db_load_tuple.rb
+++ b/lib/sisu/current/db_load_tuple.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/db_load_tuple.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/db_load_tuple.rb;hb=HEAD>
=end
module SiSU_DbTuple
diff --git a/lib/sisu/v6/db_remove.rb b/lib/sisu/current/db_remove.rb
index 9378378e..c8287aa9 100644
--- a/lib/sisu/v6/db_remove.rb
+++ b/lib/sisu/current/db_remove.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/db_remove.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/db_remove.rb;hb=HEAD>
=end
module SiSU_DbRemove
diff --git a/lib/sisu/v6/db_select.rb b/lib/sisu/current/db_select.rb
index c9c4ffc1..284bd135 100644
--- a/lib/sisu/v6/db_select.rb
+++ b/lib/sisu/current/db_select.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/db_select.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/db_select.rb;hb=HEAD>
=end
module SiSU_DbAction
diff --git a/lib/sisu/v6/db_sqltxt.rb b/lib/sisu/current/db_sqltxt.rb
index 2375d5ca..a307dc1d 100644
--- a/lib/sisu/v6/db_sqltxt.rb
+++ b/lib/sisu/current/db_sqltxt.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/db_sqltxt.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/db_sqltxt.rb;hb=HEAD>
=end
module SiSU_DbText
@@ -172,4 +169,3 @@ module SiSU_DbText
end
end
__END__
-
diff --git a/lib/sisu/v6/db_tests.rb b/lib/sisu/current/db_tests.rb
index dbe227aa..137850ab 100644
--- a/lib/sisu/v6/db_tests.rb
+++ b/lib/sisu/current/db_tests.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/db_tests.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/db_tests.rb;hb=HEAD>
=end
module SiSU_DbTests
diff --git a/lib/sisu/v5/dbi.rb b/lib/sisu/current/dbi.rb
index 019b56a3..93e4769a 100644
--- a/lib/sisu/v5/dbi.rb
+++ b/lib/sisu/current/dbi.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** postgresql module, dbi import frame
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/dbi.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: postgresql module, dbi import frame
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/dbi.rb;hb=HEAD>
=end
module SiSU_DBI #% database building
diff --git a/lib/sisu/v5/dbi_discrete.rb b/lib/sisu/current/dbi_discrete.rb
index e50f5646..f62204c6 100644
--- a/lib/sisu/v5/dbi_discrete.rb
+++ b/lib/sisu/current/dbi_discrete.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** postgresql module, dbi import frame
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/dbi_discrete.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: postgresql module, dbi import frame
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/dbi_discrete.rb;hb=HEAD>
=end
module SiSU_DBI_Discrete #% database building
diff --git a/lib/sisu/v5/digests.rb b/lib/sisu/current/digests.rb
index 985e76b2..8a3a2d08 100644
--- a/lib/sisu/v5/digests.rb
+++ b/lib/sisu/current/digests.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** document digests (md5|sha256) and structure processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/digests.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: document digests (md5|sha256) and structure processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/digests.rb;hb=HEAD>
=end
module SiSU_DigestView
diff --git a/lib/sisu/v6/dp.rb b/lib/sisu/current/dp.rb
index 89c6ba58..4cf058e7 100644
--- a/lib/sisu/v6/dp.rb
+++ b/lib/sisu/current/dp.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** document parameters extracted from input files for program use
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/dp.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: document parameters extracted from input files for program use
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/dp.rb;hb=HEAD>
=end
module SiSU_Param
@@ -70,19 +67,6 @@ module SiSU_Param
require_relative 'dp_make' # dp_make.rb
require_relative 'dp_identify_markup' # dp_identify_markup.rb
@@date=SiSU_Env::InfoDate.new
- @@proc=
- @@filename_txt=
- @@filename_texinfo=
- @@filename_lout_portrait=
- @@filename_lout_landscape=
- @@filename_html_scroll=
- @@filename_html_index=
- @@filename_html_segtoc=
- @@filename_semantic=
- @@filename_rss=
- @@newfile=
- @@drr=
- nil
@doc={
initialise: nil,
markup: '',
@@ -90,7 +74,6 @@ module SiSU_Param
stmp: '',
req: {},
}
- @@yaml=@@yamladdr=nil
@@trigger=nil
@@lv,@@flag={},{}
@@tex_backslash="\\\\"
@@ -543,7 +526,9 @@ module SiSU_Param
SiSU_Screen::Ansi.new(
@opt.act[:color_state][:set],
'WARNING Document Copyright missing; provide @rights: :copyright:'
- ).warn unless @opt.act[:quiet][:set]==:on
+ ).warn if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
''
end
l,n=Db[:col_info_note],'rights.copyright.text'
@@ -615,7 +600,9 @@ module SiSU_Param
SiSU_Screen::Ansi.new(
@opt.act[:color_state][:set],
'WARNING Document Rights information missing; provide @rights: :copyright:'
- ).warn unless @opt.act[:quiet][:set]==:on
+ ).warn if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
else
l,n=Db[:col_info_note],'rights.all'
validate_length(s,l,n)
@@ -673,7 +660,9 @@ module SiSU_Param
SiSU_Screen::Ansi.new(
@opt.act[:color_state][:set],
'WARNING Document Rights information missing; provide @rights: :copyright:'
- ).warn unless @opt.act[:quiet][:set]==:on
+ ).warn if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
else
l,n=Db[:col_info_note],'rights.all'
validate_length(s,l,n)
@@ -1424,11 +1413,13 @@ module SiSU_Param
SiSU_Screen::Ansi.new(
@opt.act[:color_state][:set],
'*WARN* endnote number mismatch',
- "endnotes: #{@en[:note]} != endnote reference marks: #{@en[:mark]} (difference = #{@en[:mismatch]})"
+ "endnotes: #{@en[:note]} != endnote reference marks: #{@en[:mark]} " \
+ + "(difference = #{@en[:mismatch]})"
).warn unless @opt.act[:quiet][:set]==:on
footnote_conversion_errors=File.new("#{Dir.pwd}/footnote_conversion_errors.txt",'a')
footnote_conversion_errors <<
- "#{@fns}:\n\tendnotes: #{@en[:note]} != endnote reference marks: #{@en[:mark]} (difference = #{@en[:mismatch]})\n"
+ "#{@fns}:\n\tendnotes: #{@en[:note]} != endnote reference marks: #{@en[:mark]} " \
+ + "(difference = #{@en[:mismatch]})\n"
end
if not @title \
or not defined? @title.main \
@@ -1441,7 +1432,9 @@ module SiSU_Param
@opt.act[:color_state][:set],
'WARNING: Document Title missing',
'please provide @title:'
- ).warn unless @opt.act[:quiet][:set]==:on
+ ).warn if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
end
end
if @author !~/[\S]/
@@ -1453,7 +1446,9 @@ module SiSU_Param
@opt.act[:color_state][:set],
'WARNING: Document Author missing',
'please provide @creator: :author:'
- ).warn unless @opt.act[:quiet][:set]==:on
+ ).warn if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
end
end
@struct={}
@@ -1565,19 +1560,6 @@ module SiSU_Param
class Instantiate
def param_instantiate
@@date=SiSU_Env::InfoDate.new
- @@proc=
- @@filename_txt=
- @@filename_texinfo=
- @@filename_lout_portrait=
- @@filename_lout_landscape=
- @@filename_html_scroll=
- @@filename_html_index=
- @@filename_html_segtoc=
- @@filename_semantic=
- @@filename_rss=
- @@newfile=
- @@drr=
- nil
@doc={
initialise: nil,
markup: '',
@@ -1587,7 +1569,6 @@ module SiSU_Param
prefix_b: '',
req: {}
}
- @@yaml=@@yamladdr=nil
@@flag={}
@@publisher='SiSU scribe'
end
diff --git a/lib/sisu/v5/dp_identify_markup.rb b/lib/sisu/current/dp_identify_markup.rb
index ee0c4ebc..acb6070a 100644
--- a/lib/sisu/v5/dp_identify_markup.rb
+++ b/lib/sisu/current/dp_identify_markup.rb
@@ -1,62 +1,59 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** A conversion script for canned substitutions, a fairly generic simple tool
+ that can be used to store other canned conversions, used here for altering
+ SiSU markup
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/dp_identify_markup.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: A conversion script for canned substitutions, a fairly generic
- simple tool that can be used to store other canned conversions, used here for
- altering SiSU markup
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/dp_identify_markup.rb;hb=HEAD>
=end
module SiSU_MarkupType
diff --git a/lib/sisu/v6/dp_make.rb b/lib/sisu/current/dp_make.rb
index 9a2c2989..f65717bb 100644
--- a/lib/sisu/v6/dp_make.rb
+++ b/lib/sisu/current/dp_make.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** document parameters make extracted for program use
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Lic/home/ralph/live-manual/build/manual/manifest/live-manual.ca.htmlense for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Lic/home/ralph/live-manual/build/manual/manifest/live-manual.ca.htmlense for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/dp_make.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: document parameters make extracted for program use
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/dp_make.rb;hb=HEAD>
=end
@@ -429,7 +426,7 @@ module SiSU_Param_Make
end
def get_image_dimensions(img)
imgk=SiSU_Env::SystemCall.new.imagemagick
- gmgk=SiSU_Env::SystemCall.new.graphicksmagick
+ gmgk=SiSU_Env::SystemCall.new.graphicsmagick
img_pth={
sst: @env.path.image_source_include,
pod: File.expand_path("../../../sisupod/image" )
diff --git a/lib/sisu/v5/embedded.rb b/lib/sisu/current/embedded.rb
index 4eec8a2f..14f2bd4a 100644
--- a/lib/sisu/v5/embedded.rb
+++ b/lib/sisu/current/embedded.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** sitemap created from parameters extracted from input file(s)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/embedded.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: sitemap created from parameters extracted from input file(s)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/embedded.rb;hb=HEAD>
=end
module SiSU_Embedded
diff --git a/lib/sisu/current/errors.rb b/lib/sisu/current/errors.rb
new file mode 100644
index 00000000..73b2feaa
--- /dev/null
+++ b/lib/sisu/current/errors.rb
@@ -0,0 +1,84 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, error screen reporting
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/errors.rb;hb=HEAD>
+
+=end
+module SiSU_Errors
+ require_relative 'se' # se.rb
+ include SiSU_Env; include SiSU_Screen
+ class Rescued <CreateFile
+ def initialize(error,errorlist,cmd,fns='')
+ @fns,@cmd,@error,@errorlist=fns,cmd,error,errorlist
+ @cmd=(cmd \
+ && (cmd =~/c/)) \
+ ? 'Vc'
+ : 'V'
+ end
+ def location
+ file=@fns \
+ ? (SiSU_Env::CreateFile.new(@fns).file_error)
+ : (File.new('/tmp/errorlog.sisu','w+'))
+ file << @fns << "\n" << @error << "\n" << @errorlist
+ file.close
+ if @cmd=~/[vVM]/
+ SiSU_Screen::Ansi.new('',$!,$@).rescue do
+ (block_given?) ? yield : __LINE__.to_s + ':' + __FILE__
+ end
+ else
+ SiSU_Screen::Ansi.new('',"rescued, exception raised, silenced").puts_grey
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/current/generic_parts.rb b/lib/sisu/current/generic_parts.rb
new file mode 100644
index 00000000..ba10b38e
--- /dev/null
+++ b/lib/sisu/current/generic_parts.rb
@@ -0,0 +1,131 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html_parts.rb;hb=HEAD>
+
+=end
+module SiSU_Parts_Generic
+ def the_url
+ def urify(uri)
+ URI.parse(uri)
+ end
+ def sisu
+ 'http://www.sisudoc.org/'
+ end
+ def sisudoc
+ 'http://www.sisudoc.org'
+ end
+ def footer_signature
+ 'http://www.sisudoc.org/'
+ end
+ def rl_root
+ '/sisu' #watch
+ end
+ def root_http
+ 'http://www.sisudoc.org/' #watch
+ end
+ def home
+ 'http://www.sisudoc.org/' # used in pdf header
+ end
+ def site #used as stub... where there are subdirectories and is different from home
+ home
+ end
+ def home_txt
+ 'www.sisudoc.org'
+ end
+ def sisu_txt
+ 'www.sisudoc.org'
+ end
+ self
+ end
+ def the_text
+ def home
+ 'SiSU'
+ end
+ def txt_hp
+ '&nbsp;SiSU'
+ end
+ def txt_hp_alias
+ 'SiSU'
+ end
+ def txt_home
+ 'SiSU'
+ end
+ def txt_signature # used in latex/pdf footer
+ 'SiSU'
+ end
+ def url_open
+ '<'
+ end
+ def url_close
+ '>'
+ end
+ self
+ end
+ def the_icon
+ def i_ico
+ 'rb7.ico'
+ end
+ def i_home_button
+ 'sisu.png'
+ end
+ def i_choice
+ 'b_choice.png'
+ end
+ def i_new
+ 'b_new.png'
+ end
+ self
+ end
+end
+__END__
diff --git a/lib/sisu/v6/git.rb b/lib/sisu/current/git.rb
index 3c20b2e3..0ec3520b 100644
--- a/lib/sisu/v6/git.rb
+++ b/lib/sisu/current/git.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/git.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/git.rb;hb=HEAD>
=end
module SiSU_Git
@@ -62,8 +59,8 @@ module SiSU_Git
require_relative 'se' # se.rb
require_relative 'ao' # ao.rb
class Source
- def initialize(opt)
- @opt=opt
+ def initialize(opt,process=:complete)
+ @opt,@process=opt,process
@env=SiSU_Env::InfoEnv.new
@md=SiSU_Param::Parameters.new(@opt).get
@file=SiSU_Env::FileOp.new(@md)
@@ -91,7 +88,7 @@ module SiSU_Git
video: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:video],
conf: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:conf]
}
- SiSU_AO::Source.new(@opt).read # -m
+ SiSU_AO::Source.new(@opt,nil,@process).read # -m
end
def create_file_structure_git
make_dir_fnb
diff --git a/lib/sisu/v6/html.rb b/lib/sisu/current/html.rb
index 3da2baf4..582773e5 100644
--- a/lib/sisu/v6/html.rb
+++ b/lib/sisu/current/html.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** html generation, processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: html generation, processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html.rb;hb=HEAD>
=end
module SiSU_HTML
diff --git a/lib/sisu/v5/html_concordance.rb b/lib/sisu/current/html_concordance.rb
index 231eb4c1..3b3275e3 100644
--- a/lib/sisu/v5/html_concordance.rb
+++ b/lib/sisu/current/html_concordance.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** concordance file (html, wordmap, linked index of words in document)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html_concordance.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: concordance file (html concordance, wordmap, linked index of
- words in document)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html_concordance.rb;hb=HEAD>
=end
module SiSU_Concordance
diff --git a/lib/sisu/v5/html_format.rb b/lib/sisu/current/html_format.rb
index 78080878..8f83219f 100644
--- a/lib/sisu/v5/html_format.rb
+++ b/lib/sisu/current/html_format.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** html formating, css template
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: html formating, css template
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html_format.rb;hb=HEAD>
=end
module SiSU_HTML_Format
@@ -72,7 +69,7 @@ module SiSU_HTML_Format
or @ocn.empty?
''
else
- %{<label class="ocn">#{@ocn}</label>}
+ %{<label class="ocn"><a href="##{@ocn_html_identifier}#{@ocn}" class="lnkocn">#{@ocn}</a></label>}
end
else
''
@@ -1150,8 +1147,8 @@ WOK
def initialize(md,txt)
super(md,txt)
end
- def endnote_seg_body(fn='') #FIX #url construction keep within single line... BUG WATCH 200408
- fn='doc' if fn.to_s.empty? #you may wish to reconsider, sends to 'doc' where no segment info
+ def endnote_seg_body(fn='')
+ fn="../#{@md.fnb}" if fn.to_s.empty?
%{
<p class="endnote">
#{@endnote_part_a}#{fn}#{@md.lang_code_insert}#{Sfx[:html]}#{@endnote_part_b}
diff --git a/lib/sisu/current/html_harvest.rb b/lib/sisu/current/html_harvest.rb
new file mode 100644
index 00000000..0ac5c95f
--- /dev/null
+++ b/lib/sisu/current/html_harvest.rb
@@ -0,0 +1,109 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** metadata harvest, harvest metadata from document corpus
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/harvest.rb;hb=HEAD>
+
+=end
+module SiSU_Harvest
+ @@the_idx_topics,@@the_idx_authors={},{}
+ class Source
+ require_relative 'hub_options' # hub_options.rb
+ require_relative 'html_harvest_topics' # html_harvest_topics.rb
+ require_relative 'html_harvest_authors' # html_harvest_authors.rb
+ require_relative 'se' # se.rb
+ include SiSU_Env
+ def initialize(opt)
+ @opt=opt
+ @env=SiSU_Env::InfoEnv.new
+ end
+ def read
+ begin
+ harvest_pth=@env.path.webserv + '/' + @opt.base_stub
+ FileUtils::mkdir_p(harvest_pth) unless FileTest.directory?(harvest_pth)
+ cases(@opt,@env)
+ rescue
+ ensure
+ SiSU_Env::CreateSite.new(@opt).cp_css
+ end
+ end
+ def help
+ puts <<WOK
+ harvest --harvest extracts document index metadata
+
+WOK
+ end
+ def css(opt)
+ require_relative 'css' # css.rb
+ css=SiSU_Style::CSS.new
+ fn_css=SiSU_Env::CSS_Default.new
+ style=File.new("#{@env.path.pwd}/#{fn_css.harvest}",'w')
+ style << css.harvest
+ style.close
+ end
+ def cases(opt,env)
+ case opt.selections.str.inspect
+ when/--harvest/i
+ css(opt) if @opt.act[:maintenance][:set]==:on
+ SiSU_HarvestAuthors::Songsheet.new(opt,env).songsheet
+ SiSU_HarvestTopics::Songsheet.new(opt,env).songsheet
+ if @opt.act[:rsync][:set]==:on
+ require_relative 'remote' # remote.rb
+ SiSU_Remote::Put.new(opt).rsync_harvest
+ end
+ else
+ help
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/current/html_harvest_author_format.rb b/lib/sisu/current/html_harvest_author_format.rb
new file mode 100644
index 00000000..db71b013
--- /dev/null
+++ b/lib/sisu/current/html_harvest_author_format.rb
@@ -0,0 +1,111 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/harvest_author_format.rb;hb=HEAD>
+
+=end
+module SiSU_FormatAuthor
+ class Author
+ def initialize(author_param)
+ @author_param=author_param
+ end
+ def author_details
+ @authors,@author_array=[],[]
+ authors=@author_param.scan(/[^;]+/)
+ authors.each do |a|
+ a=a.strip
+ if a =~/"(.+?)"/
+ @authors << { the: $1 }
+ @author_array << $1.upcase
+ else #if a =~/,/
+ x=a.scan(/[^,]+/)
+ x[0]=x[0].strip
+ x[1]=x[1].strip if x[1]
+ if x.length==1
+ @authors << { the: x[0] }
+ @author_array << x[0].upcase
+ elsif x.length==2
+ @authors << { the: x[0], others: x[1] }
+ @author_array << "#{x[0].upcase}, #{x[1]}"
+ else #p x.length
+ end
+ end
+ end
+ l = @authors.length
+ authors_string=''
+ @authors.each_with_index do |a,i|
+ authors_string += if a[:others]
+ if (l - i) > 1
+ "#{a[:others]} #{a[:the]}, "
+ else
+ "#{a[:others]} #{a[:the]}"
+ end
+ else
+ if (l - i) > 2
+ "#{a[:the]}, "
+ else
+ "#{a[:the]}"
+ end
+ end
+ end
+ {
+ last_first_a: authors,
+ last_first_format_a: @author_array,
+ authors_h: @authors,
+ authors_s: authors_string,
+ authors_param: @author_param
+ }
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/html_harvest_authors.rb b/lib/sisu/current/html_harvest_authors.rb
index 14b18ca0..cbbd153c 100644
--- a/lib/sisu/v6/html_harvest_authors.rb
+++ b/lib/sisu/current/html_harvest_authors.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
- metadata harvest, extract authors and their writings from document set
+** Description: documents, structuring, processing, publishing, search
+*** metadata harvest, extract authors and their writings from document set
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/harvest_authors.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: simple xml representation (sax style)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/harvest_authors.rb;hb=HEAD>
=end
module SiSU_HarvestAuthors
diff --git a/lib/sisu/v6/html_harvest_topics.rb b/lib/sisu/current/html_harvest_topics.rb
index 3daafe3d..58f92bcb 100644
--- a/lib/sisu/v6/html_harvest_topics.rb
+++ b/lib/sisu/current/html_harvest_topics.rb
@@ -1,62 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
- metadata harvest, extract topics and associated writings from document set
- (topics use topic_register header)
+** Description: documents, structuring, processing, publishing, search
+*** metadata harvest, extract topics and associated writings from document set
+ (topics use topic_register header)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/harvest_topics.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: simple xml representation (sax style)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/harvest_topics.rb;hb=HEAD>
=end
module SiSU_HarvestTopics
diff --git a/lib/sisu/v5/html_lite_shared.rb b/lib/sisu/current/html_lite_shared.rb
index fa1cc481..aac53727 100644
--- a/lib/sisu/v5/html_lite_shared.rb
+++ b/lib/sisu/current/html_lite_shared.rb
@@ -1,61 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by db and flatfile output generators, mostly xml/xhtml/html
+ formatting
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html_lite_shared.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by db and flatfile output generators, mostly
- xml/xhtml/html formatting
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html_lite_shared.rb;hb=HEAD>
=end
module SiSU_FormatShared
diff --git a/lib/sisu/v6/html_manifest.rb b/lib/sisu/current/html_manifest.rb
index 8fcf198c..44094383 100644
--- a/lib/sisu/v6/html_manifest.rb
+++ b/lib/sisu/current/html_manifest.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** summary of generated outputs and metadata
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html_manifest.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: summary of generated outputs and metadata
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html_manifest.rb;hb=HEAD>
=end
module SiSU_Manifest
diff --git a/lib/sisu/v6/html_minitoc.rb b/lib/sisu/current/html_minitoc.rb
index 9c8ed2a1..902a68d4 100644
--- a/lib/sisu/v6/html_minitoc.rb
+++ b/lib/sisu/current/html_minitoc.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
- minitoc
+** Description: documents, structuring, processing, publishing, search
+*** html minitoc
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html_minitoc.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html_minitoc.rb;hb=HEAD>
=end
module SiSU_HTML_MiniToc
diff --git a/lib/sisu/v5/html_parts.rb b/lib/sisu/current/html_parts.rb
index 6f3468d0..db7cdb76 100644
--- a/lib/sisu/v5/html_parts.rb
+++ b/lib/sisu/current/html_parts.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html_parts.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html_parts.rb;hb=HEAD>
=end
module SiSU_Parts_HTML
diff --git a/lib/sisu/v6/html_promo.rb b/lib/sisu/current/html_promo.rb
index 1880e246..28b4e356 100644
--- a/lib/sisu/v6/html_promo.rb
+++ b/lib/sisu/current/html_promo.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** html advertising component, build here, mockup
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html_promo.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: html advertising component, build here, mockup
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html_promo.rb;hb=HEAD>
=end
module SiSU_HTML_Promo
diff --git a/lib/sisu/v5/html_scroll.rb b/lib/sisu/current/html_scroll.rb
index 94dac502..4751a01b 100644
--- a/lib/sisu/v5/html_scroll.rb
+++ b/lib/sisu/current/html_scroll.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** html scroll generation, processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html_scroll.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: html scroll generation, processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html_scroll.rb;hb=HEAD>
=end
module SiSU_HTML_Scroll
diff --git a/lib/sisu/v6/html_segments.rb b/lib/sisu/current/html_segments.rb
index 060258d9..3288b8f4 100644
--- a/lib/sisu/v6/html_segments.rb
+++ b/lib/sisu/current/html_segments.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** html segment generation, processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html_segments.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: html segment generation, processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html_segments.rb;hb=HEAD>
=end
module SiSU_HTML_Seg
diff --git a/lib/sisu/current/html_shared.rb b/lib/sisu/current/html_shared.rb
new file mode 100644
index 00000000..883467b1
--- /dev/null
+++ b/lib/sisu/current/html_shared.rb
@@ -0,0 +1,62 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html_shared.rb;hb=HEAD>
+
+=end
+module SiSU_HTML_Shared
+ require_relative 'html_table' # html_table.rb
+ class TableHTML < SiSU_HTML_Table::TableHTML
+ end
+end
+__END__
diff --git a/lib/sisu/current/html_table.rb b/lib/sisu/current/html_table.rb
new file mode 100644
index 00000000..ddcb513d
--- /dev/null
+++ b/lib/sisu/current/html_table.rb
@@ -0,0 +1,64 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts, table
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html_table.rb;hb=HEAD>
+
+=end
+module SiSU_HTML_Table
+ require_relative 'xhtml_table' # xhtml_table.rb
+ require_relative 'html_parts' # html_parts.rb
+ class TableHTML < SiSU_XHTML_Table::TableXHTML
+ include SiSU_Parts_HTML
+ end
+end
+__END__
diff --git a/lib/sisu/v6/html_tune.rb b/lib/sisu/current/html_tune.rb
index 09c771b6..5a4575cf 100644
--- a/lib/sisu/v6/html_tune.rb
+++ b/lib/sisu/current/html_tune.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** html generation, html pre-processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html_tune.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: html generation, html pre-processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html_tune.rb;hb=HEAD>
=end
require_relative 'dp' # dp.rb
diff --git a/lib/sisu/v5/hub.rb b/lib/sisu/current/hub.rb
index a4751e40..eb6ab19d 100644
--- a/lib/sisu/v5/hub.rb
+++ b/lib/sisu/current/hub.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** hub
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/hub.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: SiSU information Structuring Universe, text structuring,
- processing, publishing, search
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/hub.rb;hb=HEAD>
=end
module SiSU
@@ -76,9 +72,9 @@ module SiSU
error('uri NOT FOUND (LoadError)')
end
class HubMaster
- def initialize(argv,call_path)
+ def initialize(argv,sisu_runtime)
begin
- opt=SiSU_Commandline::Options.new(argv,call_path)
+ opt=SiSU_Commandline::Options.new(argv,sisu_runtime)
SiSU::Processing.new(opt).actions_without_files
SiSU::Processing.new(opt).actions_on_files
SiSU::Processing.new(opt).actions_without_files_post
diff --git a/lib/sisu/v6/hub_actions.rb b/lib/sisu/current/hub_actions.rb
index 076461db..8878855d 100644
--- a/lib/sisu/v6/hub_actions.rb
+++ b/lib/sisu/current/hub_actions.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** hub, perform selected actions
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/hub_actions.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: SiSU information Structuring Universe, text structuring,
- processing, publishing, search
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/hub_actions.rb;hb=HEAD>
=end
module SiSU_Hub_Actions
diff --git a/lib/sisu/v5/hub_loop_markup_files.rb b/lib/sisu/current/hub_loop_markup_files.rb
index 165fdc93..626dc8e1 100644
--- a/lib/sisu/v5/hub_loop_markup_files.rb
+++ b/lib/sisu/current/hub_loop_markup_files.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** hub
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/hub_loop_markup_files.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: SiSU information Structuring Universe, text structuring,
- processing, publishing, search
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/hub_loop_markup_files.rb;hb=HEAD>
=end
module SiSU_Hub_Loops
diff --git a/lib/sisu/v5/hub_options.rb b/lib/sisu/current/hub_options.rb
index d267cb74..8a9af156 100644
--- a/lib/sisu/v5/hub_options.rb
+++ b/lib/sisu/current/hub_options.rb
@@ -1,61 +1,59 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** hub, command line options parsing
- * Author: Ralph Amissah
+*** hub
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * License: GPL 3 or later:
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- SiSU, a framework for document structuring, publishing and search
+** License: GPL 3 or later:
- Copyright (C) Ralph Amissah
+ SiSU, a framework for document structuring, publishing and search
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ Copyright (C) Ralph Amissah
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/hub_options.rb;hb=HEAD>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: SiSU information Structuring Universe, command line options
- parsing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/hub_options.rb;hb=HEAD>
=end
module SiSU_Commandline
@@ -154,9 +152,9 @@ module SiSU_Commandline
end
end
class Options
- attr_accessor :selections,:opt_ch,:act,:dir_structure_by,:lingual,:f_pths,:files,:files_mod,:call_path,:base_path,:base_stub,:sub_location,:image_src_path,:paths,:lngs,:f_pth,:pth,:fno,:fns,:fnb,:fnc,:fng,:fncb,:lng,:lng_base,:what,:make_instructions,:make_instructions_pod
+ attr_accessor :selections,:opt_ch,:act,:dir_structure_by,:lingual,:f_pths,:files,:files_mod,:call_path,:base_path,:base_stub,:sub_location,:image_src_path,:paths,:lngs,:f_pth,:pth,:fno,:fns,:fnb,:fnc,:fng,:fncb,:lng,:lng_base,:what,:make_instructions,:make_instructions_pod,:sisu_run_path,:sisu_install_type
@@act=nil
- def initialize(a,call_path)
+ def initialize(a,sisu_runtime)
@opt_ch=@f_pth=@pth=@fno=@fns=@fnb=@fnc=@fng=@fncb=@what=@lng=@lng_base=@call_path=@base_path=@base_stub=@image_src_path=@sub_location=''
@f_pths,@files,@files_mod,@paths,@select_arr,@act=Array.new(5){[]}
@select_str=nil
@@ -164,7 +162,9 @@ module SiSU_Commandline
@lng_base=@env.language_default_set
@dir_structure_by=SiSU_Env::EnvCall.new.output_dir_structure.by?
@lingual=SiSU_Env::EnvCall.new.mono_multi_lingual?
- @call_path=call_path
+ @sisu_run_from=sisu_runtime[:runtime_path]
+ @sisu_install_type=sisu_runtime[:runtime_type]
+ @call_path=sisu_runtime[:call_path]
pth=SiSU_Utils::Path.new(call_path)
@base_path=pth.base_markup
@base_stub=pth.base_markup_stub
@@ -175,6 +175,30 @@ module SiSU_Commandline
@make_instructions_pod=nil
init
end
+ def sisu_run_from?
+ @sisu_run_from
+ end
+ def sisu_bin_filepath?
+ @sisu_run_from
+ end
+ def sisu_install_type?
+ @sisu_install_type
+ end
+ def sisu_data_dir?
+ env=RbConfig::CONFIG
+ if sisu_install_type? ==:full_path_to_sisu_bin_in_sisu_dir_tree
+ sisu_bin_filepath?.gsub(/\/bin\/sisu\S*/,'/data/sisu')
+ #sisu_lib_dir?.gsub(/\/lib\/sisu\/(?:current|develop)\S*/,'/data/sisu')
+ elsif sisu_install_type? ==:gem_install
+ #sisu_run_from?.gsub(/\/bin\/.+/,'/data/sisu')
+ env['datadir']
+ elsif sisu_install_type? ==:system_install
+ #SiSU_Info_Env::InfoEnv.new.path.share
+ env['datadir']
+ else
+ env['datadir']
+ end
+ end
def find_all(find_flag,opt)
if find_flag
x=Dir.glob('*.ss[tm]')
diff --git a/lib/sisu/v5/i18n.rb b/lib/sisu/current/i18n.rb
index 20b30483..0413bb87 100644
--- a/lib/sisu/v5/i18n.rb
+++ b/lib/sisu/current/i18n.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** internationalisation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/i18n.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: internationalisation
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/i18n.rb;hb=HEAD>
=end
module SiSU_i18n
diff --git a/lib/sisu/v6/manpage.rb b/lib/sisu/current/manpage.rb
index 9ff83fd5..fb5a1f3c 100644
--- a/lib/sisu/v6/manpage.rb
+++ b/lib/sisu/current/manpage.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** manpage text generation, stripped manpage output (unix, linefeed)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/manpage.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: manpage text generation, stripped manpage output (unix,
- linefeed)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/manpage.rb;hb=HEAD>
=end
module SiSU_Manpage
diff --git a/lib/sisu/current/manpage_format.rb b/lib/sisu/current/manpage_format.rb
new file mode 100644
index 00000000..88291535
--- /dev/null
+++ b/lib/sisu/current/manpage_format.rb
@@ -0,0 +1,85 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** manpage formatting template
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/manpage_format.rb;hb=HEAD>
+
+=end
+module SiSU_ManpageFormat
+ require_relative 'dp' # dp.rb
+ include SiSU_Param
+ class ParagraphNumber
+ def initialize(paranum)
+ @paranum=/(\d+)/m.match(paranum)[1]
+ end
+ def display
+ @paranum.gsub(/(\d+)/,'<font size="1" color="#777777">&nbsp;&nbsp;\1</font>')
+ end
+ def name
+ @paranum.gsub(/(\d+)/,'<a name="\1"></a>')
+ end
+ def goto
+ @paranum.gsub(/(\d+)/,'<a href="#\1">')
+ end
+ end
+ class FormatTextObject
+ def initialize(md,dob)
+ @md,@dob=md,dob
+ rgx=/#{Mx[:en_a_o]}[\d*+]+\s+(.+?)#{Mx[:en_a_c]}/
+ @dob.obj.gsub!(rgx,'\1') if @dob.obj =~rgx
+ end
+ def scr_endnote_body
+ "<endnote>#{@dob.obj}</endnote> "
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/po4a.rb b/lib/sisu/current/po4a.rb
index da294e12..3de3ff7d 100644
--- a/lib/sisu/v6/po4a.rb
+++ b/lib/sisu/current/po4a.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** pot file generation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/po4a.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: pot file generation
- linefeed)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/po4a.rb;hb=HEAD>
=end
module SiSU_Po4a
@@ -67,12 +63,15 @@ module SiSU_Po4a
require_relative 'po4a_set' # po4a_set.rb
include SiSU_Param
class Source
- @@opt_src,@@opt_trn,@@opt_src_,@@opt_trn_,@@md_src,@@md_trn=nil,nil,nil,nil,nil,nil
+ @@opt_src,@@opt_trn,@@opt_src_,@@opt_trn_,@@md_src,@@md_trn=
+ nil, nil, nil, nil, nil, nil
def initialize(opt,fn=nil)
@opt,@fn=opt,fn
#unless @opt.fns =~/(.+?\.(?:-|ssm\.)?sst)$/
# puts "#{@opt.fns} not a processed file type"
#end
+ file_arr=SiSU_Info_Env::InfoEnv.new.source_file_processing_array(@opt.fns)
+ SiSU_Param::Parameters::Instructions.new(file_arr,@opt).extract
r=Px[:lng_lst_rgx].gsub(/\|en\|/,'|')
@lang_regx=%r{(?:#{r})}
if opt.fns =~/\S+?~#{@lang_regx}\.ss[mti]/ \
@@ -98,36 +97,44 @@ module SiSU_Po4a
end
md=SiSU_Param::Parameters.new(@opt).get
src[:files].each do |fn|
- SiSU_AO::Source.new(@opt,fn).read # -m
env=SiSU_Env::InfoEnv.new(@opt.fns)
+ file=SiSU_Env::FileOp.new(md)
m=/((.+?)(?:\~\w\w(?:_\w\w)?)?)\.((?:-|ssm\.)?sst|ssm|ssi)$/ #watch added match for sss
@fnn,@fnb,@fnt=fn[m,1],fn[m,2],fn[m,3]
unless @opt.act[:quiet][:set]==:on
- path=env.path.output_tell
tool=(@opt.act[:verbose][:set]==:on \
|| @opt.act[:verbose_plus][:set]==:on \
|| @opt.act[:maintenance][:set]==:on) \
- ? "#{env.program.text_editor} #{path}/#{md.fnb}/#{md.fn[:plain]}"
+ ? "#{env.program.text_editor} #{file.output_path.pot.dir}/"
: @opt.fns
(@opt.act[:verbose][:set]==:on \
|| @opt.act[:verbose_plus][:set]==:on \
|| @opt.act[:maintenance][:set]==:on) \
- ? SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Pot po4a',tool).green_hi_blue
- : SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Pot po4a',tool).green_title_hi
+ ? SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'Pot po4a',
+ tool
+ ).green_hi_blue
+ : SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'Pot po4a',
+ tool
+ ).green_title_hi
if (@opt.act[:verbose][:set]==:on \
|| @opt.act[:verbose_plus][:set]==:on \
|| @opt.act[:maintenance][:set]==:on)
SiSU_Screen::Ansi.new(
@opt.act[:color_state][:set],
@opt.fns,
- "#{path}/#{md.fnb}/#{md.fn[:plain]}"
+ file.output_path.pot.dir
).flow
end
end
if @opt.fns =~/\S+?~#{@lang_regx}\.ss[mti]/ \
or @opt.f_pth[:lng] !=@opt.lng_base
opt_lang_trn_fn=fn
- @ao_array_lang_translation=SiSU_AO::Source.new(@opt,opt_lang_trn_fn).get # ao file drawn here
+ @ao_array_lang_translation=
+ SiSU_AO::Source.new(@opt,opt_lang_trn_fn,:po4a).get # ao file drawn here
opt_lang_src_fn=if fn =~/\S+?~\S{2}(?:_\S{2})?\.ss[mti]/
fn.gsub(/(\S+?)~\S{2}(?:_\S{2})?(\.ss[mti])/,'\1\2') #check i
else fn
@@ -142,14 +149,16 @@ module SiSU_Po4a
else nil
end
if FileTest.file?("#{srcdir}/#{opt_lang_src_fn}")
- @ao_array_lang_src=SiSU_AO::Source.new(@@opt_src,opt_lang_src_fn).get # ao file drawn here
+ @ao_array_lang_src=
+ SiSU_AO::Source.new(@@opt_src,opt_lang_src_fn,:po4a).get # ao file drawn here
else
puts "no identified source document"
exit
end
Dir.chdir(transdir) if transdir
else
- @ao_array_lang_src=SiSU_AO::Source.new(@opt,fn).get # ao file drawn here
+ @ao_array_lang_src=
+ SiSU_AO::Source.new(@opt,fn,:po4a).get # ao file drawn here
@ao_array_lang_translation=nil
end
wrap_width=if defined? md.make.plaintext_wrap \
@@ -160,7 +169,13 @@ module SiSU_Po4a
env.plaintext_wrap
else 78
end
- SiSU_Po4a::Source::Scroll.new(fn,@ao_array_lang_src,@ao_array_lang_translation,@@md_src,@@md_trn,wrap_width).songsheet
+ SiSU_Po4a::Source::Scroll.new(
+ fn,
+ @ao_array_lang_src,
+ @ao_array_lang_translation,
+ @@md_src,@@md_trn,
+ wrap_width
+ ).songsheet
end
rescue
SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
@@ -174,14 +189,24 @@ module SiSU_Po4a
include SiSU_Po4aUtils
@@endnotes={ para: [], end: [] }
def initialize(fn,data_src,data_trn,md_src,md_trn,wrap_width)
- @fn,@data_src,@data_trn,@md_src,@md_trn,@wrap_width=fn,data_src,data_trn,md_src,md_trn,wrap_width
+ @fn,@data_src,@data_trn,@md_src,@md_trn,@wrap_width=
+ fn, data_src, data_trn, md_src, md_trn, wrap_width
@md=(md_trn.nil?) \
? md_src
: md_trn
@tab="\t"
@@endnotes_=(@md.opt.selections.str =~/--endnote/) ? true : false # --footnote
- @br=(@md.opt.selections.str =~/--dos/) ? "\r\n" : "\n" # --unix
- @pot={ body: [], open: [], close: [], head: [], metadata: [], tail: [] }
+ @pot={
+ body: [],
+ open: [],
+ close: [],
+ head: [],
+ metadata: [],
+ tail: []
+ }
+ end
+ def br
+ (@md.opt.selections.str =~/--dos/) ? "\r\n" : "\n" # --unix
end
def songsheet
############## BUG @fn changes value
@@ -189,7 +214,7 @@ module SiSU_Po4a
pot=pot_markup(@data_src,@data_trn)
publish(fn,pot)
end
- def extract_endnotes(dob='') #% Used for extraction of endnotes from paragraphs
+ def extract_endnotes(dob='') #% used for extraction of endnotes from paragraphs
notes_a=dob.obj.scan(/#{Mx[:en_a_o]}([\d]+\s+.+?)#{Mx[:en_a_c]}/)
##notes_a=dob.obj.scan(/#{Mx[:en_a_o]}([\d*+]+\s+.+?)#{Mx[:en_a_c]}/)
#notes_b=dob.obj.scan(/#{Mx[:en_b_o]}([\d*+]+\s+.+?)#{Mx[:en_b_c]}/)
@@ -197,8 +222,8 @@ module SiSU_Po4a
notes_a.flatten.each do |n| #high cost to deal with <br> appropriately within plaintext, consider
n=n.dup.to_s
n=n.gsub(/^([\d]+)\s+/,'^~\1 ').
- #gsub(/^([\d*+]+)\s+/,'^~\1 ').
- gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,'<br>')
+ gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,
+ ' \\\\\\ ')
@n << n
end
notes_a=@n.flatten
@@ -216,14 +241,21 @@ module SiSU_Po4a
mark="^~ "
instruct=s_mark=''
if @md.opt.act[:maintenance][:set]==:on
- instruct=%{\n# footnotes, the preferred sisu markup for a footnote is~{this is a footnote}~ however, for translation a footnote reference marker in the text~^ with a set of notes following the paragraph starting on a newline with "^~ this is a footnote", is easier to deal with, if possible these should be converted back to~{inline notes}~}
+ instruct=%{\n# footnotes, the preferred sisu markup for a footnote is~{this is a footnote}~ } \
+ + %{however, for translation a footnote reference marker in the text~^ } \
+ + %{with a set of notes following the paragraph starting on a newline with "^~ this is a footnote", } \
+ + %{is easier to deal with, if possible these should be converted back to~{inline notes}~}
s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
end
desc="#{d}#{s_mark}#{instruct}"
- orig=(orig_notes[i].to_s =~/^\^~[\d*+]+/) ? (orig_notes[i].to_s.gsub(/^\^~[\d*+]+/,'^~')) : orig_notes[i].to_s
+ orig=(orig_notes[i].to_s =~/^\^~[\d*+]+/) \
+ ? (orig_notes[i].to_s.gsub(/^\^~[\d*+]+/,'^~'))
+ : orig_notes[i].to_s
trans=if trn_notes.is_a?(Array) \
and trn_notes.length==orig_notes.length
- (trn_notes[i].to_s =~/^\^~[\d*+]+/) ? (trn_notes[i].to_s.gsub(/^\^~[\d*+]+/,'^~')) : trn_notes[i].to_s
+ (trn_notes[i].to_s =~/^\^~[\d*+]+/) \
+ ? (trn_notes[i].to_s.gsub(/^\^~[\d*+]+/,'^~'))
+ : trn_notes[i].to_s
else ''
end
util=pot_structure(desc,orig,trans)
@@ -242,7 +274,7 @@ GSUB
@@endnotes[:para] << wrap
@@endnotes[:end] << '' << wrap
end
- @@endnotes[:para].each {|e| @pot[:body] << e << @br}
+ @@endnotes[:para].each {|e| @pot[:body] << e << br}
@@endnotes[:para]=[]
@@endnotes
end
@@ -301,10 +333,10 @@ GSUB
meta_src.metadata_tags.classify.topic_register,
meta_src.metadata_tags.classify.loc,
meta_src.metadata_tags.classify.dewey,
- meta_src.metadata_tags.notes.relation,
- meta_src.metadata_tags.notes.type,
- meta_src.metadata_tags.identifier.oclc,
- meta_src.metadata_tags.identifier.isbn,
+ #meta_src.metadata_tags.notes.relation,
+ #meta_src.metadata_tags.notes.type,
+ #meta_src.metadata_tags.identifier.oclc,
+ #meta_src.metadata_tags.identifier.isbn,
'msgstr ""',
]
w << [
@@ -344,7 +376,7 @@ GSUB
z += %{"#{x}"\n} if x =~/^\s+:\S+?: /
end
end
- @pot[:metadata] << z << @br
+ @pot[:metadata] << z << br
#puts z unless z.empty?
end
end
@@ -429,20 +461,20 @@ GSUB
meta_src.metadata_tags.classify.topic_register,
meta_src.metadata_tags.classify.loc,
meta_src.metadata_tags.classify.dewey,
- meta_src.metadata_tags.notes.relation,
- meta_src.metadata_tags.notes.type,
- meta_src.metadata_tags.identifier.oclc,
- meta_src.metadata_tags.identifier.isbn,
+ #meta_src.metadata_tags.notes.relation,
+ #meta_src.metadata_tags.notes.type,
+ #meta_src.metadata_tags.identifier.oclc,
+ #meta_src.metadata_tags.identifier.isbn,
'msgstr ""',
meta_trn.metadata_tags.classify.head,
meta_trn.metadata_tags.classify.subject,
meta_trn.metadata_tags.classify.topic_register,
meta_trn.metadata_tags.classify.loc,
meta_trn.metadata_tags.classify.dewey,
- meta_trn.metadata_tags.notes.relation,
- meta_trn.metadata_tags.notes.type,
- meta_trn.metadata_tags.identifier.oclc,
- meta_trn.metadata_tags.identifier.isbn,
+ #meta_trn.metadata_tags.notes.relation,
+ #meta_trn.metadata_tags.notes.type,
+ #meta_trn.metadata_tags.identifier.oclc,
+ #meta_trn.metadata_tags.identifier.isbn,
]
w << [
"#. #{@po4a_identify_type} - metadata: date",
@@ -497,14 +529,22 @@ GSUB
z += %{"#{x}"\n} if x =~/^\s+:\S+?: /
end
end
- @pot[:metadata] << z << @br
+ @pot[:metadata] << z << br
#puts z unless z.empty?
end
end
def pot_structure(desc,orig,trans,indent=0,hang=0)
- SiSU_Po4aUtils::Wrap.new(@md,orig,trans,desc,@wrap_width,indent,hang)
+ SiSU_Po4aUtils::Wrap.new(
+ @md,
+ orig,
+ trans,
+ desc,
+ @wrap_width,
+ indent,
+ hang
+ )
end
- def pot_structure_heading(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document
+ def pot_structure_heading(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
lv=n=n3=nil
lv=dob_src.ln
n=lv - 1
@@ -515,7 +555,9 @@ GSUB
d="#{dob_src.is.to_s} (level #{dob_src.lv})"
instruct=s_mark=''
if @md.opt.act[:maintenance][:set]==:on
- instruct=%{\n# markup for headings is marker at the start of the line/object, indicating the heading level, and if provided an associated name tag, this heading is "#{mark}"}
+ instruct=%{\n# markup for headings is marker at the start of the line/object, } \
+ + %{indicating the heading level, and if provided an associated name tag, } \
+ + %{this heading is "#{mark}"}
s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
end
desc="#{d}#{s_mark}#{instruct}"
@@ -523,18 +565,18 @@ GSUB
trans=(dob_trn=='') ? '' : "#{s_mark}#{dob_trn.obj}"
util=pot_structure(desc,orig,trans)
wrapped=util.line_wrap
- @pot[:body] << wrapped << @br # main text, contents, body KEEP
+ @pot[:body] << wrapped << br # main text, contents, body KEEP
if @@endnotes[:para] \
and notes_s.length > 0 \
and not @@endnotes_
- @pot[:body] << @br
+ @pot[:body] << br
wrap_endnotes(notes_s,notes_t)
elsif @@endnotes[:para] \
and @@endnotes_
- @pot[:body] << @br*2
+ @pot[:body] << br*2
end
end
- def pot_structure_para(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document
+ def pot_structure_para(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
util=nil
wrapped=if dob_src.indent =~/[1-9]/ \
and dob_src.indent == dob_src.hang
@@ -544,7 +586,8 @@ GSUB
d="#{dob_src.is.to_s}: indent #{dob_src.indent}, bullet"
instruct=s_mark=''
if @md.opt.act[:maintenance][:set]==:on
- instruct=%{\n# markup for indented bullet text is at the start of the line/object, an underscore followed by the indent level and an asterisk "#{mark}"}
+ instruct=%{\n# markup for indented bullet text is at the start of the line/object, } \
+ + %{an underscore followed by the indent level and an asterisk "#{mark}"}
s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
end
desc="#{d}#{s_mark}#{instruct}"
@@ -553,7 +596,8 @@ GSUB
d="#{dob_src.is.to_s}: indent #{dob_src.indent}"
instruct=s_mark=''
if @md.opt.act[:maintenance][:set]==:on
- instruct=%{\n# markup for indented text is at the start of the line/object, an underscore followed by the indent level "#{mark}"}
+ instruct=%{\n# markup for indented text is at the start of the line/object, } \
+ + %{an underscore followed by the indent level "#{mark}"}
s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
end
desc="#{d}#{s_mark}#{instruct}"
@@ -568,7 +612,11 @@ GSUB
d="#{dob_src.is.to_s}: hang #{dob_src.hang} indent #{dob_src.indent}"
instruct=s_mark=''
if @md.opt.act[:maintenance][:set]==:on
- instruct=%{\n# markup for indented text with a first line indented to a different level from the rest of the paragraph, is at the start of the line/object, an underscore and the first indent level a second underscore and the indent level for the rest of the paragraph, "#{mark1}"}
+ instruct=%{\n# markup for indented text with a first line indented } \
+ + %{to a different level from the rest of the paragraph, } \
+ + %{is at the start of the line/object, } \
+ + %{an underscore and the first indent level } \
+ + %{a second underscore and the indent level for the rest of the paragraph, "#{mark1}"}
s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
end
desc="#{d}#{s_mark}#{instruct}"
@@ -582,7 +630,8 @@ GSUB
d="#{dob_src.is.to_s}: bullet"
instruct=s_mark=''
if @md.opt.act[:maintenance][:set]==:on
- instruct=%{\n# markup for indented text is at the start of the line/object, an underscore followed by an asterisk "#{mark}"}
+ instruct=%{\n# markup for indented text is at the start of the line/object, } \
+ + %{an underscore followed by an asterisk "#{mark}"}
s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
end
desc="#{d}#{s_mark}#{instruct}"
@@ -603,23 +652,24 @@ GSUB
util=pot_structure(desc,orig,trans)
end
wrapped=util.line_wrap
- @pot[:body] << wrapped << @br # main text, contents, body KEEP
+ @pot[:body] << wrapped << br # main text, contents, body KEEP
if @@endnotes[:para] \
and notes_s.length > 0 \
and not @@endnotes_
- @pot[:body] << @br
+ @pot[:body] << br
wrap_endnotes(notes_s,notes_t)
elsif @@endnotes[:para] \
and @@endnotes_
- @pot[:body] << @br*2
+ @pot[:body] << br*2
end
end
- def pot_structure_block(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document
+ def pot_structure_block(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
mark="block{\\n\\n...\\n\\n}block"
d=dob_src.is.to_s
instruct=s_mark=''
if @md.opt.act[:maintenance][:set]==:on
- instruct="\n# block text is a text block with an opening and closing marker, the content of which may be wrapped"
+ instruct=%{\n# block text is a text block with an opening and closing marker, } \
+ + %{the content of which may be wrapped}
s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
end
desc="#{d}#{s_mark}#{instruct}"
@@ -627,14 +677,15 @@ GSUB
trans=(dob_trn=='') ? '' : dob_trn.obj
util=pot_structure(desc,orig,trans)
unwrapped=util.no_line_wrap_block
- @pot[:body] << unwrapped << @br
+ @pot[:body] << unwrapped << br
end
- def pot_structure_group(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document
+ def pot_structure_group(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
mark="group{\\n\\n...\\n\\n}group"
d=dob_src.is.to_s
instruct=s_mark=''
if @md.opt.act[:maintenance][:set]==:on
- instruct="\n# group text is a text block with an opening and closing marker, the content of which may be wrapped"
+ instruct=%{\n# group text is a text block with an opening and closing marker, } \
+ + %{the content of which may be wrapped}
s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
end
desc="#{d}#{s_mark}#{instruct}"
@@ -642,14 +693,17 @@ GSUB
trans=(dob_trn=='') ? '' : dob_trn.obj
util=pot_structure(desc,orig,trans)
unwrapped=util.no_line_wrap_block
- @pot[:body] << unwrapped << @br
+ @pot[:body] << unwrapped << br
end
- def pot_structure_verse(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document
+ def pot_structure_verse(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
mark="poem{\n\nverse\n\nverse\n\n...\n\n}poem"
d=dob_src.is.to_s
instruct=s_mark=''
if @md.opt.act[:maintenance][:set]==:on
- instruct="\n# verse are part of the text block described as a poem, the first verse is preceeded by an opening marker, and the last verse by a closing marker, the content of which should remain unwrapped"
+ instruct=%{\n# verse are part of the text block described as a poem, } \
+ + %{the first verse is preceeded by an opening marker, } \
+ + %{and the last verse by a closing marker, } \
+ + %{the content of which should remain unwrapped}
s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
end
desc="#{d}#{s_mark}#{instruct}"
@@ -657,14 +711,15 @@ GSUB
trans=(dob_trn=='') ? '' : dob_trn.obj
util=pot_structure(desc,orig,trans)
unwrapped=util.no_line_wrap_block
- @pot[:body] << unwrapped << @br
+ @pot[:body] << unwrapped << br
end
- def pot_structure_code(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document
+ def pot_structure_code(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
mark="code{\\n\\n...\\n\\n}code"
d=dob_src.is.to_s
instruct=s_mark=''
if @md.opt.act[:maintenance][:set]==:on
- instruct="\n# codeblocks are a text block with an opening and closing marker, the content of which should remain unwrapped"
+ instruct=%{\n# codeblocks are a text block with an opening and closing marker, } \
+ + %{the content of which should remain unwrapped}
s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
end
desc="#{d}#{s_mark}#{instruct}"
@@ -672,14 +727,15 @@ GSUB
trans=(dob_trn=='') ? '' : dob_trn.obj
util=pot_structure(desc,orig,trans)
unwrapped=util.no_line_wrap_block
- @pot[:body] << unwrapped << @br
+ @pot[:body] << unwrapped << br
end
- def pot_structure_table(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document
+ def pot_structure_table(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
mark="table{\\n\\n...\\n\\n}table"
d=dob_src.is.to_s
instruct=s_mark=''
if @md.opt.act[:maintenance][:set]==:on
- instruct="\n# tables are a text block with an opening and closing marker, the content of which should remain unwrapped"
+ instruct=%{\n# tables are a text block with an opening and closing marker, } \
+ + %{the content of which should remain unwrapped}
s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
end
desc="#{d}#{s_mark}#{instruct}"
@@ -689,27 +745,67 @@ GSUB
trans=trans.gsub(/#{Mx[:tc_c]}/,"\n")
util=pot_structure(desc,orig,trans)
unwrapped=util.no_line_wrap_block
- @pot[:body] << unwrapped << @br
+ @pot[:body] << unwrapped << br
+ end
+ def pot_structure_idx_markup(idx)
+ struct=['={']
+ idx.sort.each do |x|
+ x.each_with_index do |y,i0|
+ case y
+ when String
+ struct << ';' unless struct[-1] =~/=\{/
+ struct << y
+ if x[i0+1].class == Hash \
+ and x[i0+1][:sub].length > 0
+ struct << ':'
+ end
+ when Hash
+ if y[:plus].to_i > 0
+ struct << '+' + y[:plus].to_s
+ end
+ if y[:sub].length > 0
+ y[:sub].each_with_index do |z,i1|
+ z.each_with_index do |a,i2|
+ #p a
+ if z.length > 0
+ struct << a[0]
+ if a[1][:plus].to_i > 0
+ struct << '+' + a[1][:plus].to_s
+ end
+ if (i1 + 1) < y[:sub].length
+ struct << '|'
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ struct << '}'
+ #puts struct.join
+ struct.join
end
- def pot_structure_idx(dob_src='',dob_trn='') #% Used to extract the structure of a document
+ def pot_structure_idx(dob_src='',dob_trn='') #% used for book index but broken as original markup lost, already abstracted, fix
mark="={ ... }"
instruct=s_mark=''
if @md.opt.act[:maintenance][:set]==:on
- instruct="\n# the book index should be attached unwrapped to the preceding text block (there should be a new line, but no empty line)"
+ instruct=%{\n# the book index should be attached unwrapped to the preceding text block } \
+ + %{(there should be a new line, but no empty line)}
s_mark="\n# " + %{"\\n#{mark}\\n\\n"}
end
d='book-idx'
desc="#{d}#{s_mark}#{instruct}"
- orig='={' + dob_src.idx + '}'
+ orig=pot_structure_idx_markup(dob_src.idx) #'={' + dob_src.idx + '}'
trans=if defined? dob_trn.idx \
and not dob_trn.idx.nil? \
and not dob_trn.idx.empty?
- '={' + dob_trn.idx + '}'
+ pot_structure_idx_markup(dob_trn.idx) #'={' + dob_trn.idx + '}'
else ''
end
util=pot_structure(desc,orig,trans)
unwrapped=util.no_line_wrap_block
- @pot[:body] << unwrapped << @br
+ @pot[:body] << unwrapped << br
end
def pot_markup(data_src,data_trn)
#@endnotes,@copen,@pot_contents_close=Array.new(3){[]}
@@ -738,24 +834,35 @@ GSUB
s+=1;t+=1
next
end
- if (data_src[s].is == :comment or data_trn[t].is == :comment) \
+ if ((data_src[s].is == :comment) \
+ || (data_trn[t].is == :comment)) \
and (data_src[s].is != data_trn[t].is)
if data_src[s].is == :comment
- puts "src (comment):\n\t" + data_src[s].obj if @md.opt.act[:maintenance][:set]==:on
+ if @md.opt.act[:maintenance][:set]==:on
+ puts "src (comment):\n\t" \
+ + data_src[s].obj
+ end
s+=1
#next if data_src[s].is == :comment
elsif data_trn[t].is == :comment
- puts "trans (comment):\n\t" + data_trn[t].obj if @md.opt.act[:maintenance][:set]==:on
+ if @md.opt.act[:maintenance][:set]==:on
+ puts "trans (comment):\n\t" \
+ + data_trn[t].obj
+ end
t+=1
#next if data_trn[t].is == :comment
end
end
- if (defined? data_src[s].ocn and data_src[s].ocn.is_a?(Fixnum)) \
- and (defined? data_trn[t].ocn and data_trn[t].ocn.is_a?(Fixnum)) \
+ if ((defined? data_src[s].ocn) \
+ && (data_src[s].ocn.is_a?(Fixnum))) \
+ and ((defined? data_trn[t].ocn) \
+ && (data_trn[t].ocn.is_a?(Fixnum))) \
and (data_src[s].ocn == data_trn[t].ocn)
@m_s,@m_t=s,t
- elsif (defined? data_src[s].ocn and data_src[s].ocn.is_a?(Fixnum)) \
- and (defined? data_trn[t].ocn and data_trn[t].ocn.is_a?(Fixnum)) \
+ elsif ((defined? data_src[s].ocn) \
+ && (data_src[s].ocn.is_a?(Fixnum))) \
+ and ((defined? data_trn[t].ocn) \
+ && (data_trn[t].ocn.is_a?(Fixnum))) \
and (data_src[s].ocn != data_trn[t].ocn)
p '--- OCN ---'
p 'mis-match'
@@ -770,7 +877,8 @@ GSUB
p data_trn[@m_t].ocn
p data_trn[@m_t].obj
exit
- elsif (defined? data_src[s].ocn and defined? data_trn[t].ocn \
+ elsif (((defined? data_src[s].ocn) \
+ && (defined? data_trn[t].ocn)) \
and data_src[s].ocn.class != data_trn[t].ocn.class)
p '--- OCN class ---'
p 'mis-match'
@@ -817,13 +925,20 @@ GSUB
@p_num=SiSU_Po4aUtils::ParagraphNumber.new(paranum)
end
case dob_src.is
- when :heading then pot_structure_heading(dob_src,notes_s,dob_trn,notes_t)
- when :para then pot_structure_para(dob_src,notes_s,dob_trn,notes_t)
- when :group then pot_structure_group(dob_src,notes_s,dob_trn,notes_t)
- when :block then pot_structure_block(dob_src,notes_s,dob_trn,notes_t)
- when :verse then pot_structure_verse(dob_src,notes_s,dob_trn,notes_t)
- when :code then pot_structure_code(dob_src,notes_s,dob_trn,notes_t)
- when :table then pot_structure_table(dob_src,notes_s,dob_trn,notes_t)
+ when :heading
+ pot_structure_heading(dob_src,notes_s,dob_trn,notes_t)
+ when :para
+ pot_structure_para(dob_src,notes_s,dob_trn,notes_t)
+ when :group
+ pot_structure_group(dob_src,notes_s,dob_trn,notes_t)
+ when :block
+ pot_structure_block(dob_src,notes_s,dob_trn,notes_t)
+ when :verse
+ pot_structure_verse(dob_src,notes_s,dob_trn,notes_t)
+ when :code
+ pot_structure_code(dob_src,notes_s,dob_trn,notes_t)
+ when :table
+ pot_structure_table(dob_src,notes_s,dob_trn,notes_t)
end
if defined? dob_src.idx \
and not dob_src.idx.nil? \
@@ -839,9 +954,10 @@ GSUB
end
#[dob_src,dob_trn]
end
- def markup(dob) # Used for major markup instructions
+ def markup(dob) # used for major markup instructions
SiSU_Env::InfoEnv.new(@md.fns)
- dob.obj=dob.obj.gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,
+ dob.obj=dob.obj.
+ gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,
"#{Px[:po_bold_o]}\\1#{Px[:po_bold_c]}").
gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,
"#{Px[:po_italics_o]}\\1#{Px[:po_italics_c]}").
@@ -861,19 +977,26 @@ GSUB
"#{Px[:po_monospace_o]}\\1#{Px[:po_monospace_c]}")
notes=''
unless dob.is==:code
- dob.obj=dob.obj.gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}/,'\1').
+ dob.obj=dob.obj.
+ gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}/,'\1').
gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'\1').
- gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,'\1 [link: <\2>]').
- gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}image/,'\1 [link: local image]').
+ gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,
+ '\1 [link: <\2>]').
+ gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}image/,
+ '\1 [link: local image]').
gsub(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,'\1')
notes=extract_endnotes(dob)
#% ### footnotes current state - extracted
- dob.obj=dob.obj.gsub(/#{Mx[:en_a_o]}([\d]+)\s+(?:.+?)#{Mx[:en_a_c]}/,'~^'). # endnote marker marked up
+ dob.obj=dob.obj.
+ gsub(/#{Mx[:en_a_o]}([\d]+)\s+(?:.+?)#{Mx[:en_a_c]}/,'~^'). # endnote marker marked up
#% ### footnotes current state - keep inline
#dob.obj.gsub!(/#{Mx[:en_a_o]}[\d]+\s+(.+?)#{Mx[:en_a_c]}/,'~{ \1 }~') # inline endnote with marker marked up
- gsub(/#{Mx[:en_b_o]}[\d]+\s+(.+?)#{Mx[:en_b_c]}/,'~[ \1 ]~'). # inline endnote with marker marked up
- gsub(/#{Mx[:en_a_o]}([*+]+)\s+(.+?)#{Mx[:en_a_c]}/,'~{\1 \2 }~'). # inline endnote with marker marked up
- gsub(/#{Mx[:en_b_o]}([*+]+)\s+(.+?)#{Mx[:en_b_c]}/,'~[\1 \2 ]~'). # inline endnote with marker marked up
+ gsub(/#{Mx[:en_b_o]}[\d]+\s+(.+?)#{Mx[:en_b_c]}/,
+ '~[ \1 ]~'). # inline endnote with marker marked up
+ gsub(/#{Mx[:en_a_o]}([*+]+)\s+(.+?)#{Mx[:en_a_c]}/,
+ '~{\1 \2 }~'). # inline endnote with marker marked up
+ gsub(/#{Mx[:en_b_o]}([*+]+)\s+(.+?)#{Mx[:en_b_c]}/,
+ '~[\1 \2 ]~'). # inline endnote with marker marked up
gsub(/#{Mx[:gl_o]}(?:#lt|#060)#{Mx[:gl_c]}/,'<').
gsub(/#{Mx[:gl_o]}(?:#gt|#062)#{Mx[:gl_c]}/,'>').
gsub(/#{Mx[:gl_o]}#(?:038|amp)#{Mx[:gl_c]}/,'&').
@@ -902,9 +1025,12 @@ GSUB
gsub(/<a href=".+?">(.+?)<\/a>/m,'\1').
gsub(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,''). # remove name links
gsub(/&nbsp;|#{Mx[:nbsp]}/,' '). # decide on
- gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/,' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]")
- gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}image/,' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]")
- gsub(/(?:^|[^_\\])\{\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*\}\S+/,'[image: "\1"]')
+ gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/,
+ ' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]")
+ gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}image/,
+ ' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]")
+ gsub(/(?:^|[^_\\])\{\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*\}\S+/,
+ '[image: "\1"]')
[dob,notes]
end
def publish(fn,pot)
@@ -914,18 +1040,18 @@ GSUB
content << pot[:metadata]
content << pot[:body]
content << @@endnotes[:end] if @@endnotes_
- Output.new(fn,content,@md).po4a
+ Output.new(fn,content,@md,@process).po4a
@@endnotes={ para: [], end: [] }
end
end
class Output <Source
include SiSU_Param
include SiSU_Env
- def initialize(fn,content,md)
- @fn,@content,@md=fn,content,md
+ def initialize(fn,content,md,process=:complete)
+ @fn,@content,@md,@process=fn,content,md,process
@file=SiSU_Env::FileOp.new(md,fn)
end
- def po4a #%pot output
+ def po4a #%pot output
file_pot=(@md.opt.f_pth[:lng] ==@md.opt.lng_base) \
? @file.write_file.pot
: @file.write_file.po
@@ -955,12 +1081,20 @@ GSUB
def po4a_git
unless @md.opt.act[:maintenance][:set]==:on
require_relative 'git' # git.rb
- git=SiSU_Git::Source.new(@md.opt)
- git.create_file_structure_git unless FileTest.directory?(@file.output_path.pot_git.dir)
+ git=SiSU_Git::Source.new(@md.opt,@process)
+ unless FileTest.directory?(@file.output_path.pot_git.dir)
+ git.create_file_structure_git
+ end
if @md.opt.f_pth[:lng] ==@md.opt.lng_base
- FileUtils::cp(@file.place_file.pot.dir, @file.output_path.pot_git.dir)
+ FileUtils::cp(
+ @file.place_file.pot.dir,
+ @file.output_path.pot_git.dir
+ )
else # naive, work on -->
- FileUtils::cp(@file.place_file.po.dir, @file.output_path.po_git.dir) #unless FileTest.file?(@file.place_file.po_git.dir)
+ FileUtils::cp(
+ @file.place_file.po.dir,
+ @file.output_path.po_git.dir
+ ) #unless FileTest.file?(@file.place_file.po_git.dir)
end
git.read
end
diff --git a/lib/sisu/v6/po4a_set.rb b/lib/sisu/current/po4a_set.rb
index 2fc56cb9..a08eea35 100644
--- a/lib/sisu/v6/po4a_set.rb
+++ b/lib/sisu/current/po4a_set.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** po4a
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/po4a_set.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by flatfile output generators
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/po4a_set.rb;hb=HEAD>
=end
module SiSU_Po4aUtils
diff --git a/lib/sisu/v5/prog_text_translation.rb b/lib/sisu/current/prog_text_translation.rb
index d097ab27..1b96e651 100644
--- a/lib/sisu/v5/prog_text_translation.rb
+++ b/lib/sisu/current/prog_text_translation.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** internationalisation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/prog_text_translation.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: internationalisation
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/prog_text_translation.rb;hb=HEAD>
=end
module SiSU_Translate
diff --git a/lib/sisu/v5/qrcode.rb b/lib/sisu/current/qrcode.rb
index 483f4deb..8d933b71 100644
--- a/lib/sisu/v5/qrcode.rb
+++ b/lib/sisu/current/qrcode.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** summary of generated outputs and metadata
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/qrcode.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: summary of generated outputs and metadata
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/qrcode.rb;hb=HEAD>
=end
module SiSU_QRcode
diff --git a/lib/sisu/v5/relaxng.rb b/lib/sisu/current/relaxng.rb
index 89066c13..c0083834 100644
--- a/lib/sisu/v5/relaxng.rb
+++ b/lib/sisu/current/relaxng.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** relaxng flow/logic
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/relaxng.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- ** Description: relaxng flow/logic
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/relaxng.rb;hb=HEAD>
=end
module SiSU_Relaxng
diff --git a/lib/sisu/v5/remote.rb b/lib/sisu/current/remote.rb
index 20e648dc..7741a6a3 100644
--- a/lib/sisu/v5/remote.rb
+++ b/lib/sisu/current/remote.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** remote operations, get source from or copy output to remote server
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/remote.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: remote operations, get source from or copy output to remote server
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/remote.rb;hb=HEAD>
=end
module SiSU_Remote
diff --git a/lib/sisu/v5/rexml.rb b/lib/sisu/current/rexml.rb
index 18041cf7..9a11305c 100644
--- a/lib/sisu/v5/rexml.rb
+++ b/lib/sisu/current/rexml.rb
@@ -1,67 +1,64 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** rexml testing of xml
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/rexml.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: rexml testing of xml
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/rexml.rb;hb=HEAD>
=end
module SiSU_Rexml
# load XML file for REXML parsing
begin
require 'rexml/document' \
- if FileTest.directory?("#{Config::CONFIG['rubylibdir']}/rexml") #Config::CONFIG['sitedir']
+ if FileTest.directory?("#{RbConfig::CONFIG['rubylibdir']}/rexml") #RbConfig::CONFIG['sitedir']
rescue LoadError
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
error('rexml/document NOT FOUND (LoadError)')
@@ -73,7 +70,7 @@ module SiSU_Rexml
class Rexml
begin
require 'rexml/document' \
- if FileTest.directory?("#{Config::CONFIG['rubylibdir']}/rexml") #Config::CONFIG['sitedir']
+ if FileTest.directory?("#{RbConfig::CONFIG['rubylibdir']}/rexml") #RbConfig::CONFIG['sitedir']
rescue LoadError
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
error('rexml/document NOT FOUND (LoadError)')
diff --git a/lib/sisu/v5/se.rb b/lib/sisu/current/se.rb
index a4120429..94ada012 100644
--- a/lib/sisu/v5/se.rb
+++ b/lib/sisu/current/se.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se.rb;hb=HEAD>
=end
@@cX=nil
diff --git a/lib/sisu/v5/se_cleanoutput.rb b/lib/sisu/current/se_cleanoutput.rb
index 1ed9ee8e..8fee88cf 100644
--- a/lib/sisu/v5/se_cleanoutput.rb
+++ b/lib/sisu/current/se_cleanoutput.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_cleanoutput.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_cleanoutput.rb;hb=HEAD>
=end
module SiSU_Clean_Output
diff --git a/lib/sisu/current/se_clear.rb b/lib/sisu/current/se_clear.rb
new file mode 100644
index 00000000..1d769268
--- /dev/null
+++ b/lib/sisu/current/se_clear.rb
@@ -0,0 +1,106 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_clear.rb;hb=HEAD>
+
+=end
+module SiSU_Clear
+ require_relative 'constants' # constants.rb
+ require_relative 'utils' # utils.rb
+ require_relative 'se_info_env' # se_info_env.rb
+ begin
+ require 'singleton'
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('singleton NOT FOUND (LoadError)')
+ end
+ class Clear < SiSU_Info_Env::InfoEnv # se_info_env.rb
+ #todo unify with FileOp
+ def initialize(cmd,fns,operation='')
+ @cmd=cmd
+ begin
+ super(fns)
+ @env=SiSU_Env::InfoEnv.new(fns)
+ SiSU_Env::InfoVersion.instance
+ if operation.class.inspect =~/SiSU_Param/
+ @md=operation
+ end
+ case operation #watch
+ when /pdf/ then @env_out=''
+ when /sql/
+ when /xml|plaintext|ascii/ then @env_out=@env.path.output + @fnb #check change of name to plaintext from ascii
+ else
+ if defined? @md.sfx_src \
+ and @md.sfx_src =~/ss[ftsumc]/
+ @env_out_root=@env.path.output
+ @env_out="#{@env.path.output}/#{@fnb}"
+ @@publisher='SiSU http://www.jus.uio.no/sisu'
+ @env_pdf="#{@env_out_root}/pdf"
+ end
+ end
+ rescue
+ SiSU_Screen::Ansi.new(@cmd,$!,$@).rescue do
+ __LINE__.to_s + ':' + __FILE__
+ end
+ ensure
+ end
+ end
+ def param_instantiate
+ @cX||=SiSU_Screen::Ansi.new(@cmd)
+ @@date=SiSU_Env::InfoDate.new
+ @@proc=@@filename_txt=@@filename_texinfo=@@filename_html_scroll=@@filename_html_index=@@filename_html_segtoc=@@filename_semantic=@@filename_rss=@@newfile=@@drr=@@yaml=@@yamladdr=nil
+ @@publisher='SiSU scribe'
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/se_createsite.rb b/lib/sisu/current/se_createsite.rb
index ce31b460..2d20007a 100644
--- a/lib/sisu/v6/se_createsite.rb
+++ b/lib/sisu/current/se_createsite.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_createsite.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_createsite.rb;hb=HEAD>
=end
module SiSU_Create_Site
@@ -166,7 +163,7 @@ module SiSU_Create_Site
cp_images(src,dest) if FileTest.directory?(src)
end
def cp_base_images #fix images
- src=SiSU_is[:path_base_system_data] + '/image'
+ src=SiSU_is.path_base_system_data? + '/image'
dest_arr=[
"#{@env.path.webserv}/_sisu/image_sys",
"#{@env.path.webserv}/#{@env.path.base_markup_dir_stub}/_sisu/image_sys"
diff --git a/lib/sisu/v6/se_css.rb b/lib/sisu/current/se_css.rb
index a83d13ca..13a099d5 100644
--- a/lib/sisu/v6/se_css.rb
+++ b/lib/sisu/current/se_css.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_css.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_css.rb;hb=HEAD>
=end
module SiSU_CSS
diff --git a/lib/sisu/current/se_date.rb b/lib/sisu/current/se_date.rb
new file mode 100644
index 00000000..0cdf8841
--- /dev/null
+++ b/lib/sisu/current/se_date.rb
@@ -0,0 +1,92 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_date.rb;hb=HEAD>
+
+=end
+module SiSU_Info_Date
+ require_relative 'constants' # constants.rb
+ require_relative 'utils' # utils.rb
+ class InfoDate
+ begin
+ require 'date'
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('date NOT FOUND (LoadError)')
+ end
+ attr_accessor :dt,:t
+ def initialize
+ @dt,@t=Date.today.to_s,Time.now
+ end
+ def week
+ w=@t.strftime('%W')
+ "#{@t.year}w#{w}"
+ end
+ def month
+ "#{@t.year}#{@t.month}"
+ end
+ def year
+ @t.year
+ end
+ def weekonly
+ @t.strftime('%W')
+ end
+ def monthonly
+ @t.month
+ end
+ def year_static
+ YEAR
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/se_db.rb b/lib/sisu/current/se_db.rb
index 392af850..2207fb3d 100644
--- a/lib/sisu/v6/se_db.rb
+++ b/lib/sisu/current/se_db.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_db.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_db.rb;hb=HEAD>
=end
module SiSU_Info_Db
diff --git a/lib/sisu/v5/se_envcall.rb b/lib/sisu/current/se_envcall.rb
index 64758811..cda71630 100644
--- a/lib/sisu/v5/se_envcall.rb
+++ b/lib/sisu/current/se_envcall.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_envcall.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_envcall.rb;hb=HEAD>
=end
module SiSU_Env_Call
diff --git a/lib/sisu/v5/se_file_op.rb b/lib/sisu/current/se_file_op.rb
index 826c01ab..3f9cb834 100644
--- a/lib/sisu/v5/se_file_op.rb
+++ b/lib/sisu/current/se_file_op.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_file_op.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_file_op.rb;hb=HEAD>
=end
module SiSU_Info_File
@@ -354,7 +351,7 @@ module SiSU_File_Op
pth=output_path.html.dir
make_path(pth)
p_fn=place_file.html_scroll.dir
- @@filename_html_scroll=File.new(p_fn,'w+')
+ File.new(p_fn,'w+')
end
def html_seg_index
pth=((output_dir_structure.by_filename?) \
@@ -363,7 +360,7 @@ module SiSU_File_Op
: "#{output_path.html.dir}/#{@md.fnb}"
make_path(pth)
p_fn=place_file.html_seg_index.dir
- @@filename_html_index=File.new(p_fn,'w+')
+ File.new(p_fn,'w+')
end
def html_segtoc
pth=((output_dir_structure.by_filename?) \
@@ -373,7 +370,7 @@ module SiSU_File_Op
: "#{output_path.html.dir}/#{@md.fnb}"
make_path(pth)
p_fn=place_file.html_segtoc.dir
- @@filename_html_index=File.new(p_fn,'w+')
+ File.new(p_fn,'w+')
end
def xhtml
path=output_path.xhtml.dir
@@ -1011,19 +1008,11 @@ module SiSU_File_Op
def html_seg(fh)
fh=default_hash_build(fh,Sfx[:html])
fh[:lng]=lang_code?(fh[:lng])
- fnh=if output_dir_structure.by_filename?
- {
- fn: 'scroll',
- ft: fh[:ft],
- lng: fh[:lng],
- }
- else
- {
- fn: fh[:fn],
- ft: fh[:ft],
- lng: fh[:lng],
- }
- end
+ fnh={
+ fn: fh[:fn],
+ ft: fh[:ft],
+ lng: fh[:lng],
+ }
i18n(fnh)
end
def html_book_index(fh=nil)
@@ -2579,11 +2568,11 @@ module SiSU_Create_File
end
def file_semantic
fn='./semantic.yaml'
- @@filename_semantic=File.new(fn,'w+')
+ File.new(fn,'w+')
end
def file_rss
fn='./semantic.xml'
- @@filename_rss=File.new(fn,'w+')
+ File.new(fn,'w+')
end
def epub
@pth=@env.processing_path.epub
diff --git a/lib/sisu/v6/se_filemap.rb b/lib/sisu/current/se_filemap.rb
index 1af08ffd..82580025 100644
--- a/lib/sisu/v6/se_filemap.rb
+++ b/lib/sisu/current/se_filemap.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_filemap.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_filemap.rb;hb=HEAD>
=end
module SiSU_File_Map
diff --git a/lib/sisu/v6/se_get_init.rb b/lib/sisu/current/se_get_init.rb
index 7452bb66..a299cd10 100644
--- a/lib/sisu/v6/se_get_init.rb
+++ b/lib/sisu/current/se_get_init.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_get_init.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_get_init.rb;hb=HEAD>
=end
module SiSU_Get_Init
@@ -83,13 +80,13 @@ module SiSU_Get_Init
end
def rc_path_options
[
- "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:version_dir]}",
+ "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is.branch_version?}",
"#{$sisu_document_markup_directory_base_fixed_path}/.sisu",
- "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:version_dir]}",
+ "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is.branch_version?}",
"#{$sisu_document_markup_directory_base_fixed_path}/_sisu",
- "#{@@home}/.sisu/#{SiSU_is[:version_dir]}",
+ "#{@@home}/.sisu/#{SiSU_is.branch_version?}",
"#{@@home}/.sisu",
- "#{@@sisu_etc}/#{SiSU_is[:version_dir]}",
+ "#{@@sisu_etc}/#{SiSU_is.branch_version?}",
"#{@@sisu_etc}",
]
end
@@ -170,13 +167,13 @@ module SiSU_Get_Init
tell_no_yaml='WARNING - YAML loading switched off, to enable delete the file:'
if @markup_dir_changed_
@ad_path=[
- "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:version_dir]}/skin/yml",
+ "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is.branch_version?}/skin/yml",
"#{$sisu_document_markup_directory_base_fixed_path}/.sisu/skin/yml",
- "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:version_dir]}/skin/yml",
+ "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is.branch_version?}/skin/yml",
"#{$sisu_document_markup_directory_base_fixed_path}/_sisu/skin/yml",
- "#{@@home}/.sisu/#{SiSU_is[:version_dir]}/skin/yml",
+ "#{@@home}/.sisu/#{SiSU_is.branch_version?}/skin/yml",
"#{@@home}/.sisu/skin/yml",
- "#{@@sisu_etc}/#{SiSU_is[:version_dir]}/skin/yml",
+ "#{@@sisu_etc}/#{SiSU_is.branch_version?}/skin/yml",
"#{@@sisu_etc}/skin/yml",
]
@ad_path.each do |v|
diff --git a/lib/sisu/v5/se_hub_particulars.rb b/lib/sisu/current/se_hub_particulars.rb
index 9b443305..f1c7f816 100644
--- a/lib/sisu/v5/se_hub_particulars.rb
+++ b/lib/sisu/current/se_hub_particulars.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
- particulars, composite information about document being processed
+** Description: documents, structuring, processing, publishing, search
+*** particulars, composite information about document being processed
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_hub_particulars.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_hub_particulars.rb;hb=HEAD>
=end
module SiSU_Particulars
diff --git a/lib/sisu/v6/se_info_env.rb b/lib/sisu/current/se_info_env.rb
index e8342783..297a0a10 100644
--- a/lib/sisu/v6/se_info_env.rb
+++ b/lib/sisu/current/se_info_env.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_info_env.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_info_env.rb;hb=HEAD>
=end
@@current_document=Dir.pwd #nil #''
@@ -1063,7 +1060,7 @@ WOK
@sys.home
end
def sisurc_path
- GetInit.new.sisu_yaml.rc_path
+ SiSU_Get_Init::GetInit.new.sisu_yaml.rc_path
end
def pwd
@sys.pwd
@@ -1084,7 +1081,7 @@ WOK
@stub_pod
end
def etc
- defaults[:sisu_etc] #live/dynamic
+ defaults[:sisu_etc] #live/dynamic
end
def arch
@sys.dir_arch
@@ -1128,7 +1125,7 @@ WOK
def webserv_path #testing, check need, remove
webserv
end
- def webserv #separation required for webrick which cannot use path.output (different requirements as no file is passed)
+ def webserv #separation required for webrick which cannot use path.output (different requirements as no file is passed)
man_path=if @@man_path.nil?
man_path=if defined? @rc['webserv']['path'] \
and @rc['webserv']['path'] =~/\S\S+/
@@ -1166,17 +1163,17 @@ WOK
def webserv_map_pwd #dir
"#{path.webserv}/#{base_markup_dir_stub}"
end
- def webserv_dir #fixed/hard path to /www web/presentation directory, on Debian /var/www subdirectories are created within it, depending on markup directory stub-name (last segment of markup directory name)
+ def webserv_dir #fixed/hard path to /www web/presentation directory, on Debian /var/www subdirectories are created within it, depending on markup directory stub-name (last segment of markup directory name)
defaults[:webserv_dir]
end
- def webserv_image #web/presentation directory, subdirectories are created within it, depending on markup directory stub-name (last segment of markup directory name)
+ def webserv_image #web/presentation directory, subdirectories are created within it, depending on markup directory stub-name (last segment of markup directory name)
images=if defined? @rc['webserv']['images']
@rc['webserv']['images']
else defaults[:images]
end
"#{path.webserv}/#{images}"
end
- def output #web/webserv output directory... subdirectory into which further subdirectories are made based on file names
+ def output #web/webserv output directory... subdirectory into which further subdirectories are made based on file names
r=Px[:lng_lst_rgx]
u=/.+?\/([^\/]+)(?:\/(?:#{r})$|$)/
base_stub=@sys.pwd.gsub(u,'\1')
@@ -1194,7 +1191,7 @@ WOK
def feed_home
"#{public_output}/#{@rc['webserv']['feed_home']}"
end
- def scripts #used previously only to include tla version info
+ def scripts #used previously only to include tla version info
if defined? @rc['project']['path']
"#{home}/#{@rc['project']['path']}"
end
@@ -1213,19 +1210,28 @@ WOK
def output_tell
url.webserv_map_pwd
end
- def image_source #image repository source directory
+ def image_source_sisu_includes(md=nil)
+ if md \
+ and (md.opt.sisu_install_type? == \
+ :full_path_to_sisu_bin_in_sisu_dir_tree) \
+ and FileTest.directory?(
+ "#{md.opt.sisu_data_dir?}/image"
+ )==true
+ "#{md.opt.sisu_data_dir?}/image"
+ else
+ "#{share}/image"
+ end
+ end
+ def image_source(md=nil) #image repository source directory
if defined? @rc['image']['path'] \
and defined? @rc['image']['public']
pth="#{@rc['image']['path']}"
"#{pth}/#{@rc['image']['public']}"
else
- "#{share}/image"
+ image_source_sisu_includes(md)
end
end
- def image_source_sisu_includes
- "#{share}/image"
- end
- def image_source_include #image repository source directory
+ def image_source_include(md=nil) #image repository source directory
if defined? @rc['image']['path'] \
and defined? @rc['image']['public'] \
and FileTest.directory?(
@@ -1239,7 +1245,7 @@ WOK
)==true
"#{SiSU_Utils::Path.new.base_markup}/#{defaults[:image_stub]}"
else
- "#{share}/image"
+ image_source_sisu_includes(md)
end
end
def image_external
@@ -1251,7 +1257,8 @@ WOK
end
end
def image_source_include_remote
- if FileTest.directory?(image_external); image_external
+ if FileTest.directory?(image_external)
+ image_external
end
end
self
@@ -1286,7 +1293,7 @@ WOK
end
v=SiSU_Env::InfoVersion.instance.get_version
v_dev=(DEVELOPER[:maintenance]==:true) \
- ? "_#{v[:version]}"
+ ? "_#{v.version}"
: ''
path=if proposed_path_base \
and FileTest.directory?(proposed_path_base) \
@@ -1476,7 +1483,9 @@ WOK
def epub_cp_images(md)
pth="#{processing_path.epub}/#{Ep[:d_oebps]}/image"
FileUtils::mkdir_p(pth) unless FileTest.directory?(pth)
- src="#{path.share}/image"
+ src=(md.opt.sisu_install_type? == :full_path_to_sisu_bin_in_sisu_dir_tree) \
+ ? "#{md.opt.sisu_data_dir?}/image"
+ : "#{md.opt.sisu_data_dir?}/sisu/image"
images=%W[bullet_09.png arrow_next_red.png arrow_prev_red.png arrow_up_red.png]
images.each do |i| #move to avoid repeated tests
if FileTest.file?("#{src}/#{i}")
@@ -2107,7 +2116,8 @@ WOK
FileUtils::rm_rf(processing_path.processing_path.odf_pth)
FileUtils::mkdir_p(processing_path.processing_path.odf_pth)
system(
- "unzip -q #{path.share}/#{SiSU_is[:version_dir]}/odf/odt.zip -d #{processing_path.odf_pth}"
+ "unzip -q #{path.share}/#{SiSU_is.branch_name?}/odf/odt.zip -d #{processing_path.odf_pth}"
+ #"unzip -q #{path.share}/#{SiSU_is.branch_version?}/odf/odt.zip -d #{processing_path.odf_pth}"
)
end
def sisupod_gen(fns_pod)
diff --git a/lib/sisu/current/se_info_port.rb b/lib/sisu/current/se_info_port.rb
new file mode 100644
index 00000000..17275b0c
--- /dev/null
+++ b/lib/sisu/current/se_info_port.rb
@@ -0,0 +1,70 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_info_port.rb;hb=HEAD>
+
+=end
+module SiSU_Info_Port
+ require_relative 'constants' # constants.rb
+ require_relative 'utils' # utils.rb
+ require_relative 'se_info_env' # se_info_env.rb
+ class InfoPort < SiSU_Info_Env::InfoEnv # se_info_env.rb
+ def initialize
+ @env=SiSU_Env::InfoEnv.new
+ end
+ def webrick
+ @env.port.webrick_port
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/se_info_system.rb b/lib/sisu/current/se_info_system.rb
index 58de52a0..969b508a 100644
--- a/lib/sisu/v6/se_info_system.rb
+++ b/lib/sisu/current/se_info_system.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_info_system.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_info_system.rb;hb=HEAD>
=end
module SiSU_Info_Sys_Gen
@@ -68,15 +65,15 @@ module SiSU_Info_Sys_Gen
error('rbconfig NOT FOUND (LoadError)')
end
@@user, @@home, @@hostname, @@pwd, @@sisu_etc, @@host, @@arch, @@rbver, @@dir_arch, @@dir_sitearch, @@dir_bin, @@locale, @@rc,@@sisurc_path,@@ad=
- ENV['USER'],ENV['HOME'],ENV['HOSTNAME'],ENV['PWD'],Config::CONFIG['sysconfdir'] + '/sisu',Config::CONFIG['host'],Config::CONFIG['arch'],%x{ruby -v}.strip,Config::CONFIG['archdir'],Config::CONFIG['sitearchdir'],Config::CONFIG['bindir'],%x{locale charmap}.strip,nil, nil, {} # %x{ruby -v}.strip # Config::CONFIG['rb_ver']
- out=Config::CONFIG['localstatedir']
- etc=Config::CONFIG['sysconfdir'] + '/sisu'
- share=Config::CONFIG['datadir'] + '/sisu'
- data=Config::CONFIG['datadir'] + '/doc/sisu'
+ 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']
+ out=RbConfig::CONFIG['localstatedir']
+ etc=RbConfig::CONFIG['sysconfdir'] + '/sisu'
+ share=RbConfig::CONFIG['datadir'] + '/sisu'
+ data=RbConfig::CONFIG['datadir'] + '/doc/sisu'
m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@stub_pwd ||=@@pwd[m,1]
@base_markup_dir_stub=SiSU_Utils::Path.new.base_markup_stub
- prcss_dir='_sisu_processing_' + '.' + SiSU_is[:version_dir]
+ prcss_dir='_sisu_processing_' + '.' + SiSU_is.branch_version?
prcss_dir_tmp_root="/tmp/#{prcss_dir}"
prcss_dir_stub="#{prcss_dir}/#{@stub_pwd}"
if @@user
diff --git a/lib/sisu/current/se_load.rb b/lib/sisu/current/se_load.rb
new file mode 100644
index 00000000..a0086049
--- /dev/null
+++ b/lib/sisu/current/se_load.rb
@@ -0,0 +1,108 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_load.rb;hb=HEAD>
+
+=end
+module SiSU_Load
+ require_relative 'constants' # constants.rb
+ require_relative 'utils' # utils.rb
+ class Load
+ def initialize(prog,mandatory=false)
+ @prog,@mandatory=prog,mandatory
+ end
+ def prog
+ load_prog=false
+ $:.each do |reqpath|
+ if FileTest.exist?("#{reqpath}/#{@prog}.rb")
+ load_prog=true
+ #SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).ok("#{reqpath}/#{@prog}.rb loaded")
+ break
+ #else SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).warn("#{reqpath}/#{@prog}.rb not found")
+ end
+ end
+ if load_prog \
+ and @prog=~/dbi/
+ begin
+ require 'dbi'
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('dbi NOT FOUND (LoadError)')
+ end
+ end
+ if load_prog
+ begin
+ require @prog
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error("#{@prog} NOT FOUND (LoadError)")
+ end
+ else
+ @mandatory \
+ ? (SiSU_Screen::Ansi.new(@prog,"*WARN* module required: #{@prog}").warn)
+ : '' #(SiSU_Screen::Ansi.new(@prog,"*WARN* #{@prog} load requested").warn)
+ end
+ load_prog
+ end
+ def prog?
+ load_prog=false
+ $:.each do |reqpath|
+ if FileTest.exist?("#{reqpath}/#{@prog}.rb"); load_prog=true
+ break
+ end
+ end
+ load_prog
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/se_processing.rb b/lib/sisu/current/se_processing.rb
index 2f41bb17..9a5f9ab2 100644
--- a/lib/sisu/v6/se_processing.rb
+++ b/lib/sisu/current/se_processing.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_processing.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_processing.rb;hb=HEAD>
=end
module SiSU_Processing_Settings
diff --git a/lib/sisu/v5/se_programs.rb b/lib/sisu/current/se_programs.rb
index 985f8233..83c57977 100644
--- a/lib/sisu/v5/se_programs.rb
+++ b/lib/sisu/current/se_programs.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_programs.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_programs.rb;hb=HEAD>
=end
module SiSU_Sys_Call
@@ -75,7 +72,7 @@ module SiSU_Sys_Call
@sys=SiSU_Info_Sys::InfoSystem.instance
end
def program_found?(program)
- found=`which #{program}` #`whereis #{program}`
+ found=`which #{program} 2>&1` #`whereis #{program}`
(found =~/bin\/#{program}\b/) ? true : false
end
def locale #locales utf8 or other
@@ -250,7 +247,7 @@ module SiSU_Sys_Call
#STDERR.puts "\t*WARN* #{program} is not installed #{program_ref}" unless found
found
end
- def graphicksmagick #graphicsmagick is a image manipulation program
+ def graphicsmagick #graphicsmagick is a image manipulation program
program='gm'
#program_ref="\n\t\tsee <http://www.graphicsmagick.org/>"
found=(program_found?(program)) ? true : false
diff --git a/lib/sisu/v5/se_remotes.rb b/lib/sisu/current/se_remotes.rb
index 633d85e9..77876637 100644
--- a/lib/sisu/v5/se_remotes.rb
+++ b/lib/sisu/current/se_remotes.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_remotes.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_remotes.rb;hb=HEAD>
=end
module SiSU_Info_Remote_Host
diff --git a/lib/sisu/v6/se_standardise_lang.rb b/lib/sisu/current/se_standardise_lang.rb
index a2340374..3293b8c4 100644
--- a/lib/sisu/v6/se_standardise_lang.rb
+++ b/lib/sisu/current/se_standardise_lang.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_standardise_lang.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_standardise_lang.rb;hb=HEAD>
=end
@@lang_info=nil
diff --git a/lib/sisu/v5/se_version.rb b/lib/sisu/current/se_version.rb
index 0243491d..464af3d9 100644
--- a/lib/sisu/v5/se_version.rb
+++ b/lib/sisu/current/se_version.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_version.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/se_version.rb;hb=HEAD>
=end
module SiSU_Info_Version
@@ -85,16 +82,19 @@ module SiSU_Info_Version
? @@lib_path
: `echo $RUBYLIB`.split(':')
@@lib_path ||=lib_path
- if File.exist?(SiSU_is[:version_info_path])
- @version=YAML::load(File::open(SiSU_is[:version_info_path]))
+ if File.exist?(SiSU_is.version_info_path?)
+ @version=YAML::load(File::open(SiSU_is.version_info_path?))
end
- @version[:install_method]=if SiSU_is[:run_from]==:gem_install
+ @version[:install_method]=if SiSU_is.runtime_type? ==:gem_install
spec = Gem::Specification.find_by_name("sisu")
gem_root = spec.gem_dir
- (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_is[:version_dir]}/,'')) == gem_root) \
+ (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_is.branch_name?}/,'')) == gem_root) \
? ' (ruby gem install)' : ''
else ''
end
+ @version[:branch_name]=SiSU_is.branch_name?
+ @version[:branch_version]=SiSU_is.branch_version?
+ @version[:branch_number]=/^v([0-9]+)$/.match(@version[:branch_version])[1]
@version
end
def rbversion
diff --git a/lib/sisu/v5/shared_images.rb b/lib/sisu/current/shared_images.rb
index 1bd08260..6d244945 100644
--- a/lib/sisu/v5/shared_images.rb
+++ b/lib/sisu/current/shared_images.rb
@@ -1,60 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** common file for xml generation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/shared_images.rb;hb=HEAD>
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/shared_images.rb;hb=HEAD>
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: common file for xml generation
=end
module SiSU_Images
require_relative 'se_hub_particulars' # se_hub_particulars.rb
@@ -127,7 +125,7 @@ module SiSU_Images
end
def select_sisu_base
images=%w[arrow_next_red.png arrow_prev_red.png arrow_up_red.png dot_clear.png dot_white.png b_doc.png b_epub.png b_odf.png b_pdf.png b_toc.png]
- src_path="#{SiSU_is[:path_base_system_data]}/image"
+ src_path="#{SiSU_is.path_base_system_data?}/image"
dest=dest_path(:image_sys)
copy(src_path,dest,images)
end
diff --git a/lib/sisu/v6/shared_markup_alt.rb b/lib/sisu/current/shared_markup_alt.rb
index 83f843be..50984a22 100644
--- a/lib/sisu/v6/shared_markup_alt.rb
+++ b/lib/sisu/current/shared_markup_alt.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/shared_markup_alt.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/shared_markup_alt.rb;hb=HEAD>
=end
module SiSU_TextRepresentation
diff --git a/lib/sisu/v6/shared_metadata.rb b/lib/sisu/current/shared_metadata.rb
index 646d7f72..92d32dda 100644
--- a/lib/sisu/v6/shared_metadata.rb
+++ b/lib/sisu/current/shared_metadata.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/shared_metadata.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/shared_metadata.rb;hb=HEAD>
=end
module SiSU_Metadata
diff --git a/lib/sisu/v6/shared_sem.rb b/lib/sisu/current/shared_sem.rb
index 74cfeaa7..35547f3a 100644
--- a/lib/sisu/v6/shared_sem.rb
+++ b/lib/sisu/current/shared_sem.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
- Sematic tags
+** Description: documents, structuring, processing, publishing, search
+*** Sematic tags
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/shared_sem.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/shared_sem.rb;hb=HEAD>
=end
module SiSU_Sem
diff --git a/lib/sisu/current/sisu_thor_lib.rb b/lib/sisu/current/sisu_thor_lib.rb
new file mode 100644
index 00000000..3212e923
--- /dev/null
+++ b/lib/sisu/current/sisu_thor_lib.rb
@@ -0,0 +1,407 @@
+module SiSU_Po4a_Actions
+ require_relative 'utils_response' # utils_response.rb
+ include SiSU_Response
+ @@source=@@targets=nil
+ def project_details
+ def name
+ 'SiSU translations under po4a management'
+ end
+ def name_warning
+ <<-WOK
+#{name}
+
+WARNING all sisu markup files (.ssm, .sst, .ssi) in languages other than #{language.source_language_selected}
+are managed by po4a, through translations of the source language to other languages.
+
+#{language.info_on_selection}
+ WOK
+ end
+ def setup_project
+ "Setup file for placing #{name}"
+ end
+ self
+ end
+ def notice
+ def warn_and_proceed?
+ '*WARNING* this software module creates, destroys, overwrites directories' + "\n" \
+ + '*WARNING*: Use this Software at your own risk!'
+ end
+ def default(selection=nil)
+ selections=:strict #selections=:short
+ ans=if selection
+ case selection
+ when selection.is_a?(String)
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ Default action selected - "#{selection} #{project_details.name}"
+#{warn_and_proceed?}
+ WOK
+ when :make
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ "--#{selection}" selected - #{selection} #{project_details.name}
+ selected (or configured) languages to be used
+ source language: #{language.source_language_available_str}
+ target languages: #{language.translation_languages_selected_that_are_available.inspect}
+
+ WARNING: this action assumes (and places) this project is under po4a
+ (translation) management. It will create sub-directories for the
+ selected (or configured) target languages:
+ #{language.translation_languages_selected_that_are_available.inspect}
+ & the po4a configuration file: #{filename.po4a_cfg}
+ in the current directory:
+ #{Dir.pwd}
+ It will populate the sub-directories with translation files created from
+ the pot and po files found under the corresponding language
+ sub-directories, (under #{dir.pot}/ & #{dir.po}/).
+ (OVERWRITING any existing translated .ssm .sst .ssi files
+ in language subdirectories that are not under po4a management).
+
+ You should backup the current directory:
+ #{Dir.pwd}
+
+#{warn_and_proceed?}
+ WOK
+ when :clean
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ "--#{selection}" selected - #{selection} #{project_details.name}
+#{warn_and_proceed?}
+ WOK
+ when :distclean
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ "--#{selection}" selected - #{selection} #{project_details.name}
+ WARNING: this action assumes (and places) this project is under po4a
+ (translation) management. It will remove the sub-directories (if they exist):
+ #{language.possible_translations.inspect}
+
+ #{language.translation_languages_selected_that_are_available.inspect}
+ & file: #{filename.po4a_cfg}
+ in the current directory:
+ #{Dir.pwd}
+ Note: these sub-directories & the config file #{filename.po4a_cfg}
+ should be auto-generated from pot and po files if this project translation
+ is under po4a management.
+ This query is to give you the chance to make sure you know what you are doing.
+#{warn_and_proceed?}
+ WOK
+ when :rebuild
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ "--#{selection}" selected - #{selection} #{project_details.name}
+ WARNING: this action assumes (and places) this project is under po4a
+ (translation) management. It will destroy/clobber and then create again the
+ sub-directories:
+ #{language.translation_languages_selected_that_are_available.inspect}
+ populating them with translation files created from the pot and po files
+ found under the corresponding language sub-directories in (#{dir.pot}/
+ & #{dir.po}/).
+ It will also generate the file: #{filename.po4a_cfg}
+ These actions will be taken in the current directory:
+ #{Dir.pwd}
+ This query is to give you the chance to make sure you know what you are doing.
+#{warn_and_proceed?}
+ WOK
+ else
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ Default action selected - "#{selection} #{project_details.name}"
+#{warn_and_proceed?}
+ WOK
+ end
+ else
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ Default action selected - "install and to setup #{project_details.name}"
+#{warn_and_proceed?}
+ WOK
+ end
+ exit unless query.answer?(ans)
+ end
+ def project_help
+ puts <<-WOK
+#{project_details.name}
+#{project_details.setup_project}
+
+This setup file is primarily to assist with having sisu markup files under po4a
+translation management. It assumes that the source language files are placed
+under the sub-directory identifying the source language set, which is currently
+#{language.source_language_selected}
+The files there are used to make the source translation file in the directory #{dir.pot}/
+Which is then used to create files for translation under the directory #{dir.po}/
+in sub-directories bearing the translation languages ISO code.
+
+The current language translation selection is: #{translation_languages_selected_str}
+The languages selected are located in the file: #{filename.languages_src_tgt}
+
+sisu available language list: #{sisu_languages_available_str}
+
+ WOK
+ end
+ self
+ end
+ def generate
+ def readme
+ system(%{ruby ../../../../../bin/sisu6 --txt -v --no-manifest --dump='../../../../../..' en/README.ssm})
+ end
+ def manpage
+ system(%{ruby ../../../../../bin/sisu6 --manpage -v --no-manifest --dump='../../../../../../man/man1' en/sisu.ssm})
+ end
+ self
+ end
+ def filename
+ def languages_src_tgt
+ #'translation_languages'
+ 'languages_source_and_targets'
+ end
+ def po4a_cfg
+ 'po4a.cfg'
+ end
+ self
+ end
+ def dir
+ def pwd
+ Dir.pwd
+ end
+ def po4a_
+ 'po4a/' # ''
+ end
+ def pot
+ po4a_ + 'pot'
+ end
+ def po
+ po4a_ + 'po'
+ end
+ self
+ end
+ def dir_mk(dir)
+ FileUtils::mkdir_p(dir) unless FileTest.directory?(dir)
+ end
+ def po4a_flags
+ def debug
+ '-d -v'
+ end
+ def normal
+ ''
+ end
+ def quiet
+ '-q'
+ end
+ self
+ end
+ def languages_from_file
+ def language_source
+ if @@source.is_a?(String) \
+ and @@source =~ /w{2,4}/
+ else languages_extract_from_file
+ end
+ @@source
+ end
+ def language_targets
+ if @@targets.is_a?(Array) \
+ and @@targets.length > 0
+ else languages_extract_from_file
+ end
+ @@targets
+ end
+ def languages_extract_from_file
+ if (@@source.is_a?(String) \
+ and @@source =~/\w{2,4}/) \
+ and (@@targets.is_a?(Array) \
+ and @@targets.length > 0)
+ else
+ if FileTest.file?(filename.languages_src_tgt)
+ puts 'file: "' + filename.languages_src_tgt + '" found and used (unless overridden)'
+ langs=IO.read(filename.languages_src_tgt, mode: 'r:utf-8').scan(/source:\s+\w+|target:\s+\w.+/)
+ langs.each do |sel|
+ case sel
+ when /source:/
+ source=sel.split(/source:\s*|\s+/).join
+ source=(source =~/\w{2,4}/) ? source : nil
+ @@source=unless @@source.is_a?(String) \
+ and @@source =~/\w{2,4}/
+ source
+ else @@source
+ end
+ when /target:/
+ @@targets=unless @@targets.is_a?(Array)
+ sel.split(/targets?:\s*|\s+/) - ['']
+ else @@targets
+ end
+ end
+ end
+ else
+ puts %{(create) missing instruction file: "#{filename.languages_src_tgt}"\n contents e.g.:\n source: en\n target: de fr es ja ru zh\n no po target languages found}
+ exit
+ end
+ end
+ end
+ self
+ end
+ def language
+ def source_language_selected(src=nil)
+ @@source=if not @@source.nil? \
+ and @@source.is_a?(String) \
+ and @@source =~/\w{2,4}/
+ @@source
+ elsif (src \
+ && src.is_a?(String) \
+ && src.length > 1)
+ src
+ else
+ src=languages_from_file.language_source
+ end
+ end
+ def translation_languages_selected(targets=nil) #translation_languages
+ @@targets=if not @@targets.nil? \
+ and @@targets.is_a?(Array) \
+ and @@targets.length > 0
+ @@targets
+ elsif (targets \
+ && targets.is_a?(Array) \
+ && targets.length > 0)
+ targets
+ else
+ targets=languages_from_file.language_targets
+ end
+ end
+ def source_language_available
+ [source_language_selected] & sisu_languages_available
+ end
+ def translation_languages_selected_that_are_available
+ translation_languages_selected & sisu_languages_available
+ end
+ def info_on_selection
+ if translation_languages_selected != translation_languages_selected_that_are_available
+ <<-WOK
+WARNING: language selections mismatch
+
+The current language translation selection appears to be: #{translation_languages_selected_str}
+Of which the following are valid (available) selections: #{translation_languages_selected_that_are_available_str}
+
+sisu available language list: #{sisu_languages_available_str}
+
+the following will be used: #{translation_languages_selected_that_are_available_str}
+The languages selected are located in the file: #{filename.languages_src_tgt}
+ WOK
+ else
+ <<-WOK
+The current language translation selection is: #{translation_languages_selected_str}
+The languages selected are located in the file: #{filename.languages_src_tgt}
+
+sisu available language list: #{sisu_languages_available_str}
+ WOK
+ end
+ end
+ def sisu_languages_available
+ $SiSU_Language_Codes.language_list.codes
+ end
+ def possible_translations
+ sisu_languages_available - [source_language_selected]
+ end
+ def translation_languages_selected_str
+ language.translation_languages_selected.join(' ')
+ end
+ def source_language_available_str
+ source_language_available.join
+ end
+ def translation_languages_selected_that_are_available_str
+ language.translation_languages_selected_that_are_available.join(' ')
+ end
+ def sisu_languages_available_str
+ language.sisu_languages_available.join(' ')
+ end
+ def posible_translations_str
+ language.posible_translations.join(' ')
+ end
+ self
+ end
+ def files_src
+ def ssm
+ Dir.glob("#{language.source_language_selected}/*.ssm").sort
+ end
+ def sst
+ Dir.glob("#{language.source_language_selected}/*.sst").sort
+ end
+ def ssi
+ Dir.glob("#{language.source_language_selected}/*.ssi").sort
+ end
+ def all
+ Dir.glob("#{language.source_language_selected}/*{.ssm,.sst,.ssi}").sort
+ end
+ self
+ end
+ def po4a_cfg_file
+ File.open("#{Dir.pwd}/#{filename.po4a_cfg}",'w')
+ end
+ def po4a_create
+ def configure #po4a_cfg
+ po4a_cfg_arr=[]
+ po4a_cfg_arr \
+ << "[po4a_langs] #{language.translation_languages_selected_that_are_available_str}"
+ po4a_cfg_arr \
+ << "[po4a_paths] #{dir.pot}/$master.pot $lang:#{dir.po}/$lang/$master.po"
+ files_src.ssm.each do |file_src|
+ file_src_fn=file_src.gsub(/#{language.source_language_selected}\//,'')
+ po4a_cfg_arr \
+ << "[type: text] #{file_src} $lang:$lang/#{file_src_fn}"
+ end
+ files_src.sst.each do |file_src|
+ file_src_fn=file_src.gsub(/#{language.source_language_selected}\//,'')
+ po4a_cfg_arr \
+ << "[type: text] #{file_src} $lang:$lang/#{file_src_fn}"
+ end
+ files_src.ssi.each do |file_src|
+ file_src_fn=file_src.gsub(/#{language.source_language_selected}\//,'')
+ po4a_cfg_arr \
+ << "[type: text] #{file_src} $lang:$lang/#{file_src_fn}"
+ end
+ file=po4a_cfg_file
+ po4a_cfg_arr.each do |txt|
+ puts txt
+ file << txt << "\n"
+ end
+ file.close
+ cmd='po4a --keep 0 ' \
+ + po4a_flags.normal + ' ' \
+ + filename.po4a_cfg
+ #cmd='po4a --keep 0 --no-backups --package-name ' \
+ #+ 'sisu-manual' + ' ' \
+ #+ po4a_flags.normal + ' ' \
+ #+ filename.po4a_cfg
+ system(cmd); puts cmd
+ end
+ self
+ end
+ def project
+ def make
+ dir_mk(dir.pot)
+ language.translation_languages_selected_that_are_available.each do |lang_dir|
+ dir_lang="#{Dir.pwd}/#{dir.po}/#{lang_dir}"
+ dir_mk(dir_lang)
+ end
+ po4a_create.configure
+ end
+ def clean
+ #rm -f po/*/*.po~
+ #rm -rf ../build
+ FileUtils.rm_f Dir.glob("./#{dir.po}/*/*.po~")
+ end
+ def distclean
+ #rm -f po4a.cfg
+ #rm -rf $(LANGUAGES)
+ FileUtils::rm_f(filename.po4a_cfg)
+ FileUtils::rm_r(language.possible_translations,:force => true)
+ end
+ self
+ end
+end
+__END__
diff --git a/lib/sisu/v5/sitemaps.rb b/lib/sisu/current/sitemaps.rb
index 39c02255..61c62172 100644
--- a/lib/sisu/v5/sitemaps.rb
+++ b/lib/sisu/current/sitemaps.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** sitemap created from document parameters
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/sitemaps.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: sitemap created from document parameters
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/sitemaps.rb;hb=HEAD>
=end
module SiSU_Sitemaps
diff --git a/lib/sisu/current/src_kdissert_share.rb b/lib/sisu/current/src_kdissert_share.rb
new file mode 100644
index 00000000..2220aea0
--- /dev/null
+++ b/lib/sisu/current/src_kdissert_share.rb
@@ -0,0 +1,102 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** share sisu source markup file, copy it to output directory!
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/src_share_kdissert.rb;hb=HEAD>
+
+=end
+module SiSU_KdiSource
+ require_relative 'se' # se.rb
+ include SiSU_Env
+ class Source
+ begin
+ require 'fileutils'
+ include FileUtils
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('fileutils NOT FOUND (LoadError)')
+ end
+ def initialize(opt)
+ @opt=opt
+ @env=SiSU_Env::InfoEnv.new(@opt.fns)
+ @output_path="#{@env.path.output}/#{@opt.fnb}"
+ end
+ def read
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'Share Kdissert Source Document!',
+ @opt.fnb
+ ).green_hi_blue unless @opt.act[:quiet][:set]==:on
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ "Copy kdissert file to output directory",
+ "#{@opt.fnb} -> #{@output_path}"
+ ).warn unless @opt.act[:quiet][:set]==:on
+ FileUtils::mkdir_p(@env.path.output) unless FileTest.directory?(@env.path.output)
+ FileUtils::mkdir_p(@output_path) unless FileTest.directory?(@output_path)
+ if FileTest.directory?(@output_path)
+ if @opt.fns =~/\.kdi\._sst$/ \
+ and FileTest.file?(@opt.fnb)
+ FileUtils::cp(@opt.fnb,@output_path)
+ end
+ else
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ "Output directory does not exist",
+ "#{@opt.fnb} -> #{@output_path}"
+ ).warn unless @opt.act[:quiet][:set]==:on
+ exit
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/current/src_share.rb b/lib/sisu/current/src_share.rb
new file mode 100644
index 00000000..7d3564f2
--- /dev/null
+++ b/lib/sisu/current/src_share.rb
@@ -0,0 +1,109 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** share sisu source markup file, copy it to output directory!
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/src_share.rb;hb=HEAD>
+
+=end
+module SiSU_Markup
+ require_relative 'src_shared' # src_shared.rb
+ include SiSU_Source
+ require_relative 'se' # se.rb
+ include SiSU_Env
+ class Source < SiSU_Source::SiSUpodSource
+ def initialize(opt,build=nil,place=nil)
+ super(opt,build,place)
+ @opt=opt
+ end
+ def read
+ unless @opt.act[:quiet][:set]==:on
+ (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on) \
+ ? SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'Share document markup text source',
+ @opt.fns
+ ).cyan_hi_blue
+ : SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'Share document markup text source',
+ @opt.fns
+ ).cyan_title_hi
+ end
+ if FileTest.directory?(@path_pod[:fnb])
+ FileUtils::mkdir_p(@file.output_path.src.dir) \
+ unless FileTest.directory?(@file.output_path.src.dir)
+ v=(@opt.act[:maintenance][:set]==:on) \
+ ? 'v' : ''
+ system(%{
+ rsync -a#{v} #{@path_pod[:fnb]} #{@file.output_path.sisupod.dir}
+ chbk=`pwd`
+ cd #{@file.output_path.sisupod.dir}
+ for I in `find -type d` ; do chmod 755 $I ; done
+ for I in `find -type f` ; do chmod 644 $I ; done
+ cd ${chbk}
+ })
+ else
+ if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Screen::Ansi.new(
+ '',
+ "#{@opt.fno} not available"
+ ).blue_tab
+ end
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/src_shared.rb b/lib/sisu/current/src_shared.rb
index 957fcb30..a6c41c22 100644
--- a/lib/sisu/v6/src_shared.rb
+++ b/lib/sisu/current/src_shared.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** create sisupod filetype and copy it to output directory!
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/src_shared.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: create sisupod filetype and copy it to output directory!
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/src_shared.rb;hb=HEAD>
=end
module SiSU_Source
diff --git a/lib/sisu/v5/src_sisupod_make.rb b/lib/sisu/current/src_sisupod_make.rb
index 0077948e..5eefdcff 100644
--- a/lib/sisu/v5/src_sisupod_make.rb
+++ b/lib/sisu/current/src_sisupod_make.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** create sisupod filetype and copy it to output directory!
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/src_sisupod_make.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: create sisupod filetype and copy it to output directory!
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/src_sisupod_make.rb;hb=HEAD>
=end
module SiSU_Doc
diff --git a/lib/sisu/v6/sst_convert_markup.rb b/lib/sisu/current/sst_convert_markup.rb
index d92461f6..447514f4 100644
--- a/lib/sisu/v6/sst_convert_markup.rb
+++ b/lib/sisu/current/sst_convert_markup.rb
@@ -1,62 +1,59 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** A conversion script for canned substitutions, a fairly generic
+ simple tool that can be used to store other canned conversions, used here for
+ altering SiSU markup
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/sst_convert_markup.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: A conversion script for canned substitutions, a fairly generic
- simple tool that can be used to store other canned conversions, used here for
- altering SiSU markup
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/sst_convert_markup.rb;hb=HEAD>
=end
module SiSU_Modify
diff --git a/lib/sisu/v6/sst_do_inline_footnotes.rb b/lib/sisu/current/sst_do_inline_footnotes.rb
index 42fd559e..3a623d55 100644
--- a/lib/sisu/v6/sst_do_inline_footnotes.rb
+++ b/lib/sisu/current/sst_do_inline_footnotes.rb
@@ -1,61 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** preprocessing, convert bi-footnotemarker-footnote to inline
+ footnotes, invoked using: sisu --to-footnotes filename.sst
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/set_do_inline_footnotes.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: preprocessing, convert bi-footnotemarker-footnote to inline
- footnotes, invoked using: sisu --to-footnotes filename.sst
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/set_do_inline_footnotes.rb;hb=HEAD>
=end
module SiSU_ConvertFootnotes
diff --git a/lib/sisu/v5/sst_from_xml.rb b/lib/sisu/current/sst_from_xml.rb
index e18e1798..3b253775 100644
--- a/lib/sisu/v5/sst_from_xml.rb
+++ b/lib/sisu/current/sst_from_xml.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** Conversion script from kdissert .kdi to sisu markup .ssm (master document)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/sst_from_xml.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: Conversion script from kdissert .kdi to sisu markup .ssm
- (master document)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/sst_from_xml.rb;hb=HEAD>
=end
module SiSU_sstFromXML
diff --git a/lib/sisu/v6/sst_identify_markup.rb b/lib/sisu/current/sst_identify_markup.rb
index bd2e4569..5a41fb54 100644
--- a/lib/sisu/v6/sst_identify_markup.rb
+++ b/lib/sisu/current/sst_identify_markup.rb
@@ -1,62 +1,59 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** A conversion script for canned substitutions, a fairly generic
+ simple tool that can be used to store other canned conversions, used here for
+ altering SiSU markup
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/sst_identify_markup.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: A conversion script for canned substitutions, a fairly generic
- simple tool that can be used to store other canned conversions, used here for
- altering SiSU markup
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/sst_identify_markup.rb;hb=HEAD>
=end
module SiSU_Markup
diff --git a/lib/sisu/v6/sst_to_s_xml_sax.rb b/lib/sisu/current/sst_to_s_xml_sax.rb
index 5a77903a..f82f44b6 100644
--- a/lib/sisu/v6/sst_to_s_xml_sax.rb
+++ b/lib/sisu/current/sst_to_s_xml_sax.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** simple xml representation (sax style)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/sst_to_s_xml_sax.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: simple xml representation (sax style)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/sst_to_s_xml_sax.rb;hb=HEAD>
=end
module SiSU_SimpleXML_ModelSax
diff --git a/lib/sisu/v6/termsheet.rb b/lib/sisu/current/termsheet.rb
index bc07dd25..7089f1c5 100644
--- a/lib/sisu/v6/termsheet.rb
+++ b/lib/sisu/current/termsheet.rb
@@ -1,62 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** specialised pre-processing wrapper
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/termsheet.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: SiSU information Structuring Universe, specialised pre-processing wrapper
- ** NOTE wrapper makes little sense without additional components, additional
- sample files must be provided - (saved till later as may confuse)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/termsheet.rb;hb=HEAD>
=end
require_relative 'se' # se.rb
@@ -151,6 +146,9 @@ report_html.join("\n")
summary_file << "#{report_thlnk}"
summary_html << "#{report_html}"
__END__
+** NOTE wrapper makes little sense without additional components, additional
+ sample files must be provided - (saved till later as may confuse)
+*** bits
sisu -t x_bank.and.*
e.g. sisu -t x_bank.and.*.termsheet.rb
e.g. sisu_termsheet.rb -t x_bank.and.c*.termsheet.rb
diff --git a/lib/sisu/v6/texinfo.rb b/lib/sisu/current/texinfo.rb
index a82c1542..898312cc 100644
--- a/lib/sisu/v6/texinfo.rb
+++ b/lib/sisu/current/texinfo.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** texinfo processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/texinfo.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: texinfo processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/texinfo.rb;hb=HEAD>
=end
module SiSU_TexInfo
diff --git a/lib/sisu/v6/texinfo_format.rb b/lib/sisu/current/texinfo_format.rb
index 03ec2609..c03e2ec7 100644
--- a/lib/sisu/v6/texinfo_format.rb
+++ b/lib/sisu/current/texinfo_format.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** texinfo formatting template
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/texinfo_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: texinfo formatting template
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/texinfo_format.rb;hb=HEAD>
=end
module SiSU_TexInfoFormat
diff --git a/lib/sisu/v6/texpdf.rb b/lib/sisu/current/texpdf.rb
index 79a36c0d..cd4504aa 100644
--- a/lib/sisu/v6/texpdf.rb
+++ b/lib/sisu/current/texpdf.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** LaTeX generation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/texpdf.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: LaTeX generation
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/texpdf.rb;hb=HEAD>
=end
module SiSU_TeX
diff --git a/lib/sisu/v6/texpdf_format.rb b/lib/sisu/current/texpdf_format.rb
index 134a2b2f..a1a147e1 100644
--- a/lib/sisu/v6/texpdf_format.rb
+++ b/lib/sisu/current/texpdf_format.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** LaTeX formatting template, unicode utf-8 version, used for pdf
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/texpdf_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: LaTeX formatting template, unicode utf-8 version, used for pdf
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/texpdf_format.rb;hb=HEAD>
=end
module SiSU_TeX_Pdf
diff --git a/lib/sisu/v5/texpdf_parts.rb b/lib/sisu/current/texpdf_parts.rb
index d5daf004..229785df 100644
--- a/lib/sisu/v5/texpdf_parts.rb
+++ b/lib/sisu/current/texpdf_parts.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xhtml_parts.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xhtml_parts.rb;hb=HEAD>
=end
module SiSU_Parts_TeXpdf
diff --git a/lib/sisu/v6/txt_asciidoc.rb b/lib/sisu/current/txt_asciidoc.rb
index 5f27a86a..65488bd5 100644
--- a/lib/sisu/v6/txt_asciidoc.rb
+++ b/lib/sisu/current/txt_asciidoc.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** plaintext (smarttext) generation, asciidoc
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/plaintext_asciidoc.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: plaintext (smarttext) generation, asciidoc
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/plaintext_asciidoc.rb;hb=HEAD>
=end
module SiSU_Txt_AsciiDoc
diff --git a/lib/sisu/v6/txt_markdown.rb b/lib/sisu/current/txt_markdown.rb
index eb220a46..1ec2bdf2 100644
--- a/lib/sisu/v6/txt_markdown.rb
+++ b/lib/sisu/current/txt_markdown.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** plaintext (smarttext) generation, markdown
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/plaintext_markdown.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: plaintext (smarttext) generation, markdown
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/plaintext_markdown.rb;hb=HEAD>
=end
module SiSU_Txt_Markdown
diff --git a/lib/sisu/v6/txt_plain.rb b/lib/sisu/current/txt_plain.rb
index c988c50f..0edd6551 100644
--- a/lib/sisu/v6/txt_plain.rb
+++ b/lib/sisu/current/txt_plain.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** plaintext text generation, stripped plaintext output (unix, linefeed)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/plaintext.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: plaintext text generation, stripped plaintext output (unix,
- linefeed)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/plaintext.rb;hb=HEAD>
=end
module SiSU_Txt_Plain
diff --git a/lib/sisu/v5/txt_rst.rb b/lib/sisu/current/txt_rst.rb
index 297a2457..238c0bb7 100644
--- a/lib/sisu/v5/txt_rst.rb
+++ b/lib/sisu/current/txt_rst.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** plaintext (smarttext) generation, rST
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/plaintext_rst.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: plaintext (smarttext) generation, rST
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/plaintext_rst.rb;hb=HEAD>
=end
module SiSU_Txt_rST
diff --git a/lib/sisu/v5/txt_shared.rb b/lib/sisu/current/txt_shared.rb
index 30f54f5a..a47279bb 100644
--- a/lib/sisu/v5/txt_shared.rb
+++ b/lib/sisu/current/txt_shared.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by flatfile output generators
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/txt_shared.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by flatfile output generators
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/txt_shared.rb;hb=HEAD>
=end
module SiSU_TextUtils
diff --git a/lib/sisu/v5/txt_textile.rb b/lib/sisu/current/txt_textile.rb
index 71268d96..86187a3d 100644
--- a/lib/sisu/v5/txt_textile.rb
+++ b/lib/sisu/current/txt_textile.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** plaintext (smarttext) generation, textile
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/plaintext_textile.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: plaintext (smarttext) generation, textile
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/plaintext_textile.rb;hb=HEAD>
=end
module SiSU_Txt_Textile
diff --git a/lib/sisu/v5/update.rb b/lib/sisu/current/update.rb
index 30a184f0..32fdd1a2 100644
--- a/lib/sisu/v5/update.rb
+++ b/lib/sisu/current/update.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** update previous output (with similar output file type formats)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/update.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: update previous output (with similar output file type formats)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/update.rb;hb=HEAD>
=end
module SiSU_UpdateControlFlag
diff --git a/lib/sisu/v5/urls.rb b/lib/sisu/current/urls.rb
index 33781603..db31282b 100644
--- a/lib/sisu/v5/urls.rb
+++ b/lib/sisu/current/urls.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** urls for output files
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/urls.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: urls for output files
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/urls.rb;hb=HEAD>
=end
module SiSU_Urls
diff --git a/lib/sisu/v6/utils.rb b/lib/sisu/current/utils.rb
index 42901e42..53e28fd9 100644
--- a/lib/sisu/v6/utils.rb
+++ b/lib/sisu/current/utils.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, debug related
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/utils.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, debug related
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/utils.rb;hb=HEAD>
=end
module SiSU_Utils
@@ -135,6 +132,12 @@ module SiSU_Utils
def mark(v=nil,x=nil)
puts set(v,x)
end
+ def tell(v=nil,x=nil)
+ puts set(v,x)
+ end
+ def report(v=nil,x=nil)
+ puts set(v,x)
+ end
def ok(v=nil,x=nil)
if (v.is_a?(Symbol) \
and x.is_a?(String))
diff --git a/lib/sisu/current/utils_response.rb b/lib/sisu/current/utils_response.rb
new file mode 100644
index 00000000..c47fab2e
--- /dev/null
+++ b/lib/sisu/current/utils_response.rb
@@ -0,0 +1,113 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** Request response
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/utils_response.rb;hb=HEAD>
+
+=end
+module SiSU_Response
+ class Response
+ def response?(ask) #move to more appropriate directory later
+ response='redo'
+ print ask + " ['yes', 'no' or 'quit']: "
+ response=File.new('/dev/tty').gets.strip
+ ans=if response=='yes' then true
+ elsif response=='no' then false
+ elsif response =~/^quit|exit$/ then exit
+ else puts "[please type: 'yes', 'no' or 'quit']"
+ response?(ask)
+ end
+ ans
+ end
+ end
+ def query
+ def selections_available_(selections=:strict)
+ short_options=(selections == :strict) ? '' : '; [ynqx]'
+ %{'yes', 'no', 'quit' or 'exit'#{short_options}}
+ end
+ def selection_options
+ def response_strict(resp)
+ case resp
+ when /^(?:yes)$/ then true
+ when /^(?:no)$/ then false
+ when /^(?:quit|exit)$/ then exit
+ else
+ puts %{response was: #{resp}}
+ puts %{[please type to select: #{selections_available_(:strict)}]}
+ answer?('',:strict)
+ end
+ end
+ def response_short(resp)
+ case resp
+ when /^(?:y|yes)$/ then true
+ when /^(?:n|no)$/ then false
+ when /^(?:[qx]|quit|exit)$/ then exit
+ else
+ puts %{response was: #{resp}}
+ puts %{[please type to select: #{selections_available_(:short)}]}
+ answer?('',:short)
+ end
+ end
+ self
+ end
+ def answer?(ask,selections=:strict)
+ resp='redo'
+ print ask + %{PROCEED? [#{selections_available_(selections)}]: }
+ resp=File.new('/dev/tty').gets.strip
+ (selections==:strict) \
+ ? selection_options.response_strict(resp)
+ : selection_options.response_short(resp)
+ end
+ self
+ end
+end
+__END__
diff --git a/lib/sisu/v5/utils_screen_text_color.rb b/lib/sisu/current/utils_screen_text_color.rb
index 5689389e..4fd9f6a1 100644
--- a/lib/sisu/v5/utils_screen_text_color.rb
+++ b/lib/sisu/current/utils_screen_text_color.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, screen colors text
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/utils_screen_text_color.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, screen colors text
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/utils_screen_text_color.rb;hb=HEAD>
=end
module SiSU_Screen
diff --git a/lib/sisu/current/utils_spell.rb b/lib/sisu/current/utils_spell.rb
new file mode 100644
index 00000000..ffd781d1
--- /dev/null
+++ b/lib/sisu/current/utils_spell.rb
@@ -0,0 +1,99 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** spellchecking
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/utils_spell.rb;hb=HEAD>
+
+=end
+module SiSU_SpellUtility
+ class Spell
+ def initialize(input,filesrc,flg)
+ @flg=flg
+ @filename, @filetype = /(.+?)(\.\w\w\w0$)/.match(filesrc)[1,2] #.gsub(/\.\w\w\w0$/, "")
+ @input=input
+ @allwords=[]
+ puts @filename
+ @speller='aspell' # 'ispell'
+ @dictionary='british'
+ @lang='en_GB'
+ end
+ def check
+ @input.each do |data|
+ data=data.gsub(/(https?|www|ftp|gopher|png|jpg|gif|html|htm)\S+/i,' ').
+ gsub(/(&nbsp;|#{Mx[:nbsp]})/i,' ').
+ gsub(/<\/?(table|tr|td|b|p|href).*?>/i,' ').
+ gsub(/(<==.+|<:\S+>|<!.+?!>|^@\S+?:.+|\{\{\{|~)/,' ').
+ gsub(/(["|<>)(\n'`.;&_-]|\=)/,' ').
+ gsub(/\b(altExternal|
+ target|externalimg|
+ srcimagebext|
+ img|src|toc|pdf|
+ cd|org|
+ helvetica|roman
+ )\b/i,' ').
+ gsub(/EOF/,'')
+ @words=data.scan(/\S+/)
+ @words.each { |y| @allwords << y }
+ end
+ @allwords=@allwords.uniq
+ if @flg =~ /S/
+ File.open('/home/ralph/spell_error','a+') do |file| #fix
+ file.puts %{\n\n<<#{@filename}>>}
+ end
+ @allwords.each { |y| puts y.inspect; system(%{cat #{y} | /usr/bin/#{@speller} -l -d #{@dictionary} >> ~/spell_error })}
+ else
+ @allwords.each { |y| sp=%x{echo #{y}|#{@speller} -l }; puts sp unless sp.empty?}
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/webrick.rb b/lib/sisu/current/webrick.rb
index f05e16de..cabdf6cc 100644
--- a/lib/sisu/v6/webrick.rb
+++ b/lib/sisu/current/webrick.rb
@@ -1,61 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** webrick share - note sisu by default does not link with file suffixes,
+ see man pages for options
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/webrick.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: webrick share - note sisu by default does not link with file
- suffixes, see man pages for options
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/webrick.rb;hb=HEAD>
=end
module SiSU_Webserv
diff --git a/lib/sisu/v5/wikispeak.rb b/lib/sisu/current/wikispeak.rb
index c8bf1d53..a40f6424 100644
--- a/lib/sisu/v5/wikispeak.rb
+++ b/lib/sisu/current/wikispeak.rb
@@ -1,60 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** wiki text generation, stripped wiki output (unix, linefeed)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * License: GPL 3 or later:
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- SiSU, a framework for document structuring, publishing and search
+** License: GPL 3 or later:
- Copyright (C) Ralph Amissah
+ SiSU, a framework for document structuring, publishing and search
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ Copyright (C) Ralph Amissah
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/wikispeak.rb;hb=HEAD>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: wiki text generation, stripped wiki output (unix, linefeed)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/wikispeak.rb;hb=HEAD>
=end
module SiSU_Wikispeak
diff --git a/lib/sisu/v5/xhtml.rb b/lib/sisu/current/xhtml.rb
index 2327ba30..8a7cc176 100644
--- a/lib/sisu/v5/xhtml.rb
+++ b/lib/sisu/current/xhtml.rb
@@ -1,61 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** Description: xhtml output logic, flow
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xhtml.rb;hb=HEAD>
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xhtml.rb;hb=HEAD>
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: xhtml output logic, flow
- ** Notes: tidy -xml scroll.xhtml >> index.tidy
=end
module SiSU_XHTML
require_relative 'se_hub_particulars' # se_hub_particulars.rb
@@ -461,6 +458,8 @@ WOK
end
end
__END__
+** Notes:
+tidy -xml scroll.xhtml >> index.tidy
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
diff --git a/lib/sisu/v5/xhtml_epub2.rb b/lib/sisu/current/xhtml_epub2.rb
index ceed3239..9072bf93 100644
--- a/lib/sisu/v5/xhtml_epub2.rb
+++ b/lib/sisu/current/xhtml_epub2.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** epub generation, processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/epub.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: epub generation, processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xhtml_epub2.rb;hb=HEAD>
=end
module SiSU_XHTML_EPUB2
diff --git a/lib/sisu/v5/xhtml_epub2_concordance.rb b/lib/sisu/current/xhtml_epub2_concordance.rb
index 02f47d5a..d3dfec0e 100644
--- a/lib/sisu/v5/xhtml_epub2_concordance.rb
+++ b/lib/sisu/current/xhtml_epub2_concordance.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** epub concordance file (wordmap, linked index of words in document)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/epub_concordance.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: epub concordance file (html concordance, wordmap, linked index
- of words in document)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xhtml_epub2_concordance.rb;hb=HEAD>
=end
module SiSU_XHTML_EPUB2_Concordance
diff --git a/lib/sisu/v5/xhtml_epub2_format.rb b/lib/sisu/current/xhtml_epub2_format.rb
index bbd02a6d..9cfc5736 100644
--- a/lib/sisu/v5/xhtml_epub2_format.rb
+++ b/lib/sisu/current/xhtml_epub2_format.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** epub formating, css template
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/epub_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: epub formating, css template
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xhtml_epub2_format.rb;hb=HEAD>
=end
module SiSU_XHTML_EPUB2_Format
diff --git a/lib/sisu/v5/xhtml_epub2_segments.rb b/lib/sisu/current/xhtml_epub2_segments.rb
index ea3e27fa..b8af25dc 100644
--- a/lib/sisu/v5/xhtml_epub2_segments.rb
+++ b/lib/sisu/current/xhtml_epub2_segments.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** epub segment generation, processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/epub_segments.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: epub segment generation, processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xhtml_epub2_segments.rb;hb=HEAD>
=end
module SiSU_XHTML_EPUB2_Seg
@@ -389,18 +386,18 @@ WOK
else sto.para
end
end
- elsif dob.is ==:block \
- || dob.is ==:group \
- || dob.is ==:alt
- sto.para #fix this should be block type specific #FIX
- elsif dob.is==:verse
- sto.verse
- elsif dob.is==:code
- sto.code
- elsif dob.is==:table
- sto.table
- elsif dob.is==:break
- sto.break
+ elsif dob.is ==:block \
+ || dob.is ==:group \
+ || dob.is ==:alt
+ sto.para #fix this should be block type specific #FIX
+ elsif dob.is==:verse
+ sto.verse
+ elsif dob.is==:code
+ sto.code
+ elsif dob.is==:table
+ sto.table
+ elsif dob.is==:break
+ sto.break
end
if @md.flag_separate_endnotes # may need to revisit, check
dob.obj=dob.obj.gsub(/"\s+href="##{Mx[:note_ref]}(\d+)">/,%{" href=\"endnotes#{Sfx[:epub_xhtml]}##{Mx[:note_ref]}\\1">}) #endnote- twice #removed file type
@@ -529,7 +526,7 @@ WOK
end
try.join('<br \/>')
#% creation of separate end segment/page of all endnotes referenced back to reference segment
- m=/(?:#{Mx[:en_a_o]}(?:\d|#{ast}|#{pls})+|#{Mx[:en_b_o]}(?:#{ast}|#{pls})\d+)\s+(.+?href=")(#note_ref(?:\d|_a|_b)+".+)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/mi
+ m=/(?:#{Mx[:en_a_o]}(?:\d|#{ast}|#{pls})+|#{Mx[:en_b_o]}(?:#{ast}|#{pls})\d+)\s+(.+?href=")(##{Mx[:note_ref]}(?:\d|_a|_b)+".+)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/mi
endnote_part_a=note_match_seg[m,1]
endnote_part_b=note_match_seg[m,2]
txt_obj={ endnote_part_a: endnote_part_a, endnote_part_b: endnote_part_b }
diff --git a/lib/sisu/v5/xhtml_epub2_tune.rb b/lib/sisu/current/xhtml_epub2_tune.rb
index b4142e2e..f8cc3774 100644
--- a/lib/sisu/v5/xhtml_epub2_tune.rb
+++ b/lib/sisu/current/xhtml_epub2_tune.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** epub generation, epub pre-processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/epub_tune.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: epub generation, epub pre-processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xhtml_epub2_tune.rb;hb=HEAD>
=end
require_relative 'dp' # dp.rb
diff --git a/lib/sisu/v6/xhtml_parts.rb b/lib/sisu/current/xhtml_parts.rb
index 7be47079..3a7cff04 100644
--- a/lib/sisu/v6/xhtml_parts.rb
+++ b/lib/sisu/current/xhtml_parts.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xhtml_parts.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xhtml_parts.rb;hb=HEAD>
=end
module SiSU_Parts_XHTML
diff --git a/lib/sisu/current/xhtml_shared.rb b/lib/sisu/current/xhtml_shared.rb
new file mode 100644
index 00000000..c2026799
--- /dev/null
+++ b/lib/sisu/current/xhtml_shared.rb
@@ -0,0 +1,62 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xhtml_shared.rb;hb=HEAD>
+
+=end
+module SiSU_XHTML_Shared
+ require_relative 'xhtml_table' # xhtml_table.rb
+ class TableXHTML < SiSU_XHTML_Table::TableXHTML
+ end
+end
+__END__
diff --git a/lib/sisu/current/xhtml_table.rb b/lib/sisu/current/xhtml_table.rb
new file mode 100644
index 00000000..42698f0b
--- /dev/null
+++ b/lib/sisu/current/xhtml_table.rb
@@ -0,0 +1,98 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xhtml_table.rb;hb=HEAD>
+
+=end
+module SiSU_XHTML_Table
+ require_relative 'xhtml_parts' # xhtml_parts.rb
+ class TableXHTML
+ include SiSU_Parts_XHTML
+ @@tablehead=0
+ @@tablefoot=[] #watch
+ def initialize(table)
+ @table_obj=table
+ end
+ def table
+ table_obj=@table_obj
+ if table_obj.obj !~/^<table\s/m
+ table_obj=table_rows_and_columns_array(table_obj)
+ else p __LINE__; p caller
+ end
+ table_obj
+ end
+ def table_rows_and_columns_array(table_obj) # provides basic (x)html table
+ table_rows,nr=[],0
+ table_obj.obj.split(Mx[:tc_c]).each do |table_row|
+ table_row_with_columns=table_row.split(Mx[:tc_p])
+ trc,nc=[],0
+ table_row_with_columns.each do |c|
+ c=c.gsub(/^~$/,''). # tilde / empty cell
+ gsub(/<:br>/,the_line_break)
+ trc <<= if table_obj.head_ and nr==0; %{<th width="#{table_obj.widths[nc]}%">#{c}</th>}
+ else %{<td width="#{table_obj.widths[nc]}%">#{c}</td>}
+ end
+ nc+=1
+ end
+ trc=(trc.is_a?(Array)) ? trc.flatten.join : trc
+ trc=" <tr>#{trc}</tr>\n"
+ nr+=1
+ table_rows << trc
+ end
+ table_rows=table_rows.flatten.join
+ table_obj.obj=%{<table summary="normal text css" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">\n#{table_rows} </table>}
+ table_obj
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/xml_docbook5.rb b/lib/sisu/current/xml_docbook5.rb
index 5cd6fc66..384efbe0 100644
--- a/lib/sisu/v6/xml_docbook5.rb
+++ b/lib/sisu/current/xml_docbook5.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** Docbook book XML rendition
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xml_docbook_book.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: Docbook book XML rendition
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xml_docbook_book.rb;hb=HEAD>
=end
module SiSU_XML_Docbook_Book
diff --git a/lib/sisu/v6/xml_dom.rb b/lib/sisu/current/xml_dom.rb
index fd96b564..9707deec 100644
--- a/lib/sisu/v6/xml_dom.rb
+++ b/lib/sisu/current/xml_dom.rb
@@ -1,61 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** xml (dom style) output processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xml_dom.rb;hb=HEAD>
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xml_dom.rb;hb=HEAD>
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: xml (dom style) output processing
- ** Notes: tidy -xml dom.xml >> index.tidy
=end
module SiSU_XML_DOM
require_relative 'se_hub_particulars' # se_hub_particulars.rb
@@ -618,3 +615,4 @@ WOK
end
end
__END__
+** Notes: tidy -xml dom.xml >> index.tidy
diff --git a/lib/sisu/v5/xml_fictionbook2.rb b/lib/sisu/current/xml_fictionbook2.rb
index c192179b..f8c0ed6b 100644
--- a/lib/sisu/v5/xml_fictionbook2.rb
+++ b/lib/sisu/current/xml_fictionbook2.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** Fictionbook XML rendition
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xml_fictionbook.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: Fictionbook XML rendition
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xml_fictionbook.rb;hb=HEAD>
=end
module SiSU_XML_Fictionbook
diff --git a/lib/sisu/v6/xml_format.rb b/lib/sisu/current/xml_format.rb
index 088b5d2b..08eed960 100644
--- a/lib/sisu/v6/xml_format.rb
+++ b/lib/sisu/current/xml_format.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+** xml template
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xml_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: xml template
- ** Notes: tidy -xml index.xml >> index.tidy
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xml_format.rb;hb=HEAD>
=end
module SiSU_XML_Format
@@ -866,3 +862,4 @@ WOK
end
end
__END__
+** Notes: tidy -xml index.xml >> index.tidy
diff --git a/lib/sisu/v5/xml_md_oai_pmh_dc.rb b/lib/sisu/current/xml_md_oai_pmh_dc.rb
index a452c9b5..b5fe2ccf 100644
--- a/lib/sisu/v5/xml_md_oai_pmh_dc.rb
+++ b/lib/sisu/current/xml_md_oai_pmh_dc.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** summary of generated outputs and metadata
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xml_md_oai_pmh_dc.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: summary of generated outputs and metadata
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xml_md_oai_pmh_dc.rb;hb=HEAD>
=end
module SiSU_XML_Metadata
diff --git a/lib/sisu/v5/xml_odf_odt.rb b/lib/sisu/current/xml_odf_odt.rb
index b2957e54..8b7c493c 100644
--- a/lib/sisu/v5/xml_odf_odt.rb
+++ b/lib/sisu/current/xml_odf_odt.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** opendocument text generation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/odf.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: opendocument text generation
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/odf.rb;hb=HEAD>
=end
module SiSU_XML_ODF_ODT
diff --git a/lib/sisu/v5/xml_odf_odt_format.rb b/lib/sisu/current/xml_odf_odt_format.rb
index 64bf1315..436c3996 100644
--- a/lib/sisu/v5/xml_odf_odt_format.rb
+++ b/lib/sisu/current/xml_odf_odt_format.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** opendocument formatting, default opendocument template
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/odf_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: opendocument formatting, default opendocument template
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/odf_format.rb;hb=HEAD>
=end
module SiSU_XML_ODF_ODT_Format
diff --git a/lib/sisu/v5/xml_parts.rb b/lib/sisu/current/xml_parts.rb
index c08fc05c..d8acea66 100644
--- a/lib/sisu/v5/xml_parts.rb
+++ b/lib/sisu/current/xml_parts.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** shared xml parts
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html_parts.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/html_parts.rb;hb=HEAD>
=end
module SiSU_Parts_XML
diff --git a/lib/sisu/v5/xml_sax.rb b/lib/sisu/current/xml_sax.rb
index 87205488..21455628 100644
--- a/lib/sisu/v5/xml_sax.rb
+++ b/lib/sisu/current/xml_sax.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** xml output (sax style) processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xml.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: xml output (sax style) processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xml.rb;hb=HEAD>
=end
module SiSU_XML_SAX
diff --git a/lib/sisu/v5/xml_scaffold_structure_collapsed.rb b/lib/sisu/current/xml_scaffold_structure_collapsed.rb
index 2f4bea17..2da1f135 100644
--- a/lib/sisu/v5/xml_scaffold_structure_collapsed.rb
+++ b/lib/sisu/current/xml_scaffold_structure_collapsed.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** extract and print an XML rendition of document structure to screen
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xml_scaffold.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: extract and print an XML rendition of document structure to screen
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xml_scaffold.rb;hb=HEAD>
=end
module SiSU_XML_Scaffold_Structure_Collapse
diff --git a/lib/sisu/v5/xml_scaffold_structure_sisu.rb b/lib/sisu/current/xml_scaffold_structure_sisu.rb
index ea76bc7c..dbb6be7d 100644
--- a/lib/sisu/v5/xml_scaffold_structure_sisu.rb
+++ b/lib/sisu/current/xml_scaffold_structure_sisu.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** extract and print an XML rendition of document structure to screen
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xml_scaffold.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: extract and print an XML rendition of document structure to screen
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xml_scaffold.rb;hb=HEAD>
=end
module SiSU_XML_Scaffold_Structure_Sisu
diff --git a/lib/sisu/v6/xml_shared.rb b/lib/sisu/current/xml_shared.rb
index 601b6d69..f392d9fc 100644
--- a/lib/sisu/v6/xml_shared.rb
+++ b/lib/sisu/current/xml_shared.rb
@@ -1,60 +1,60 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** common file for xml generation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xml_shared.rb;hb=HEAD>
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xml_shared.rb;hb=HEAD>
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
+** Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- ** Description: common file for xml generation
=end
module SiSU_XML_Munge
require_relative 'xml_parts' # xml_parts.rb
diff --git a/lib/sisu/v5/xml_tables.rb b/lib/sisu/current/xml_tables.rb
index 76ecffe1..55b0be41 100644
--- a/lib/sisu/v5/xml_tables.rb
+++ b/lib/sisu/current/xml_tables.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** common file for xml table generation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xml_tables.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: common file for xml table generation
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/xml_tables.rb;hb=HEAD>
=end
module SiSU_Tables
diff --git a/lib/sisu/current/zap.rb b/lib/sisu/current/zap.rb
new file mode 100644
index 00000000..6e1e0fb0
--- /dev/null
+++ b/lib/sisu/current/zap.rb
@@ -0,0 +1,90 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** zap wipe clean previous output of the type specified
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/current/zap.rb;hb=HEAD>
+
+=end
+module SiSU_Zap
+ require_relative 'se' # se.rb
+ include SiSU_Env
+ class Source
+ def initialize(opt)
+ @opt=opt
+ @env=SiSU_Env::InfoEnv.new(opt.fns)
+ end
+ def read
+ zap_path="#{@env.path.output}/#{@env.fnb}"
+ z=SiSU_Env::CleanOutput.new(@opt)
+ if SiSU_Env::InfoSettings.new.permission?('zap')
+ unless @opt.act[:quiet][:set]==:on
+ tell=SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ "Clean files related to processing #{@opt.selections.str} ->",
+ "#{@opt.fns} -> #{zap_path}"
+ )
+ tell.warn
+ end
+ z.zap.remove_output
+ else
+ unless @opt.act[:quiet][:set]==:on
+ tell=SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'use of -Z (zap) has not enabled in sisurc.yml'
+ )
+ tell.warn
+ end
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/develop/air.rb b/lib/sisu/develop/air.rb
new file mode 100644
index 00000000..2822fe52
--- /dev/null
+++ b/lib/sisu/develop/air.rb
@@ -0,0 +1,80 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/air.rb;hb=HEAD>
+
+=end
+module SiSU_Air
+ require_relative 'se_hub_particulars' # se_hub_particulars.rb
+ class Source
+ @@ao_array=[]
+ @@fns=nil
+ def initialize(opt)
+ @opt=opt
+ @@fns||@opt.fns
+ @particulars=SiSU_Particulars::Combined.new(opt)
+ #@env=@particulars.env
+ #@md=@particulars.md
+ #@ao_array=@particulars.ao_array
+ end
+ def read
+ end
+ protected
+ def print
+ puts @particulars.md.inspect
+ puts @particulars.env.inspect
+ puts @particulars.ao_array
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/ao.rb b/lib/sisu/develop/ao.rb
index 34e952cb..0ac6f502 100644
--- a/lib/sisu/v6/ao.rb
+++ b/lib/sisu/develop/ao.rb
@@ -1,61 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** preprocessing, (document abstraction), data abstraction used in subsequent
+ processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/ao.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: preprocessing, (document abstraction), data abstraction used
- in subsequent processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao.rb;hb=HEAD>
=end
module SiSU_AO
@@ -63,10 +60,11 @@ module SiSU_AO
include SiSU_Env
require_relative 'dp' # dp.rb
include SiSU_Param
- require_relative 'ao_doc_objects' # ao.rb
+ require_relative 'ao_doc_objects' # ao_doc_objects.rb
require_relative 'ao_syntax' # ao_syntax.rb
include SiSU_AO_Syntax
require_relative 'ao_doc_str' # ao_doc_str.rb
+ require_relative 'ao_references' # ao_references.rb
require_relative 'ao_idx' # ao_idx.rb
require_relative 'ao_numbering' # ao_numbering.rb
require_relative 'ao_hash_digest' # ao_hash_digest.rb
@@ -76,6 +74,7 @@ module SiSU_AO
require_relative 'ao_character_check' # ao_character_check.rb
require_relative 'ao_misc_arrange' # ao_misc_arrange.rb
require_relative 'ao_expand_insertions' # ao_expand_insertions.rb
+ require_relative 'ao_persist' # ao_persist.rb
require_relative 'prog_text_translation' # prog_text_translation.rb
require_relative 'shared_sem' # shared_sem.rb
class Instantiate < SiSU_Param::Parameters::Instructions
@@ -85,13 +84,10 @@ module SiSU_AO
end
end
class Source <Instantiate
- @@ao_array=[]
- @@idx_arr={ sst: [], tex: [], html: [], xhtml: [] }
- @@map_arr={ nametags: [], ocn_htmlseg: [] }
- @@fns=nil
- def initialize(opt,fnx=nil)
- @opt,@fnx=opt,fnx
- @@fns ||=opt.fns
+ def initialize(opt,fnx=nil,process=:complete)
+ @opt,@fnx,@process=opt,fnx,process
+ @per ||=SiSU_AO_Persist::Persist.new.persist_init
+ @per.fns ||=opt.fns
fn_use=if fnx \
and fnx =~/\.ss[tmi]$/
fnx
@@ -113,34 +109,36 @@ module SiSU_AO
end
def read #creates ao
begin
- @@ao_array=[]
- @@fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
+ @per=SiSU_AO_Persist::Persist.new
+ @per.ao_arr=[]
+ @per.fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
? @fnx
: @opt.fns
create_ao
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@@fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@per.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
+ SiSU_AO_Persist::Persist.new.persist_init
SiSU_AO::Instantiate.new
end
end
def get #reads ao, unless does not exist then creates first
begin
ao=[]
- unless @@fns==@opt.fns \
- or @@fns==@fnx
- @@fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
+ unless @per.fns==@opt.fns \
+ or @per.fns==@fnx
+ @per.fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
? @fnx
: @opt.fns
- @@ao_array=[]
+ @per.ao_arr=[]
end
- ao=(@@ao_array.empty?) \
+ ao=(@per.ao_arr.empty?) \
? read_fnc
- : @@ao_array.dup
+ : @per.ao_arr.dup
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -150,18 +148,18 @@ module SiSU_AO
def get_idx_sst #reads ao idx.sst, #unless does not exist then creates first
begin
ao=[]
- unless @@fns==@opt.fns \
- or @@fns==@fnx
- @@fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
+ unless @per.fns==@opt.fns \
+ or @per.fns==@fnx
+ @per.fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
? @fnx
: @opt.fns
- @@idx_arr[:sst]=[]
+ @per.idx_arr_sst=[]
end
- ao=(@@idx_arr[:sst].empty?) \
+ ao=(@per.idx_arr_sst.empty?) \
? read_idx_sst
- : @@idx_arr[:sst].dup #check
+ : @per.idx_arr_sst.dup #check
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -171,18 +169,18 @@ module SiSU_AO
def get_idx_raw
begin
ao=[]
- unless @@fns==@opt.fns \
- or @@fns==@fnx
- @@fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
+ unless @per.fns==@opt.fns \
+ or @per.fns==@fnx
+ @per.fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
? @fnx
: @opt.fns
- @@idx_arr[:tex]=[]
+ @per.idx_arr_tex=[]
end
- ao=(@@idx_arr[:tex].empty?) \
+ ao=(@per.idx_arr_tex.empty?) \
? read_idx_raw
- : @@idx_arr[:tex].dup #check
+ : @per.idx_arr_tex.dup #check
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -192,18 +190,18 @@ module SiSU_AO
def get_idx_html #reads ao idx.html, #unless does not exist then creates first
begin
ao=[]
- unless @@fns==@opt.fns \
- or @@fns==@fnx
- @@fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
+ unless @per.fns==@opt.fns \
+ or @per.fns==@fnx
+ @per.fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
? @fnx
: @opt.fns
- @@idx_arr[:html]=[]
+ @per.idx_arr_html=[]
end
- ao=(@@idx_arr[:html].empty?) \
+ ao=(@per.idx_arr_html.empty?) \
? read_idx_html
- : @@idx_arr[:html].dup
+ : @per.idx_arr_html.dup
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -213,18 +211,18 @@ module SiSU_AO
def get_idx_xhtml #reads ao idx.xhtml, #unless does not exist then creates first
begin
ao=[]
- unless @@fns==@opt.fns \
- or @@fns==@fnx
- @@fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
+ unless @per.fns==@opt.fns \
+ or @per.fns==@fnx
+ @per.fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
? @fnx
: @opt.fns
- @@idx_arr[:xthml]=[]
+ @per.idx_arr_xhtml=[] #...
end
- ao=(@@idx_arr[:xhtml].empty?) \
+ ao=(@per.idx_arr_xhtml.empty?) \
? read_idx_xhtml
- : @@idx_arr[:xhtml].dup
+ : @per.idx_arr_xhtml.dup
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -234,18 +232,18 @@ module SiSU_AO
def get_map_nametags #reads ao map.nametags, #unless does not exist then creates first
begin
ao=[]
- unless @@fns==@opt.fns \
- or @@fns==@fnx
- @@fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
+ unless @per.fns==@opt.fns \
+ or @per.fns==@fnx
+ @per.fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
? @fnx
: @opt.fns
- @@map_arr[:nametags]=[]
+ @per.map_arr_nametags=[]
end
- ao=(@@map_arr[:nametags].empty?) \
+ ao=(@per.map_arr_nametags.empty?) \
? read_map_nametags
- : @@map_arr[:nametags].dup
+ : @per.map_arr_nametags.dup
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -255,18 +253,18 @@ module SiSU_AO
def get_map_ocn_htmlseg #reads ao map.ocn_htmlseg, #unless does not exist then creates first
begin
ao=[]
- unless @@fns==@opt.fns \
- or @@fns==@fnx
- @@fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
+ unless @per.fns==@opt.fns \
+ or @per.fns==@fnx
+ @per.fns=(@fnx && @fnx =~/\.ss[tmi]$/) \
? @fnx
: @opt.fns
- @@map_arr[:ocn_htmlseg]=[]
+ @per.map_arr_ocn_htmlseg=[]
end
- ao=(@@map_arr[:ocn_htmlseg].empty?) \
+ ao=(@per.map_arr_ocn_htmlseg.empty?) \
? read_map_ocn_htmlseg
- : @@map_arr[:ocn_htmlseg].dup
+ : @per.map_arr_ocn_htmlseg.dup
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selection,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -276,6 +274,7 @@ module SiSU_AO
protected
def create_ao
ao_array=[]
+ fnp = @fnx ? "#{@opt.fno} #{@fnx}" : @opt.fno
unless @opt.act[:quiet][:set]==:on
tell=(@opt.act[:verbose][:set]==:on \
|| @opt.act[:verbose_plus][:set]==:on \
@@ -286,7 +285,8 @@ module SiSU_AO
)
: SiSU_Screen::Ansi.new(
@opt.act[:color_state][:set],
- 'Document Abstraction',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}"
+ 'Document Abstraction',
+ "[#{@opt.f_pth[:lng_is]}] #{fnp}"
)
tell.blue_title_hi
end
@@ -299,7 +299,7 @@ module SiSU_AO
meta=file_array=@env.source_file_processing_array(fn)
@md=SiSU_Param::Parameters::Instructions.new(meta,@opt).extract
meta=nil
- ao=SiSU_AO::Make.new(fn,@md,file_array).song
+ ao=SiSU_AO::Make.new(fn,@md,file_array,@fnx,@process).song
if (@opt.act[:verbose][:set]==:on \
|| @opt.act[:verbose_plus][:set]==:on \
|| @opt.act[:maintenance][:set]==:on)
@@ -350,7 +350,7 @@ module SiSU_AO
ao=[]
ao=(FileTest.file?(@fnc)) \
? (File.open(@fnc,'r:utf-8'){ |f| ao=Marshal.load(f)})
- : SiSU_AO::Source.new(@opt).create_ao
+ : SiSU_AO::Source.new(@opt,@fnx,@process).create_ao
end
def read_idx_sst
m=[]
@@ -522,8 +522,8 @@ module SiSU_AO
end
end
class Make
- def initialize(fn,md,data)
- @fn,@md,@data=fn,md,data
+ def initialize(fn,md,data,fnx,process)
+ @fn,@md,@data,@fnx,@process=fn,md,data,fnx,process
@env=SiSU_Env::InfoEnv.new(@md.fns)
end
def reset
@@ -540,11 +540,12 @@ module SiSU_AO
SiSU_AO_MiscArrangeText::SI.new(@md,data_txt). # ao_misc_arrange.rb
prepare_text
data_obj,
- metadata=
+ metadata,
+ bibliography=
SiSU_AO_DocumentStructureExtract::Build.new(@md,data_txt). # ao_doc_str.rb
identify_parts
data_obj=
- SiSU_AO_Syntax::Markup.new(@md,data_obj).songsheet # ao_syntax.rb
+ SiSU_AO_Syntax::Markup.new(@md,data_obj,bibliography).songsheet # ao_syntax.rb
data_obj,
endnote_array=
SiSU_AO_CharacterCheck::Check.new(data_obj). # ao_character_check.rb
@@ -554,12 +555,13 @@ module SiSU_AO
data_obj,
tags_map,
ocn_html_seg_map=
- SiSU_AO_Numbering::Numbering.new(@md,data_obj). # ao_numbering.rb
+ SiSU_AO_Numbering::Numbering.new(@md,data_obj,@fnx,@process). # ao_numbering.rb
numbering_song
data_obj,
book_index_rel,
book_index_rel_html_seg,
- html_idx,xhtml_idx=
+ html_idx,
+ xhtml_idx=
SiSU_AO_BookIndex::BookIndex.new(@md,data_obj,@env). # ao_idx.rb
indexing_song if @md.book_idx
data_obj=
diff --git a/lib/sisu/develop/ao_character_check.rb b/lib/sisu/develop/ao_character_check.rb
new file mode 100644
index 00000000..2596c739
--- /dev/null
+++ b/lib/sisu/develop/ao_character_check.rb
@@ -0,0 +1,102 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_character_check.rb;hb=HEAD>
+
+=end
+module SiSU_AO_CharacterCheck
+ class Check
+ def initialize(data)
+ @data=data
+ @comment='%'
+ @endnote_array=[]
+ end
+ def character_check_and_oldstyle_endnote_array
+ data=@data
+ @endnote_array=[]
+ endnote_no=1
+ @tuned_file=data.select do |dob|
+ unless dob.is ==:table
+ dob.obj=dob.obj.strip.
+ gsub(/^[{~}]\s*$/,'').
+ gsub(/~#\s*/,"#{Mx[:pa_non_object_no_heading]}").
+ gsub(/-#\s*/,"#{Mx[:pa_non_object_dummy_heading]}").
+ gsub(/(#{Mx[:en_a_o]})\s*\s+/,'\1 ').
+ gsub(/(~\{\s*)\s+/,'\1 ').
+ gsub(/ \/\//,"#{Mx[:br_line]}").
+ gsub(/<br>/,"#{Mx[:br_line]}"). #needed by xml, xhtml etc.
+ gsub(/\t/,' ').
+ gsub(/\342\200\231/u,"'"). #if dob =~/’/ #Avoid #&lsquo; &rsquo; #&ldquo; &rdquo;
+ gsub(/\\copy(?:right)?\b/,'&#169;').
+ gsub(/\\trademark\b|\\tm\b/,'&#174;')
+ dob.obj=dob.obj + "\n"
+ unless dob.is ==:code
+ case dob.obj
+ when /\^~/ #% Note must do this first (earlier loop) and then enter gathered data into ~^\d+
+ sub_dob=dob.obj.dup
+ @endnote_array << sub_dob.gsub(/\n/,'').
+ gsub(/\^~\s+(.+)\s*/,
+ %{#{Mx[:en_a_o]}#{endnote_no} \\1 #{Mx[:en_a_c]}}).
+ strip
+ endnote_no+=1
+ dob=nil if dob.obj =~/\^~ .+/ #watch, removes 'binary' endnote now in endnote array for later insertion
+ end
+ end
+ end
+ dob if dob.is_a?(Object)
+ end.flatten.compact
+ [@tuned_file,@endnote_array]
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/ao_composite.rb b/lib/sisu/develop/ao_composite.rb
index c570d05f..8a59f064 100644
--- a/lib/sisu/v5/ao_composite.rb
+++ b/lib/sisu/develop/ao_composite.rb
@@ -1,65 +1,63 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** composite documents, assemble/build documents from other documents
+ or parts of marked up text
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/ao_composite.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: composite documents, assemble/build documents from other
- documents or parts of marked up text
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_composite.rb;hb=HEAD>
=end
module SiSU_Assemble
require_relative 'se' # se.rb
+ require_relative 'utils_composite' # utils_composite.rb
class RemoteImage
def initialize
@env=SiSU_Env::InfoEnv.new
@@ -89,7 +87,7 @@ module SiSU_Assemble
end
end
class Composite
- @@imager={}
+ include SiSU_Composite_Doc_Utils # composite doc, .ssm, extract all related insert files, array of filenames test
def initialize(opt)
@opt=opt
@env=SiSU_Env::InfoEnv.new
@@ -104,14 +102,14 @@ module SiSU_Assemble
'Composite Document',
"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}",
).grey_title_hi unless @opt.act[:quiet][:set]==:on
+ composite_and_imported_filenames_array(@opt.fno) # composite doc, .ssm, extract all related insert files, array of filenames test
assembled=loadfile(@opt.fno)
- #assembled=insertions?(fns_array)
- write(assembled)
write(assembled)
end
Dir.chdir(pwd)
rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).
+ location do
__LINE__.to_s + ':' + __FILE__
end
ensure
@@ -129,7 +127,6 @@ module SiSU_Assemble
end
end
def loadfile(loadfilename)
- tuned_file=[]
begin
if FileTest.file?(loadfilename)
insert_array=IO.readlines(loadfilename,'')
@@ -143,18 +140,17 @@ module SiSU_Assemble
loadfilename,
).txt_grey
end
- if loadfilename =~/\S+?\.ss[im]$/
- insert_array.each do |para|
- tuned_file << insert?(para)
+ tuned_file=if loadfilename =~/\S+?\.ss[im]$/
+ insert_array.each.map do |para|
+ insert?(para)
end
elsif loadfilename =~/\S+?\.sst$/
- insert_array.each do |para|
- tuned_file << para
+ insert_array.each.map do |para|
+ para
end
- end
+ end.flatten.compact
end
end
- tuned_file=tuned_file.flatten.compact
rescue
SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
@@ -165,9 +161,6 @@ module SiSU_Assemble
def url(loadfilename)
if loadfilename =~ /((?:https?|file):\/\/\S+?\.ss[it])$/ # and NetTest
loadfilename=$1
- imagedir = /((?:https?|file):\/\/\S+?)\/[^\/]+?\.ss[it]$/.
- match(loadfilename).captures.join +
- '/_sisu/image' #watch
begin
require 'uri'
require 'open-uri'
@@ -176,13 +169,10 @@ module SiSU_Assemble
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
error('uri, open-uri or pp NOT FOUND (LoadError)')
end
- image_uri=URI.parse(imagedir)
insert=open(loadfilename)
insert_array=insert.dup
insert.close
file=insertion(loadfilename,insert_array)
- @@imager[image_uri] ||=[]
- @@imager[image_uri] << file[:images]
file[:prepared]
end
end
@@ -241,7 +231,6 @@ module SiSU_Assemble
end
end
class CompositeFileList
- @@imager={}
def initialize(opt)
@opt=opt
@env=SiSU_Env::InfoEnv.new
diff --git a/lib/sisu/v6/ao_doc_objects.rb b/lib/sisu/develop/ao_doc_objects.rb
index e361e0b2..5a59af7d 100644
--- a/lib/sisu/v6/ao_doc_objects.rb
+++ b/lib/sisu/develop/ao_doc_objects.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** document abstraction
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/ao_doc_objects.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: document abstraction
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_doc_objects.rb;hb=HEAD>
=end
module SiSU_AO_DocumentStructure
@@ -498,6 +495,18 @@ module SiSU_AO_DocumentStructure
of,is, obj, flag, act, selections,tmp
self
end
+ def flag_lng(h,o=nil)
+ of= @of #Symbol, classification - group
+ is= :flag_lng
+ obj= nil #String, text content
+ flag= h[:flag] || ((defined? o.flag) ? o.flag : nil) #Symbol, :lng_on or :lng_off
+ act= h[:act] || ((defined? o.act) ? o.act : nil) #Symbol, language set to :en etc.
+ selections= h[:selections] || ((defined? o.selections) ? o.selections : nil) #String, text content
+ tmp= h[:act] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ @of, @is,@obj,@flag,@act,@selections,@tmp=
+ of,is, obj, flag, act, selections,tmp
+ self
+ end
end
class ObjectLayout
attr_accessor :obj,:sym,:attr,:is,:is_for,:of,:from,:tmp,:num
diff --git a/lib/sisu/v5/ao_doc_str.rb b/lib/sisu/develop/ao_doc_str.rb
index 2ca21f9d..353469ec 100644
--- a/lib/sisu/v5/ao_doc_str.rb
+++ b/lib/sisu/develop/ao_doc_str.rb
@@ -1,102 +1,75 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** document abstraction
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/ao_doc_str.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: document abstraction
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_doc_str.rb;hb=HEAD>
=end
module SiSU_AO_DocumentStructureExtract
+ require_relative 'ao_persist' # ao_persist.rb
class Instantiate < SiSU_Param::Parameters::Instructions
- @@flag={
- ocn: :on,
- code: :off,
- lngsyn: :txt,
- poem: :off,
- block: :off,
- box: :off,
- group: :off,
- alt: :off,
- quote: :off,
- table: :off,
- table_to: :off,
- }
def initialize
@@counter=@@column=@@columns=0
@@line_mode=''
end
end
class Build
- @@flag={
- ocn: :on,
- code: :off,
- lngsyn: :txt,
- poem: :off,
- block: :off,
- box: :off,
- group: :off,
- alt: :off,
- quote: :off,
- table: :off,
- table_to: :off,
- }
def initialize(md,data)
@md,@data=md,data
SiSU_AO_DocumentStructureExtract::Instantiate.new
@pb=SiSU_AO_DocumentStructure::ObjectLayout.new.break(Hx[:br_page])
@pbn=SiSU_AO_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_new])
@pbl=SiSU_AO_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_line])
+ @per=SiSU_AO_Persist::PersistDocStructExt.new
end
def ln_get(lv)
case lv
@@ -123,7 +96,7 @@ module SiSU_AO_DocumentStructureExtract
: false
end
def quotes?
- @@flag[:quote]==:open \
+ @per.quote==:open \
? true
: false
end
@@ -258,42 +231,29 @@ module SiSU_AO_DocumentStructureExtract
array: idx_array,
}
end
- def identify_parts
- tuned_file=[]
- @tuned_block,@tuned_code=[],[]
- @@counter,@verse_count=0,0
- @num_id={
- code_block: 0,
- poem: 0,
- box: 0,
- group: 0,
- alt: 0,
- quote: 0,
- table: 0,
- }
- @metadata={}
- @data.each do |t_o|
+ def extract_structure_loop(data,tuned_file)
+ data.each do |t_o|
if t_o =~/^--([+~-])[#]$/
h=case $1
when /[+]/
- @@flag[:ocn]=:on
+ @per.ocn=:on
{
flag: :ocn_on,
}
when /[~]/
- @@flag[:ocn]=:ocn_off_headings_keep
+ @per.ocn=:ocn_off_headings_keep
{
flag: :ocn_off,
mod: :headings_keep,
}
when /[-]/ #of particular relevance with level 1~ which is required to precede substantive text & used e.g. in html segmented text
- @@flag[:ocn]=:ocn_off_headings_dummy_lev1
+ @per.ocn=:ocn_off_headings_dummy_lev1
{
flag: :ocn_off,
mod: :headings_exclude,
}
else
- @@flag[:ocn]=:on
+ @per.ocn=:on
{
flag: :ocn_on,
}
@@ -301,7 +261,30 @@ module SiSU_AO_DocumentStructureExtract
t_o=SiSU_AO_DocumentStructure::ObjectFlag.new.flag_ocn(h)
next
end
- t_o=t_o.gsub(/(?:\n\s*\n)+/m,"\n") if @@flag[:code]==:off
+ if t_o =~/^:[~](#{SiSU_is.language_list_regex?}|-)$/ # work with for identifying language of objects
+ lng=$1
+ h=case lng
+ when /(?:#{SiSU_is.language_list_regex?})/
+ @per.lng=:on
+ @per.lng_is=lng.to_sym
+ {
+ flag: :lng_on,
+ act: lng.to_sym,
+ }
+ else # ^:~-
+ if @per.lng==:on
+ @per.lng=:off
+ @per.lng_is=:doc_default
+ {
+ flag: :lng_off,
+ act: :doc_default,
+ }
+ end
+ end
+ t_o=SiSU_AO_DocumentStructure::ObjectFlag.new.flag_lng(h)
+ next
+ end
+ t_o=t_o.gsub(/(?:\n\s*\n)+/m,"\n") if @per.code==:off
unless t_o =~/^(?:@\S+?:|%+)\s/ # extract book index for paragraph if any
idx=if t_o=~/^=\{\s*(.+)\s*\}\s*$\Z/m
m=$1
@@ -316,13 +299,13 @@ module SiSU_AO_DocumentStructureExtract
end
if t_o !~/^(?:code(?:\.[a-z][0-9a-z_]+)?|box(?:\.[a-z_]+)?|poem|alt|group|block)\{|^\}(?:code|poem|alt|group|block)|^(?:table\{|\{table)[ ~]/ \
and t_o !~/^```[ ]+(?:code(?:\.[a-z][0-9a-z_]+)?|box(?:\.[a-z_]+)?|poem|alt|group|block|table)|^```(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$|^`:quote_(?:open|close)`/ \
- and @@flag[:code]==:off \
- and @@flag[:poem]==:off \
- and @@flag[:group]==:off \
- and @@flag[:block]==:off \
- and @@flag[:alt]==:off \
- and @@flag[:box]==:off \
- and @@flag[:table]==:off
+ and @per.code==:off \
+ and @per.poem==:off \
+ and @per.group==:off \
+ and @per.block==:off \
+ and @per.alt==:off \
+ and @per.box==:off \
+ and @per.table==:off
t_o=case t_o
when /^#{Mx[:meta_o]}\S+?#{Mx[:meta_c]}/ #metadata, header
if t_o=~/^#{Mx[:meta_o]}(\S+?)#{Mx[:meta_c]}\s*(.+)/m
@@ -343,14 +326,14 @@ module SiSU_AO_DocumentStructureExtract
obj=$1
note=endnote_test?(obj)
obj,tags=extract_tags(obj)
- if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
- or @@flag[:ocn]==:ocn_off_headings_keep
+ if @per.ocn==:ocn_off_headings_dummy_lev1 \
+ or @per.ocn==:ocn_off_headings_keep
unless obj =~ /[~-][#]\s*$/
- if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ if @per.ocn==:ocn_off_headings_dummy_lev1 \
and t_o =~/^1\~\S*\s+/m
obj << ' -#'
- elsif @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
- or @@flag[:ocn]==:ocn_off_headings_keep
+ elsif @per.ocn==:ocn_off_headings_dummy_lev1 \
+ or @per.ocn==:ocn_off_headings_keep
obj << ' ~#'
end
end
@@ -367,14 +350,14 @@ module SiSU_AO_DocumentStructureExtract
name,obj=$1,$2
note=endnote_test?(obj)
obj,tags=extract_tags(obj)
- if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
- or @@flag[:ocn]==:ocn_off_headings_keep
+ if @per.ocn==:ocn_off_headings_dummy_lev1 \
+ or @per.ocn==:ocn_off_headings_keep
unless obj =~ /[~-][#]\s*$/
- if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ if @per.ocn==:ocn_off_headings_dummy_lev1 \
and t_o =~/^1\~\S*\s+/m
obj << ' -#'
- elsif @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
- or @@flag[:ocn]==:ocn_off_headings_keep
+ elsif @per.ocn==:ocn_off_headings_dummy_lev1 \
+ or @per.ocn==:ocn_off_headings_keep
obj << ' ~#'
end
end
@@ -392,14 +375,14 @@ module SiSU_AO_DocumentStructureExtract
name,obj=$1,$2
note=endnote_test?(obj)
obj,tags=extract_tags(obj,name)
- if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
- or @@flag[:ocn]==:ocn_off_headings_keep
+ if @per.ocn==:ocn_off_headings_dummy_lev1 \
+ or @per.ocn==:ocn_off_headings_keep
unless obj =~ /[~-][#]\s*$/
- if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
+ if @per.ocn==:ocn_off_headings_dummy_lev1 \
and t_o =~/^1\~\S*\s+/m
obj << ' -#'
- elsif @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
- or @@flag[:ocn]==:ocn_off_headings_keep
+ elsif @per.ocn==:ocn_off_headings_dummy_lev1 \
+ or @per.ocn==:ocn_off_headings_keep
obj << ' ~#'
end
end
@@ -427,8 +410,8 @@ module SiSU_AO_DocumentStructureExtract
note=endnote_test?(obj)
obj,tags=extract_tags(obj)
unless obj=~/\A\s*\Z/m
- if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
- or @@flag[:ocn]==:ocn_off_headings_keep
+ if @per.ocn==:ocn_off_headings_dummy_lev1 \
+ or @per.ocn==:ocn_off_headings_keep
unless obj =~ /[~-][#]\s*$/
obj << ' ~#'
end
@@ -460,8 +443,8 @@ module SiSU_AO_DocumentStructureExtract
note=endnote_test?(obj)
obj,tags=extract_tags(obj)
unless obj=~/\A\s*\Z/m
- if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
- or @@flag[:ocn]==:ocn_off_headings_keep
+ if @per.ocn==:ocn_off_headings_dummy_lev1 \
+ or @per.ocn==:ocn_off_headings_keep
unless obj =~ /[~-][#]\s*$/
obj << ' ~#'
end
@@ -492,8 +475,8 @@ module SiSU_AO_DocumentStructureExtract
image=image_test(t_o)
note=endnote_test?(t_o)
obj,tags=extract_tags(t_o)
- if @@flag[:ocn]==:ocn_off_headings_dummy_lev1 \
- or @@flag[:ocn]==:ocn_off_headings_keep
+ if @per.ocn==:ocn_off_headings_dummy_lev1 \
+ or @per.ocn==:ocn_off_headings_keep
unless obj =~ /[~-][#]\s*$/
obj << ' ~#'
end
@@ -514,14 +497,14 @@ module SiSU_AO_DocumentStructureExtract
end
t_o=SiSU_AO_DocumentStructureExtract::Structure.new(@md).structure_markup(t_o) #must happen earlier, node info etc. require
end
- elsif @@flag[:code]==:off
+ elsif @per.code==:off
if t_o =~/^(?:code(?:\.[a-z][0-9a-z_]+)?\{|```[ ]+code(?:\.[a-z][0-9a-z_]+)?)/
- @@flag[:code]=case t_o
+ @per.code=case t_o
when /^code(?:\.[a-z][0-9a-z_]+)?\{/ then :curls
when /^```[ ]+code/ then :tics
- else @@flag[:code] #error
+ else @per.code #error
end
- @@flag[:lngsyn]=if t_o =~/^(?:code\.[a-z][0-9a-z_]+\{|```[ ]+code\.[a-z_]+)/
+ @per.lngsyn=if t_o =~/^(?:code\.[a-z][0-9a-z_]+\{|```[ ]+code\.[a-z_]+)/
case t_o
when /^code\.([a-z][0-9a-z_]+)\{/
:"#{$1}"
@@ -542,14 +525,14 @@ module SiSU_AO_DocumentStructureExtract
obj: '',
sym: :code_block_open,
num: @num_id[:code_block],
- syntax: @@flag[:lngsyn],
+ syntax: @per.lngsyn,
}
t_o=SiSU_AO_DocumentStructure::ObjectLayout.new.open_close(h)
elsif t_o =~/^(?:poem\{|```[ ]+poem)/
- @@flag[:poem]=case t_o
+ @per.poem=case t_o
when /^poem\{/ then :curls
when /^```[ ]+poem/ then :tics
- else @@flag[:poem] #error
+ else @per.poem #error
end
@num_id[:poem] +=1
h={
@@ -561,10 +544,10 @@ module SiSU_AO_DocumentStructureExtract
t_o=SiSU_AO_DocumentStructure::ObjectLayout.new.open_close(h)
tuned_file << t_o
elsif t_o =~/^(?:box(?:\.[a-z_]+)?\{|```[ ]+box(?:\.[a-z_]+)?)/
- @@flag[:box]=case t_o
+ @per.box=case t_o
when /^box\{/ then :curls
when /^```[ ]+box/ then :tics
- else @@flag[:box] #error
+ else @per.box #error
end
@num_id[:box] +=1
h={
@@ -576,10 +559,10 @@ module SiSU_AO_DocumentStructureExtract
t_o=SiSU_AO_DocumentStructure::ObjectLayout.new.open_close(h)
tuned_file << t_o
elsif t_o =~/^(?:group\{|```[ ]+group)/
- @@flag[:group]=case t_o
+ @per.group=case t_o
when /^group\{/ then :curls
when /^```[ ]+group/ then :tics
- else @@flag[:group] #error
+ else @per.group #error
end
@num_id[:group] +=1
h={
@@ -591,10 +574,10 @@ module SiSU_AO_DocumentStructureExtract
t_o=SiSU_AO_DocumentStructure::ObjectLayout.new.open_close(h)
tuned_file << t_o
elsif t_o =~/^(?:block\{|```[ ]+block)/
- @@flag[:block]=case t_o
+ @per.block=case t_o
when /^block\{/ then :curls
when /^```[ ]+block/ then :tics
- else @@flag[:block] #error
+ else @per.block #error
end
@num_id[:block] +=1
h={
@@ -606,10 +589,10 @@ module SiSU_AO_DocumentStructureExtract
t_o=SiSU_AO_DocumentStructure::ObjectLayout.new.open_close(h)
tuned_file << t_o
elsif t_o =~/^(?:alt\{|```[ ]+alt)/
- @@flag[:alt]=case t_o
+ @per.alt=case t_o
when /^alt\{/ then :curls
when /^```[ ]+alt/ then :tics
- else @@flag[:alt] #error
+ else @per.alt #error
end
@num_id[:alt] +=1
h={
@@ -621,7 +604,7 @@ module SiSU_AO_DocumentStructureExtract
t_o=SiSU_AO_DocumentStructure::ObjectLayout.new.open_close(h)
tuned_file << t_o
elsif t_o =~/^`:quote_open`/
- @@flag[:quote]=:open
+ @per.quote=:open
@num_id[:quote] +=1
h={
is_for: :quote,
@@ -642,7 +625,7 @@ module SiSU_AO_DocumentStructureExtract
ins_o=SiSU_AO_DocumentStructure::ObjectLayout.new.open_close(h)
tuned_file << ins_o
if t_o=~/^table\{(?:~h)?\s+/
- @@flag[:table]=:curls
+ @per.table=:curls
@rows=''
case t_o
when /table\{~h\s+c(\d+);\s+(.+)/
@@ -661,7 +644,7 @@ module SiSU_AO_DocumentStructureExtract
idx: idx,
}
elsif t_o=~/^```[ ]+table(?:~h)?\s+c\d+/
- @@flag[:table]=:tics
+ @per.table=:tics
@rows=''
case t_o
when /^```[ ]+table~h\s+c(\d+);\s+(.+)/
@@ -800,12 +783,12 @@ module SiSU_AO_DocumentStructureExtract
end
t_o
end
- if @@flag[:table]==:curls or @@flag[:table]==:tics
- if (@@flag[:table]==:curls \
+ if @per.table==:curls or @per.table==:tics
+ if (@per.table==:curls \
and t_o =~/^\}table/) \
- or (@@flag[:table]==:tics \
+ or (@per.table==:tics \
and t_o =~/^```(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$/)
- @@flag[:table]=:off
+ @per.table=:off
headings,columns,widths,idx=@h[:head_],@h[:cols],@h[:widths],@h[:idx]
@h={
head_: headings,
@@ -835,13 +818,13 @@ module SiSU_AO_DocumentStructureExtract
t_o=nil
end
end
- if @@flag[:code]==:curls \
- or @@flag[:code]==:tics
- if (@@flag[:code]==:curls \
+ if @per.code==:curls \
+ or @per.code==:tics
+ if (@per.code==:curls \
&& t_o =~/^\}code/) \
- or (@@flag[:code]==:tics \
+ or (@per.code==:tics \
&& t_o =~/^```(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$/m)
- @@flag[:code]=:off
+ @per.code=:off
if @tuned_code[-1]
@tuned_code[-1].
gsub!(/\s*(?:#{Mx[:br_line]}|#{Mx[:br_nl]})\s*\Z/m,'')
@@ -851,12 +834,12 @@ module SiSU_AO_DocumentStructureExtract
h={
obj: obj,
idx: idx,
- syntax: @@flag[:lngsyn],
+ syntax: @per.lngsyn,
tags: tags,
num: @num_id[:code_block],
number_: @codeblock_numbered,
}
- @@flag[:lngsyn]=:txt
+ @per.lngsyn=:txt
t_o=SiSU_AO_DocumentStructure::ObjectBlockTxt.new.code(h)
@tuned_code=[]
tuned_file << t_o
@@ -868,8 +851,8 @@ module SiSU_AO_DocumentStructureExtract
}
t_o=SiSU_AO_DocumentStructure::ObjectLayout.new.open_close(h)
end
- if (@@flag[:code]==:curls \
- || @@flag[:code]==:tics) \
+ if (@per.code==:curls \
+ || @per.code==:tics) \
and t_o.is_a?(String)
sub_array=t_o.dup + "#{Mx[:br_nl]}"
@line_mode=[]
@@ -878,23 +861,23 @@ module SiSU_AO_DocumentStructureExtract
@tuned_code << t_o
t_o=nil
end
- elsif (@@flag[:poem]==:curls \
- || @@flag[:poem]==:tics) \
- or (@@flag[:box]==:curls \
- || @@flag[:box]==:tics) \
- or (@@flag[:group]==:curls \
- || @@flag[:group]==:tics) \
- or (@@flag[:block]==:curls \
- || @@flag[:block]==:tics) \
- or (@@flag[:alt]==:curls \
- || @@flag[:alt]==:tics) \
- or (@@flag[:quote]==:open \
+ elsif (@per.poem==:curls \
+ || @per.poem==:tics) \
+ or (@per.box==:curls \
+ || @per.box==:tics) \
+ or (@per.group==:curls \
+ || @per.group==:tics) \
+ or (@per.block==:curls \
+ || @per.block==:tics) \
+ or (@per.alt==:curls \
+ || @per.alt==:tics) \
+ or (@per.quote==:open \
&& t_o =~/`:quote_close`/m) #not
- if (@@flag[:poem]==:curls \
+ if (@per.poem==:curls \
&& t_o =~/^\}poem$/m) \
- or (@@flag[:poem]==:tics \
+ or (@per.poem==:tics \
&& t_o =~/^```(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$/)
- @@flag[:poem]=:off
+ @per.poem=:off
h={
is_for: :poem,
obj: '',
@@ -903,11 +886,11 @@ module SiSU_AO_DocumentStructureExtract
num: @num_id[:poem],
}
t_o=SiSU_AO_DocumentStructure::ObjectLayout.new.open_close(h)
- elsif (@@flag[:box]==:curls \
+ elsif (@per.box==:curls \
&& t_o =~/^\}box/) \
- or (@@flag[:box]==:tics \
+ or (@per.box==:tics \
&& t_o =~/^```(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$/)
- @@flag[:box]=:off
+ @per.box=:off
obj,tags=extract_tags(@tuned_block.join("\n"))
h={
obj: obj,
@@ -926,11 +909,11 @@ module SiSU_AO_DocumentStructureExtract
num: @num_id[:box],
}
t_o=SiSU_AO_DocumentStructure::ObjectLayout.new.open_close(h)
- elsif (@@flag[:group]==:curls \
+ elsif (@per.group==:curls \
&& t_o =~/^\}group/) \
- or (@@flag[:group]==:tics \
+ or (@per.group==:tics \
&& t_o =~/^```(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$/)
- @@flag[:group]=:off
+ @per.group=:off
obj,tags=extract_tags(@tuned_block.join("\n"))
h={
obj: obj,
@@ -948,11 +931,11 @@ module SiSU_AO_DocumentStructureExtract
num: @num_id[:group],
}
t_o=SiSU_AO_DocumentStructure::ObjectLayout.new.open_close(h)
- elsif (@@flag[:block]==:curls \
+ elsif (@per.block==:curls \
&& t_o =~/^\}block/) \
- or (@@flag[:block]==:tics \
+ or (@per.block==:tics \
&& t_o =~/^```(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$/)
- @@flag[:block]=:off
+ @per.block=:off
obj,tags=extract_tags(@tuned_block.join("\n"))
h={
obj: obj,
@@ -970,11 +953,11 @@ module SiSU_AO_DocumentStructureExtract
num: @num_id[:block],
}
t_o=SiSU_AO_DocumentStructure::ObjectLayout.new.open_close(h)
- elsif (@@flag[:alt]==:curls \
+ elsif (@per.alt==:curls \
&& t_o =~/^\}alt/) \
- or (@@flag[:alt]==:tics \
+ or (@per.alt==:tics \
&& t_o =~/^```(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$/)
- @@flag[:alt]=:off
+ @per.alt=:off
obj,tags=extract_tags(@tuned_block.join("\n"))
h={
obj: obj,
@@ -992,9 +975,9 @@ module SiSU_AO_DocumentStructureExtract
num: @num_id[:alt],
}
t_o=SiSU_AO_DocumentStructure::ObjectLayout.new.open_close(h)
- elsif @@flag[:quote]==:open \
+ elsif @per.quote==:open \
and t_o =~/`:quote_close`/m
- @@flag[:quote]=:off
+ @per.quote=:off
h={
is_for: :quote,
idx: idx,
@@ -1003,7 +986,7 @@ module SiSU_AO_DocumentStructureExtract
num: @num_id[:quote],
}
t_o=SiSU_AO_DocumentStructure::ObjectLayout.new.open_close(h)
- elsif @@flag[:quote]==:open
+ elsif @per.quote==:open
t_o,tags=extract_tags(t_o)
h={
indent: 1,
@@ -1016,18 +999,18 @@ module SiSU_AO_DocumentStructureExtract
}
SiSU_AO_DocumentStructure::ObjectPara.new.paragraph(h)
end
- if (@@flag[:poem]==:curls \
- || @@flag[:poem]==:tics) \
- or (@@flag[:group]==:curls \
- || @@flag[:group]==:tics) \
- or (@@flag[:alt]==:curls \
- || @@flag[:alt]==:tics) \
+ if (@per.poem==:curls \
+ || @per.poem==:tics) \
+ or (@per.group==:curls \
+ || @per.group==:tics) \
+ or (@per.alt==:curls \
+ || @per.alt==:tics) \
and t_o =~/\S/ \
and t_o !~/^(?:\}(?:verse|code|box|alt|group|block)|(?:verse|code(?:\.[a-z][0-9a-z_]+)?|box(?:\.[a-z_]+)?|alt|group|block)\{)/ \
and t_o !~/^```[ ]+(?:code(?:\.[a-z][0-9a-z_]+)?|box(?:\.[a-z_]+)?|poem|alt|group|block)|^```(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$/ # fix logic
sub_array=t_o.dup
@line_mode=sub_array.scan(/.+/)
- type=if @@flag[:poem]==:curls or @@flag[:poem]==:tics
+ type=if @per.poem==:curls or @per.poem==:tics
t_o=SiSU_AO_DocumentStructureExtract::Build.new(@md,@line_mode).build_lines(type).join
poem=t_o.split(/\n\n/)
poem.each do |v|
@@ -1045,14 +1028,14 @@ module SiSU_AO_DocumentStructureExtract
else :group
end
end
- @verse_count+=1 if @@flag[:poem]==:curls or @@flag[:poem]==:tics
+ @verse_count+=1 if @per.poem==:curls or @per.poem==:tics
end
- if @@flag[:code]==:off
- if @@flag[:poem]==:curls or @@flag[:poem]==:tics \
- or @@flag[:box]==:curls or @@flag[:box]==:tics \
- or @@flag[:group]==:curls or @@flag[:group]==:tics \
- or @@flag[:alt]==:curls or @@flag[:alt]==:tics \
- or (@@flag[:quote]==:open and t_o =~/`:quote_close`/m)
+ if @per.code==:off
+ if @per.poem==:curls or @per.poem==:tics \
+ or @per.box==:curls or @per.box==:tics \
+ or @per.group==:curls or @per.group==:tics \
+ or @per.alt==:curls or @per.alt==:tics \
+ or (@per.quote==:open and t_o =~/`:quote_close`/m)
if t_o.is_a?(String)
t_o=t_o.gsub(/\n/m,"#{Mx[:br_nl]}").
gsub(/[ ][ ]/m,"#{Mx[:nbsp]*2}").
@@ -1073,6 +1056,24 @@ module SiSU_AO_DocumentStructureExtract
else tuned_file << t_o
end
end
+ tuned_file
+ end
+ def identify_parts
+ tuned_file=[]
+ @tuned_block,@tuned_code=[],[]
+ @@counter,@verse_count=0,0
+ @num_id={
+ code_block: 0,
+ poem: 0,
+ box: 0,
+ group: 0,
+ alt: 0,
+ quote: 0,
+ table: 0,
+ }
+ @metadata={}
+ @data,bibliography=SiSU_AO_References::Bibliography.new(@md,@data).biblio_extraction
+ tuned_file=extract_structure_loop(@data,tuned_file)
if @md.flag_endnotes
tuned_file << @pb
h={
@@ -1092,7 +1093,98 @@ module SiSU_AO_DocumentStructureExtract
tuned_file << SiSU_AO_DocumentStructure::ObjectHeading.new.heading_insert(h)
h={
obj: 'Endnotes'
- }
+ }
+ end
+ if @md.flag_auto_biblio
+ tuned_file << @pb
+ h={
+ ln: 1,
+ lc: 1,
+ obj: 'References',
+ autonum_: false,
+ }
+ tuned_file << SiSU_AO_DocumentStructure::ObjectHeading.new.heading_insert(h)
+ h={
+ ln: 4,
+ lc: 2,
+ obj: 'Bibliography',
+ name: 'biblio',
+ autonum_: false,
+ }
+ tuned_file << SiSU_AO_DocumentStructure::ObjectHeading.new.heading_insert(h)
+ h={
+ obj: 'Bibliography'
+ }
+ citenumber=0
+ bibliography.each do |c|
+ citenumber +=1 if c.is_a?(Hash)
+ if c[:is]==:book
+ h={
+ obj: %{[#{citenumber}] *{#{c[:author]}}* /{"#{c[:fulltitle]}"}/ #{c[:publisher]} (#{c[:year]}) #{c[:url]}},
+ tags: [c[:id]],
+ hang: 0,
+ indent: 2,
+ ocn_: false,
+ }
+ tuned_file << SiSU_AO_DocumentStructure::ObjectPara.new.paragraph(h)
+ elsif c[:is]==:article
+ h={
+ obj: %{[#{citenumber}] *{#{c[:author]}}* /{"#{c[:title]}"}/ #{c[:journal]} #{c[:volume]} (#{c[:year]}) #{c[:url]}},
+ tags: [c[:id]],
+ hang: 0,
+ indent: 2,
+ ocn_: false,
+ }
+ tuned_file << SiSU_AO_DocumentStructure::ObjectPara.new.paragraph(h)
+ end
+ end
+ elsif @md.flag_biblio
+ tuned_file << @pb
+ h={
+ ln: 1,
+ lc: 1,
+ obj: 'References',
+ autonum_: false,
+ }
+ tuned_file << SiSU_AO_DocumentStructure::ObjectHeading.new.heading_insert(h)
+ h={
+ ln: 4,
+ lc: 2,
+ obj: 'Bibliography',
+ name: 'biblio',
+ autonum_: false,
+ }
+ tuned_file << SiSU_AO_DocumentStructure::ObjectHeading.new.heading_insert(h)
+ h={
+ obj: 'Bibliography'
+ }
+ if bibliography.length > 0
+ tuned_file=extract_structure_loop(bibliography,tuned_file)
+ else
+ tuned_file, citations =
+ SiSU_AO_References::Citations.new(@md,tuned_file).songsheet # ao_references.rb
+ citenumber=0
+ citations.compact.each do |c|
+ citenumber +=1 if c.is_a?(Hash)
+ if c[:is]==:book
+ h={
+ obj: %{[#{citenumber}] *{#{c[:author]}}* /{#{c[:publication]}}/ (#{c[:year]})},
+ hang: 0,
+ indent: 2,
+ ocn_: false,
+ }
+ tuned_file << SiSU_AO_DocumentStructure::ObjectPara.new.paragraph(h)
+ elsif c[:is]==:article
+ h={
+ obj: %{[#{citenumber}] *{#{c[:author]}}* /{"#{c[:title]}"}/ #{c[:publication]} editor #{c[:editor]} (#{c[:year]})},
+ hang: 0,
+ indent: 2,
+ ocn_: false,
+ }
+ tuned_file << SiSU_AO_DocumentStructure::ObjectPara.new.paragraph(h)
+ end
+ end
+ end
end
if @md.book_idx
tuned_file << @pb
@@ -1137,7 +1229,7 @@ module SiSU_AO_DocumentStructureExtract
obj: 'eof',
}
meta=SiSU_AO_DocumentStructure::ObjectMetadata.new.metadata(@metadata)
- [tuned_file,meta]
+ [tuned_file,meta,bibliography]
end
def table_rows_and_columns_array(table_str)
table=[]
@@ -1165,13 +1257,13 @@ module SiSU_AO_DocumentStructureExtract
SiSU_AO_DocumentStructure::ObjectPara.new.paragraph(h)
end
def build_lines(type=:none)
- lines,lines_new=@data,[]
- lines.each do |line|
+ lines=@data
+ lines.each.map do |line|
line=if line =~/\S/ \
and line !~/^(?:code(?:\.[a-z][0-9a-z_]+)?\{|\}code)/ \
and line !~/^(?:```[ ]+code(?:\.[a-z][0-9a-z_]+)?|```(?:\s+[~-][#]|\s+\~\{.+?\}\~)?\s*$)/ \
and not line.is_a?(Hash) #watch
- @@counter+=1 if @@flag[:code]==:curls or @@flag[:code]==:tics
+ @@counter+=1 if @per.code==:curls or @per.code==:tics
line=line.gsub(/\s\s/,"#{Mx[:nbsp]*2}").
gsub(/#{Mx[:nbsp]}\s/,"#{Mx[:nbsp]*2}")
line=line.gsub(/^/,"#{Mx[:gr_o]}codeline#{Mx[:gr_c]}") if type==:code # REMOVE try sort for texpdf special case
@@ -1183,9 +1275,8 @@ module SiSU_AO_DocumentStructureExtract
line.gsub(/\s*$/,"#{Mx[:br_nl]}")
else line
end
- lines_new << line
+ line
end
- lines_new
end
end
class Structure # this must happen early
@@ -1260,8 +1351,8 @@ module SiSU_AO_DocumentStructureExtract
end
end
class OCN
- def initialize(md,data)
- @md,@data=md,data
+ def initialize(md,data,fnx,process)
+ @md,@data,@fnx,@process=md,data,fnx,process
end
def structure_info
def lv
@@ -1321,31 +1412,33 @@ has incorrect level and/or parent level
--}
end
def required_headers_present?
- unless (defined? @md.title \
- and @md.title.full)
- STDERR.puts %{required header missing:
+ if @process == :complete
+ unless (defined? @md.title \
+ and @md.title.full)
+ STDERR.puts %{required header missing:
@title:
SKIPPED processing file:
[#{@md.opt.lng}] "#{@md.fns}"
}
- if @md.opt.act[:no_stop][:set]==:on
- $process_document = :skip
- else exit
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ else exit
+ end
end
- end
- unless (defined? @md.creator.author \
- and @md.creator.author)
- STDERR.puts %{required header missing:
+ unless (defined? @md.creator.author \
+ and @md.creator.author)
+ STDERR.puts %{required header missing:
@creator:
:author: anonymous?
SKIPPED processing file:
[#{@md.opt.lng}] "#{@md.fns}"
}
- if @md.opt.act[:no_stop][:set]==:on
- $process_document = :skip
- else exit
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ else exit
+ end
end
end
end
@@ -1384,337 +1477,341 @@ SKIPPED processing file:
if not dob.obj =~/~#|-#/
ocn+=1
end
- if dob.is==:heading \
- and (ln.to_s =~/^[0-9]/ \
- or ln.to_s =~@md.lv0 \
- or ln.to_s =~@md.lv1 \
- or ln.to_s =~@md.lv2 \
- or ln.to_s =~@md.lv3 \
- or ln.to_s =~@md.lv4 \
- or ln.to_s =~@md.lv5 \
- or ln.to_s =~@md.lv6 \
- or ln.to_s =~@md.lv7)
- if not dob.obj =~/~#|-#/
- ocnh+=1
- end
- if ln==0 \
- or ln=~@md.lv0
- @lev_occurences[:a] += 1
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh0+=1 #heading
- node0="0:#{ocnh0};#{ocn}"
- else
- #document_structure_check_info(node0,node0,:error) #fix
- ocn_flag=false
- node0="0:0;0"
- end
- document_structure_check_info(node0,node0)
- @collapsed_lv0=0
- collapsed_level=@collapsed_lv0
- node,ocn_sp,parent=node0,"h#{ocnh}",'ROOT'
- elsif ln==1 \
- or ln=~@md.lv1
- @lev_occurences[:b] += 1
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh1+=1 #heading
- node1="1:#{ocnh1};#{ocn}"
- else
- #document_structure_check_info(node0,node0,:error) #fix
- ocn_flag=false
- node1="1:0;0"
- end
- parent=if node0
- document_structure_check_info(node1,node0)
- @collapsed_lv1=@collapsed_lv0+1
- node0
- else
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node0,node0,:error)
- node0
- end
- collapsed_level=@collapsed_lv1
- node,ocn_sp,parent=node1,"h#{ocnh}",node0 #FIX
- elsif ln==2 \
- or ln=~@md.lv2
- @lev_occurences[:c] += 1
+ if @process == :complete \
+ or (@fnx == @md.opt.fns \
+ && @md.opt.fns =~/.sst$/)
+ if dob.is==:heading \
+ and (ln.to_s =~/^[0-9]/ \
+ or ln.to_s =~@md.lv0 \
+ or ln.to_s =~@md.lv1 \
+ or ln.to_s =~@md.lv2 \
+ or ln.to_s =~@md.lv3 \
+ or ln.to_s =~@md.lv4 \
+ or ln.to_s =~@md.lv5 \
+ or ln.to_s =~@md.lv6 \
+ or ln.to_s =~@md.lv7)
if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh2+=1
- node2="2:#{ocnh2};#{ocn}"
- else
- #document_structure_check_info(node0,node0,:error) #fix
- ocn_flag=false
- node2="2:0;0"
- end
- parent=if node1
- document_structure_check_info(node2,node1)
- @collapsed_lv2=@collapsed_lv1+1
- node1
- else
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node2,node0,:error)
- node0
+ ocnh+=1
end
- collapsed_level=@collapsed_lv2
- node,ocn_sp=node2,"h#{ocnh}"
- elsif ln==3 \
- or ln=~@md.lv3
- @lev_occurences[:d] += 1
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh3+=1
- node3="3:#{ocnh3};#{ocn}"
- else
- #document_structure_check_info(node0,node0,:error) #fix
- ocn_flag=false
- node3="3:0;0"
- end
- parent=if node2
- document_structure_check_info(node3,node2)
- @collapsed_lv3=@collapsed_lv2+1
- node2
- elsif node1
- warning_incorrect_parent_level_or_level(dob.obj)
- puts %{parent is :A~ & this level #{dob.lv}
+ if ln==0 \
+ or ln=~@md.lv0
+ @lev_occurences[:a] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh0+=1 #heading
+ node0="0:#{ocnh0};#{ocn}"
+ else
+ #document_structure_check_info(node0,node0,:error) #fix
+ ocn_flag=false
+ node0="0:0;0"
+ end
+ document_structure_check_info(node0,node0)
+ @collapsed_lv0=0
+ collapsed_level=@collapsed_lv0
+ node,ocn_sp,parent=node0,"h#{ocnh}",'ROOT'
+ elsif ln==1 \
+ or ln=~@md.lv1
+ @lev_occurences[:b] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh1+=1 #heading
+ node1="1:#{ocnh1};#{ocn}"
+ else
+ #document_structure_check_info(node0,node0,:error) #fix
+ ocn_flag=false
+ node1="1:0;0"
+ end
+ parent=if node0
+ document_structure_check_info(node1,node0)
+ @collapsed_lv1=@collapsed_lv0+1
+ node0
+ else
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node0,node0,:error)
+ node0
+ end
+ collapsed_level=@collapsed_lv1
+ node,ocn_sp,parent=node1,"h#{ocnh}",node0 #FIX
+ elsif ln==2 \
+ or ln=~@md.lv2
+ @lev_occurences[:c] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh2+=1
+ node2="2:#{ocnh2};#{ocn}"
+ else
+ #document_structure_check_info(node0,node0,:error) #fix
+ ocn_flag=false
+ node2="2:0;0"
+ end
+ parent=if node1
+ document_structure_check_info(node2,node1)
+ @collapsed_lv2=@collapsed_lv1+1
+ node1
+ else
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node2,node0,:error)
+ node0
+ end
+ collapsed_level=@collapsed_lv2
+ node,ocn_sp=node2,"h#{ocnh}"
+ elsif ln==3 \
+ or ln=~@md.lv3
+ @lev_occurences[:d] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh3+=1
+ node3="3:#{ocnh3};#{ocn}"
+ else
+ #document_structure_check_info(node0,node0,:error) #fix
+ ocn_flag=false
+ node3="3:0;0"
+ end
+ parent=if node2
+ document_structure_check_info(node3,node2)
+ @collapsed_lv3=@collapsed_lv2+1
+ node2
+ elsif node1
+ warning_incorrect_parent_level_or_level(dob.obj)
+ puts %{parent is :A~ & this level #{dob.lv}
either parent should be level :B~
or this level should be level :B~ rather than #{dob.lv}}
- document_structure_check_info(node3,node1,:error)
- @collapsed_lv3=@collapsed_lv1+1
- node1
- else
- document_structure_check_info(node3,node0,:error)
- warning_incorrect_parent_level_or_level(dob.obj)
- node0
- end
- collapsed_level=@collapsed_lv3
- node,ocn_sp=node3,"h#{ocnh}"
- elsif ln==4 \
- or ln=~@md.lv4
- @lev_occurences[:l1] += 1
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh4+=1
- node4="4:#{ocnh4};#{ocn}"
- else
- ocn_flag=false
- node4="4:0;0"
- end
- parent=if node3
- document_structure_check_info(node4,node3)
- @collapsed_lv4=@collapsed_lv3+1
- node3
- elsif node2
- document_structure_check_info(node4,node2)
- @collapsed_lv4=@collapsed_lv2+1
- node2
- elsif node1
- document_structure_check_info(node4,node1)
- @collapsed_lv4=@collapsed_lv1+1
- node1
- elsif node0
- document_structure_check_info(node4,node0)
- @collapsed_lv4=@collapsed_lv0+1
- node0
- else
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node4,node0,:error)
- node0
- end
- collapsed_level=@collapsed_lv4
- node,ocn_sp=node4,"h#{ocnh}"
- elsif ln==5 \
- or ln=~@md.lv5
- @lev_occurences[:l2] += 1
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh5+=1
- node5="5:#{ocnh5};#{ocn}"
- else
- ocn_flag=false
- node5="5:0;0"
- end
- parent=if node4
- document_structure_check_info(node5,node4)
- @collapsed_lv5=@collapsed_lv4+1
- node4
- elsif node3
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node5,node3,:error)
- @collapsed_lv5=@collapsed_lv3+1
- node3
- elsif node2
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node5,node2,:error)
- @collapsed_lv5=@collapsed_lv2+1
- node2
- elsif node1
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node5,node1,:error)
- @collapsed_lv5=@collapsed_lv1+1
- node1
- else
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node5,node0,:error)
- node0
- end
- collapsed_level=@collapsed_lv5
- node,ocn_sp=node5,"h#{ocnh}"
- elsif ln==6 \
- or ln=~@md.lv6
- @lev_occurences[:l3] += 1
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh6+=1
- node6="6:#{ocnh6};#{ocn}"
- else
- ocn_flag=false
- node6="6:0;0"
- end
- parent=if node5
- document_structure_check_info(node6,node5)
- @collapsed_lv6=@collapsed_lv5+1
- node5
- elsif node4
- warning_incorrect_parent_level_or_level(dob.obj)
- puts "parent is level #4 (1~) & this level ##{dob.ln} (#{dob.lv}~)
+ document_structure_check_info(node3,node1,:error)
+ @collapsed_lv3=@collapsed_lv1+1
+ node1
+ else
+ document_structure_check_info(node3,node0,:error)
+ warning_incorrect_parent_level_or_level(dob.obj)
+ node0
+ end
+ collapsed_level=@collapsed_lv3
+ node,ocn_sp=node3,"h#{ocnh}"
+ elsif ln==4 \
+ or ln=~@md.lv4
+ @lev_occurences[:l1] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh4+=1
+ node4="4:#{ocnh4};#{ocn}"
+ else
+ ocn_flag=false
+ node4="4:0;0"
+ end
+ parent=if node3
+ document_structure_check_info(node4,node3)
+ @collapsed_lv4=@collapsed_lv3+1
+ node3
+ elsif node2
+ document_structure_check_info(node4,node2)
+ @collapsed_lv4=@collapsed_lv2+1
+ node2
+ elsif node1
+ document_structure_check_info(node4,node1)
+ @collapsed_lv4=@collapsed_lv1+1
+ node1
+ elsif node0
+ document_structure_check_info(node4,node0)
+ @collapsed_lv4=@collapsed_lv0+1
+ node0
+ else
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node4,node0,:error)
+ node0
+ end
+ collapsed_level=@collapsed_lv4
+ node,ocn_sp=node4,"h#{ocnh}"
+ elsif ln==5 \
+ or ln=~@md.lv5
+ @lev_occurences[:l2] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh5+=1
+ node5="5:#{ocnh5};#{ocn}"
+ else
+ ocn_flag=false
+ node5="5:0;0"
+ end
+ parent=if node4
+ document_structure_check_info(node5,node4)
+ @collapsed_lv5=@collapsed_lv4+1
+ node4
+ elsif node3
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node5,node3,:error)
+ @collapsed_lv5=@collapsed_lv3+1
+ node3
+ elsif node2
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node5,node2,:error)
+ @collapsed_lv5=@collapsed_lv2+1
+ node2
+ elsif node1
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node5,node1,:error)
+ @collapsed_lv5=@collapsed_lv1+1
+ node1
+ else
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node5,node0,:error)
+ node0
+ end
+ collapsed_level=@collapsed_lv5
+ node,ocn_sp=node5,"h#{ocnh}"
+ elsif ln==6 \
+ or ln=~@md.lv6
+ @lev_occurences[:l3] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh6+=1
+ node6="6:#{ocnh6};#{ocn}"
+ else
+ ocn_flag=false
+ node6="6:0;0"
+ end
+ parent=if node5
+ document_structure_check_info(node6,node5)
+ @collapsed_lv6=@collapsed_lv5+1
+ node5
+ elsif node4
+ warning_incorrect_parent_level_or_level(dob.obj)
+ puts "parent is level #4 (1~) & this level ##{dob.ln} (#{dob.lv}~)
either parent should be level #5 (2~)
or this level should be #5 (2~) rather ##{dob.ln} (#{dob.lv}~)"
- document_structure_check_info(node6,node4,:error)
- @collapsed_lv6=@collapsed_lv4+1
- node4
- elsif node3
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node6,node3,:error)
- @collapsed_lv6=@collapsed_lv3+1
- node3
- elsif node2
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node6,node2,:error)
- @collapsed_lv6=@collapsed_lv2+1
- node2
- elsif node1
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node6,node1,:error)
- @collapsed_lv6=@collapsed_lv1+1
- node1
- else
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node6,node0,:error)
- node0
- end
- collapsed_level=@collapsed_lv6
- node,ocn_sp=node6,"h#{ocnh}"
- elsif ln==7 \
- or ln=~@md.lv7
- @lev_occurences[:l4] += 1
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- ocnh7+=1
- node7="7:#{ocnh7};#{ocn}"
- else
- ocn_flag=false
- node7="7:0;0"
- end
- parent=if node6
- document_structure_check_info(node7,node6)
- @collapsed_lv7=@collapsed_lv6+1
- node5
- elsif node5
- warning_incorrect_parent_level_or_level(dob.obj)
- puts "parent is level #5 (2~) & this level ##{dob.ln} (#{dob.lv}~)
+ document_structure_check_info(node6,node4,:error)
+ @collapsed_lv6=@collapsed_lv4+1
+ node4
+ elsif node3
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node6,node3,:error)
+ @collapsed_lv6=@collapsed_lv3+1
+ node3
+ elsif node2
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node6,node2,:error)
+ @collapsed_lv6=@collapsed_lv2+1
+ node2
+ elsif node1
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node6,node1,:error)
+ @collapsed_lv6=@collapsed_lv1+1
+ node1
+ else
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node6,node0,:error)
+ node0
+ end
+ collapsed_level=@collapsed_lv6
+ node,ocn_sp=node6,"h#{ocnh}"
+ elsif ln==7 \
+ or ln=~@md.lv7
+ @lev_occurences[:l4] += 1
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ ocnh7+=1
+ node7="7:#{ocnh7};#{ocn}"
+ else
+ ocn_flag=false
+ node7="7:0;0"
+ end
+ parent=if node6
+ document_structure_check_info(node7,node6)
+ @collapsed_lv7=@collapsed_lv6+1
+ node5
+ elsif node5
+ warning_incorrect_parent_level_or_level(dob.obj)
+ puts "parent is level #5 (2~) & this level ##{dob.ln} (#{dob.lv}~)
either parent should be level #6 (3~)
or this level should be #6 (3~) rather ##{dob.ln} (#{dob.lv}~)"
- document_structure_check_info(node7,node5,:error)
- @collapsed_lv6=@collapsed_lv5+1
- node5
- elsif node4
- warning_incorrect_parent_level_or_level(dob.obj)
- puts "parent is level #4 (1~) & this level ##{dob.ln} (#{dob.lv}~)
+ document_structure_check_info(node7,node5,:error)
+ @collapsed_lv6=@collapsed_lv5+1
+ node5
+ elsif node4
+ warning_incorrect_parent_level_or_level(dob.obj)
+ puts "parent is level #4 (1~) & this level ##{dob.ln} (#{dob.lv}~)
either parent should be level 6~
or this level should be #6 (3~) rather ##{dob.ln} (#{dob.lv}~)"
- document_structure_check_info(node7,node4,:error)
- @collapsed_lv6=@collapsed_lv4+1
- node4
- elsif node3
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node7,node3,:error)
- @collapsed_lv6=@collapsed_lv3+1
- node3
- elsif node2
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node7,node2,:error)
- @collapsed_lv6=@collapsed_lv2+1
- node2
- elsif node1
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node7,node1,:error)
- @collapsed_lv6=@collapsed_lv1+1
- node1
- else
- warning_incorrect_parent_level_or_level(dob.obj)
- document_structure_check_info(node7,node0,:error)
- node0
+ document_structure_check_info(node7,node4,:error)
+ @collapsed_lv6=@collapsed_lv4+1
+ node4
+ elsif node3
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node7,node3,:error)
+ @collapsed_lv6=@collapsed_lv3+1
+ node3
+ elsif node2
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node7,node2,:error)
+ @collapsed_lv6=@collapsed_lv2+1
+ node2
+ elsif node1
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node7,node1,:error)
+ @collapsed_lv6=@collapsed_lv1+1
+ node1
+ else
+ warning_incorrect_parent_level_or_level(dob.obj)
+ document_structure_check_info(node7,node0,:error)
+ node0
+ end
+ collapsed_level=@collapsed_lv7
+ node,ocn_sp=node7,"h#{ocnh}"
end
- collapsed_level=@collapsed_lv7
- node,ocn_sp=node7,"h#{ocnh}"
- end
- else
- unless @lev_occurences[:l1] > 0
- STDERR.puts %{Substantive text objects must follow a level 1~ heading and there are none at this point in processing: #{@lev_occurences[:l1]}
+ else
+ unless @lev_occurences[:l1] > 0
+ STDERR.puts %{Substantive text objects must follow a level 1~ heading and there are none at this point in processing: #{@lev_occurences[:l1]}
SKIPPED processing file:
[#{@md.opt.lng}] "#{@md.fns}"}
- puts dob.obj #.gsub(/^(.{1,80})/,'"\1"')
- exit
- end
- unless @ln >= 4
- lev=case @ln
- when 0 then 'A'
- when 1 then 'B'
- when 2 then 'C'
- when 3 then 'D'
- when 4 then '1'
- when 5 then '2'
- when 6 then '3'
- when 7 then '4'
- when 8 then '5'
- when 9 then '6'
+ puts dob.obj #.gsub(/^(.{1,80})/,'"\1"')
+ exit
end
- STDERR.puts %{Substantive text objects must follow a level 1~ 2~ or 3~ heading: #{lev}~
+ unless @ln >= 4
+ lev=case @ln
+ when 0 then 'A'
+ when 1 then 'B'
+ when 2 then 'C'
+ when 3 then 'D'
+ when 4 then '1'
+ when 5 then '2'
+ when 6 then '3'
+ when 7 then '4'
+ when 8 then '5'
+ when 9 then '6'
+ end
+ STDERR.puts %{Substantive text objects must follow a level 1~ 2~ or 3~ heading: #{lev}~
SKIPPED processing file:
[#{@md.opt.lng}] "#{@md.fns}"}
- puts dob.obj.gsub(/^(.{1,80})/,'"\1"')
- if @md.opt.act[:no_stop][:set]==:on
- $process_document = :skip
- break
- else exit
+ puts dob.obj.gsub(/^(.{1,80})/,'"\1"')
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ break
+ else exit
+ end
+ end
+ if not dob.obj =~/~#|-#/
+ ocn_flag=true
+ else
+ ocn_flag=false
+ end
+ ocno+=1
+ if dob.is==:table
+ ocnt+=1
+ ocn_sp,parent="t#{ocnt}",node
+ elsif dob.is==:code
+ ocnc+=1
+ ocn_sp,parent="c#{ocnc}",node
+ elsif dob.is==:group \
+ || dob.is==:box \
+ || dob.is==:block \
+ || dob.is==:alt \
+ || dob.is==:verse
+ ocng+=1 #group, poem
+ ocn_sp,parent="g#{ocng}",node
+ elsif dob.is==:image #check
+ ocni+=1
+ ocn_sp,parent="i#{ocni}",node
+ else ocnp+=1 #paragraph
+ ocn_sp,parent="p#{ocnp}",node
end
- end
- if not dob.obj =~/~#|-#/
- ocn_flag=true
- else
- ocn_flag=false
- end
- ocno+=1
- if dob.is==:table
- ocnt+=1
- ocn_sp,parent="t#{ocnt}",node
- elsif dob.is==:code
- ocnc+=1
- ocn_sp,parent="c#{ocnc}",node
- elsif dob.is==:group \
- || dob.is==:box \
- || dob.is==:block \
- || dob.is==:alt \
- || dob.is==:verse
- ocng+=1 #group, poem
- ocn_sp,parent="g#{ocng}",node
- elsif dob.is==:image #check
- ocni+=1
- ocn_sp,parent="i#{ocni}",node
- else ocnp+=1 #paragraph
- ocn_sp,parent="p#{ocnp}",node
end
end
if dob.is==:heading
@@ -1763,24 +1860,28 @@ SKIPPED processing file:
end
@o_array << dob
end
- unless @lev_occurences[:a] == 1
- STDERR.puts %{The number of level A~ in this document: #{@lev_occurences[:a]}
+ if @process == :complete \
+ or (@fnx == @md.opt.fns \
+ && @md.opt.fns =~/.sst$/)
+ unless @lev_occurences[:a] == 1
+ STDERR.puts %{The number of level A~ in this document: #{@lev_occurences[:a]}
There must be one level A~ (no more and no less)
SKIPPED processing file:
[#{@md.opt.lng}] "#{@md.fns}"}
- if @md.opt.act[:no_stop][:set]==:on
- $process_document = :skip
- else exit
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ else exit
+ end
end
- end
- unless @lev_occurences[:l1] > 0
- STDERR.puts %{The number of level 1~ in this document: #{@lev_occurences[:l1]}
+ unless @lev_occurences[:l1] > 0
+ STDERR.puts %{The number of level 1~ in this document: #{@lev_occurences[:l1]}
There must be at least one level 1~ (and as many as required)
SKIPPED processing file:
[#{@md.opt.lng}] "#{@md.fns}"}
- if @md.opt.act[:no_stop][:set]==:on
- $process_document = :skip
- else exit
+ if @md.opt.act[:no_stop][:set]==:on
+ $process_document = :skip
+ else exit
+ end
end
end
@o_array
diff --git a/lib/sisu/v6/ao_endnotes.rb b/lib/sisu/develop/ao_endnotes.rb
index 3b731e30..c5233452 100644
--- a/lib/sisu/v6/ao_endnotes.rb
+++ b/lib/sisu/develop/ao_endnotes.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/ao_doc_endnotes.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_doc_endnotes.rb;hb=HEAD>
=end
module SiSU_AO_Endnotes
@@ -69,9 +66,8 @@ module SiSU_AO_Endnotes
end
def endnotes
data=@data
- @tuned_file=[]
endnote_ref=1
- data.each do |dob|
+ @tuned_file=data.each.map do |dob|
# manually numbered endnotes <!e(\d)!> <!e_(\d)!> -->
if @md.opt.selections.str =~/--no-asterisk|--no-annotate/
dob.obj=dob.obj.
@@ -92,20 +88,20 @@ module SiSU_AO_Endnotes
word_mode=endnote_call_number(word_mode)
dob.obj=word_mode.join(' ')
endnote_ref+=1
- when /~\^(?:\s|$)|<:e>/ #%note inserts endnotes previously gathered from /^(<!e[:_]!>|[-~]\{{3})/ (in earlier loop)
+ when /~\^(?:\s|$)/ #%note inserts endnotes previously gathered from /^(<!e[:_]!>|[-~]\{{3})/ (in earlier loop)
word_mode=dob.obj.scan(/\S+/m)
word_mode=endnote_call_number(word_mode)
dob.obj=word_mode.join(' ')
endnote_ref+=1
end
end
- @tuned_file << dob
- end
+ dob
+ end.flatten
@endnote_counter,
@endnote_counter_asterisk,
@endnote_counter_dag=
1,1,1
- @tuned_file=@tuned_file.flatten
+ @tuned_file
end
def endnote_call_number(words)
words.each do |word|
@@ -126,9 +122,9 @@ module SiSU_AO_Endnotes
"#{Mx[:en_b_o]}\*#{@endnote_counter_asterisk} ")
@endnote_counter_asterisk+=1
end
- when /~\^|<:e>/
+ when /~\^/
if @endnote_array
- word.gsub!(/~\^|<:e>/,
+ word.gsub!(/~\^/,
"#{@endnote_array[@endnote_counter-1]}")
@endnote_counter+=1
end
diff --git a/lib/sisu/v5/ao_expand_insertions.rb b/lib/sisu/develop/ao_expand_insertions.rb
index fe02d4c6..897cb7e2 100644
--- a/lib/sisu/v5/ao_expand_insertions.rb
+++ b/lib/sisu/develop/ao_expand_insertions.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/ao_expand_insertions.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_expand_insertions.rb;hb=HEAD>
=end
module SiSU_AO_Insertions
@@ -487,21 +484,19 @@ module SiSU_AO_Insertions
linked_title="#{m_pre}{#{m_txt} }#{lnk[:manifest]}#{m_note}\n\n"
tuned_file_tmp << linked_title
output_filetypes=output_filetypes_in_cmd(m_cmd,lnk)
- output_filetypes[:gen].each do |o_f|
- describe = o_f
- if describe
- tuned_file_tmp << if @u.remote #to double space <:br> at beginning of entry
- "#{Mx[:nbsp]*4} #{describe} "
+ output_filetypes[:gen].each do |desc|
+ if desc
+ tuned_file_tmp << if @u.remote
+ "#{Mx[:nbsp]*4} #{desc} "
else # remove ...
"[provide document placement host location]"
end
end
end
- output_filetypes[:src].each do |o_f|
- describe = o_f
- if describe
+ output_filetypes[:src].each do |desc|
+ if desc
tuned_file_tmp << if @u.remote
- "#{Mx[:nbsp]*4} #{describe} "
+ "#{Mx[:nbsp]*4} #{desc} "
else
"[provide document placement host location]"
end
diff --git a/lib/sisu/v6/ao_hash_digest.rb b/lib/sisu/develop/ao_hash_digest.rb
index aeb881bf..39f34f85 100644
--- a/lib/sisu/v6/ao_hash_digest.rb
+++ b/lib/sisu/develop/ao_hash_digest.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/ao_hash_digest.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_hash_digest.rb;hb=HEAD>
=end
module SiSU_AO_Hash
@@ -106,9 +103,8 @@ module SiSU_AO_Hash
#use md5 or to create hash of each ao object including ocn, & add into to each ao object
end
def endnote_digest(data)
- t_o_bit=[]
- data.each do |en_plus|
- t_o_bit <<= case en_plus
+ data.each.map do |en_plus|
+ case en_plus
when /#{Mx[:en_a_o]}|#{Mx[:en_b_o]}/
if en_plus =~/#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]}/
t_o_txt,en_open,en_txt,en_close=
@@ -136,8 +132,7 @@ module SiSU_AO_Hash
end
else en_plus
end
- end
- t_o_bit.join
+ end.join
end
def stamped(t_o,hash_class) #decide what hash information is most useful, is compromise necessary?
t_o.obj=SiSU_TextRepresentation::Alter.new(t_o).strip_clean_of_extra_spaces
diff --git a/lib/sisu/v5/ao_idx.rb b/lib/sisu/develop/ao_idx.rb
index 71cfc9df..cbe3f00c 100644
--- a/lib/sisu/v5/ao_idx.rb
+++ b/lib/sisu/develop/ao_idx.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/ao_idx.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_idx.rb;hb=HEAD>
=end
module SiSU_AO_BookIndex
@@ -64,8 +61,6 @@ module SiSU_AO_BookIndex
@rgx_idx=/#{Mx[:idx_o]}(?:.+?)#{Mx[:idx_c]}\s*/
@rgx_idx_ocn_seg=/(.+?)~(\d+)~(\S+)/
@rgx_idx_ocn=/(.+?)~(\d+)/
- @ocn_html_identifier=
- SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
@env ||=SiSU_Env::InfoEnv.new(@md.fns)
end
def indexing_song
@@ -264,13 +259,13 @@ module SiSU_AO_BookIndex
if a[:range]
idx[:sst_rel_html_seg][@o]=
idx[:sst_rel_html_seg][@o] +
- %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}/#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}#{Mx[:rel_c]}, }
+ %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}/#{a[:seg]}.html##{a[:ocn]}#{Mx[:rel_c]}, }
idx[:sst_rel][@t]=
idx[:sst_rel][@t] +
%{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, }
idx[:html][@q]=
idx[:html][@q] +
- %{<a href="#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}">#{a[:range]}</a>, }
+ %{<a href="#{a[:seg]}.html##{a[:ocn]}">#{a[:range]}</a>, }
idx[:xhtml][@q]=
idx[:xhtml][@q] +
%{<a href="#{a[:seg]}.xhtml#o#{a[:ocn]}">#{a[:range]}</a>, }
@@ -278,13 +273,13 @@ module SiSU_AO_BookIndex
elsif a[:ocn]
idx[:sst_rel_html_seg][@o]=
idx[:sst_rel_html_seg][@o] +
- %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}#{Mx[:rel_c]}, }
+ %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:seg]}.html##{a[:ocn]}#{Mx[:rel_c]}, }
idx[:sst_rel][@t]=
idx[:sst_rel][@t] +
%{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, }
idx[:html][@q]=
idx[:html][@q] +
- %{<a href="#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}">#{a[:ocn]}</a>, }
+ %{<a href="#{a[:seg]}.html##{a[:ocn]}">#{a[:ocn]}</a>, }
idx[:xhtml][@q]=
idx[:xhtml][@q] +
%{<a href="#{a[:seg]}.xhtml#o#{a[:ocn]}">#{a[:ocn]}</a>, }
@@ -316,13 +311,13 @@ module SiSU_AO_BookIndex
if z[:range]
idx[:sst_rel_html_seg][@o]=
idx[:sst_rel_html_seg][@o] +
- %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}#{Mx[:rel_c]}, }
+ %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{z[:ocn]}#{Mx[:rel_c]}, }
idx[:sst_rel][@t]=
idx[:sst_rel][@t] +
%{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:ocn]}#{Mx[:rel_c]}, }
idx[:html][@q]=
idx[:html][@q] +
- %{<a href="#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}">#{z[:range]}</a>, }
+ %{<a href="#{z[:seg]}.html##{z[:ocn]}">#{z[:range]}</a>, }
idx[:xhtml][@q]=
idx[:xhtml][@q] +
%{<a href="#{z[:seg]}.xhtml#o#{z[:ocn]}">#{z[:range]}</a>, }
@@ -330,13 +325,13 @@ module SiSU_AO_BookIndex
elsif z[:ocn]
idx[:sst_rel_html_seg][@o]=
idx[:sst_rel_html_seg][@o] +
- %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}#{Mx[:rel_c]}, }
+ %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{z[:ocn]}#{Mx[:rel_c]}, }
idx[:sst_rel][@t]=
idx[:sst_rel][@t] +
%{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:ocn]}#{Mx[:rel_c]}, }
idx[:html][@q]=
idx[:html][@q] +
- %{<a href="#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}">#{z[:ocn]}</a>, }
+ %{<a href="#{z[:seg]}.html##{z[:ocn]}">#{z[:ocn]}</a>, }
idx[:xhtml][@q]=
idx[:xhtml][@q] +
%{<a href="#{z[:seg]}.xhtml#o#{z[:ocn]}">#{z[:ocn]}</a>, }
@@ -418,12 +413,9 @@ module SiSU_AO_BookIndex
tuned_file
end
def clean_index(data) #check on use of dob
- tuned_file=[]
- data.each do |para|
- para=para.gsub(/\n*#{@rgx_idx}/m,'')
- tuned_file << para
+ data.each.map do |para|
+ para.gsub(/\n*#{@rgx_idx}/m,'')
end
- tuned_file
end
end
end
diff --git a/lib/sisu/v6/ao_images.rb b/lib/sisu/develop/ao_images.rb
index 93356e9f..f6ef8e12 100644
--- a/lib/sisu/v6/ao_images.rb
+++ b/lib/sisu/develop/ao_images.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/ao_images.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_images.rb;hb=HEAD>
=end
module SiSU_AO_Images
@@ -70,7 +67,6 @@ module SiSU_AO_Images
end
def images
data=@data
- tuned_file=[]
@rmgk=false
imagemagick_=true #imagemagick_=SiSU_Env::InfoSettings.new.program?('rmagick')
if imagemagick_
@@ -88,7 +84,7 @@ module SiSU_AO_Images
).warn
end
end
- data.each do |dob|
+ data.select do |dob|
unless dob.is ==:table
dob.obj=dob.obj.strip
if dob.obj =~/#{Mx[:lnk_o]}\s*\S+\.(?:png|jpg|gif)(?:\s*|\s+.+)?#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|image)/
@@ -122,7 +118,7 @@ module SiSU_AO_Images
).warn
end
imgk=SiSU_Env::SystemCall.new.imagemagick
- gmgk=SiSU_Env::SystemCall.new.graphicksmagick
+ gmgk=SiSU_Env::SystemCall.new.graphicsmagick
if imgk or gmgk
if imgk
imgsys=`identify #{image_path}/#{image}`.strip #system call
@@ -132,7 +128,7 @@ module SiSU_AO_Images
img_col,img_row=/(\d+)x(\d+)/m.match(imgsys)[1,2]
img_col,img_row=img_col.to_i,img_row.to_i
else
- errmsg='imagemagick or graphicksmagick are required to process images'
+ errmsg='imagemagick or graphicsmagick are required to process images'
if @md.opt.act[:no_stop][:set]==:on
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
error("#{errmsg}, proceeding (as requested) without image processing")
@@ -182,9 +178,8 @@ module SiSU_AO_Images
dob.obj=dob.obj.gsub(/(#{Mx[:lnk_o]})\s*(\S+\.(?:png|jpg|gif))\s+/i,'\1\2 ')
end
end
- tuned_file << dob unless dob.nil?
+ dob unless dob.nil?
end
- tuned_file
end
end
end
diff --git a/lib/sisu/develop/ao_metadata.rb b/lib/sisu/develop/ao_metadata.rb
new file mode 100644
index 00000000..95743213
--- /dev/null
+++ b/lib/sisu/develop/ao_metadata.rb
@@ -0,0 +1,86 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_metadata.rb;hb=HEAD>
+
+=end
+module SiSU_AO_Metadata
+ class Metadata
+ def initialize(md,metad)
+ @md,@metadata=md,metad
+ l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language
+ language=l[:n]
+ @tr=SiSU_Translate::Source.new(md,language)
+ end
+ def make_para(obj,ocn)
+ h={
+ obj: obj,
+ ocn: 0
+ }
+ SiSU_AO_DocumentStructure::ObjectPara.new.paragraph(h)
+ end
+ def make_heading(obj,ocn,name,lv,ln)
+ h={
+ lv: lv,
+ ln: ln,
+ name: name,
+ obj: obj,
+ ocn: 0
+ }
+ SiSU_AO_DocumentStructure::ObjectHeading.new.heading(h)
+ end
+ def metadata
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/ao_misc_arrange.rb b/lib/sisu/develop/ao_misc_arrange.rb
index ffd8684f..8f8fe368 100644
--- a/lib/sisu/v6/ao_misc_arrange.rb
+++ b/lib/sisu/develop/ao_misc_arrange.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/ao_misc_arrange.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_misc_arrange.rb;hb=HEAD>
=end
module SiSU_AO_MiscArrangeText
@@ -192,7 +189,6 @@ module SiSU_AO_MiscArrangeText
end
def prepare_text
data=@data
- data_new=[],[]
if data[0] =~ /^#!\s*(?:\/usr\/bin\/env sisu|\/usr\/bin\/sisu)/ # remove bang from top #! (however file is stripped, so will be removed provided no content precedes it)
data[0]=data[0].gsub(/^#!\s*\/usr\/bin\/sisu/,'').
gsub(/^#!\s*\/usr\/bin\/env sisu/,'')
@@ -201,11 +197,10 @@ module SiSU_AO_MiscArrangeText
data[0]=data[0].gsub(/^(SiSU\s*[\d.]*)$/,'% \1').
gsub(/^(sisu-[\d.]+)$/,'% \1')
end
- data.each do |para|
+ data.each.map do |para|
para=conditional_headings(para)
- data_new << markup_blocks(para)
- end
- data_new=data_new.flatten
+ markup_blocks(para)
+ end.flatten
end
end
end
diff --git a/lib/sisu/v6/ao_numbering.rb b/lib/sisu/develop/ao_numbering.rb
index a8000c92..38054fa1 100644
--- a/lib/sisu/v6/ao_numbering.rb
+++ b/lib/sisu/develop/ao_numbering.rb
@@ -1,68 +1,65 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/ao_numbering.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_numbering.rb;hb=HEAD>
=end
module SiSU_AO_Numbering
class Numbering
attr_accessor :obj,:osp,:ocn,:lv,:name,:index,:comment
@@segments_count=0
- def initialize(md,data)
- @md,@data=md,data
+ def initialize(md,data,fnx,process)
+ @md,@data,@fnx,@process=md,data,fnx,process
@obj=@type=@ocn=@lv=@name=@index=@comment=nil
@chosen_seg_names=[]
end
@@ -107,7 +104,9 @@ module SiSU_AO_Numbering
data=ocn(data.compact) #watch
data=xml(data.compact)
data=minor_numbering(data.compact)
- data,tags_map,ocn_html_seg_map=name_para_seg_filename(data)
+ if @process==:complete
+ data,tags_map,ocn_html_seg_map=name_para_seg_filename(data)
+ end
data=set_heading_top(data) unless @md.set_heading_top
[data,tags_map,ocn_html_seg_map]
ensure
@@ -173,7 +172,6 @@ module SiSU_AO_Numbering
gsub(/#{Mx[:gl_bullet]}/,'')
end
def auto_number_heading_ie_title(data) #also does some segment naming
- @tuned_file=[]
if defined? @md.make.num_top \
and @md.make.num_top \
and @md.make.num_top !~/^$/
@@ -186,7 +184,7 @@ module SiSU_AO_Numbering
end
chapter_number_counter=0
data=data.compact
- data.each do |dob| #@md.seg_names << [additions to segment names]
+ @tuned_file=data.each.map do |dob| #@md.seg_names << [additions to segment names]
title_no=nil
if dob.is ==:heading \
&& dob.autonum_ \
@@ -275,12 +273,11 @@ module SiSU_AO_Numbering
dob.tags=set_tags(dob.tags,dob.name)
end
dob.tags=dob.tags.uniq if defined? dob.tags
- @tuned_file << dob
- end
- @tuned_file=@tuned_file.flatten
+ dob
+ end.flatten
end
def ocn(data) #and auto segment numbering increment
- @tuned_file=SiSU_AO_DocumentStructureExtract::OCN.new(@md,data).ocn
+ @tuned_file=SiSU_AO_DocumentStructureExtract::OCN.new(@md,data,@fnx,@process).ocn
@tuned_file
end
def xml(data)
@@ -288,10 +285,9 @@ module SiSU_AO_Numbering
@tuned_file
end
def minor_numbering(data) #and auto segment numbering increment
- @tuned_file=[]
number_small,letter_small=0,0
letter=%w( a b c d e f g h i j k l m n o p q r s t u v w x y z )
- data.each do |dob|
+ @tuned_file=data.each.map do |dob|
if dob.of ==:heading \
|| dob.of ==:heading_insert \
|| dob.of ==:para \
@@ -314,9 +310,8 @@ module SiSU_AO_Numbering
end
end
end
- @tuned_file << dob
- end
- @tuned_file=@tuned_file.flatten
+ dob
+ end.flatten
end
def leading_zeros_fixed_width_number(possible_seg_name)
if possible_seg_name.to_s =~/^([0-9]+?\.|[0-9]+)$/m #!~/[.,:-]+/
diff --git a/lib/sisu/develop/ao_persist.rb b/lib/sisu/develop/ao_persist.rb
new file mode 100644
index 00000000..51ff6e0b
--- /dev/null
+++ b/lib/sisu/develop/ao_persist.rb
@@ -0,0 +1,194 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** document abstraction
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_persist.rb;hb=HEAD>
+
+=end
+module SiSU_AO_Persist
+ class Persist
+ @@persistance=nil
+ attr_accessor :fns, :ao_arr, :idx_arr_sst, :idx_arr_tex, :idx_arr_html, :idx_arr_xhtml, :map_arr_nametags, :map_arr_ocn_htmlseg
+ def initialize(args=nil)
+ @@persistance=args=(args ? args : (@@persistance || persist_init_hash_values))
+ @fns=args[:fns]
+ @ao_arr=args[:ao_arr]
+ @idx_arr_sst=args[:idx_arr_sst]
+ @idx_arr_tex=args[:idx_arr_tex]
+ @idx_arr_html=args[:idx_arr_html]
+ @idx_arr_xhtml=args[:idx_arr_xhtml]
+ @map_arr_nametags=args[:map_arr_nametags]
+ @map_arr_ocn_htmlseg=args[:map_arr_ocn_htmlseg]
+ end
+ def fns
+ @fns
+ end
+ def ao_arr
+ @ao_arr
+ end
+ def idx_arr_sst
+ @idx_arr_sst
+ end
+ def idx_arr_tex
+ @idx_arr_tex
+ end
+ def idx_arr_html
+ @idx_arr_html
+ end
+ def idx_arr_xhtml
+ @idx_arr_xhtml
+ end
+ def map_arr_nametags
+ @map_arr_nametags
+ end
+ def map_arr_ocn_htmlseg
+ @map_arr_ocn_htmlseg
+ end
+ def persist_init_hash_values
+ {
+ fns: nil,
+ ao_arr: [],
+ idx_arr_sst: [],
+ idx_arr_tex: [],
+ idx_arr_html: [],
+ idx_arr_xhtml: [],
+ map_arr_nametags: [],
+ map_arr_ocn_htmlseg: [],
+ }
+ end
+ def persist_init
+ @@persistance=nil
+ Persist.new(persist_init_hash_values)
+ end
+ end
+ class PersistDocStructExt
+ @@persist=nil
+ attr_accessor :ocn, :lng, :lng_is, :code, :lngsyn, :poem, :block, :box, :group, :alt, :quote, :table, :table_to
+ def initialize(args=nil)
+ @@persist=args=(args ? args : (@@persist || persist_init_hash_values))
+ @ocn=args[:ocn]
+ @lng=args[:lng]
+ @lng_is=args[:lng_is]
+ @code=args[:code]
+ @lngsyn=args[:lngsyn]
+ @poem=args[:poem]
+ @block=args[:block]
+ @box=args[:box]
+ @group=args[:group]
+ @alt=args[:alt]
+ @quote=args[:quote]
+ @table=args[:table]
+ @table_to=args[:table_to]
+ end
+ def ocn
+ @ocn
+ end
+ def lng
+ @lng
+ end
+ def lng_is
+ @lng_is
+ end
+ def code
+ @code
+ end
+ def lngsyn
+ @lngsyn
+ end
+ def poem
+ @poem
+ end
+ def block
+ @block
+ end
+ def box
+ @box
+ end
+ def group
+ @group
+ end
+ def alt
+ @alt
+ end
+ def quote
+ @quote
+ end
+ def table
+ @table
+ end
+ def table_to
+ @table_to
+ end
+ def persist_init_hash_values
+ {
+ ocn: :on,
+ lng: :off,
+ lng_is: :doc_default,
+ code: :off,
+ lngsyn: :txt,
+ poem: :off,
+ block: :off,
+ box: :off,
+ group: :off,
+ alt: :off,
+ quote: :off,
+ table: :off,
+ table_to: :off,
+ }
+ end
+ def persist_init
+ @@persist=nil
+ PersistDocStructExt.new(persist_init_hash_values)
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/develop/ao_references.rb b/lib/sisu/develop/ao_references.rb
new file mode 100644
index 00000000..5ef94c61
--- /dev/null
+++ b/lib/sisu/develop/ao_references.rb
@@ -0,0 +1,502 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_references.rb;hb=HEAD>
+
+=end
+module SiSU_AO_References
+ class Bibliography
+ def initialize(md,data)
+ @md,@data=md,data
+ end
+ def sort_bibliography_array_by_author_year_title(bib)
+ if bib
+ bib.compact.sort_by do |c|
+ [c[:author_arr][0],c[:year],c[:title]]
+ end
+ end
+ end
+ def citation_in_prepared_bibliography(cite)
+ @cite=cite
+ def article
+ {
+ is: :article,
+ author_raw: nil,
+ author: nil,
+ author_arr: nil,
+ title: nil,
+ language: nil,
+ journal: nil,
+ volume: nil,
+ editor: nil,
+ year: nil,
+ where: nil,
+ url: nil,
+ note: nil,
+ short_name: nil,
+ id: nil,
+ }
+ end
+ def book
+ {
+ is: :book,
+ author_raw: nil,
+ author: nil,
+ author_arr: nil,
+ #editor: nil,
+ title: nil,
+ subtitle: nil,
+ fulltitle: nil,
+ language: nil,
+ publisher: nil,
+ edition: nil,
+ year: nil,
+ where: nil,
+ url: nil,
+ note: nil,
+ short_name: nil,
+ id: nil,
+ }
+ end
+ def citation_metadata
+ type=if @cite =~/^jo: \S+/m
+ :article
+ elsif @cite =~/^au: \S+/m
+ :book
+ end
+ if type
+ citeblock=@cite.split("\n")
+ if type == :article
+ citation=article
+ citeblock.select do |meta|
+ case meta
+ when /^((?:au|author):\s+)\S+/ #req
+ citation[:author_raw]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:ti|title):\s+)\S+/ #req
+ citation[:title]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:lng|language):\s+)\S+/
+ citation[:language]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:jo|journal):\s+)\S+/ #req?
+ citation[:journal]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:vo|volume):\s+)\S+/
+ citation[:volume]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:edr|editor):\s+)\S+/
+ citation[:editor]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:yr|year):\s+)\S+/ #req?
+ citation[:year]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:pst|publisher_state):\s+)\S+/
+ citation[:where]=/^#{$1}(.+)/.match(meta)[1]
+ when /^(url:\s+)\S+/
+ citation[:url]=/^#{$1}(.+)/.match(meta)[1]
+ when /^(note:\s+)\S+/
+ citation[:note]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:sn|shortname):\s+)\S+/
+ citation[:short_name]=/^#{$1}(.+)/.match(meta)[1]
+ when /^(id:\s+)\S+/
+ citation[:id]=/^#{$1}(.+)/.match(meta)[1]
+ end
+ end
+ end
+ if type == :book
+ citation=book
+ citeblock.select do |meta|
+ case meta
+ when /^((?:au|author):\s+)\S+/ #req
+ citation[:author_raw]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:ti|title):\s+)\S+/ #req
+ citation[:title]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:st|subtitle):\s+)\S+/
+ citation[:subtitle]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:lng|language):\s+)\S+/
+ citation[:language]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:pb|publisher):\s+)\S+/
+ citation[:publisher]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:edn|edition):\s+)\S+/
+ citation[:edition]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:yr|year):\s+)\S+/ #req?
+ citation[:year]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:pst|publisher_state):\s+)\S+/
+ citation[:where]=/^#{$1}(.+)/.match(meta)[1]
+ when /^(url:\s+)\S+/
+ citation[:url]=/^#{$1}(.+)/.match(meta)[1]
+ when /^(note:\s+)\S+/
+ citation[:note]=/^#{$1}(.+)/.match(meta)[1]
+ when /^((?:sn|shortname):\s+)\S+/
+ citation[:short_name]=/^#{$1}(.+)/.match(meta)[1]
+ when /^(id:\s+)\S+/
+ citation[:id]=/^#{$1}(.+)/.match(meta)[1]
+ end
+ end
+ end
+ if citation[:is]==:book
+ if citation[:subtitle]
+ citation[:fulltitle] = citation[:title] \
+ + ' - ' \
+ + citation[:subtitle]
+ else
+ citation[:fulltitle] = citation[:title]
+ end
+ end
+ citation[:author_arr]=citation[:author_raw].split(/;\s*/)
+ citation[:author]=citation[:author_arr].map do |author|
+ author.gsub(/(.+?),\s+(.+)/,'\2 \1').strip
+ end.join(', ').strip
+ unless citation[:short_name]
+ citation[:short_name]=%{#{c[:author]}, "#{c[:short_name]}" (#{c[:date]})}
+ end
+ end
+ citation
+ end
+ self
+ end
+ def biblio_extraction
+ bibliography=[]
+ biblioflag=false
+ code_flag=false
+ flag_code_curly=:not_code_curly
+ flag_code_tics=:not_code_tics
+ @data=@data.select do |t_o|
+ if t_o =~/^code\{/
+ flag_code_curly=:code_curly
+ elsif t_o =~/^\}code/
+ flag_code_curly=:not_code_curly
+ elsif t_o =~/^``` code/
+ flag_code_tics=:code_tics
+ elsif flag_code_tics ==:code_tics \
+ and t_o =~/^```/
+ flag_code_tics=:not_code_tics
+ end
+ code_flag=if flag_code_curly==:code_curly \
+ or flag_code_tics==:code_tics
+ true
+ else false
+ end
+ unless code_flag
+ if @md.flag_auto_biblio
+ if t_o =~/^1~biblio(?:graphy)?/
+ biblioflag = true
+ t_o
+ elsif t_o =~/^:?[B-D1]~/
+ biblioflag = false
+ t_o
+ elsif biblioflag
+ if t_o !~/\A%+ /
+ bibliography << citation_in_prepared_bibliography(t_o).citation_metadata
+ next
+ else
+ t_o
+ end
+ else t_o
+ end
+ elsif @md.flag_biblio
+ if t_o =~/^1~biblio(?:graphy)?/
+ biblioflag = true
+ next
+ elsif t_o =~/^:?[B-D]~/
+ next
+ elsif t_o =~/^:?[B-D1]~/
+ biblioflag = false
+ t_o
+ elsif biblioflag
+ if t_o !~/\A%+ /
+ bibliography << t_o
+ next
+ else
+ t_o
+ end
+ else t_o
+ end
+ else t_o
+ end
+ else t_o
+ end
+ end.compact
+ if @md.flag_auto_biblio \
+ and bibliography.length > 0
+ data_new=[]
+ bibliography=sort_bibliography_array_by_author_year_title(bibliography)
+ @data.select do |t_o|
+ if t_o =~/^1~biblio(?:graphy)?/
+ bibliography.each do |c|
+ if c[:is]==:book
+ <<-WOK
+
+!_ #{c[:author]}
+/{"#{c[:fulltitle]}"}/ #{c[:publisher]} (#{c[:year]})
+ WOK
+ elsif c[:is]==:article
+ <<-WOK
+
+!_ #{c[:author]}
+/{"#{c[:title]}"}/ #{c[:journal]} (#{c[:year]})
+ WOK
+ end
+ end
+ else data_new << t_o
+ end
+ end
+ @data=data_new
+ end
+ [@data,bibliography]
+ end
+ end
+ class Citations
+ def initialize(md='',data='')
+ @md,@data=md,data
+ #@biblio=[]
+ end
+ def songsheet
+ tuned_file,citations=citations_scan(@data)
+ [tuned_file,citations]
+ end
+ def sort_bibliography_array_by_author_year(bib)
+ bib.sort_by do |c|
+ [c[:author_raw],c[:year]]
+ #[c[:author_arr][0],c[:year],c[:title]]
+ end
+ end
+ def citations_regex
+ def pages_pattern
+ %r{(?:[,.:]?\s+(?:p{1,2}\.?\s+)?(?:\d+--?\d+)[,.]?\s+)?}
+ end
+ def editor_pattern
+ %r{(?<editor>(?:editor|edited by)\s+.+?)}
+ end
+ def year_pattern
+ %r{[(\[]?(?<year>\d{4})[\])]?[.,]?}
+ end
+ def authors_year_title_publication_editor_pages
+ /(?<authors>.+?)\s+#{year_pattern}\s+"(?<title>.+?)"\s+(?:#{Mx[:fa_italics_o]}|#{Mx[:srcrgx_italics_o]})(?<publication>.+?)(?:#{Mx[:fa_italics_c]}|#{Mx[:srcrgx_italics_c]})\s+#{editor_pattern}#{pages_pattern}/m # note ed. is usually edition rather than editor
+ end
+ def authors_title_publication_year_editor_pages
+ /(?<authors>.+?)\s+"(?<title>.+?)"\s+(?:#{Mx[:fa_italics_o]}|#{Mx[:srcrgx_italics_o]})(?<publication>.+?)(?:#{Mx[:fa_italics_c]}|#{Mx[:srcrgx_italics_c]})\s+#{year_pattern}\s+#{editor_pattern}#{pages_pattern}/m # note ed. is usually edition rather than editor
+ end
+ def authors_title_publication_editor_year_pages ###
+ /(?<authors>.+?)\s+"(?<title>.+?)"\s+(?:#{Mx[:fa_italics_o]}|#{Mx[:srcrgx_italics_o]})(?<publication>.+?)(?:#{Mx[:fa_italics_c]}|#{Mx[:srcrgx_italics_c]})\s+ed.\s+#{editor_pattern}#{year_pattern}#{pages_pattern}/m
+ # note ed. is usually edition rather than editor
+ end
+ def authors_title_publication_editor_pages_year ###
+ /(?<authors>.+?)\s+"(?<title>.+?)"\s+(?:#{Mx[:fa_italics_o]}|#{Mx[:srcrgx_italics_o]})(?<publication>.+?)(?:#{Mx[:fa_italics_c]}|#{Mx[:srcrgx_italics_c]})\s+#{editor_pattern}#{pages_pattern}#{year_pattern}/m # note ed. is usually edition rather than editor
+ end
+ def authors_year_title_publication_pages
+ /(?<authors>.+?)\s+#{year_pattern}\s+"(?<title>.+?)"\s+(?:#{Mx[:fa_italics_o]}|#{Mx[:srcrgx_italics_o]})(?<publication>.+?)(?:#{Mx[:fa_italics_c]}|#{Mx[:srcrgx_italics_c]})[,.;]?#{pages_pattern}/m
+ end
+ def authors_title_publication_year_pages
+ /(?<authors>.+?)\s+"(?<title>.+?)"\s+(?:#{Mx[:fa_italics_o]}|#{Mx[:srcrgx_italics_o]})(?<publication>.+?)(?:#{Mx[:fa_italics_c]}|#{Mx[:srcrgx_italics_c]})\s+#{year_pattern}\s+#{pages_pattern}/m
+ end
+ def authors_title_publication_pages_year ###
+ /(?<authors>.+?)\s+"(?<title>.+?)"\s+(?:#{Mx[:fa_italics_o]}|#{Mx[:srcrgx_italics_o]})(?<publication>.+?)(?:#{Mx[:fa_italics_c]}|#{Mx[:srcrgx_italics_c]})#{pages_pattern}#{year_pattern}/m
+ end
+ def authors_year_publication_pages
+ /(?<authors>.+?)\s+#{year_pattern}\s+(?:#{Mx[:fa_italics_o]}|#{Mx[:srcrgx_italics_o]})(?<publication>.+?)(?:#{Mx[:fa_italics_c]}|#{Mx[:srcrgx_italics_c]})#{pages_pattern}/m
+ end
+ def authors_publication_year_pages
+ /(?<authors>.+?)\s+(?:#{Mx[:fa_italics_o]}|#{Mx[:srcrgx_italics_o]})(?<publication>.+?)(?:#{Mx[:fa_italics_c]}|#{Mx[:srcrgx_italics_c]})[,.;]?\s+(?<publisher>.+?)?#{year_pattern}#{pages_pattern}[.;]?/m
+ end
+ self
+ end
+ def authors?(citations)
+ citations.each.map do |b|
+ if b =~ /^.+\s+::.+?:$/
+ c=/^(?<citation>.+?)\s+::(?<shortref>.+?):$/.match(b)
+ {
+ citation: c[:citation],
+ shortref: c[:shortref],
+ c[:shortref].to_s => c[:citation]
+ }
+ else { citation: b }
+ end
+ end
+ end
+ def long_and_short_ref?(citations) #could be useful, keep ... ectract shortref
+ citations.each.map do |b|
+ if b =~ /^.+\s+::.+?:$/
+ c=/^(?<citation>.+?)\s+::(?<shortref>.+?):$/.match(b)
+ {
+ citation: c[:citation],
+ shortref: c[:shortref],
+ c[:shortref].to_s => c[:citation]
+ }
+ else { citation: b }
+ end
+ end
+ end
+ def citation_detail(citations) #could be useful, keep ... extract shortref
+ bibahash=[]
+ number=0
+ missed=0
+ citations.select do |b|
+ z=if b =~citations_regex.authors_year_title_publication_editor_pages
+ c=citations_regex.authors_year_title_publication_editor_pages.match(b)
+ {
+ is: :article,
+ author_raw: c[:authors],
+ year: c[:year],
+ title: c[:title],
+ publication: c[:publication],
+ editor: c[:editor],
+ }
+ elsif b =~citations_regex.authors_title_publication_year_editor_pages
+ c=citations_regex.authors_title_publication_year_editor_pages.match(b)
+ {
+ is: :article,
+ author_raw: c[:authors],
+ year: c[:year],
+ title: c[:title],
+ publication: c[:publication],
+ editor: c[:editor],
+ }
+ elsif b =~citations_regex.authors_title_publication_editor_year_pages
+ c=citations_regex.authors_title_publication_editor_year_pages.match(b)
+ {
+ is: :article,
+ author_raw: c[:authors],
+ year: c[:year],
+ title: c[:title],
+ publication: c[:publication],
+ editor: c[:editor],
+ }
+ elsif b =~citations_regex.authors_title_publication_editor_pages_year
+ c=citations_regex.authors_title_publication_editor_pages_year.match(b)
+ {
+ is: :article,
+ author_raw: c[:authors],
+ year: c[:year],
+ title: c[:title],
+ publication: c[:publication],
+ editor: c[:editor],
+ }
+ elsif b =~citations_regex.authors_year_title_publication_pages
+ c=citations_regex.authors_year_title_publication_pages.match(b)
+ {
+ is: :article,
+ author_raw: c[:authors],
+ year: c[:year],
+ title: c[:title],
+ publication: c[:publication],
+ }
+ elsif b =~citations_regex.authors_title_publication_year_pages
+ c=citations_regex.authors_title_publication_year_pages.match(b)
+ {
+ is: :article,
+ author_raw: c[:authors],
+ year: c[:year],
+ title: c[:title],
+ publication: c[:publication],
+ }
+ elsif b =~citations_regex.authors_year_publication_pages
+ c=citations_regex.authors_year_publication_pages.match(b)
+ {
+ is: :book,
+ author_raw: c[:authors],
+ year: c[:year],
+ publication: c[:publication],
+ }
+ elsif b =~citations_regex.authors_publication_year_pages
+ c=citations_regex.authors_publication_year_pages.match(b)
+ {
+ is: :book,
+ author_raw: c[:authors],
+ year: c[:year],
+ publication: c[:publication],
+ }
+ else b
+ end
+ if not z.is_a?(NilClass) \
+ and z.is_a?(Hash) \
+ and z[:author_raw].length > 0
+ z[:author_arr]=z[:author_raw].split(/;\s*/)
+ z[:author]=z[:author_arr].map do |author|
+ author.gsub(/(.+?),\s+(.+)/,'\2 \1').strip
+ end.join(', ').strip
+ if @md.opt.act[:verbose_plus][:set]==:on \
+ || @md.opt.act[:maintenance][:set]==:on
+ number +=1 if z.is_a?(Hash)
+ missed +=1 if z.is_a?(String)
+ (z.is_a?(Hash)) \
+ ? (p '[' + number.to_s + '] ' + z.to_s)
+ : (p '<' + missed.to_s + '> ' + z.to_s)
+ end
+ end
+ bibahash << z if z.is_a?(Hash)
+ end
+ bibahash=sort_bibliography_array_by_author_year(bibahash.compact)
+ bibahash
+ end
+ def citations_scan(data)
+ citations=[]
+ #short_ref=[]
+ tuned_file = data.compact.select do |dob|
+ if dob.is !=:meta \
+ && dob.is !=:comment \
+ && dob.is !=:code \
+ && dob.is !=:table
+ if dob.obj =~/\.:.+?:\./
+ citations << dob.obj.scan(/\.:\s*(.+?)\s*:\./m)
+ #short_ref << dob.obj.scan(/\.:\s+(.+?)\s+::([^:]+)::\./m) #look at later
+ ##short_ref << dob.obj.scan(/\.:\s+(.+?)\s+::(.+?)::\./m) #look at later
+ #short_ref << dob.obj.scan(/\.:\s*(.+?)\s*(::(.+?):)?:\./m) #look at later
+ citations=citations.flatten.compact
+ dob.obj=dob.obj. #remove citations delimiter & helpers from text
+ gsub(/\.:|:\./,'')
+ end
+ end
+ dob if dob.is_a?(Object)
+ end
+ #bib=long_and_short_ref?(citations) #could be useful, keep ... extract shortref
+ citations=citation_detail(citations)
+ [tuned_file,citations]
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/ao_syntax.rb b/lib/sisu/develop/ao_syntax.rb
index da1daddf..4632fb2d 100644
--- a/lib/sisu/v6/ao_syntax.rb
+++ b/lib/sisu/develop/ao_syntax.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** Syntax for markup, input markup syntaxes, determined here
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/ao_syntax.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: Syntax for markup, input markup syntaxes, determined here
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/ao_syntax.rb;hb=HEAD>
=end
module SiSU_AO_Syntax
@@ -64,8 +61,8 @@ module SiSU_AO_Syntax
end
end
class Markup
- def initialize(md='',data='')
- @md,@data=md,data
+ def initialize(md='',data='',biblio=[])
+ @md,@data,@bibliography=md,data,biblio
@data_new=[]
url_and_stub=SiSU_Env::InfoEnv.new.url
@output_url="#{url_and_stub.remote}"
@@ -91,8 +88,8 @@ module SiSU_AO_Syntax
@manmkp_ital=emph_italics \
? '[i/*]\\{.+?\\}[i/*]'
: '[i/]\\{.+?\\}[i/]'
- tail_m_ital=%q{(?:\s|[.,;:?!'")]|~\^|~\\\{\s|$)}
- tail_m_bold=%{(?:(?:#{Mx[:fa_italics_c]})?(?:\s|[.,;:?!'")]|~\^|~\\\{\s|$))?}
+ tail_m_ital=%q{(?:\s|'s\b|[.,;:?!'")]|~\^|~\\\{\s|$)}
+ tail_m_bold=%{(?:(?:#{Mx[:fa_italics_c]})?(?:\s|'s\b|[.,;:?!'")]|~\^|~\\\{\s|$))?}
bold_line=%{^!_\s.+?(?:#{Mx[:br_line]}|\n|$)}
#ital_line=%{^/_\s.+?(?:#{Mx[:br_line]}|\n|$)} #not implemented
@line_scan_ital=if defined? @md.italics_match_list[:str]
@@ -224,6 +221,24 @@ module SiSU_AO_Syntax
end
def substitutions(dob)
dob=dob.dup
+ dob=if @md.flag_auto_biblio \
+ and @bibliography.length > 0
+ dob=if dob.is !=:meta \
+ && dob.is !=:heading_insert \
+ && dob.is !=:code \
+ && dob.is !=:comment \
+ && dob.is !=:table
+ @bibliography.each do |c|
+ if c[:id] and not c[:id].nil? and not c[:id].empty?
+ dob.obj=dob.obj.gsub(/#{c[:id]}/mi,c[:short_name])
+ end
+ end
+ dob
+ else dob
+ end
+ dob
+ else dob
+ end
dob=if defined? @md.substitution_match_list[:match_and_replace] \
and @md.substitution_match_list[:match_and_replace].is_a?(Array)
dob=if dob.is !=:meta \
@@ -360,7 +375,7 @@ module SiSU_AO_Syntax
# {url address}:url
# {image.png}imageurl
# {image.png}png
- # ~{endnote}~ <!e endnote !>
+ # ~{endnote}~
# !_ #bold/emphasise paragraph
# _" #blockquote paragraph
# _1 <:i1> #indent paragraph 1 step
@@ -392,7 +407,7 @@ module SiSU_AO_Syntax
dob.obj=dob.obj.strip
end
dob.obj=dob.obj.
- gsub(/^([*#-.]{1,12})$/,'\1 ~#'). #ocn off for these paragraph separators
+ gsub(/^([*#.-]{1,12})$/,'\1 ~#'). #ocn off for these paragraph separators
gsub(/~\{(.+?)\}~/m,Mx[:en_a_o] + '\1' + Mx[:en_a_c]).
gsub(/~\[([^*+].+?)\]~/m,Mx[:en_b_o] + '* \1' + Mx[:en_b_c]). #default if markup does not specify
gsub(/~\[(.+?)\]~/m,Mx[:en_b_o] + '\1' + Mx[:en_b_c])
@@ -555,7 +570,7 @@ module SiSU_AO_Syntax
# {url address}:url
# {image.png}imageurl
# {image.png}png
- # ~{endnote}~ <!e endnote !>
+ # ~{endnote}~
# +1 <!i1!>
# +2 <!i2!>
puts 'tech'
diff --git a/lib/sisu/develop/cgi.rb b/lib/sisu/develop/cgi.rb
new file mode 100644
index 00000000..23df361f
--- /dev/null
+++ b/lib/sisu/develop/cgi.rb
@@ -0,0 +1,84 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** generates naive cgi search form for search of sisu database (pgsql sqlite)
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/cgi.rb;hb=HEAD>
+
+=end
+module SiSU_CGI #% database building documents
+ require_relative 'se' # se.rb
+ require_relative 'cgi_pgsql' # cgi_pgsql.rb
+ require_relative 'cgi_sqlite' # cgi_sqlite.rb
+ class SearchSQL
+ def initialize(opt)
+ @opt=opt
+ @webserv=@opt.files[0].to_s.strip
+ end
+ def read
+ if @opt.act[:sample_search_form][:db]==:pg # cgi_pgsql.rb
+ SiSU_CGI_PgSQL::SearchPgSQL.new(@opt,@webserv).pgsql
+ elsif @opt.act[:sample_search_form][:db]==:sqlite # cgi_sqlite.rb
+ SiSU_CGI_SQLite::SearchSQLite.new(@opt,@webserv).sqlite
+ else
+ puts <<-WOK
+ please select database type for which sample search form should be built (pgsql or sqlite)
+ sisu --sample-search-form --db=sqlite
+ sisu --sample-search-form --db=pg
+ other options include
+ --webserv-cgi='[cgi-server-name]'
+ --webserv-output='[sisu-output-server-with-base-path]'
+ WOK
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/cgi_pgsql.rb b/lib/sisu/develop/cgi_pgsql.rb
index 49ab0e50..bb561b08 100644
--- a/lib/sisu/v6/cgi_pgsql.rb
+++ b/lib/sisu/develop/cgi_pgsql.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** generates naive cgi search form for search of sisu database (pgsql)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/cgi_pgsql.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: generates naive cgi search form for search of sisu database (pgsql)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/cgi_pgsql.rb;hb=HEAD>
=end
module SiSU_CGI_PgSQL #% database building documents
diff --git a/lib/sisu/v6/cgi_sql_common.rb b/lib/sisu/develop/cgi_sql_common.rb
index 6976e042..33e9c150 100644
--- a/lib/sisu/v6/cgi_sql_common.rb
+++ b/lib/sisu/develop/cgi_sql_common.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** generates naive cgi search form for search of sisu database (pgsql sqlite)
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * License: GPL 3 or later:
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- SiSU, a framework for document structuring, publishing and search
+** License: GPL 3 or later:
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ SiSU, a framework for document structuring, publishing and search
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ Copyright (C) Ralph Amissah
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/cgi_sql_common.rb;hb=HEAD>
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- ** Description: generates naive cgi search form for search of sisu database (pgsql sqlite)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/cgi_sql_common.rb;hb=HEAD>
=end
module SiSU_CGI_SQL
@@ -540,14 +537,14 @@ module SiSU_CGI_SQL
<!-- SiSU Rights -->
<p class="tiny_left"><font color="#666666" size="2">
Generated by
- #{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]})
+ #{v.project} #{v.version} #{v.date} (#{v.date_stamp})
<br>
<a href="http://www.sisudoc.org" >
- <b>#{v[:project]}</b></a> <sup>&copy;</sup> Ralph Amissah
+ <b>#{v.project}</b></a> <sup>&copy;</sup> Ralph Amissah
1993, current 2014.
All Rights Reserved.
<br>
- #{v[:project]} is software for document structuring, publishing and search,
+ #{v.project} is software for document structuring, publishing and search,
<br>
<a href="http://www.jus.uio.no/sisu" >
www.jus.uio.no/sisu
@@ -577,7 +574,7 @@ module SiSU_CGI_SQL
</font></p>
</td><td valign="top" width="45%">
<p class="tiny_left"><font color="#666666" size="2">
- #{v[:project]} using:
+ #{v.project} using:
<br>Standard SiSU markup syntax,
<br>Standard SiSU meta-markup syntax, and the
<br>Standard SiSU <u>object citation numbering</u> and system, (object/text identifying/locating system)
@@ -604,7 +601,7 @@ module SiSU_CGI_SQL
</font></p>
</td><td valign="top" width="45%">
<p class="tiny_left"><font color="#666666" size="2">
- #{v[:project]}, developed using
+ #{v.project}, developed using
<a href="http://www.ruby-lang.org/en/">
Ruby
</a>
@@ -911,13 +908,11 @@ module SiSU_CGI_SQL
else nil
end
@search_regx=if unescaped_search #check
- search_regex=[]
- build=unescaped_search.scan(/\S+/).each do |g|
+ search_regex=unescaped_search.scan(/\S+/).each.map do |g|
(g.to_s =~/(AND|OR)/) \
- ? (search_regex << '|')
- : (search_regex << %{#{g.to_s}})
- end
- search_regex=search_regex.join(' ')
+ ? ('|')
+ : (%{#{g.to_s}})
+ end.join(' ')
search_regex=search_regex.gsub(/\s*\|\s*/,'|')
Regexp.new(search_regex, Regexp::IGNORECASE)
else nil
@@ -927,7 +922,7 @@ module SiSU_CGI_SQL
matched_para=(@search_regx.to_s.class==String && @search_regx.to_s=~/\S\S+/) \
? (c['body'].gsub(/(<a\s+href="https?:\/\/[^><\s]+#{@search_regx}[^>]+?>|#{@search_regx})/mi,%{<span style="background-color: #{@color_match}">\\1</span>}))
: c['body']
- %{<hr><p><font size="2">ocn <b><a href="#{path_filename(location,c['seg'],c['language_document_char'])}#o#{c['ocn']}">#{c['ocn']}</a></b>:</font></p>#{matched_para}}
+ %{<hr><p><font size="2">ocn <b><a href="#{path_filename(location,c['seg'],c['language_document_char'])}##{c['ocn']}">#{c['ocn']}</a></b>:</font></p>#{matched_para}}
elsif c['suffix'] =~/1/ #doc
%{#{title}<hr><p><font size="2">ocn #{c['ocn']}:#{c['body']}}
end
@@ -935,9 +930,9 @@ module SiSU_CGI_SQL
output=title+text
else #elsif cgi['view']=~/index/ #% idx body
if c['suffix'] !~/1/ #seg
- index=%{<a href="#{path_filename(location,c['seg'],c['language_document_char'])}#o#{c['ocn']}">#{c['ocn']}</a>, } if @text_search_flag
+ index=%{<a href="#{path_filename(location,c['seg'],c['language_document_char'])}##{c['ocn']}">#{c['ocn']}</a>, } if @text_search_flag
elsif c['suffix'] =~/1/ #doc #FIX
- index=%{<a href="#{path_html_doc(location,c['language_document_char'])}#o#{c['ocn']}">#{c['ocn']}</a>, }
+ index=%{<a href="#{path_html_doc(location,c['language_document_char'])}##{c['ocn']}">#{c['ocn']}</a>, }
end
if c['seg'] =~/\S+/
if @text_search_flag
diff --git a/lib/sisu/v5/cgi_sqlite.rb b/lib/sisu/develop/cgi_sqlite.rb
index 8f3f58eb..7b3a5b02 100644
--- a/lib/sisu/v5/cgi_sqlite.rb
+++ b/lib/sisu/develop/cgi_sqlite.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** generates naive cgi search form for search of sisu database (sqlite)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/cgi_sql_sqlite.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: generates naive cgi search form for search of sisu database (sqlite)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/cgi_sql_sqlite.rb;hb=HEAD>
=end
module SiSU_CGI_SQLite #% database building documents
diff --git a/lib/sisu/v5/conf.rb b/lib/sisu/develop/conf.rb
index 32354503..90364899 100644
--- a/lib/sisu/v5/conf.rb
+++ b/lib/sisu/develop/conf.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** configuration
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/conf.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: configuration
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/conf.rb;hb=HEAD>
=end
module SiSU_Initialize
diff --git a/lib/sisu/v6/constants.rb b/lib/sisu/develop/constants.rb
index bf16d7da..0c4c258d 100644
--- a/lib/sisu/v6/constants.rb
+++ b/lib/sisu/develop/constants.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
- constants
+** Description: documents, structuring, processing, publishing, search
+*** constants, system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/constants.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/constants.rb;hb=HEAD>
=end
#Ax,Xx,Mx,Rx,Hx,Dx,Px,Ep,Db,Gt,Tex=Array.new(11){{}}
@@ -66,6 +62,7 @@ Sfx={
txt_asciidoc: '.ad',
txt_markdown: '.md',
txt_rst: '.rst',
+ txt_orgmode: '.org',
html: '.html',
xhtml: '.xhtml',
xml: '.xml',
@@ -150,6 +147,26 @@ Mx={
sm_set_o: '◢', sm_set_c: '◣',
sm_subset_o: '◢', sm_subset_c: '◣',
vline: '┆', # ¦ |
+ src_bold_o: '!{', src_bold_c: '}!',
+ src_italics_o: '/{', src_italics_c: '}/',
+ src_underscore_o: '_{', src_underscore_c: '}_',
+ src_cite_o: '"{', src_cite_c: '}"',
+ src_insert_o: '+{', src_insert_c: '}+',
+ src_strike_o: '-{', src_strike_c: '}-',
+ src_superscript_o: '^{', src_superscript_c: '}^',
+ src_subscript_o: ',{', src_subscript_c: '}',
+ src_hilite_o: '*{', src_hilite_c: '}*',
+ src_monospace_o: '#{', src_monospace_c: '}#',
+ srcrgx_bold_o: '\!\{', srcrgx_bold_c: '\}\!',
+ srcrgx_italics_o: '\/\{', srcrgx_italics_c: '\}\/',
+ srcrgx_underscore_o: '_\{', srcrgx_underscore_c: '\}_',
+ srcrgx_cite_o: '"\{', srcrgx_cite_c: '\}"',
+ srcrgx_insert_o: '\+\{', srcrgx_insert_c: '\}\+',
+ srcrgx_strike_o: '\-\{', srcrgx_strike_c: '\}\-',
+ srcrgx_superscript_o: '\^\{', srcrgx_superscript_c: '\}\^',
+ srcrgx_subscript_o: ',\{', srcrgx_subscript_c: '\},',
+ srcrgx_hilite_o: '\*\{', srcrgx_hilite_c: '\}\*',
+ srcrgx_monospace_o: '\#\{', srcrgx_monospace_c: '\}\#',
}
Mx[:fa_bold_o]= "#{Mx[:fa_o]}b#{Mx[:fa_o_c]}"
Mx[:fa_bold_c]= "#{Mx[:fa_c_o]}b#{Mx[:fa_c]}"
@@ -224,18 +241,8 @@ Px={
subscript_o: '[', subscript_c: ']',
hilite_o: '*', hilite_c: '*',
monospace_o: '', monospace_c: '',
- po_bold_o: '!{', po_bold_c: '}!',
- po_italics_o: '/{', po_italics_c: '}/',
- po_underscore_o: '_{', po_underscore_c: '}_',
- po_cite_o: '"{', po_cite_c: '}"',
- po_insert_o: '+{', po_insert_c: '}+',
- po_strike_o: '-{', po_strike_c: '}-',
- po_superscript_o: '^{', po_superscript_c: '}^',
- po_subscript_o: ',{', po_subscript_c: '},',
- po_hilite_o: '*{', po_hilite_c: '}*',
- po_monospace_o: '#{', po_monospace_c: '}#',
- lng_lst: SiSU_is[:language_list],
- lng_lst_rgx: SiSU_is[:language_list_regex],
+ lng_lst: SiSU_is.language_list?,
+ lng_lst_rgx: SiSU_is.language_list_regex?,
lv1: '*',
lv2: '=',
lv3: '=',
@@ -264,8 +271,8 @@ else
}
end
Db={
- name_prefix: "SiSU#{SiSU_is[:version_dir]}c_",
- name_prefix_db: "sisu_#{SiSU_is[:version_dir]}c_",
+ name_prefix: "SiSU#{SiSU_is.branch_version?}c_",
+ name_prefix_db: "sisu_#{SiSU_is.branch_version?}c_",
col_title: 800,
col_title_part: 400,
col_title_edition: 10,
@@ -356,7 +363,7 @@ check:
#˝ " λ Ω β α π Ѫ Ж Я Ѳ ѳ Ф ✠ ㈣
Ѳ ѳ Ф
♩ ♭  ✠  ▭ ▬ ▪
-【】〖〗◢ ◣ ◀ ▶ ◘ ◙
+【】〖〗◢ ◣ ◀ ▶ ◘ ◙ « ▲ »
《》「」
‹ › ∗  ∴ ∷
'〔lv1〕','〔lv2〕','〔lv3〕','〔lv4〕','〔lv5〕','〔lv6〕','〔lv7〕','〔lv8〕','〔lv9〕'
diff --git a/lib/sisu/v6/css.rb b/lib/sisu/develop/css.rb
index 05f0631a..19c87c07 100644
--- a/lib/sisu/v6/css.rb
+++ b/lib/sisu/develop/css.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** css stylesheets
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/css.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: css stylesheets
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/css.rb;hb=HEAD>
=end
module SiSU_Style
@@ -358,16 +355,6 @@ WOK
color: #000000;
background-color: #f9f9aa;
}
- a.lnkocn:link {
- color: #777777;
- text-decoration: none;
- }
-/*
- a:hover {
- border-bottom: 2px solid #777777;
- background-color: #fff3b6;
- }
-*/
a:hover img {
background-color: #ffffff;
}
@@ -375,6 +362,14 @@ WOK
color: #003399;
text-decoration: underline;
}
+ a.lnkocn:link {
+ color: #777777;
+ text-decoration: none;
+ }
+ a.lnkocn:visited {
+ color: #555555;
+ text-decoration: none;
+ }
div {
margin-left: 0;
margin-right: 0;
diff --git a/lib/sisu/v6/db_columns.rb b/lib/sisu/develop/db_columns.rb
index 95beab3b..478a1127 100644
--- a/lib/sisu/v6/db_columns.rb
+++ b/lib/sisu/develop/db_columns.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/db_columns.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/db_columns.rb;hb=HEAD>
=end
module SiSU_DbColumns
@@ -373,7 +369,6 @@ module SiSU_DbColumns
if defined? @md.creator.editor_detail \
and @md.creator.editor_detail.is_a?(Array) \
and @md.creator.editor_detail.length > 0
- txt=@md.creator.editor_detail #dc
txt=''
@md.creator.editor_detail.each do |h|
txt=txt + %{#{h[:the]}, #{h[:others]}; }
@@ -401,7 +396,6 @@ module SiSU_DbColumns
if defined? @md.creator.contributor_detail \
and @md.creator.contributor_detail.is_a?(Array) \
and @md.creator.contributor_detail.length > 0
- txt=@md.creator.contributor_detail #dc
txt=''
@md.creator.contributor_detail.each do |h|
txt=txt + %{#{h[:the]}, #{h[:others]}; }
@@ -429,7 +423,6 @@ module SiSU_DbColumns
if defined? @md.creator.illustrator_detail \
and @md.creator.illustrator_detail.is_a?(Array) \
and @md.creator.illustrator_detail.length > 0
- txt=@md.creator.illustrator_detail
txt=''
@md.creator.illustrator_detail.each do |h|
txt=txt + %{#{h[:the]}, #{h[:others]}; }
@@ -457,7 +450,6 @@ module SiSU_DbColumns
if defined? @md.creator.photographer_detail \
and @md.creator.photographer_detail.is_a?(Array) \
and @md.creator.photographer_detail.length > 0
- txt=@md.creator.photographer_detail
txt=''
@md.creator.photographer_detail.each do |h|
txt=txt + %{#{h[:the]}, #{h[:others]}; }
@@ -512,7 +504,6 @@ module SiSU_DbColumns
if defined? @md.creator.prepared_by_detail \
and @md.creator.prepared_by_detail.is_a?(Array) \
and @md.creator.prepared_by_detail.length > 0
- txt=@md.creator.prepared_by_detail
txt=''
@md.creator.prepared_by_detail.each do |h|
txt=txt + %{#{h[:the]}, #{h[:others]}; }
@@ -540,7 +531,6 @@ module SiSU_DbColumns
if defined? @md.creator.digitized_by_detail \
and @md.creator.digitized_by_detail.is_a?(Array) \
and @md.creator.digitized_by_detail.length > 0
- txt=@md.creator.digitized_by_detail
txt=''
@md.creator.digitized_by_detail.each do |h|
txt=txt + %{#{h[:the]}, #{h[:others]}; }
@@ -568,7 +558,6 @@ module SiSU_DbColumns
if defined? @md.creator.audio_detail \
and @md.creator.audio_detail.is_a?(Array) \
and @md.creator.audio_detail.length > 0
- txt=@md.creator.audio_detail
txt=''
@md.creator.audio_detail.each do |h|
txt=txt + %{#{h[:the]}, #{h[:others]}; }
diff --git a/lib/sisu/v5/db_create.rb b/lib/sisu/develop/db_create.rb
index 58a441de..782b0e60 100644
--- a/lib/sisu/v5/db_create.rb
+++ b/lib/sisu/develop/db_create.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/db_create.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/db_create.rb;hb=HEAD>
=end
module SiSU_DbCreate
diff --git a/lib/sisu/v6/db_dbi.rb b/lib/sisu/develop/db_dbi.rb
index db09a855..e72c0e7f 100644
--- a/lib/sisu/v6/db_dbi.rb
+++ b/lib/sisu/develop/db_dbi.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/db_dbi.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/db_dbi.rb;hb=HEAD>
=end
module SiSU_DbDBI
diff --git a/lib/sisu/v5/db_drop.rb b/lib/sisu/develop/db_drop.rb
index 4d08313d..f2dd642e 100644
--- a/lib/sisu/v5/db_drop.rb
+++ b/lib/sisu/develop/db_drop.rb
@@ -1,69 +1,65 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/db_drop.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/db_drop.rb;hb=HEAD>
=end
module SiSU_DbDrop
+ require_relative 'utils_response' # utils_response.rb
class Drop
- require_relative 'utils_response' # utils_response.rb
+ include SiSU_Response
def initialize(opt,conn,db_info,sql_type)
@opt,@conn,@db_info,@sql_type=opt,conn,db_info,sql_type
- @ans=SiSU_Response::Response.new
case @sql_type
when :sqlite
cascade=''
@@ -86,7 +82,7 @@ module SiSU_DbDrop
case @sql_type
when :sqlite
puts msg_sqlite
- ans=@ans.response?('remove sql database?')
+ ans=response?('remove sql database?')
if ans \
and File.exist?(@db_info.sqlite.db)
@conn.close
@@ -137,7 +133,7 @@ module SiSU_DbDrop
rescue
case @sql_type
when :sqlite
- ans=@ans.response?('remove sql database?')
+ ans=response?('remove sql database?')
if ans and File.exist?(@db_info.sqlite.db); File.unlink(@db_info.sqlite.db)
end
else
diff --git a/lib/sisu/v6/db_import.rb b/lib/sisu/develop/db_import.rb
index 5e159451..c221885c 100644
--- a/lib/sisu/v6/db_import.rb
+++ b/lib/sisu/develop/db_import.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/db_import.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/db_import.rb;hb=HEAD>
=end
module SiSU_DbImport
diff --git a/lib/sisu/v5/db_indexes.rb b/lib/sisu/develop/db_indexes.rb
index b5d99b5d..bb925090 100644
--- a/lib/sisu/v5/db_indexes.rb
+++ b/lib/sisu/develop/db_indexes.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/db_indexes.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/db_indexes.rb;hb=HEAD>
=end
module SiSU_DbIndex
diff --git a/lib/sisu/v6/db_load_tuple.rb b/lib/sisu/develop/db_load_tuple.rb
index d5cb6e14..3833c686 100644
--- a/lib/sisu/v6/db_load_tuple.rb
+++ b/lib/sisu/develop/db_load_tuple.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/db_load_tuple.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/db_load_tuple.rb;hb=HEAD>
=end
module SiSU_DbTuple
diff --git a/lib/sisu/v5/db_remove.rb b/lib/sisu/develop/db_remove.rb
index 10c84560..bb98a814 100644
--- a/lib/sisu/v5/db_remove.rb
+++ b/lib/sisu/develop/db_remove.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/db_remove.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/db_remove.rb;hb=HEAD>
=end
module SiSU_DbRemove
diff --git a/lib/sisu/v5/db_select.rb b/lib/sisu/develop/db_select.rb
index 997b6a1a..ad56e65c 100644
--- a/lib/sisu/v5/db_select.rb
+++ b/lib/sisu/develop/db_select.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/db_select.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/db_select.rb;hb=HEAD>
=end
module SiSU_DbAction
diff --git a/lib/sisu/v5/db_sqltxt.rb b/lib/sisu/develop/db_sqltxt.rb
index 3f6cf951..1e3efbc7 100644
--- a/lib/sisu/v5/db_sqltxt.rb
+++ b/lib/sisu/develop/db_sqltxt.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/db_sqltxt.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/db_sqltxt.rb;hb=HEAD>
=end
module SiSU_DbText
@@ -69,9 +66,9 @@ module SiSU_DbText
gsub(/#{Mx[:lnk_o]}\s*(.+?)\s*#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/m,'\1')
end
def clean_searchable_text_from_document_objects(arr)
- txt_arr,en=[],[]
+ en=[]
arr=(arr.is_a?(String)) ? [ arr ] : arr
- arr.each do |s|
+ txt_arr=arr.each.map do |s|
s=s.gsub(/#{Mx[:fa_o]}[a-z]{1,4}#{Mx[:fa_o_c]}/m,'').
gsub(/#{Mx[:fa_c_o]}[a-z]{1,4}#{Mx[:fa_c]}/m,'').
gsub(/<br>/m,' ')
@@ -80,25 +77,26 @@ module SiSU_DbText
gsub(/#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]}/m,'').
gsub(/ \s+/m,' ')
#p s if s =~/[^ \nA-Za-z0-9'"`?!#@$%^&*=+,.;:\[\]()<>{}‹›|\\\/~_-]/
- txt_arr << s
+ s
end
txt_arr=txt_arr << en
txt=txt_arr.flatten.join("\n")
special_character_escape(txt)
end
def clean_document_objects_body(arr)
- txt_arr,en,en_arr=[],[],[]
+ en=[]
arr=(arr.is_a?(String)) ? [ arr ] : arr
- arr.each do |s|
+ txt_arr=arr.each.map do |s|
en << s.scan(/#{Mx[:en_a_o]}\s*(.+?)\s*#{Mx[:en_a_c]}/m)
- s=s.gsub(/#{Mx[:en_a_o]}\s*(\d+).+?#{Mx[:en_a_c]}/m,'<sup>\1</sup>').
+ s=s.
+ gsub(/#{Mx[:en_a_o]}\s*(\d+).+?#{Mx[:en_a_c]}/m,
+ '<sup>\1</sup>').
gsub(/#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]}/m,'').
gsub(/ \s+/m,' ')
- txt_arr << s
+ s
end
- en.flatten.each do |e|
- e=e.sub(/^(\d+)\s*/,'<sup>\1</sup> ')
- en_arr << e
+ en_arr=en.flatten.each.map do |e|
+ e.sub(/^(\d+)\s*/,'<sup>\1</sup> ')
end
txt_arr=txt_arr << en_arr
txt=txt_arr.flatten.join("\n<br>")
@@ -109,7 +107,8 @@ module SiSU_DbText
arr=(arr.is_a?(String)) ? arr.split(/\n+/m) : arr
arr.each do |s|
s=s.gsub(/([*\/_-])\{(.+?)\}\1/m,'\2').
- gsub(/^(?:block|group|poem|code)\{/m,'').gsub(/^\}(?:block|group|poem|code)/m,'').
+ gsub(/^(?:block|group|poem|code)\{/m,'').
+ gsub(/^\}(?:block|group|poem|code)/m,'').
gsub(/\A(?:@\S+:\s+.+)\Z/m,'')
if s =~/^:A~/
if defined? @md.creator \
@@ -172,4 +171,3 @@ module SiSU_DbText
end
end
__END__
-
diff --git a/lib/sisu/v5/db_tests.rb b/lib/sisu/develop/db_tests.rb
index 59fa74e2..a3022414 100644
--- a/lib/sisu/v5/db_tests.rb
+++ b/lib/sisu/develop/db_tests.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by the different db types, dbi, postgresql, sqlite
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/db_tests.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by the different db types, dbi, postgresql,
- sqlite
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/db_tests.rb;hb=HEAD>
=end
module SiSU_DbTests
diff --git a/lib/sisu/v6/dbi.rb b/lib/sisu/develop/dbi.rb
index e939607c..90e4312c 100644
--- a/lib/sisu/v6/dbi.rb
+++ b/lib/sisu/develop/dbi.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** postgresql module, dbi import frame
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/dbi.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: postgresql module, dbi import frame
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/dbi.rb;hb=HEAD>
=end
module SiSU_DBI #% database building
diff --git a/lib/sisu/v6/dbi_discrete.rb b/lib/sisu/develop/dbi_discrete.rb
index 4c3efc46..19b1dc82 100644
--- a/lib/sisu/v6/dbi_discrete.rb
+++ b/lib/sisu/develop/dbi_discrete.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** postgresql module, dbi import frame
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/dbi_discrete.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: postgresql module, dbi import frame
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/dbi_discrete.rb;hb=HEAD>
=end
module SiSU_DBI_Discrete #% database building
diff --git a/lib/sisu/v6/digests.rb b/lib/sisu/develop/digests.rb
index fe72ea84..358bd929 100644
--- a/lib/sisu/v6/digests.rb
+++ b/lib/sisu/develop/digests.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** document digests (md5|sha256) and structure processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/digests.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: document digests (md5|sha256) and structure processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/digests.rb;hb=HEAD>
=end
module SiSU_DigestView
diff --git a/lib/sisu/v5/dp.rb b/lib/sisu/develop/dp.rb
index 6186f323..f9cd27fa 100644
--- a/lib/sisu/v5/dp.rb
+++ b/lib/sisu/develop/dp.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** document parameters extracted from input files for program use
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/dp.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: document parameters extracted from input files for program use
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/dp.rb;hb=HEAD>
=end
module SiSU_Param
@@ -70,19 +67,6 @@ module SiSU_Param
require_relative 'dp_make' # dp_make.rb
require_relative 'dp_identify_markup' # dp_identify_markup.rb
@@date=SiSU_Env::InfoDate.new
- @@proc=
- @@filename_txt=
- @@filename_texinfo=
- @@filename_lout_portrait=
- @@filename_lout_landscape=
- @@filename_html_scroll=
- @@filename_html_index=
- @@filename_html_segtoc=
- @@filename_semantic=
- @@filename_rss=
- @@newfile=
- @@drr=
- nil
@doc={
initialise: nil,
markup: '',
@@ -90,7 +74,6 @@ module SiSU_Param
stmp: '',
req: {},
}
- @@yaml=@@yamladdr=nil
@@trigger=nil
@@lv,@@flag={},{}
@@tex_backslash="\\\\"
@@ -149,8 +132,14 @@ module SiSU_Param
@@md=@md
else @@md
end
- @@md.opt=@opt
- @@md
+ begin
+ @@md.opt=@opt
+ @@md
+ rescue
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ mark('has an existing option been selected?')
+ exit
+ end
end
class MdDefault
def rights(author,date)
@@ -543,7 +532,9 @@ module SiSU_Param
SiSU_Screen::Ansi.new(
@opt.act[:color_state][:set],
'WARNING Document Copyright missing; provide @rights: :copyright:'
- ).warn unless @opt.act[:quiet][:set]==:on
+ ).warn if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
''
end
l,n=Db[:col_info_note],'rights.copyright.text'
@@ -615,7 +606,9 @@ module SiSU_Param
SiSU_Screen::Ansi.new(
@opt.act[:color_state][:set],
'WARNING Document Rights information missing; provide @rights: :copyright:'
- ).warn unless @opt.act[:quiet][:set]==:on
+ ).warn if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
else
l,n=Db[:col_info_note],'rights.all'
validate_length(s,l,n)
@@ -673,7 +666,9 @@ module SiSU_Param
SiSU_Screen::Ansi.new(
@opt.act[:color_state][:set],
'WARNING Document Rights information missing; provide @rights: :copyright:'
- ).warn unless @opt.act[:quiet][:set]==:on
+ ).warn if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
else
l,n=Db[:col_info_note],'rights.all'
validate_length(s,l,n)
@@ -902,9 +897,9 @@ module SiSU_Param
@doc={ lv: [] }
@doc[:fns],@doc[:fnb],@doc[:scr_suffix]='','',''
@@publisher='SiSU scribe'
- attr_accessor :make,:env,:path,:file,:fn,:fns,:fno,:fnb,:fnn,:fnt,:fnl,:flv,:fnz,:fnstex,:ocn,:sfx_src,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:sisu,:sisu_version,:ruby_version,:title,:subtitle,:full_title,:html_title,:subtitle_tex,:creator,:classify,:author_home,:author,:author_title,:author_nationality,:authors,:authorship,:translator,:illustrator,:prepared_by,:digitized_by,:subject,:description,:publisher,:current_publisher,:contributor,:date,:date_created,:date_issued,:date_available,:date_valid,:date_modified,:date_translated,:date_added_to_site,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:type,:format,:identifier,:source,:language,:language_original,:relation,:coverage,:rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:papersize_array,:toc,:lv0,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:lvs,:pagenew,:pagebreak,:pageline,:num_top,:bold_match_list,:italics_match_list,:substitution_match_list,:emphasis_set_to,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:markup,:markup_instruction,:flag_tables,:vocabulary,:doc_css,:yaml,:lnk,:links,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:filesize,:user,:home,:hostname,:pwd,:firstseg,:programs,:author_copymark,:i18n,:lang,:lang_code_insert,:en,:notes,:dgst,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:ec,:opt,:sem_tag,:book_idx,:topic_register,:topic_register_array,:original,:writing_focus,:audio,:daisy,:home_button_image,:home_button_links,:footer_links,:cover_image,:man_section
+ attr_accessor :make,:env,:path,:file,:fn,:fns,:fno,:fnb,:fnn,:fnt,:fnl,:flv,:fnz,:fnstex,:ocn,:sfx_src,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:sisu,:project_details,:ruby_version,:title,:subtitle,:full_title,:html_title,:subtitle_tex,:creator,:classify,:author_home,:author,:author_title,:author_nationality,:authors,:authorship,:translator,:illustrator,:prepared_by,:digitized_by,:subject,:description,:publisher,:current_publisher,:contributor,:date,:date_created,:date_issued,:date_available,:date_valid,:date_modified,:date_translated,:date_added_to_site,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:type,:format,:identifier,:source,:language,:language_original,:relation,:coverage,:rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:papersize_array,:toc,:lv0,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:lvs,:pagenew,:pagebreak,:pageline,:num_top,:bold_match_list,:italics_match_list,:substitution_match_list,:emphasis_set_to,:toc_lev_limit,:flag_biblio,:flag_auto_biblio,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:markup,:markup_instruction,:flag_tables,:vocabulary,:doc_css,:yaml,:lnk,:links,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:filesize,:user,:home,:hostname,:pwd,:firstseg,:programs,:author_copymark,:i18n,:lang,:lang_code_insert,:en,:notes,:dgst,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:ec,:opt,:sem_tag,:book_idx,:topic_register,:topic_register_array,:original,:writing_focus,:audio,:daisy,:home_button_image,:home_button_links,:footer_links,:cover_image,:man_section
def initialize(fns_array,opt)
- @env=@path,@file=@fn=@fns=@fno=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@make=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@sisu=@sisu_version=@ruby_version=@title=@subtitle=@full_title=@html_title=@subtitle_tex=@creator=@classify=@author_home=@author=@author_title=@author_nationality=@translator=@illustrator=@prepared_by=@digitized_by=@subject=@description=@publisher=@current_publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@date_translated=@date_added_to_site=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@type=@format=@identifier=@source=@language=@language_original=@relation=@coverage=@rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv0=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@pageline=@num_top=@bold_match_list=@italics_match_list=@substitution_match_list=@emphasis_set_to=@toc_lev_limit=@flag_tables=@vocabulary=@doc_css=@yaml=@lnk=@links=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@filesize=@firstseg=@programs=@author_copymark=@i18n=@lang=@lang_code_insert=@en=@notes=@dgst=@generated=@heading_seg_first=@base_program=@topic_register=@original=@writing_focus=@audio=@home_button_image=@home_button_links=@cover_image=@man_section=nil
+ @env=@path,@file=@fn=@fns=@fno=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@make=@flag_biblio=@flag_auto_biblio=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@sisu=@project_details=@ruby_version=@title=@subtitle=@full_title=@html_title=@subtitle_tex=@creator=@classify=@author_home=@author=@author_title=@author_nationality=@translator=@illustrator=@prepared_by=@digitized_by=@subject=@description=@publisher=@current_publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@date_translated=@date_added_to_site=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@type=@format=@identifier=@source=@language=@language_original=@relation=@coverage=@rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv0=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@pageline=@num_top=@bold_match_list=@italics_match_list=@substitution_match_list=@emphasis_set_to=@toc_lev_limit=@flag_tables=@vocabulary=@doc_css=@yaml=@lnk=@links=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@filesize=@firstseg=@programs=@author_copymark=@i18n=@lang=@lang_code_insert=@en=@notes=@dgst=@generated=@heading_seg_first=@base_program=@topic_register=@original=@writing_focus=@audio=@home_button_image=@home_button_links=@cover_image=@man_section=nil
@data, @path, @fns, @fno, @opt=
fns_array,opt.pth,opt.fns,opt.fno,opt #@data used as data
@flag_tables,@set_header_title,@set_heading_top,@set_heading_seg,@heading_seg_first_flag,@flag_promo,@book_idx=
@@ -1019,22 +1014,35 @@ module SiSU_Param
@fnstex=@fns.gsub(/_/,'\_\-').gsub(/\./,'.\-')
@flag_endnotes,@flag_auto_endnotes,@flag_separate_endnotes=false,false,false
@flag_separate_endnotes_make=true
+ @flag_biblio,@flag_auto_biblio=false,false
ver=SiSU_Env::InfoVersion.instance
- @sisu_version=ver.get_version
+ @project_details=ver.get_version
@ruby_version=ver.rbversion
@generated=Time.now
fns_array=@data.dup
skip unless fns_array # consider
@code_flag=false
+ flag_code_curly=:not_code_curly
+ flag_code_tics=:not_code_tics
fns_array.each do |para| #% scan document
if para !~/^%+\s/ \
and para =~/<![abcdeghijklmnopqrstuvwxyz]/i # <!f not included
- raise "Old markup style in file #{@fns}, current version #{@sisu_version[:project]} #{@sisu_version[:version]} #{@sisu_version[:date_stamp]} #{@sisu_version[:date]}:\n\t\t#{para}\n\n"
+ raise "Old markup style in file #{@fns}, current version #{@project_details.project} #{@project_details.version} #{@project_details.date_stamp} #{@project_details.date}:\n\t\t#{para}\n\n"
end
- @code_flag=case para
- when /^code\{\s*$/ then true
- when /^\}code\s*$/ then false
- else @code_flag
+ if para =~/^code\{/
+ flag_code_curly=:code_curly
+ elsif para =~/^\}code/
+ flag_code_curly=:not_code_curly
+ elsif para =~/^``` code/
+ flag_code_tics=:code_tics
+ elsif flag_code_tics ==:code_tics \
+ and para =~/^```/
+ flag_code_tics=:not_code_tics
+ end
+ @code_flag=if flag_code_curly==:code_curly \
+ or flag_code_tics==:code_tics
+ true
+ else false
end
regx_header=/^@\S+?:[+-]?\s/
if para =~regx_header \
@@ -1207,6 +1215,16 @@ module SiSU_Param
%{#{title}#{creator}}
).txt_grey if @opt.act[:verbose][:set]==:on
end
+ unless @code_flag
+ if para =~/^1~biblio(?:graphy)?/
+ @flag_auto_biblio,@flag_biblio=false,true
+ #@flag_biblio=true
+ elsif @flag_biblio ==true \
+ and @flag_auto_biblio ==false \
+ and para =~/^(?:au|author):/m
+ @flag_auto_biblio =true
+ end
+ end
if not @book_idx \
and para =~/^=\{(.+?)\}[\s`]*\Z/m
@book_idx=true
@@ -1424,11 +1442,13 @@ module SiSU_Param
SiSU_Screen::Ansi.new(
@opt.act[:color_state][:set],
'*WARN* endnote number mismatch',
- "endnotes: #{@en[:note]} != endnote reference marks: #{@en[:mark]} (difference = #{@en[:mismatch]})"
+ "endnotes: #{@en[:note]} != endnote reference marks: #{@en[:mark]} " \
+ + "(difference = #{@en[:mismatch]})"
).warn unless @opt.act[:quiet][:set]==:on
footnote_conversion_errors=File.new("#{Dir.pwd}/footnote_conversion_errors.txt",'a')
footnote_conversion_errors <<
- "#{@fns}:\n\tendnotes: #{@en[:note]} != endnote reference marks: #{@en[:mark]} (difference = #{@en[:mismatch]})\n"
+ "#{@fns}:\n\tendnotes: #{@en[:note]} != endnote reference marks: #{@en[:mark]} " \
+ + "(difference = #{@en[:mismatch]})\n"
end
if not @title \
or not defined? @title.main \
@@ -1441,7 +1461,9 @@ module SiSU_Param
@opt.act[:color_state][:set],
'WARNING: Document Title missing',
'please provide @title:'
- ).warn unless @opt.act[:quiet][:set]==:on
+ ).warn if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
end
end
if @author !~/[\S]/
@@ -1453,7 +1475,9 @@ module SiSU_Param
@opt.act[:color_state][:set],
'WARNING: Document Author missing',
'please provide @creator: :author:'
- ).warn unless @opt.act[:quiet][:set]==:on
+ ).warn if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
end
end
@struct={}
@@ -1565,19 +1589,6 @@ module SiSU_Param
class Instantiate
def param_instantiate
@@date=SiSU_Env::InfoDate.new
- @@proc=
- @@filename_txt=
- @@filename_texinfo=
- @@filename_lout_portrait=
- @@filename_lout_landscape=
- @@filename_html_scroll=
- @@filename_html_index=
- @@filename_html_segtoc=
- @@filename_semantic=
- @@filename_rss=
- @@newfile=
- @@drr=
- nil
@doc={
initialise: nil,
markup: '',
@@ -1587,7 +1598,6 @@ module SiSU_Param
prefix_b: '',
req: {}
}
- @@yaml=@@yamladdr=nil
@@flag={}
@@publisher='SiSU scribe'
end
diff --git a/lib/sisu/v6/dp_identify_markup.rb b/lib/sisu/develop/dp_identify_markup.rb
index 2ec5ac8a..411ea5da 100644
--- a/lib/sisu/v6/dp_identify_markup.rb
+++ b/lib/sisu/develop/dp_identify_markup.rb
@@ -1,62 +1,59 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** A conversion script for canned substitutions, a fairly generic simple tool
+ that can be used to store other canned conversions, used here for altering
+ SiSU markup
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/dp_identify_markup.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: A conversion script for canned substitutions, a fairly generic
- simple tool that can be used to store other canned conversions, used here for
- altering SiSU markup
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/dp_identify_markup.rb;hb=HEAD>
=end
module SiSU_MarkupType
diff --git a/lib/sisu/v5/dp_make.rb b/lib/sisu/develop/dp_make.rb
index 39a5ba1a..62b5ed21 100644
--- a/lib/sisu/v5/dp_make.rb
+++ b/lib/sisu/develop/dp_make.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** document parameters make extracted for program use
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Lic/home/ralph/live-manual/build/manual/manifest/live-manual.ca.htmlense for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Lic/home/ralph/live-manual/build/manual/manifest/live-manual.ca.htmlense for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/dp_make.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: document parameters make extracted for program use
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/dp_make.rb;hb=HEAD>
=end
@@ -429,7 +426,7 @@ module SiSU_Param_Make
end
def get_image_dimensions(img)
imgk=SiSU_Env::SystemCall.new.imagemagick
- gmgk=SiSU_Env::SystemCall.new.graphicksmagick
+ gmgk=SiSU_Env::SystemCall.new.graphicsmagick
img_pth={
sst: @env.path.image_source_include,
pod: File.expand_path("../../../sisupod/image" )
diff --git a/lib/sisu/v6/embedded.rb b/lib/sisu/develop/embedded.rb
index 1e5d7925..fbe73d6d 100644
--- a/lib/sisu/v6/embedded.rb
+++ b/lib/sisu/develop/embedded.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** sitemap created from parameters extracted from input file(s)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/embedded.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: sitemap created from parameters extracted from input file(s)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/embedded.rb;hb=HEAD>
=end
module SiSU_Embedded
diff --git a/lib/sisu/develop/errors.rb b/lib/sisu/develop/errors.rb
new file mode 100644
index 00000000..e24b9571
--- /dev/null
+++ b/lib/sisu/develop/errors.rb
@@ -0,0 +1,84 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, error screen reporting
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/errors.rb;hb=HEAD>
+
+=end
+module SiSU_Errors
+ require_relative 'se' # se.rb
+ include SiSU_Env; include SiSU_Screen
+ class Rescued <CreateFile
+ def initialize(error,errorlist,cmd,fns='')
+ @fns,@cmd,@error,@errorlist=fns,cmd,error,errorlist
+ @cmd=(cmd \
+ && (cmd =~/c/)) \
+ ? 'Vc'
+ : 'V'
+ end
+ def location
+ file=@fns \
+ ? (SiSU_Env::CreateFile.new(@fns).file_error)
+ : (File.new('/tmp/errorlog.sisu','w+'))
+ file << @fns << "\n" << @error << "\n" << @errorlist
+ file.close
+ if @cmd=~/[vVM]/
+ SiSU_Screen::Ansi.new('',$!,$@).rescue do
+ (block_given?) ? yield : __LINE__.to_s + ':' + __FILE__
+ end
+ else
+ SiSU_Screen::Ansi.new('',"rescued, exception raised, silenced").puts_grey
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/develop/generic_parts.rb b/lib/sisu/develop/generic_parts.rb
new file mode 100644
index 00000000..1545a72a
--- /dev/null
+++ b/lib/sisu/develop/generic_parts.rb
@@ -0,0 +1,131 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_parts.rb;hb=HEAD>
+
+=end
+module SiSU_Parts_Generic
+ def the_url
+ def urify(uri)
+ URI.parse(uri)
+ end
+ def sisu
+ 'http://www.sisudoc.org/'
+ end
+ def sisudoc
+ 'http://www.sisudoc.org'
+ end
+ def footer_signature
+ 'http://www.sisudoc.org/'
+ end
+ def rl_root
+ '/sisu' #watch
+ end
+ def root_http
+ 'http://www.sisudoc.org/' #watch
+ end
+ def home
+ 'http://www.sisudoc.org/' # used in pdf header
+ end
+ def site #used as stub... where there are subdirectories and is different from home
+ home
+ end
+ def home_txt
+ 'www.sisudoc.org'
+ end
+ def sisu_txt
+ 'www.sisudoc.org'
+ end
+ self
+ end
+ def the_text
+ def home
+ 'SiSU'
+ end
+ def txt_hp
+ '&nbsp;SiSU'
+ end
+ def txt_hp_alias
+ 'SiSU'
+ end
+ def txt_home
+ 'SiSU'
+ end
+ def txt_signature # used in latex/pdf footer
+ 'SiSU'
+ end
+ def url_open
+ '<'
+ end
+ def url_close
+ '>'
+ end
+ self
+ end
+ def the_icon
+ def i_ico
+ 'rb7.ico'
+ end
+ def i_home_button
+ 'sisu.png'
+ end
+ def i_choice
+ 'b_choice.png'
+ end
+ def i_new
+ 'b_new.png'
+ end
+ self
+ end
+end
+__END__
diff --git a/lib/sisu/v5/git.rb b/lib/sisu/develop/git.rb
index 7cf26272..4d20742a 100644
--- a/lib/sisu/v5/git.rb
+++ b/lib/sisu/develop/git.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/git.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/git.rb;hb=HEAD>
=end
module SiSU_Git
@@ -62,8 +59,8 @@ module SiSU_Git
require_relative 'se' # se.rb
require_relative 'ao' # ao.rb
class Source
- def initialize(opt)
- @opt=opt
+ def initialize(opt,process=:complete)
+ @opt,@process=opt,process
@env=SiSU_Env::InfoEnv.new
@md=SiSU_Param::Parameters.new(@opt).get
@file=SiSU_Env::FileOp.new(@md)
@@ -91,7 +88,7 @@ module SiSU_Git
video: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:video],
conf: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:conf]
}
- SiSU_AO::Source.new(@opt).read # -m
+ SiSU_AO::Source.new(@opt,nil,@process).read # -m
end
def create_file_structure_git
make_dir_fnb
@@ -135,14 +132,22 @@ module SiSU_Git
(found =~/bin\/git\b/) ? true : false
end
def make_dir_fnb
- FileUtils::mkdir_p(@git_path[:fnb]) unless FileTest.directory?(@git_path[:fnb])
- FileUtils::mkdir_p(@git_path[:doc]) unless FileTest.directory?(@git_path[:doc])
- FileUtils::mkdir_p(@git_path[:po]) unless FileTest.directory?(@git_path[:po])
- FileUtils::mkdir_p(@git_path[:pot]) unless FileTest.directory?(@git_path[:pot])
- FileUtils::mkdir_p(@git_path[:conf]) unless FileTest.directory?(@git_path[:conf])
- FileUtils::mkdir_p(@git_path[:image]) unless FileTest.directory?(@git_path[:image])
- #FileUtils::mkdir_p(@git_path[:audio]) unless FileTest.directory?(@git_path[:audio])
- #FileUtils::mkdir_p(@git_path[:video]) unless FileTest.directory?(@git_path[:video])
+ FileUtils::mkdir_p(@git_path[:fnb]) \
+ unless FileTest.directory?(@git_path[:fnb])
+ FileUtils::mkdir_p(@git_path[:doc]) \
+ unless FileTest.directory?(@git_path[:doc])
+ FileUtils::mkdir_p(@git_path[:po]) \
+ unless FileTest.directory?(@git_path[:po])
+ FileUtils::mkdir_p(@git_path[:pot]) \
+ unless FileTest.directory?(@git_path[:pot])
+ FileUtils::mkdir_p(@git_path[:conf]) \
+ unless FileTest.directory?(@git_path[:conf])
+ FileUtils::mkdir_p(@git_path[:image]) \
+ unless FileTest.directory?(@git_path[:image])
+ #FileUtils::mkdir_p(@git_path[:audio]) \
+ # unless FileTest.directory?(@git_path[:audio])
+ #FileUtils::mkdir_p(@git_path[:video]) \
+ # unless FileTest.directory?(@git_path[:video])
end
def git_init
unless FileTest.directory?("#{@git_path[:fnb]}/.git")
@@ -171,13 +176,23 @@ module SiSU_Git
p __LINE__
end
def copy_src_head
- if @opt.f_pth[:lng]
- FileUtils::cp_r("#{@env.path.pwd}/#{@opt.f_pth[:lng]}/#{@opt.fns}",@git_path[:doc])
+ if @opt.f_pth[:lng] \
+ and File.exist?("#{@env.path.pwd}/#{@opt.f_pth[:lng]}/#{@opt.fns}")
+ FileUtils::cp_r(
+ "#{@env.path.pwd}/#{@opt.f_pth[:lng]}/#{@opt.fns}",
+ @git_path[:doc]
+ )
elsif @opt.fns =~/\.ssm\.sst/
ssm=@opt.fns.gsub(/\.ssm\.sst/,'.ssm')
- FileUtils::cp_r("#{@env.path.pwd}/#{ssm}",@git_path[:doc])
- else
- FileUtils::cp_r("#{@env.path.pwd}/#{@opt.fns}",@git_path[:doc])
+ FileUtils::cp_r(
+ "#{@env.path.pwd}/#{ssm}",
+ @git_path[:doc]
+ )
+ elsif File.exist?("#{@env.path.pwd}/#{@opt.fns}")
+ FileUtils::cp_r(
+ "#{@env.path.pwd}/#{@opt.fns}",
+ @git_path[:doc]
+ )
end
end
def copy_related_sst_ssi
@@ -186,14 +201,21 @@ module SiSU_Git
file_array=IO.readlines(@opt.fns,'')
file_array.each do |f|
if f =~@rgx_doc_import
- doc_import = doc_import + f.scan(@rgx_doc_import).uniq.flatten
+ doc_import = doc_import \
+ + f.scan(@rgx_doc_import).uniq.flatten
end
end
doc_import.each do |f|
if @opt.f_pth[:lng]
- FileUtils::cp_r("#{@env.path.pwd}/#{@opt.f_pth[:lng]}/#{f}",@git_path[:doc])
+ FileUtils::cp_r(
+ "#{@env.path.pwd}/#{@opt.f_pth[:lng]}/#{f}",
+ @git_path[:doc]
+ )
else
- FileUtils::cp_r("#{@env.path.pwd}/#{f}",@git_path[:doc])
+ FileUtils::cp_r(
+ "#{@env.path.pwd}/#{f}",
+ @git_path[:doc]
+ )
end
end
end
@@ -203,10 +225,19 @@ module SiSU_Git
and not @opt.act[:ao][:set]==:on
##SiSU_Assemble::Composite.new(@opt).read
#SiSU_AO::Source.new(@opt).read # -m
- "#{@env.processing_path.composite_file}/#{@opt.fnb}.ssm.sst"
+ @env.processing_path.composite_file \
+ + '/' \
+ + @opt.fnb \
+ + '.ssm.sst'
elsif composite_src
- "#{@env.processing_path.composite_file}/#{@opt.fnb}.ssm.sst"
- else "#{@env.path.pwd}/#{@opt.fns}"
+ @env.processing_path.composite_file \
+ + '/' \
+ + @opt.fnb \
+ + '.ssm.sst'
+ else
+ @env.path.pwd
+ + '/' \
+ + @opt.fns
end
end
def read_composite
diff --git a/lib/sisu/v5/html.rb b/lib/sisu/develop/html.rb
index 1a8d6608..2386394f 100644
--- a/lib/sisu/v5/html.rb
+++ b/lib/sisu/develop/html.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** html generation, processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: html generation, processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html.rb;hb=HEAD>
=end
module SiSU_HTML
@@ -168,11 +165,10 @@ module SiSU_HTML
end
end
SiSU_Env::Clear.new(@opt.selections.str,@opt.fns,@md).param_instantiate
- @@flag,@@scr,@@seg,@@seg_endnotes,@@seg_subtoc,@@seg_ad={},{},{},{},{},{}
- @@seg_total,@@tracker,@@loop_count,@@tablehead,@@number_of_cols=0,0,0,0,0
- @@seg_name,@@seg_name_html,@@seg_subtoc_array,@@seg_endnotes_array,@@segtocband,@@tablefoot=Array.new(7){[]}
- @@filename_seg,@@seg_url,@@fn,@@to_lev4,@@get_hash_to,@@get_hash_fn='','','','','','',''
- @@is4=@@is3=@@is2=@@is1=@@heading1=@@heading2=@@heading3=@@heading4=0
+ @@flag,@@scr,@@seg,@@seg_endnotes,@@seg_subtoc={},{},{},{},{}
+ @@tracker=0
+ @@seg_name,@@seg_name_x,@@seg_subtoc_array,@@seg_endnotes_array,@@tablefoot=Array.new(5){[]}
+ @@filename_seg,@@seg_url,@@to_lev4,@@get_hash_to,@@get_hash_fn='','','','',''
end
end
private
@@ -265,8 +261,6 @@ module SiSU_HTML
@@firstseg=nil
def initialize(md=nil,data='')
@data,@md=data,md
- @ocn_html_identifier=
- SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
@tell=SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set]) if @md
end
def songsheet #extracts toc for scroll & seg
@@ -381,7 +375,7 @@ WOK
title=if dob.ocn ==0 then linkname
else
@@toc[:scr] << '<br>'
- %{<b><a href="##{@ocn_html_identifier}#{dob.ocn}">#{linkname}</a></b>}
+ %{<b><a href="##{dob.ocn}">#{linkname}</a></b>}
end
txt_obj={ txt: title }
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
@@ -423,7 +417,7 @@ WOK
end
else
@@toc[:scr] << '<br>'
- %{<b><a href="##{@ocn_html_identifier}#{dob.ocn}">#{linkname}</a></b>}
+ %{<b><a href="##{dob.ocn}">#{linkname}</a></b>}
end
txt_obj={ txt: title }
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
@@ -540,7 +534,7 @@ WOK
}
f=@md.file.base_filename.html_seg(fnh)
p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
- lnk_n_txt=%{ <a href="#{f}##{@ocn_html_identifier}#{ocn}">
+ lnk_n_txt=%{ <a href="#{f}##{ocn}">
#{linkname}
</a>}
txt_obj={ txt: lnk_n_txt }
@@ -565,7 +559,7 @@ WOK
}
f=@md.file.base_filename.html_seg(fnh)
p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
- lnk_n_txt=%{ <a href="#{f}##{@ocn_html_identifier}#{ocn}">
+ lnk_n_txt=%{ <a href="#{f}##{ocn}">
#{linkname}
</a>}
txt_obj={ txt: lnk_n_txt }
diff --git a/lib/sisu/v6/html_concordance.rb b/lib/sisu/develop/html_concordance.rb
index 4d3b74e4..d988dd33 100644
--- a/lib/sisu/v6/html_concordance.rb
+++ b/lib/sisu/develop/html_concordance.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** concordance file (html, wordmap, linked index of words in document)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html_concordance.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: concordance file (html concordance, wordmap, linked index of
- words in document)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_concordance.rb;hb=HEAD>
=end
module SiSU_Concordance
diff --git a/lib/sisu/v6/html_format.rb b/lib/sisu/develop/html_format.rb
index a84d079d..1692e452 100644
--- a/lib/sisu/v6/html_format.rb
+++ b/lib/sisu/develop/html_format.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** html formating, css template
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: html formating, css template
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_format.rb;hb=HEAD>
=end
module SiSU_HTML_Format
@@ -63,7 +60,6 @@ module SiSU_HTML_Format
def initialize(md,ocn)
@md,@ocn=md,ocn.to_s
@ocn ||=''
- @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
@make=SiSU_Env::ProcessingSettings.new(@md)
end
def ocn_display
@@ -72,7 +68,7 @@ module SiSU_HTML_Format
or @ocn.empty?
''
else
- %{<label class="ocn">#{@ocn}</label>}
+ %{<label class="ocn"><a href="##{@ocn}" class="lnkocn">#{@ocn}</a></label>}
end
else
''
@@ -87,10 +83,12 @@ module SiSU_HTML_Format
end
end
def id #w3c? "tidy" complains about numbers as identifiers ! annoying
- (@ocn==nil || @ocn.empty?) ? '' : %{id="#{Mx[:ocn_id_char]}#{@ocn}"}
+ (@ocn==nil || @ocn.empty?) \
+ ? '' : %{id="#{Mx[:ocn_id_char]}#{@ocn}"}
end
def goto
- (@ocn==nil || @ocn.empty?) ? '' : %{<a href="##{@ocn_html_identifier}#{@ocn}">}
+ (@ocn==nil || @ocn.empty?) \
+ ? '' : %{<a href="##{@ocn}">}
end
end
class HeadInformation
@@ -102,8 +100,9 @@ module SiSU_HTML_Format
@md=md
# DublinCore 1 - title
@bits=SiSU_Proj_HTML::Bits.new
- @seg_name_html=(SiSU_HTML::Source::Seg.new.seg_name_html || [])
- @seg_name_html_tracker=(SiSU_HTML::Source::Seg.new.seg_name_html_tracker || [])
+ @per=SiSU_HTML_Persist::Persist.new
+ @per.seg_name_x=SiSU_HTML::Seg.new.seg_name_x
+ @per.seg_name_x_tracker=SiSU_HTML::Seg.new.seg_name_x_tracker
@tocband_scroll,@tocband_segtoc=nil,nil
@stylesheet=SiSU_Style::CSS_HeadInfo.new(md).stylesheet
@o_str ||=SiSU_Env::ProcessingSettings.new(md).output_dir_structure
@@ -406,7 +405,7 @@ WOK
<head>
<meta charset="utf-8">
<title>
- #{@md.html_title}
+ #{@md.title.full}
</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
#{rdf.metatag_html}
@@ -618,9 +617,9 @@ WOK
super(md)
end
def dot_control_pre_next
- pre="#{@seg_name_html[@seg_name_html_tracker-1]}#{@md.lang_code_insert}#{Sfx[:html]}"
+ pre="#{@per.seg_name_x[@per.seg_name_x_tracker-1]}#{@md.lang_code_insert}#{Sfx[:html]}"
up=@toc
- nxt="#{@seg_name_html[@seg_name_html_tracker+1]}#{@md.lang_code_insert}#{Sfx[:html]}"
+ nxt="#{@per.seg_name_x[@per.seg_name_x_tracker+1]}#{@md.lang_code_insert}#{Sfx[:html]}"
if nxt=~/sisu_manifest\.html/
@file=SiSU_Env::FileOp.new(@md) if @md
if @file.output_dir_structure.by_language_code? \
@@ -646,7 +645,7 @@ WOK
#{the_table_close}}
end
def dot_control_pre
- pre="#{@seg_name_html[@seg_name_html_tracker-2]}#{@md.lang_code_insert}#{Sfx[:html]}"
+ pre="#{@per.seg_name_x[@per.seg_name_x_tracker-2]}#{@md.lang_code_insert}#{Sfx[:html]}"
up=@toc
nxt="#{@md.file.base_filename.html_segtoc}"
%{<table summary="segment hidden control pre" width="100%" border="0" cellpadding="0" bgcolor=#{the_color.grey_pale} align="center">
@@ -674,12 +673,12 @@ WOK
</a>
</td>}
pre=%{<td align="center" bgcolor=#{the_color.band1}>
- <a href="#{@seg_name_html[@seg_name_html_tracker-use]}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top">
+ <a href="#{@per.seg_name_x[@per.seg_name_x_tracker-use]}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top">
#{png_nav.pre}
</a>
</td>} if f_pre==true
nxt=%{<td align="center" bgcolor=#{the_color.band1}>
- <a href="#{@seg_name_html[@seg_name_html_tracker+1]}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top">
+ <a href="#{@per.seg_name_x[@per.seg_name_x_tracker+1]}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top">
#{png_nav.nxt}
</a>
</td>} if f_nxt==true
@@ -724,23 +723,6 @@ WOK
else ''
end
end
- def navigation_table
- %{<table summary="navigation segment table" width=#{the_width.table1} border="0" bgcolor="white" cellpadding="0">
-<tr><th width="#{@@indent['leve_1']}" align="right">
-</td>
-<td valign="top">
- <font size=2>}
- end
- def navigation_table1
- %{<table summary="navigation segment table1" width=#{the_width.table1} border="0" cellpadding=#{the_table_cellpad_box} bgcolor=#{the_color.table1} align="left">
-<tr><td valign="top">
- <font size="2">}
- end
- def navigation_table2
- %{<table summary="navigation segment table2" width=#{the_width.table2} border="0" cellpadding=#{the_table_cellpad_box} bgcolor=#{the_color.table2} align="left">
-<tr><td valign="top">
- <font size="2">}
- end
def credit
%{
<div class="main_column">
@@ -802,8 +784,8 @@ WOK
<head>
<meta charset="utf-8">
<title>
- #{@seg_name_html[@seg_name_html_tracker]} -
- #{@md.html_title}
+ #{@per.seg_name_x[@per.seg_name_x_tracker]} -
+ #{@md.title.main}
</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
#{rdf.metatag_html}
@@ -1150,8 +1132,8 @@ WOK
def initialize(md,txt)
super(md,txt)
end
- def endnote_seg_body(fn='') #FIX #url construction keep within single line... BUG WATCH 200408
- fn='doc' if fn.to_s.empty? #you may wish to reconsider, sends to 'doc' where no segment info
+ def endnote_seg_body(fn='')
+ fn="../#{@md.fnb}" if fn.to_s.empty?
%{
<p class="endnote">
#{@endnote_part_a}#{fn}#{@md.lang_code_insert}#{Sfx[:html]}#{@endnote_part_b}
@@ -1164,7 +1146,6 @@ WOK
end
def subtoc_lev(tag,attrib)
@txt=clean(@txt)
- @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
txt=if @txt \
and @txt =~/<\/?i>|<a\s+name="\S+?">/mi
@txt.gsub(/<\/?i>|<a\s+name="\S+?">/mi,'') #removes name markers from subtoc, go directly to substantive text
@@ -1178,7 +1159,7 @@ WOK
gsub(/<a[\s]+name="-\d+"[\s]+href="#_\d+">&nbsp;<sup>\d+<\/sup>&nbsp;/m,'')
end
%{<#{tag} class="#{attrib}">
- <a href="##{@ocn_html_identifier}#{@ocn}"><i>#{txt}</i></a> #{note}
+ <a href="##{@ocn}"><i>#{txt}</i></a> #{note}
</#{tag}>}
end
def subtoc_lev5
diff --git a/lib/sisu/develop/html_harvest.rb b/lib/sisu/develop/html_harvest.rb
new file mode 100644
index 00000000..cc867352
--- /dev/null
+++ b/lib/sisu/develop/html_harvest.rb
@@ -0,0 +1,109 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** metadata harvest, harvest metadata from document corpus
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/harvest.rb;hb=HEAD>
+
+=end
+module SiSU_Harvest
+ @@the_idx_topics,@@the_idx_authors={},{}
+ class Source
+ require_relative 'hub_options' # hub_options.rb
+ require_relative 'html_harvest_topics' # html_harvest_topics.rb
+ require_relative 'html_harvest_authors' # html_harvest_authors.rb
+ require_relative 'se' # se.rb
+ include SiSU_Env
+ def initialize(opt)
+ @opt=opt
+ @env=SiSU_Env::InfoEnv.new
+ end
+ def read
+ begin
+ harvest_pth=@env.path.webserv + '/' + @opt.base_stub
+ FileUtils::mkdir_p(harvest_pth) unless FileTest.directory?(harvest_pth)
+ cases(@opt,@env)
+ rescue
+ ensure
+ SiSU_Env::CreateSite.new(@opt).cp_css
+ end
+ end
+ def help
+ puts <<WOK
+ harvest --harvest extracts document index metadata
+
+WOK
+ end
+ def css(opt)
+ require_relative 'css' # css.rb
+ css=SiSU_Style::CSS.new
+ fn_css=SiSU_Env::CSS_Default.new
+ style=File.new("#{@env.path.pwd}/#{fn_css.harvest}",'w')
+ style << css.harvest
+ style.close
+ end
+ def cases(opt,env)
+ case opt.selections.str.inspect
+ when/--harvest/i
+ css(opt) if @opt.act[:maintenance][:set]==:on
+ SiSU_HarvestAuthors::Songsheet.new(opt,env).songsheet
+ SiSU_HarvestTopics::Songsheet.new(opt,env).songsheet
+ if @opt.act[:rsync][:set]==:on
+ require_relative 'remote' # remote.rb
+ SiSU_Remote::Put.new(opt).rsync_harvest
+ end
+ else
+ help
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/develop/html_harvest_author_format.rb b/lib/sisu/develop/html_harvest_author_format.rb
new file mode 100644
index 00000000..24f8af8d
--- /dev/null
+++ b/lib/sisu/develop/html_harvest_author_format.rb
@@ -0,0 +1,111 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/harvest_author_format.rb;hb=HEAD>
+
+=end
+module SiSU_FormatAuthor
+ class Author
+ def initialize(author_param)
+ @author_param=author_param
+ end
+ def author_details
+ @authors,@author_array=[],[]
+ authors=@author_param.scan(/[^;]+/)
+ authors.each do |a|
+ a=a.strip
+ if a =~/"(.+?)"/
+ @authors << { the: $1 }
+ @author_array << $1.upcase
+ else #if a =~/,/
+ x=a.scan(/[^,]+/)
+ x[0]=x[0].strip
+ x[1]=x[1].strip if x[1]
+ if x.length==1
+ @authors << { the: x[0] }
+ @author_array << x[0].upcase
+ elsif x.length==2
+ @authors << { the: x[0], others: x[1] }
+ @author_array << "#{x[0].upcase}, #{x[1]}"
+ else #p x.length
+ end
+ end
+ end
+ l = @authors.length
+ authors_string=''
+ @authors.each_with_index do |a,i|
+ authors_string += if a[:others]
+ if (l - i) > 1
+ "#{a[:others]} #{a[:the]}, "
+ else
+ "#{a[:others]} #{a[:the]}"
+ end
+ else
+ if (l - i) > 2
+ "#{a[:the]}, "
+ else
+ "#{a[:the]}"
+ end
+ end
+ end
+ {
+ last_first_a: authors,
+ last_first_format_a: @author_array,
+ authors_h: @authors,
+ authors_s: authors_string,
+ authors_param: @author_param
+ }
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/html_harvest_authors.rb b/lib/sisu/develop/html_harvest_authors.rb
index 0fa079d6..8298b1af 100644
--- a/lib/sisu/v5/html_harvest_authors.rb
+++ b/lib/sisu/develop/html_harvest_authors.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
- metadata harvest, extract authors and their writings from document set
+** Description: documents, structuring, processing, publishing, search
+*** metadata harvest, extract authors and their writings from document set
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/harvest_authors.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: simple xml representation (sax style)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/harvest_authors.rb;hb=HEAD>
=end
module SiSU_HarvestAuthors
@@ -326,7 +322,7 @@ module SiSU_HarvestAuthors
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="dc.title" content= "SiSU metadata harvest, Authors - SiSU information Structuring Universe, Structured information Serialised Units" />
<meta name="dc.subject" content= "document structuring, ebook, publishing, PDF, LaTeX, XML, ODF, SQL, postgresql, sqlite, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, granular search, digital library" />
-<meta name="generator" content="#{sv[:project]} #{sv[:version]} of #{sv[:date_stamp]} (n*x and Ruby!)" />
+<meta name="generator" content="#{sv.project} #{sv.version} of #{sv.date_stamp} (n*x and Ruby!)" />
<link rel="generator" href="http://www.jus.uio.no/sisu/SiSU" />
<link href="#{css_path}" rel="stylesheet" >
<link rel="shortcut icon" href="../_sisu/image/rb7.ico" />
diff --git a/lib/sisu/v5/html_harvest_topics.rb b/lib/sisu/develop/html_harvest_topics.rb
index ab74968c..22c880d6 100644
--- a/lib/sisu/v5/html_harvest_topics.rb
+++ b/lib/sisu/develop/html_harvest_topics.rb
@@ -1,62 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
- metadata harvest, extract topics and associated writings from document set
- (topics use topic_register header)
+** Description: documents, structuring, processing, publishing, search
+*** metadata harvest, extract topics and associated writings from document set
+ (topics use topic_register header)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/harvest_topics.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: simple xml representation (sax style)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/harvest_topics.rb;hb=HEAD>
=end
module SiSU_HarvestTopics
@@ -162,10 +158,9 @@ module SiSU_HarvestTopics
end
idx_array[lang] <<=if @idx_list =~/;/
g=@idx_list.scan(/[^;]+/)
- idxl=[]
- g.each do |i|
+ g.each.map do |i|
i=i.strip
- idxl << {
+ {
filename: filename,
file: file,
rough_idx: i,
@@ -175,7 +170,6 @@ module SiSU_HarvestTopics
lang: lang
}
end
- idxl
else {
filename: filename,
file: file,
@@ -695,7 +689,7 @@ module SiSU_HarvestTopics
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="dc.title" content= "SiSU metadata harvest, Topics - SiSU information Structuring Universe, Structured information Serialised Units" />
<meta name="dc.subject" content= "document structuring, ebook, publishing, PDF, LaTeX, XML, ODF, SQL, postgresql, sqlite, electronic book, electronic publishing, electronic document, electronic citation, data structure, citation systems, granular search, digital library" />
-<meta name="generator" content="#{sv[:project]} #{sv[:version]} of #{sv[:date_stamp]} (n*x and Ruby!)" />
+<meta name="generator" content="#{sv.project} #{sv.version} of #{sv.date_stamp} (n*x and Ruby!)" />
<link rel="generator" href="http://www.jus.uio.no/sisu/SiSU" />
<link href="#{css_path}" rel="stylesheet">
<link rel="shortcut icon" href="../_sisu/image/rb7.ico" />
diff --git a/lib/sisu/v6/html_lite_shared.rb b/lib/sisu/develop/html_lite_shared.rb
index e54ee952..5c74fa85 100644
--- a/lib/sisu/v6/html_lite_shared.rb
+++ b/lib/sisu/develop/html_lite_shared.rb
@@ -1,61 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by db and flatfile output generators, mostly xml/xhtml/html
+ formatting
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html_lite_shared.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by db and flatfile output generators, mostly
- xml/xhtml/html formatting
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_lite_shared.rb;hb=HEAD>
=end
module SiSU_FormatShared
@@ -78,7 +75,6 @@ module SiSU_FormatShared
else @@hname
end
@tab="\t"
- @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
@@tablehead,@@tablefoot=[],[]
@env=SiSU_Env::InfoEnv.new(@md.fns)
@base_url="#{@env.url.root}/#{@md.fnb}/#{@hname}.html"
@@ -207,7 +203,7 @@ GSUB
%{<p class="#{h[:class]}" type="#{h[:type]}">#{h[:txt]}</a></p>\n} << "\n"
end
def lev_toc_hname
- %{<p class="toc#{@lv}" header="#{@hname}"><a href="##{@ocn_html_identifier}#{@ocn}">#{@txt}</a></p>\n} #<< "\n"
+ %{<p class="toc#{@lv}" header="#{@hname}"><a href="##{@ocn}">#{@txt}</a></p>\n} #<< "\n"
end
def lev_toc
h={ txt: txt, class: "toc#{@lv}", type: 'toc' }
diff --git a/lib/sisu/v5/html_manifest.rb b/lib/sisu/develop/html_manifest.rb
index 02368111..514727e6 100644
--- a/lib/sisu/v5/html_manifest.rb
+++ b/lib/sisu/develop/html_manifest.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** summary of generated outputs and metadata
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html_manifest.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: summary of generated outputs and metadata
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_manifest.rb;hb=HEAD>
=end
module SiSU_Manifest
@@ -163,19 +160,19 @@ module SiSU_Manifest
%{<p class="tiny">#{the_url_decoration.xml_open}<a href="#{url}/#{file}">#{url}/#{file}</a>#{the_url_decoration.xml_close}</p>}
end
end
- def summarize(id,file,pth='',rel='',url='',img='● ')
+ def summarize(desc,id,file,pth='',rel='',url='',img='● ')
size=(File.size("#{pth}/#{file}")/1024.00).to_s
kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]
- @manifest[:txt] << "#{file} #{id} #{kb}\n"
- @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{rel}/#{file}">#{img}#{id}</a></p></th><td><p class="small"><a href="#{rel}/#{file}">#{file}</a></p>#{url_make(url,file)}</td><td class="right"><p class="right">#{kb}</p></td></tr>\n}
+ @manifest[:txt] << "#{file} #{desc} #{kb}\n"
+ @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{rel}/#{file}">#{img}#{desc}</a></p></th><td><p class="small"><a href="#{rel}/#{file}">#{file}</a></p>#{url_make(url,file)}</td><td class="right"><p class="right">#{kb}</p></td></tr>\n}
end
- def summarize_html_seg(id,file,pth='',rel='',url='',img='● ')
+ def summarize_html_seg(desc,id,file,pth='',rel='',url='',img='● ')
size=(File.size("#{pth}/#{file}")/1024.00).to_s
kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]
- @manifest[:txt] << "#{file} #{id} #{kb}\n"
- @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{rel}/#{file}">#{img}#{id}</a></p></th><td><p class="small"><a href="#{rel}/#{file}">#{file}</a></p>#{url_make(url,file)}</td><td class="right"><p class="right">#{kb}</p></td></tr>\n}
+ @manifest[:txt] << "#{file} #{desc} #{kb}\n"
+ @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{rel}/#{file}">#{img}#{desc}</a></p></th><td><p class="small"><a href="#{rel}/#{file}">#{file}</a></p>#{url_make(url,file)}</td><td class="right"><p class="right">#{kb}</p></td></tr>\n}
end
- def summarize_sources(id,file,pth,rel,url)
+ def summarize_sources(desc,id,file,pth,rel,url)
sys=SiSU_Env::SystemCall.new
dgst=case @dg
when :sha512
@@ -197,9 +194,9 @@ module SiSU_Manifest
end
size=(File.size("#{pth}/#{file}")/1024.00).to_s
kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]
- @manifest[:txt] << "#{file} #{id} #{kb}\n"
+ @manifest[:txt] << "#{file} #{desc} #{kb}\n"
@manifest[:html] << %{<tr>} \
- + %{<th class="left"><p class="norm"><a href="#{rel}/#{file}">#{id}</a></p></th>} \
+ + %{<th class="left"><p class="norm" id="#{id}"><a href="#{rel}/#{file}">#{desc}</a></p></th>} \
+ %{<td class="right"><p class="tiny"><a href="#{rel}/#{file}">#{file}</a> &nbsp;&nbsp;#{dgst[1]}#{url_make(url,file,:src)}</p></td>} \
+ %{<td class="right"><p class="right">#{kb}</p></td>} \
+ %{</tr>\n} \
@@ -249,7 +246,7 @@ module SiSU_Manifest
end
@m=@m.uniq
end
- def languages(id,file)
+ def languages(desc,file)
@manifest[:html] << %{<tr><th class="left"><div id="horizontal_links"><ul id="horizontal">\n}
published_manifests?.each do |l|
SiSU_Translate::Source.new(@md,@language,l[:n]).language_list
@@ -258,15 +255,15 @@ module SiSU_Manifest
end
@manifest[:html] << %{</ul></div></th></tr>\n}
end
- def published_languages(id)
+ def published_languages(desc)
published_manifests?.each do |l|
@manifest[:txt] << "#{l[:mu]} #{l[:l]}\n"
@manifest[:html] << %{<tr><th class="left"><p class="bold"><a href="#{l[:mu]}">#{l[:l]}</a></p></th><td><p class="norm">#{l[:l]}</p><p class="tiny">#{the_url_decoration.xml_open}<a href="#{l[:mu]}">#{l[:mu]}</a>#{the_url_decoration.xml_close}</p></td><td class="right"><p class="right">&nbsp;</p></td></tr>\n}
end
end
- def metadata(id,info)
+ def metadata(desc,id,info)
info=info.to_s.gsub(/(?:#{Mx[:br_line]}|\\)+/,'<br>')
- @manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{id}:</p></th><td><p class="left">#{info}</p></td></tr>\n}
+ @manifest[:html] << %{<tr><th class="left"><p class="bold_left" id="#{id}">#{desc}:</p></th><td><p class="left">#{info}</p></td></tr>\n}
end
def links(url,lnk,target)
static=if url =~/^\.\// then url.gsub(/^\.(\.)?/,@base_url)
@@ -281,271 +278,278 @@ module SiSU_Manifest
pth=@f.output_path.html_seg.dir
rel=@f.output_path.html_seg.rel_sm
url=@f.output_path.html_seg.url
- id,file='HTML, table of contents (for segmented text)',@f.base_filename.html_segtoc
- summarize_html_seg(id,file,pth,rel,url,img)
+ desc,id,file='HTML, table of contents (for segmented text)','html',@f.base_filename.html_segtoc
+ summarize_html_seg(desc,id,file,pth,rel,url,img)
end
if FileTest.file?(@f.place_file.html_scroll.dir)==true
img=%{<img border="0" height="15" width="15" src="#{@image_path}/b_doc.png" alt="Full Text" /> }
pth=@f.output_path.html_scroll.dir
rel=@f.output_path.html_scroll.rel_sm
url=@f.output_path.html_scroll.url
- id,file='HTML, full length document',@f.base_filename.html_scroll
- summarize(id,file,pth,rel,url,img)
+ desc,id,file='HTML, full length document','html_scroll',@f.base_filename.html_scroll
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?(@f.place_file.html_book_index.dir)==true
pth=@f.output_path.html_seg.dir
rel=@f.output_path.html_seg.rel_sm
url=@f.output_path.html_seg.url
- id,file='HTML, (book type) index',@f.base_filename.html_book_index
- summarize(id,file,pth,rel,url)
+ desc,id,file='HTML, (book type) index','html_book',@f.base_filename.html_book_index
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.html_concordance.dir)==true
pth=@f.output_path.html_seg.dir
rel=@f.output_path.html_seg.rel_sm
url=@f.output_path.html_seg.url
- id,file='HTML, concordance file',@f.base_filename.html_concordance
- summarize(id,file,pth,rel,url)
+ desc,id,file='HTML, concordance file','concordance',@f.base_filename.html_concordance
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.epub.dir)==true
img=%{<img border="0" height="18" width="18" src="#{@image_path}/b_epub.png" alt="EPUB" /> }
- id,file='EPUB (Electronic Publication, e-book standard)',@f.base_filename.epub
+ desc,id,file='EPUB (Electronic Publication, e-book standard)','epub',@f.base_filename.epub
pth=@f.output_path.epub.dir
rel=@f.output_path.epub.rel_sm
url=@f.output_path.epub.url
- summarize(id,file,pth,rel,url,img)
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_letter}")==true
img=%{<img border="0" height="18" width="15" src="#{@image_path}/b_pdf.png" alt="PDF portrait" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, U.S. letter size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_letter}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, U.S. letter size, portrait/vertical document (recommended for printing)",'pdf_letter',"#{@f.base_filename.pdf_p_letter}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_letter}")==true
img=%{<img border="0" height="15" width="18" src="#{@image_path}/b_pdf.png" alt="PDF landscape" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, U.S. letter size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_letter}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, U.S. letter size, landscape/horizontal document (recommended for screen viewing)",'pdf_letter_landscape',"#{@f.base_filename.pdf_l_letter}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_a4}")==true
img=%{<img border="0" height="18" width="15" src="#{@image_path}/b_pdf.png" alt="PDF portrait" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, A4 size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_a4}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, A4 size, portrait/vertical document (recommended for printing)",'pdf_a4',"#{@f.base_filename.pdf_p_a4}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_a4}")==true
img=%{<img border="0" height="15" width="18" src="#{@image_path}/b_pdf.png" alt="PDF landscape" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, A4 size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_a4}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, A4 size, landscape/horizontal document (recommended for screen viewing)",'pdf_a4_landscape',"#{@f.base_filename.pdf_l_a4}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_a5}")==true
img=%{<img border="0" height="18" width="15" src="#{@image_path}/b_pdf.png" alt="PDF portrait" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, A5 (book) size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_a5}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, A5 (book) size, portrait/vertical document (recommended for printing)",'pdf_a5',"#{@f.base_filename.pdf_p_a5}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_a5}")==true
img=%{<img border="0" height="15" width="18" src="#{@image_path}/b_pdf.png" alt="PDF landscape" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, A5 (book) size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_a5}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, A5 (book) size, landscape/horizontal document (recommended for screen viewing)",'pdf_a5_landscape',"#{@f.base_filename.pdf_l_a5}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_b5}")==true
img=%{<img border="0" height="18" width="15" src="#{@image_path}/b_pdf.png" alt="PDF portrait" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, B5 (book) size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_b5}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, B5 (book) size, portrait/vertical document (recommended for printing)",'pdf_b5',"#{@f.base_filename.pdf_p_b5}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_b5}")==true
img=%{<img border="0" height="15" width="18" src="#{@image_path}/b_pdf.png" alt="PDF landscape" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, B5 (book) size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_b5}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, B5 (book) size, landscape/horizontal document (recommended for screen viewing)",'pdf_a5_landscape',"#{@f.base_filename.pdf_l_b5}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_legal}")==true
img=%{<img border="0" height="18" width="15" src="#{@image_path}/b_pdf.png" alt="PDF portrait" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, U.S. legal size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_legal}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, U.S. legal size, portrait/vertical document (recommended for printing)",'pdf_legal',"#{@f.base_filename.pdf_p_legal}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_legal}")==true
img=%{<img border="0" height="15" width="18" src="#{@image_path}/b_pdf.png" alt="PDF landscape" /> }
pth=@f.output_path.pdf.dir
rel=@f.output_path.pdf.rel_sm
url=@f.output_path.pdf.url
- id,file="PDF, U.S. legal size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_legal}"
- summarize(id,file,pth,rel,url,img)
+ desc,id,file="PDF, U.S. legal size, landscape/horizontal document (recommended for screen viewing)",'pdf_legal_landscape',"#{@f.base_filename.pdf_l_legal}"
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?(@f.place_file.odt.dir)==true
img=%{<img border="0" height="18" width="18" src="#{@image_path}/b_odf.png" alt="ODF/ODT" /> }
pth=@f.output_path.odt.dir
rel=@f.output_path.odt.rel_sm
url=@f.output_path.odt.url
- id,file='ODF:ODT (Open Document Format)',@f.base_filename.odt
- summarize(id,file,pth,rel,url,img)
+ desc,id,file='ODF:ODT (Open Document Format)','odt',@f.base_filename.odt
+ summarize(desc,id,file,pth,rel,url,img)
end
if FileTest.file?(@f.place_file.xhtml.dir)==true
pth=@f.output_path.xhtml.dir
rel=@f.output_path.xhtml.rel_sm
url=@f.output_path.xhtml.url
- id,file='ODF:ODT (Open Document Format)',@f.base_filename.odt
- id,file='XHTML',@f.base_filename.xhtml
- summarize(id,file,pth,rel,url)
+ desc,id,file='XHTML','xhtml',@f.base_filename.xhtml
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.xml_sax.dir)==true
pth=@f.output_path.xml_sax.dir
rel=@f.output_path.xml_sax.rel_sm
url=@f.output_path.xml_sax.url
- id,file='XML SAX',@f.base_filename.xml_sax
- summarize(id,file,pth,rel,url)
+ desc,id,file='XML SAX','xml_sax',@f.base_filename.xml_sax
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.xml_dom.dir)==true
pth=@f.output_path.xml_dom.dir
rel=@f.output_path.xml_dom.rel_sm
url=@f.output_path.xml_dom.url
- id,file='XML DOM',@f.base_filename.xml_dom
- summarize(id,file,pth,rel,url)
+ desc,id,file='XML DOM','xml_dom',@f.base_filename.xml_dom
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.xml_docbook_article.dir)==true
pth=@f.output_path.xml_docbook_article.dir
rel=@f.output_path.xml_docbook_article.rel_sm
url=@f.output_path.xml_docbook_article.url
- id,file='XML Docbook Book',@f.base_filename.xml_docbook_article
- summarize(id,file,pth,rel,url)
+ desc,id,file='XML Docbook Article','docbook_article',@f.base_filename.xml_docbook_article
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.xml_docbook_book.dir)==true
pth=@f.output_path.xml_docbook_book.dir
rel=@f.output_path.xml_docbook_book.rel_sm
url=@f.output_path.xml_docbook_book.url
- id,file='XML Docbook Book',@f.base_filename.xml_docbook_book
- summarize(id,file,pth,rel,url)
+ desc,id,file='XML Docbook Book','docbook',@f.base_filename.xml_docbook_book
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.xml_fictionbook.dir)==true
pth=@f.output_path.xml_fictionbook.dir
rel=@f.output_path.xml_fictionbook.rel_sm
url=@f.output_path.xml_fictionbook.url
- id,file='XML Fictionbook',@f.base_filename.xml_fictionbook
- summarize(id,file,pth,rel,url)
+ desc,id,file='XML Fictionbook','fictionbook',@f.base_filename.xml_fictionbook
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.xml_scaffold_structure_sisu.dir)==true
pth=@f.output_path.xml_scaffold_structure_sisu.dir
rel=@f.output_path.xml_scaffold_structure_sisu.rel_sm
url=@f.output_path.xml_scaffold_structure_sisu.url
- id,file='XML Scaffold sisu structure',@f.base_filename.xml_scaffold_structure_sisu
- summarize(id,file,pth,rel,url)
+ desc,id,file='XML Scaffold sisu structure','xml_scaffold',@f.base_filename.xml_scaffold_structure_sisu
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.xml_scaffold_structure_collapse.dir)==true
pth=@f.output_path.xml_scaffold_structure_collapse.dir
rel=@f.output_path.xml_scaffold_structure_collapse.rel_sm
url=@f.output_path.xml_scaffold_structure_collapse.url
- id,file='XML Scaffold collapsed structure',@f.base_filename.xml_scaffold_structure_collapse
- summarize(id,file,pth,rel,url)
+ desc,id,file='XML Scaffold collapsed structure','xml_collapsed',@f.base_filename.xml_scaffold_structure_collapse
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.info.dir)==true
pth=@f.output_path.texinfo.dir
rel=@f.output_path.texinfo.rel_sm
url=@f.output_path.texinfo.url
- id,file='Info file',@f.base_filename.info
- summarize(id,file,pth,rel,url)
+ desc,id,file='Info file','info',@f.base_filename.info
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.manpage.dir)==true
pth=@f.output_path.manpage.dir
rel=@f.output_path.manpage.rel_sm
url=@f.output_path.manpage.url
- id,file='Manpage',@f.base_filename.manpage
- summarize(id,file,pth,rel,url)
+ desc,id,file='Manpage','manpage',@f.base_filename.manpage
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.sqlite_discrete.dir)==true
- id,file='SQLite3 file',@f.base_filename.sqlite_discrete
+ desc,id,file='SQLite3 file','sqlite',@f.base_filename.sqlite_discrete
pth=@f.output_path.sqlite_discrete.dir
rel=@f.output_path.sqlite_discrete.rel_sm
url=@f.output_path.sqlite_discrete.url
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.txt.dir)==true
- id='Plaintext (UTF-8)'
+ desc,id='Plaintext (UTF-8)','text'
pth=@f.output_path.txt.dir
rel=@f.output_path.txt.rel_sm
url=@f.output_path.txt.url
file=@f.base_filename.txt
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.textile.dir)==true
- id='Textile text (UTF-8)'
+ desc,id='Textile text (UTF-8)','textile'
pth=@f.output_path.textile.dir
rel=@f.output_path.textile.rel_sm
url=@f.output_path.textile.url
file=@f.base_filename.textile
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.asciidoc.dir)==true
- id='AsciiDoc text (UTF-8)'
+ desc,id='AsciiDoc text (UTF-8)','asciidoc'
pth=@f.output_path.asciidoc.dir
rel=@f.output_path.asciidoc.rel_sm
url=@f.output_path.asciidoc.url
file=@f.base_filename.asciidoc
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.markdown.dir)==true
- id='Markdown text (UTF-8)'
+ desc,id='Markdown text (UTF-8)','markdown'
pth=@f.output_path.markdown.dir
rel=@f.output_path.markdown.rel_sm
url=@f.output_path.markdown.url
file=@f.base_filename.markdown
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.rst.dir)==true
- id='rST text (UTF-8)'
+ desc,id='rST text (UTF-8)','rst'
pth=@f.output_path.rst.dir
rel=@f.output_path.rst.rel_sm
url=@f.output_path.rst.url
file=@f.base_filename.rst
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
+ end
+ if FileTest.file?(@f.place_file.orgmode.dir)==true
+ desc,id='OrgMode structure text (UTF-8)','org'
+ pth=@f.output_path.orgmode.dir
+ rel=@f.output_path.orgmode.rel_sm
+ url=@f.output_path.orgmode.url
+ file=@f.base_filename.orgmode
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?("#{@base_path}/#{@md.fns}.tex")==true
- id,file='LaTeX (portrait)',"#{@md.fns}.tex"
+ desc,id,file='LaTeX (portrait)','latex',"#{@md.fns}.tex"
pth,rel,url='','',''
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?("#{@base_path}/#{@md.fns}.tex")==true
- id,file='LaTeX (landscape)',"#{@md.fns}.landscape.tex"
+ desc,id,file='LaTeX (landscape)','latex_landscape',"#{@md.fns}.landscape.tex"
pth,rel,url='','',''
- summarize(id,file,pth,rel,url)
+ summarize(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.hash_digest.dir)==true
pth=@f.output_path.hash_digest.dir
rel=@f.output_path.hash_digest.rel_sm
url=@f.output_path.hash_digest.url
- id,file="Digest/DCC - Document Content Certificate (#{@dg})",@f.base_filename.hash_digest
- summarize(id,file,pth,rel,url)
+ desc,id,file="Digest/DCC - Document Content Certificate (#{@dg})",'digests',@f.base_filename.hash_digest
+ summarize(desc,id,file,pth,rel,url)
end
end
def published_versions
- id,file='Markup (SiSU source)',@md.fns
- languages(id,file)
+ desc,file='Markup (SiSU source)','source',@md.fns
+ languages(desc,file)
end
def language_versions
if FileTest.file?(@f.place_file.manifest.dir)==true
- id='Markup (SiSU source)'
- published_languages(id)
+ desc='Markup (SiSU source)'
+ published_languages(desc)
end
end
def qrc_image
@@ -585,165 +589,165 @@ WOK
pth=@f.output_path.src.dir
rel=@f.output_path.src.rel_sm
url=@f.output_path.src.url
- id,file='Markup Composite File (SiSU source)',@f.base_filename.src
- summarize_sources(id,file,pth,rel,url)
+ desc,id,file='Markup Composite File (SiSU source)','source',@f.base_filename.src
+ summarize_sources(desc,id,file,pth,rel,url)
end
else
if FileTest.file?(@f.place_file.src.dir)==true
pth=@f.output_path.src.dir
rel=@f.output_path.src.rel_sm
url=@f.output_path.src.url
- id,file='Markup (SiSU source)',@f.base_filename.src
- summarize_sources(id,file,pth,rel,url)
+ desc,id,file='Markup (SiSU source)','composite',@f.base_filename.src
+ summarize_sources(desc,id,file,pth,rel,url)
end
end
if FileTest.file?(@f.place_file.sisupod.dir)==true
pth=@f.output_path.sisupod.dir
rel=@f.output_path.sisupod.rel_sm
url=@f.output_path.sisupod.url
- id,file='SiSU doc (tar.xz)',@f.base_filename.sisupod
- summarize_sources(id,file,pth,rel,url)
+ desc,id,file='SiSUdoc pod (tar.xz)','sisupod',@f.base_filename.sisupod
+ summarize_sources(desc,id,file,pth,rel,url)
end
if FileTest.file?(@f.place_file.pot.dir)==true
pth=@f.output_path.pot.dir
rel=@f.output_path.pot.rel_sm
url=@f.output_path.pot.url
- id,file='SiSU pot',@f.base_filename.pot
- summarize_sources(id,file,pth,rel,url)
+ desc,id,file='SiSU pot','pot',@f.base_filename.pot
+ summarize_sources(desc,id,file,pth,rel,url)
end
end
def metadata_tests
if defined? @md.title #%
if defined? @md.title.full \
and @md.title.full=~/\S+/
- id,info=@translate.full_title,@md.title.full
- metadata(id,info)
+ desc,id,info=@translate.full_title,'title',@md.title.full
+ metadata(desc,id,info)
end
end
if defined? @md.creator #%
if defined? @md.creator.author \
and @md.creator.author=~/\S+/
- id,info=@translate.author,@md.creator.author
- metadata(id,info)
+ desc,id,info=@translate.author,'author',@md.creator.author
+ metadata(desc,id,info)
end
if defined? @md.creator.editor \
and @md.creator.editor=~/\S+/
- id,info=@translate.editor,@md.creator.editor
- metadata(id,info)
+ desc,id,info=@translate.editor,'editor',@md.creator.editor
+ metadata(desc,id,info)
end
if defined? @md.creator.contributor \
and @md.creator.contributor=~/\S+/
- id,info=@translate.contributor,@md.creator.contributor
- metadata(id,info)
+ desc,id,info=@translate.contributor,'contributor',@md.creator.contributor
+ metadata(desc,id,info)
end
if defined? @md.creator.translator \
and @md.creator.translator=~/\S+/
- id,info=@translate.translator,@md.creator.translator
- metadata(id,info)
+ desc,id,info=@translate.translator,'creator',@md.creator.translator
+ metadata(desc,id,info)
end
if defined? @md.creator.illustrator \
and @md.creator.illustrator=~/\S+/
- id,info=@translate.illustrator,@md.creator.illustrator
- metadata(id,info)
+ desc,id,info=@translate.illustrator,'illustrator',@md.creator.illustrator
+ metadata(desc,id,info)
end
if defined? @md.creator.prepared_by \
and @md.creator.prepared_by=~/\S+/
- id,info=@translate.prepared_by,@md.creator.prepared_by
- metadata(id,info)
+ desc,id,info=@translate.prepared_by,'prepared_by',@md.creator.prepared_by
+ metadata(desc,id,info)
end
if defined? @md.creator.digitized_by \
and @md.creator.digitized_by=~/\S+/
- id,info=@translate.digitized_by,@md.creator.digitized_by
- metadata(id,info)
+ desc,id,info=@translate.digitized_by,'designed_by',@md.creator.digitized_by
+ metadata(desc,id,info)
end
end
if defined? @md.rights
if defined? @md.rights.all \
and @md.rights.all=~/\S+/ #dc
- id,info=@translate.rights,@md.rights.all
- metadata(id,info)
+ desc,id,info=@translate.rights,'rights',@md.rights.all
+ metadata(desc,id,info)
end
end
if defined? @md.date #%
if defined? @md.date.published \
and @md.date.published=~/\S+/ #dc
- id,info=@translate.date,@md.date.published
- metadata(id,info)
+ desc,id,info=@translate.date,'date',@md.date.published
+ metadata(desc,id,info)
end
if defined? @md.date.created \
and @md.date.created=~/\S+/ #dc
- id,info=@translate.date_created,@md.date.created
- metadata(id,info)
+ desc,id,info=@translate.date_created,'date_created',@md.date.created
+ metadata(desc,id,info)
end
if defined? @md.date.issued \
and @md.date.issued=~/\S+/ #dc
- id,info=@translate.date_issued,@md.date.issued
- metadata(id,info)
+ desc,id,info=@translate.date_issued,'date_issued',@md.date.issued
+ metadata(desc,id,info)
end
if defined? @md.date.available \
and @md.date.available=~/\S+/ #dc
- id,info=@translate.date_available,@md.date.available
- metadata(id,info)
+ desc,id,info=@translate.date_available,'date_available',@md.date.available
+ metadata(desc,id,info)
end
if defined? @md.date.modified \
and @md.date.modified=~/\S+/ #dc
- id,info=@translate.date_modified,@md.date.modified
- metadata(id,info)
+ desc,id,info=@translate.date_modified,'date_modified',@md.date.modified
+ metadata(desc,id,info)
end
if defined? @md.date.valid \
and @md.date.valid=~/\S+/ #dc
- id,info=@translate.date_valid,@md.date.valid
- metadata(id,info)
+ desc,id,info=@translate.date_valid,'date_valid',@md.date.valid
+ metadata(desc,id,info)
end
end
if defined? @md.publisher \
and @md.publisher=~/\S+/ #dc
- id,info=@translate.publisher,@md.publisher
- metadata(id,info)
+ desc,id,info=@translate.publisher,'publisher',@md.publisher
+ metadata(desc,id,info)
end
if defined? @md.notes #%
if defined? @md.notes.description \
and @md.notes.description=~/\S+/
- id,info=@translate.description,@md.notes.description
- metadata(id,info)
+ desc,id,info=@translate.description,'description',@md.notes.description
+ metadata(desc,id,info)
end
if defined? @md.notes.abstract \
and @md.notes.abstract=~/\S+/
- id,info=@translate.abstract,@md.notes.abstract
- metadata(id,info)
+ desc,id,info=@translate.abstract,'abstract',@md.notes.abstract
+ metadata(desc,id,info)
end
if defined? @md.notes.comment \
and @md.notes.comment=~/\S+/
- id,info=@translate.comments,@md.notes.comment
- metadata(id,info)
+ desc,id,info=@translate.comments,'comment',@md.notes.comment
+ metadata(desc,id,info)
end
if defined? @md.notes.prefix_a \
and @md.notes.prefix_a=~/\S+/
- id,info=@translate.prefix_a,@md.notes.prefix_a
- metadata(id,info)
+ desc,id,info=@translate.prefix_a,'prefix',@md.notes.prefix_a
+ metadata(desc,id,info)
end
if defined? @md.notes.prefix_b \
and @md.notes.prefix_b=~/\S+/
- id,info=@translate.prefix_b,@md.notes.prefix_b
- metadata(id,info)
+ desc,id,info=@translate.prefix_b,'prefix_b',@md.notes.prefix_b
+ metadata(desc,id,info)
end
end
if defined? @md.title #%
if defined? @md.title.language \
and @md.title.language=~/\S+/
- id,info=@translate.language,@md.title.language
- metadata(id,info)
+ desc,id,info=@translate.language,'language',@md.title.language
+ metadata(desc,id,info)
end
if defined? @md.original.language \
and @md.original.language=~/\S+/
- id,info=@translate.language_original,@md.original.language
- metadata(id,info)
+ desc,id,info=@translate.language_original,'language_original',@md.original.language
+ metadata(desc,id,info)
end
end
if defined? @md.classify #%
if defined? @md.topic_register_array \
and @md.topic_register_array.length > 0
- @manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{@translate.topic_register}:</p></th><td>\n}
+ @manifest[:html] << %{<tr><th class="left"><p class="bold_left" id="topics">#{@translate.topic_register}:</p></th><td>\n}
@md.topic_register_array.each do |t|
t.each_with_index do |st,i|
if st.is_a?(Array)
@@ -764,104 +768,104 @@ WOK
end
if defined? @md.classify.subject \
and @md.classify.subject=~/\S+/
- id,info=@translate.subject,@md.classify.subject
- metadata(id,info)
+ desc,id,info=@translate.subject,'subject',@md.classify.subject
+ metadata(desc,id,info)
end
if defined? @md.classify.keywords \
and @md.classify.keywords=~/\S+/
- id,info=@translate.keywords,@md.classify.keywords
- metadata(id,info)
+ desc,id,info=@translate.keywords,'keywords',@md.classify.keywords
+ metadata(desc,id,info)
end
if defined? @md.classify.loc \
and @md.classify.loc=~/\S+/
- id,info=@translate.cls_loc,@md.classify.loc
- metadata(id,info)
+ desc,id,info=@translate.cls_loc,'loc',@md.classify.loc
+ metadata(desc,id,info)
end
if defined? @md.classify.dewey \
and @md.classify.dewey=~/\S+/
- id,info=@translate.cls_dewey,@md.classify.dewey
- metadata(id,info)
+ desc,id,info=@translate.cls_dewey,'dewey',@md.classify.dewey
+ metadata(desc,id,info)
end
if defined? @md.notes.coverage \
and @md.notes.coverage=~/\S+/
- id,info=@translate.coverage,@md.notes.coverage
- metadata(id,info)
+ desc,id,info=@translate.coverage,'coverage',@md.notes.coverage
+ metadata(desc,id,info)
end
if defined? @md.notes.relation \
and @md.notes.relation=~/\S+/
- id,info=@translate.relation,@md.notes.relation
- metadata(id,info)
+ desc,id,info=@translate.relation,'relation',@md.notes.relation
+ metadata(desc,id,info)
end
if defined? @md.notes.type \
and @md.notes.type=~/\S+/ #dc
- id,info=@translate.type,@md.notes.type
- metadata(id,info)
+ desc,id,info=@translate.type,'type',@md.notes.type
+ metadata(desc,id,info)
end
if defined? @md.notes.format \
and @md.notes.format=~/\S+/
- id,info=@transate.format,@md.notes.format
- metadata(id,info)
+ desc,id,info=@transate.format,'format',@md.notes.format
+ metadata(desc,id,info)
end
end
if defined? @md.identifier #%
if defined? @md.identifier.oclc \
and @md.identifier.oclc=~/\S+/
- id,info=@translate.cls_oclc,@md.identifier.oclc
- @manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{id}:</p></th><td>\n}
+ desc,id,info=@translate.cls_oclc,'',@md.identifier.oclc
+ @manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{desc}:</p></th><td>\n}
@manifest[:html] << %{<p class="left"><a href="http://worldcat.org/oclc/#{info}">#{info}</a></p>\n}
@manifest[:html] << %{</td></tr>\n}
end
if defined? @md.identifier.pg \
and @md.identifier.pg=~/\S+/
- id,info=@translate.cls_gutenberg,@md.identifier.pg
- metadata(id,info)
+ desc,id,info=@translate.cls_gutenberg,'ocalc',@md.identifier.pg
+ metadata(desc,id,info)
end
if defined? @md.identifier.isbn \
and @md.identifier.isbn=~/\S+/
- id,info=@translate.cls_isbn,@md.identifier.isbn
- metadata(id,info)
+ desc,id,info=@translate.cls_isbn,'isbn',@md.identifier.isbn
+ metadata(desc,id,info)
end
end
if defined? @md.original.source \
and @md.original.source=~/\S+/
- id,info=@translate.source,@md.original.source
- metadata(id,info)
+ desc,id,info=@translate.source,'source_original',@md.original.source
+ metadata(desc,id,info)
end
if @md.fns
- id,info=@translate.sourcefile,@md.fns
- metadata(id,info)
+ desc,id,info=@translate.sourcefile,'source_filename',@md.fns
+ metadata(desc,id,info)
end
if @md.en[:mismatch] > 0
- id,info='WARNING document error in endnote markup, number mismatch',"endnotes: #{@md.en[:note]} != endnote reference marks: #{@md.en[:mark]} (difference = #{@md.en[:mismatch]})"
- metadata(id,info)
+ desc,id,info='WARNING document error in endnote markup, number mismatch','',"endnotes: #{@md.en[:note]} != endnote reference marks: #{@md.en[:mark]} (difference = #{@md.en[:mismatch]})"
+ metadata(desc,id,info)
end
if @md.wc_words
- id,info=@translate.word_count,@md.wc_words
- metadata(id,info)
+ desc,id,info=@translate.word_count,'wordcount',@md.wc_words
+ metadata(desc,id,info)
end
if @md.dgst
- id,info="#{@translate.sourcefile_digest} (#{@dg})",@md.dgst[1]
- metadata(id,info)
+ desc,id,info="#{@translate.sourcefile_digest} (#{@dg})",'digests',@md.dgst[1]
+ metadata(desc,id,info)
end
if @md.sc_number
- id,info=@translate.sc_number,@md.sc_number
- metadata(id,info)
+ desc,id,info=@translate.sc_number,'sc_number',@md.sc_number
+ metadata(desc,id,info)
end
if @md.sc_date
- id,info=@translate.sc_date,"#{@md.sc_date} at #{@md.sc_time}"
- metadata(id,info)
+ desc,id,info=@translate.sc_date,'sc_date',"#{@md.sc_date} at #{@md.sc_time}"
+ metadata(desc,id,info)
end
if @md.generated
- id,info=@translate.last_generated,@md.generated
- metadata(id,info)
+ desc,id,info=@translate.last_generated,'generated',@md.generated
+ metadata(desc,id,info)
end
- if @md.sisu_version
- id,info=@translate.sisu_version,"#{@md.sisu_version[:project]} #{@md.sisu_version[:version]} #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})#{@md.sisu_version[:install_method]}"
- metadata(id,info)
+ if @md.project_details
+ desc,id,info=@translate.sisu_version,'project',"#{@md.project_details.project} #{@md.project_details.version} #{@md.project_details.date_stamp} (#{@md.project_details.date})#{@md.project_details.install_method}"
+ metadata(desc,id,info)
end
if @md.ruby_version
- id,info=@translate.ruby_version,@md.ruby_version
- metadata(id,info)
+ desc,id,info=@translate.ruby_version,'ruby',@md.ruby_version
+ metadata(desc,id,info)
end
end
def links_tests
@@ -982,7 +986,7 @@ WOK
@manifest[:html] <<<<WOK
<h2 class="small"><a name="metadata">#{@translate.manifest_description_metadata}</a></h2>
<table summary="document metadata" width="100%" border="0" cellpadding="2" align="center">
-<tr> <th class="left"><p class="bold">#{@translate.metadata}</p></th><th class="left"><p class="bold">#{@translate.description}</p></th></tr>
+<tr> <th class="left"><p class="bold" id="metadata">#{@translate.metadata}</p></th><th class="left"><p class="bold">#{@translate.description}</p></th></tr>
WOK
metadata_tests
@manifest[:html] <<<<WOK
diff --git a/lib/sisu/v5/html_minitoc.rb b/lib/sisu/develop/html_minitoc.rb
index f185b0ee..96da06d7 100644
--- a/lib/sisu/v5/html_minitoc.rb
+++ b/lib/sisu/develop/html_minitoc.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
- minitoc
+** Description: documents, structuring, processing, publishing, search
+*** html minitoc
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html_minitoc.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_minitoc.rb;hb=HEAD>
=end
module SiSU_HTML_MiniToc
@@ -68,7 +64,6 @@
def initialize(md,data)
@md,@data=md,data
@pat_strip_heading_name=/<a name="h?\d.*?">(.+?)<\/a>/
- @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
@tell=SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set]) if @md
end
def songsheet
@@ -203,7 +198,7 @@
fn: @@seg_url,
}
f=@md.file.base_filename.html_seg(fnh)
- lnk_n_txt=%{ <a href="#{f}##{@ocn_html_identifier}#{txt.ocn}">
+ lnk_n_txt=%{ <a href="#{f}##{txt.ocn}">
#{txt.obj}
</a>}
txt_obj={ txt: lnk_n_txt }
@@ -222,7 +217,7 @@
fn: @@seg_url,
}
f=@md.file.base_filename.html_seg(fnh)
- lnk_n_txt=%{ <a href="#{f}##{@ocn_html_identifier}#{txt.ocn}">
+ lnk_n_txt=%{ <a href="#{f}##{txt.ocn}">
#{txt.obj}
</a>}
txt_obj={ txt: lnk_n_txt }
diff --git a/lib/sisu/v6/html_parts.rb b/lib/sisu/develop/html_parts.rb
index 2c09db7e..4133203c 100644
--- a/lib/sisu/v6/html_parts.rb
+++ b/lib/sisu/develop/html_parts.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html_parts.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_parts.rb;hb=HEAD>
=end
module SiSU_Parts_HTML
@@ -296,7 +293,7 @@ module SiSU_Proj_HTML
#@date=SiSU_Env::InfoDate.new #{@date.year}
end
def txt_generator
- %{ <meta name="generator" content="#{@v[:project]} #{@v[:version]} of #{@v[:date_stamp]} (#{@v[:date]}) (n*x and Ruby!)" />
+ %{ <meta name="generator" content="#{@v.project} #{@v.version} of #{@v.date_stamp} (#{@v.date}) (n*x and Ruby!)" />
<link rel="generator" href="http://www.sisudoc.org/" />}
end
def widget_sisu_text
@@ -304,9 +301,9 @@ module SiSU_Proj_HTML
<p class="tiny"><font color="#666666" size="2">
Output generated by
<a href="#{the_url.sisu}">
- #{@v[:project]}
+ #{@v.project}
</a>
- #{@v[:version]} #{@v[:date]} (#{@v[:date_stamp]})
+ #{@v.version} #{@v.date} (#{@v.date_stamp})
</font></p>
WOK
end
@@ -365,7 +362,7 @@ WOK
<meta name="dc.publisher" content= "SiSU http://www.sisudoc.org/" />
<meta name="dc.language" content="en" />
<meta name="dc.rights" content="Copyright Ralph Amissah" />
-<meta name="generator" content="#{@v[:project]} #{@v[:version]} of #{@v[:date_stamp]} (#{@v[:date]}) (n*x and Ruby!)" />
+<meta name="generator" content="#{@v.project} #{@v.version} of #{@v.date_stamp} (#{@v.date}) (n*x and Ruby!)" />
<link rel="generator" href="http://www.sisudoc.org/" />
<link rel="stylesheet" href="./#{@dir.path.style}/harvest.css" type="text/css" />
<link rel="shortcut icon" href="./_sisu/image/rb7.ico" />
@@ -423,7 +420,7 @@ Outputs include: plaintext, HTML, EPUB, ODT (OpenDocumentText), (XHTML, XML,) La
</a>
</p>
<p class="tiny">
-#{@v[:project]} #{@v[:version]} of #{@v[:date_stamp]} (#{@v[:date]}) (n*x and Ruby!), #{@date.year_static}.
+#{@v.project} #{@v.version} of #{@v.date_stamp} (#{@v.date}) (n*x and Ruby!), #{@date.year_static}.
</p>
<p class="tiny">
w3 since October 3 1993.
diff --git a/lib/sisu/develop/html_persist.rb b/lib/sisu/develop/html_persist.rb
new file mode 100644
index 00000000..482a0c00
--- /dev/null
+++ b/lib/sisu/develop/html_persist.rb
@@ -0,0 +1,237 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** html segment generation, processing
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_persist.rb;hb=HEAD>
+
+=end
+module SiSU_HTML_Persist
+ class Persist
+ @@persist=nil
+ attr_accessor :is0,:is1,:is2,:is3,:is4,:heading0,:heading1,:heading2,:heading3,:heading4, :title, :dot_nav, :tocband_banner, :tocband_bannerless, :headings, :heading_endnotes, :main, :endnote_all, :tail, :credits, :heading_idx, :idx, :seg_endnotes, :seg_endnotes_array, :segtocband, :get_hash_fn, :get_hash_to, :seg_subtoc, :seg_subtoc_array, :fn, :seg_name ,:seg_name_x,:seg_name_x_tracker
+ def initialize(args=nil)
+ @@persist=args=(args ? args : (@@persist || persist_init_hash_values))
+ @is0=args[:is0]
+ @is1=args[:is1]
+ @is2=args[:is2]
+ @is3=args[:is3]
+ @is4=args[:is4]
+ @heading0=args[:heading0]
+ @heading1=args[:heading1]
+ @heading2=args[:heading2]
+ @heading3=args[:heading3]
+ @heading4=args[:heading4]
+ @title=args[:title]
+ @dot_nav=args[:dot_nav]
+ @tocband_banner=args[:tocband_banner]
+ @tocband_bannerless=args[:tocband_bannerless]
+ @headings=args[:headings]
+ @heading_endnotes=args[:heading_endnotes]
+ @main=args[:main]
+ @endnote_all=args[:endnote_all]
+ @tail=args[:tail]
+ @credits=args[:credits]
+ @heading_idx=args[:heading_idx]
+ @idx=args[:idx]
+ @seg_endnotes=args[:seg_endnotes]
+ @seg_endnotes_array=args[:seg_endnotes_array]
+ @get_hash_to=args[:get_hash_to]
+ @get_hash_fn=args[:get_hash_fn]
+ @seg_subtoc=args[:seg_subtoc]
+ @seg_subtoc_array=args[:seg_subtoc_array]
+ @segtocband=args[:fn]
+ @fn=args[:fn]
+ @seg_name=args[:seg_name]
+ @seg_name_x=args[:seg_name_x]
+ @seg_name_x_tracker=args[:seg_name_x_tracker]
+ end
+ def is0
+ @is0
+ end
+ def is1
+ @is1
+ end
+ def is2
+ @is2
+ end
+ def is3
+ @is3
+ end
+ def is4
+ @is4
+ end
+ def heading0
+ @heading0
+ end
+ def heading1
+ @heading1
+ end
+ def heading2
+ @heading2
+ end
+ def heading3
+ @heading3
+ end
+ def heading4
+ @heading4
+ end
+ def title
+ @title
+ end
+ def dot_nav
+ @dot_nav
+ end
+ def tocband_banner
+ @tocband_banner
+ end
+ def tocband_bannerless
+ @tocband_bannerless
+ end
+ def headings
+ @headings
+ end
+ def heading_endnotes
+ @heading_endnotes
+ end
+ def main
+ @main
+ end
+ def endnote_all
+ @endnote_all
+ end
+ def tail
+ @tail
+ end
+ def credits
+ @credits
+ end
+ def heading_idx
+ @heading_idx
+ end
+ def idx
+ @idx
+ end
+ def seg_endnotes
+ @seg_endnotes
+ end
+ def seg_endnotes_array
+ @seg_endnotes_array
+ end
+ def get_hash_to
+ @get_hash_to
+ end
+ def get_hash_fn
+ @get_hash_fn
+ end
+ def seg_subtoc
+ @seg_subtoc
+ end
+ def seg_subtoc_array
+ @seg_subtoc_array
+ end
+ def segtocband
+ @segtocband
+ end
+ def fn
+ @fn
+ end
+ def seg_name
+ @seg_name
+ end
+ def seg_name_x
+ @seg_name_x
+ end
+ def seg_name_x_tracker
+ @seg_name_x_tracker
+ end
+ def persist_init_hash_values
+ {
+ is0: 0,
+ is1: 0,
+ is2: 0,
+ is3: 0,
+ is4: 0,
+ heading0: '',
+ heading1: '',
+ heading2: '',
+ heading3: '',
+ heading4: '',
+ tocband_banner: [],
+ tocband_bannerless: [],
+ title: [],
+ headings: [],
+ main: [],
+ idx: [],
+ tail: [],
+ credits: [],
+ endnote_all: [],
+ heading_endnotes: '',
+ seg_endnotes: {},
+ seg_endnotes_array: [],
+ get_hash_fn: '',
+ get_hash_to: '',
+ seg_subtoc: {},
+ seg_subtoc_array: [],
+ segtocband: '',
+ fn: '',
+ seg_name: [],
+ seg_name_x: [],
+ seg_name_x_tracker: 0,
+ }
+ end
+ def persist_init
+ @@persist=nil
+ Persist.new(persist_init_hash_values)
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/html_promo.rb b/lib/sisu/develop/html_promo.rb
index a2d3ecf3..b58fcac2 100644
--- a/lib/sisu/v5/html_promo.rb
+++ b/lib/sisu/develop/html_promo.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** html advertising component, build here, mockup
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html_promo.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: html advertising component, build here, mockup
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_promo.rb;hb=HEAD>
=end
module SiSU_HTML_Promo
diff --git a/lib/sisu/v6/html_scroll.rb b/lib/sisu/develop/html_scroll.rb
index 9e158af3..9229e5fb 100644
--- a/lib/sisu/v6/html_scroll.rb
+++ b/lib/sisu/develop/html_scroll.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** html scroll generation, processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html_scroll.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: html scroll generation, processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_scroll.rb;hb=HEAD>
=end
module SiSU_HTML_Scroll
diff --git a/lib/sisu/v5/html_segments.rb b/lib/sisu/develop/html_segments.rb
index 06aac4e1..65bd2d64 100644
--- a/lib/sisu/v5/html_segments.rb
+++ b/lib/sisu/develop/html_segments.rb
@@ -1,71 +1,69 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** html segment generation, processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html_segments.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: html segment generation, processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_segments.rb;hb=HEAD>
=end
module SiSU_HTML_Seg
require_relative 'html_shared' # html_shared.rb
require_relative 'html' # html.rb
+ require_relative 'html_persist' # html_persist.rb
require_relative 'html_promo' # html_promo.rb
require_relative 'shared_metadata' # shared_metadata.rb
class Output
- def initialize(md,outputfile,seg,minitoc,type='')
- @md, @output_seg_file,@seg,@minitoc,@type=
- md,outputfile, seg,minitoc, type
+ def initialize(md,outputfile,per,minitoc,type='')
+ @md, @output_seg_file,@per,@minitoc,@type=
+ md,outputfile, per,minitoc, type
@title_banner_=SiSU_Env::CreateSite.new(@md.opt).html_seg_title_banner?
@file=SiSU_Env::FileOp.new(@md)
@make=SiSU_Env::ProcessingSettings.new(@md)
@@ -74,67 +72,68 @@ module SiSU_HTML_Seg
: 'content0'
end
def output
- if @seg[:title] =~/\S/
+ if @per.title =~/\S/
filename_seg=[]
if @make.build.html_top_band?
filename_seg \
- << @seg[:title] \
- << @seg[:tocband_banner]
+ << @per.title \
+ << @per.tocband_banner
else
filename_seg \
- << @seg[:title]
+ << @per.title
end
if @type=='endnotes'
- @seg[:headings]=[]
+ @per.headings=[]
format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md)
if @title_banner_
- @seg[:headings] \
+ @per.headings \
<< format_head_seg.
title_banner(@md.title.main,@md.title.sub,@author)
end
txt_obj={ txt: 'Endnotes', ocn_display: '' }
format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj)
- @seg[:headings] \
+ @per.headings \
<< format_seg.title_heading1
filename_seg \
- << @seg[:heading_endnotes] \
- << @minitoc << @seg[:headings] \
+ << @per.heading_endnotes \
+ << @minitoc << @per.headings \
<< %{\n<div class="#{@cl}">\n} \
- << @seg[:endnote_all] \
+ << @per.endnote_all \
<< '</div>' # << '</div>'
elsif @type=='idx'
- @seg[:headings]=[]
+ @per.headings=[]
format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md)
if @title_banner_
- @seg[:headings] \
+ @per.headings \
<< format_head_seg.
title_banner(@md.title.main,@md.title.sub,@author)
end
txt_obj={ txt: 'Index', ocn_display: '' }
format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj)
- @seg[:headings] << format_seg.title_heading1
+ @per.headings << format_seg.title_heading1
filename_seg \
- << @seg[:heading_idx] \
- << @minitoc << @seg[:headings] \
+ << @per.heading_idx \
+ << @minitoc << @per.headings \
<< %{\n<div class="#{@cl}">\n} \
- << @seg[:idx] \
+ << @per.idx \
<< '</div>' # << '</div>'
elsif @type=='metadata'
metadata=SiSU_Metadata::Summary.new(@md).html_display.metadata
- @seg[:headings]=[]
+ @per.headings=[]
format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md)
if @title_banner_
- @seg[:headings] \
+ @per.headings \
<< format_head_seg.
title_banner(@md.title.main,@md.title.sub,@author)
end
txt_obj={ txt: 'Metadata', ocn_display: '' }
format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj)
- @seg[:headings] << format_seg.title_heading1
+ @per.headings \
+ << format_seg.title_heading1
filename_seg \
- << @seg[:heading_idx] \
+ << @per.heading_idx \
<< @minitoc \
- << @seg[:headings] \
+ << @per.headings \
<< %{\n<div class="#{@cl}">\n} \
<< metadata \
<< '</div>' # << '</div>'
@@ -142,23 +141,23 @@ module SiSU_HTML_Seg
if @make.build.html_top_band?
filename_seg \
<< @minitoc \
- << @seg[:headings] \
- << @seg[:main] \
+ << @per.headings \
+ << @per.main \
<< "\n</div>\n"
else
filename_seg \
<< @minitoc \
- << @seg[:main] \
+ << @per.main \
<< "\n</div>\n"
end
end
filename_seg <<=if @make.build.html_top_band?
- @seg[:tail] \
- << @seg[:tocband_bannerless] \
- << @seg[:credits]
+ @per.tail \
+ << @per.tocband_bannerless \
+ << @per.credits
else
- @seg[:tail] \
- << @seg[:credits]
+ @per.tail \
+ << @per.credits
end
filename_seg=filename_seg.flatten.compact #watch
filename_seg.each do |str|
@@ -176,32 +175,15 @@ module SiSU_HTML_Seg
end
end
class Seg
- @@seg,@@seg_subtoc,@@seg_endnotes,@@seg_ad={},{},{},{}
- @@seg_name,@@seg_name_html=[],[]
- @@seg_url=@@fn=@@get_hash_to=@@get_hash_fn=''
- @@loop_count=@@seg_total=@@tracker=0
- @@is4=@@is3=@@is2=@@is1=@@is0=0
- @@heading0=@@heading1=@@heading2=@@heading3=@@heading4=0
- @@seg[:tocband_banner],
- @@seg[:tocband_bannerless],
- @@seg[:title],@@seg[:headings],
- @@seg[:main],
- @@seg[:idx],
- @@seg[:tail],
- @@seg[:credits],
- @@seg_subtoc_array,
- @@seg_endnotes_array,
- @@seg[:endnote_all]=
- Array.new(11){[]}
- @@seg[:heading_endnotes]=''
- @@tablehead,@@number_of_cols=0,0
- @@dp,@@segtocband=nil,nil
- @@fns_previous=''
- attr_reader :seg_name_html,:seg_name_html_tracker
+ @@seg_url=''
+ @@tracker=0
+ @@seg_name=[]
+ attr_reader :seg_name_x,:seg_name_x_tracker
def initialize(md=nil,data='')
@md,@data=md,data
- @seg_name_html=@@seg_name_html || nil
- @seg_name_html_tracker=@@tracker || nil
+ @per=SiSU_HTML_Persist::Persist.new
+ @seg_name_x=@per.seg_name_x=(@@seg_name || [])
+ @seg_name_x_tracker=@per.seg_name_x_tracker=(@@tracker || 0)
@env=SiSU_Env::InfoEnv.new(@md.fns) if @md
if @md
@make=SiSU_Env::ProcessingSettings.new(@md)
@@ -217,22 +199,24 @@ module SiSU_HTML_Seg
def songsheet
begin
@minitoc=SiSU_HTML::Source::Toc.new(@md,@data).minitoc
- data=get_subtoc_endnotes(@data)
- data=articles(data)
- SiSU_HTML_Seg::Seg.new.cleanup # (((( added ))))
+ @per=SiSU_HTML_Persist::Persist.new
+ data=get_subtoc_endnotes(@data,@per)
+ data=articles(data,@per)
+ cleanup(@md,@per) # (((( added ))))
#### (((( END )))) ####
rescue
SiSU_Errors::Rescued.new($!,$@,@md.opt.selections.str,@md.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
- @@seg_name=[]
+ SiSU_HTML_Persist::Persist.new.persist_init
+ @@seg_name=@per.seg_name=[]
end
end
protected
- def articles(data)
+ def articles(data,per)
+ @per=per
tracking,newfile=0,0
- @@is4=@@is3=@@is2=@@is1=@@is0=0
printed_endnote_seg='n'
idx_html=nil
if @md.book_idx
@@ -240,27 +224,28 @@ module SiSU_HTML_Seg
idx_html=SiSU_Particulars::CombinedSingleton.
instance.get_idx_html(@md.opt).html_idx
idx_html.each do |x|
- @@seg[:idx] << x
+ @per.idx << x
end
- @@seg[:heading_idx]=''
+ @per.heading_idx=''
end
data.each do |dob|
if (dob.is == :heading \
|| dob.is == :heading_insert) \
&& dob.ln == 4
@@seg_name << dob.name
+ @per.seg_name = @@seg_name
dob.name
end
end
- @@seg_name_html=@@seg_name
- @@seg_total=@@seg_name.length
- testforartnum=@@seg_name_html
+ @per.seg_name_x=@per.seg_name
+ @per.seg_name.length
+ testforartnum=@per.seg_name_x
if (@md.opt.act[:verbose][:set]==:on \
|| @md.opt.act[:verbose_plus][:set]==:on \
|| @md.opt.act[:maintenance][:set]==:on)
SiSU_Screen::Ansi.new(
@md.opt.act[:color_state][:set],
- @@seg_name.length
+ @per.seg_name.length
).segmented
end
map_nametags=SiSU_Particulars::CombinedSingleton.
@@ -288,41 +273,41 @@ module SiSU_HTML_Seg
if (dob.is==:heading \
|| dob.is==:heading_insert) \
&& dob.ln==4
- @@heading4=dob.obj
- @@is4=newfile=1
+ @per.heading4=dob.obj
+ @per.is4=newfile=1
end
if (dob.is==:heading \
|| dob.is==:heading_insert) \
&& dob.ln==3
- @@heading3=dob.obj
- @@is4,@@is3=0,1
+ @per.heading3=dob.obj
+ @per.is4,@per.is3=0,1
end
if (dob.is==:heading \
|| dob.is==:heading_insert) \
&& dob.ln==2
- @@heading2=dob.obj
- @@is4,@@is3,@@is2=0,0,1
+ @per.heading2=dob.obj
+ @per.is4,@per.is3,@per.is2=0,0,1
end
if (dob.is==:heading \
|| dob.is==:heading_insert) \
&& dob.ln==1
- @@heading1=dob.obj
- @@is4,@@is3,@@is2,@@is1=0,0,0,1
+ @per.heading1=dob.obj
+ @per.is4,@per.is3,@per.is2,@per.is1=0,0,0,1
end
if (dob.is==:heading \
|| dob.is==:heading_insert) \
&& dob.ln==0
- @@heading0=dob.obj
- @@is4,@@is3,@@is2,@@is1,@@is0=0,0,0,0,1
+ @per.heading0=dob.obj
+ @per.is4,@per.is3,@per.is2,@per.is1,@per.is0=0,0,0,0,1
end
- if (@@is1 && !@@is2 && !@@is3 && !@@is4)
+ if (@per.is1 && !@per.is2 && !@per.is3 && !@per.is4)
if not (dob.is==:heading \
|| dob.is==:heading_insert) \
&& dob.ln==0
$_ #; check
end
end
- if @@is4==1
+ if @per.is4==1
if newfile==1 \
or dob.obj =~/^#{Mx[:br_endnotes]}|^#{Mx[:br_eof]}/
newfile=0
@@ -335,43 +320,46 @@ module SiSU_HTML_Seg
FileUtils::mkdir_p(@file.output_path.html_seg.dir) \
if File.writable?("#{@file.output_path.base.dir}/.")
end
- SiSU_HTML_Seg::Seg.new(@md).tail
+ tail(@md,@per)
+ #SiSU_HTML_Seg::Seg.new(@md,@per).tail
fnh={
- fn: @@seg_name_html[tracking-1],
+ fn: @per.seg_name_x[tracking-1],
}
fn=@md.file.base_filename.html_seg(fnh)
segfilename="#{@file.output_path.html_seg.dir}/#{fn}"
- output_seg_file=File.new(segfilename,'w') if @@seg_name_html[tracking-1]
+ output_seg_file=File.new(segfilename,'w') if @per.seg_name_x[tracking-1]
minitoc=(@make.build.html_minitoc?) ? @minitoc : ''
if dob.is==:heading \
- || (@@seg_name_html[tracking-1] !~/endnotes|book_index|metadata/)
- SiSU_HTML_Seg::Output.new(@md,output_seg_file,@@seg,minitoc).output
+ || (@per.seg_name_x[tracking-1] !~/endnotes|book_index|metadata/)
+ SiSU_HTML_Seg::Output.new(@md,output_seg_file,@per,minitoc).output
elsif dob.is==:heading_insert
- if @@seg_name_html[tracking-1]=='endnotes'
- SiSU_HTML_Seg::Output.new(@md,output_seg_file,@@seg,minitoc,'endnotes').output
- elsif @@seg_name_html[tracking-1]=='book_index'
- SiSU_HTML_Seg::Output.new(@md,output_seg_file,@@seg,minitoc,'idx').output
- @@seg[:idx]=[]
- elsif @@seg_name_html[tracking-1]=='metadata'
- SiSU_HTML_Seg::Output.new(@md,output_seg_file,@@seg,minitoc,'metadata').output
+ if @per.seg_name_x[tracking-1]=='endnotes'
+ SiSU_HTML_Seg::Output.new(@md,output_seg_file,@per,minitoc,'endnotes').output
+ elsif @per.seg_name_x[tracking-1]=='book_index'
+ SiSU_HTML_Seg::Output.new(@md,output_seg_file,@per,minitoc,'idx').output
+ @per.idx=[]
+ elsif @per.seg_name_x[tracking-1]=='metadata'
+ SiSU_HTML_Seg::Output.new(@md,output_seg_file,@per,minitoc,'metadata').output
else puts "#{__FILE__}::#{__LINE__}"
end
else puts "#{__FILE__}::#{__LINE__}"
end
- SiSU_HTML_Seg::Seg.new.reinitialise
+ SiSU_HTML_Seg::Seg.new.reinitialise(per)
+ #per=persist_init
heading_art(dob)
head(dob)
#keep use for last segment, eg if metadata is last segment
- if @@seg_name_html[tracking] =='metadata' # this is for metadata
- fnh={
- fn: @@seg_name_html[tracking],
- }
- fn=@md.file.base_filename.html_seg(fnh)
- segfilename="#{@file.output_path.html_seg.dir}/#{fn}"
- output_seg_file=File.new(segfilename,'w')
- SiSU_HTML_Seg::Output.new(@md,output_seg_file,@@seg,minitoc,'metadata').output
- Seg.new.reinitialise
- end
+ if @per.seg_name_x[tracking] =='metadata' # this is for metadata
+ fnh={
+ fn: @per.seg_name_x[tracking],
+ }
+ fn=@md.file.base_filename.html_seg(fnh)
+ segfilename="#{@file.output_path.html_seg.dir}/#{fn}"
+ output_seg_file=File.new(segfilename,'w')
+ SiSU_HTML_Seg::Output.new(@md,output_seg_file,@per,minitoc,'metadata').output
+ #per=persist_init
+ Seg.new.reinitialise(per)
+ end
end
if tracking==0
heading_art(dob)
@@ -384,8 +372,8 @@ module SiSU_HTML_Seg
|| dob.is==:heading_insert) \
&& dob.ln==4 \
&& dob.name
- @@get_hash_to=dob.name
- @@get_hash_fn=dob.name
+ @per.get_hash_to=dob.name
+ @per.get_hash_fn=dob.name
end
if dob.obj.is_a?(String)
markup(dob)
@@ -405,108 +393,108 @@ module SiSU_HTML_Seg
end
def heading_art(dob)
format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md)
- @@seg[:dot_nav]=if (@make.build.html_navigation?) \
+ @per.dot_nav=if (@make.build.html_navigation?) \
&& (@make.build.html_navigation_bar?)
x=if (dob.is==:heading \
|| dob.is==:heading_insert) \
&& (dob.ln.to_s =~/^[0-7]/)
- x=if @@tracker < @@seg_total-1
+ x=if @@tracker < @per.seg_name.length-1
format_head_seg.dot_control_pre_next
else
format_head_seg.dot_control_pre
end
- else @@seg[:dot_nav]
+ else @per.dot_nav
end
- else @@seg[:dot_nav]=''
+ else @per.dot_nav=''
end
ads=SiSU_HTML_Promo::Ad.new(@md)
- @@seg[:title]=format_head_seg.head_seg << ads.div.major
+ @per.title=format_head_seg.head_seg << ads.div.major
end
def head(dob)
clean=/<!.*?!>|<:.*?>/
format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md)
if @make.build.html_navigation?
- if @@tracker < @@seg_total-1
- @@segtocband=if @@tracker==0
+ if @@tracker < @per.seg_name.length-1
+ @per.segtocband=if @@tracker==0
format_head_seg.toc_next2
else
format_head_seg.toc_pre_next2
end
- else @@segtocband=format_head_seg.toc_pre2
+ else @per.segtocband=format_head_seg.toc_pre2
end
- else @@segtocband=''
+ else @per.segtocband=''
end
@p_num ||= ''
- if @@is0==1
+ if @per.is0==1
@author=%{<b>#{@md.author}</b>\n} if @md.author.to_s =~/\S/
- @@seg[:tocband_banner] \
- << format_head_seg.navigation_band(@@segtocband,@@seg[:dot_nav])
- @@seg[:tocband_bannerless] \
+ @per.tocband_banner \
+ << format_head_seg.navigation_band(@per.segtocband,@per.dot_nav)
+ @per.tocband_bannerless \
<< '<br>' \
- << format_head_seg.navigation_band_bottom(@@segtocband,@@seg[:dot_nav])
+ << format_head_seg.navigation_band_bottom(@per.segtocband,@per.dot_nav)
if @title_banner_
- @@seg[:headings] \
+ @per.headings \
<< format_head_seg.title_banner(@md.title.main,@md.title.sub,@author).gsub(clean,'')
end
- ocn=(@@heading0[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]) \
+ ocn=(@per.heading0[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]) \
? $1
: ''
@p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
- txt_obj={ txt: @@heading0, ocn_display: @p_num.ocn_display }
+ txt_obj={ txt: @per.heading0, ocn_display: @p_num.ocn_display }
format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj)
- @@seg[:headings] \
+ @per.headings \
<< format_seg.title_heading0.gsub(clean,'')
- @@heading0=@@heading0.
+ @per.heading0=@per.heading0.
gsub(/&nbsp;<a name="-[\d*+]+" href="#_[\d*+]+">&nbsp;<sup>[\d*+]+<\/sup>&nbsp;<\/a>/,'')
end
- if @@is1==1
- heading1=@@heading1
+ if @per.is1==1
+ heading1=@per.heading1
ocn=(heading1[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]) \
? $1
: ''
@p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
txt_obj={ txt: heading1, ocn_display: @p_num.ocn_display }
format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj)
- @@seg[:headings] \
+ @per.headings \
<< format_seg.title_heading1.gsub(clean,'')
- @@heading1=@@heading1.
+ @per.heading1=@per.heading1.
gsub(/&nbsp;<a name="-[\d*+]+" href="#_[\d*+]+">&nbsp;<sup>[\d*+]+<\/sup>&nbsp;<\/a>/,'')
end
- if @@is2==1
- heading2=@@heading2
+ if @per.is2==1
+ heading2=@per.heading2
ocn=(heading2[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]) \
? $1
: ''
@p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
txt_obj={ txt: heading2, ocn_display: @p_num.ocn_display }
format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj)
- @@seg[:headings] \
+ @per.headings \
<< format_seg.title_heading2.gsub(clean,'')
- @@heading2=@@heading2.
+ @per.heading2=@per.heading2.
gsub(/&nbsp;<a name="-[\d*+]+" href="#_[\d*+]+">&nbsp;<sup>[\d*+]+<\/sup>&nbsp;<\/a>/,'')
end
- if @@is3==1
- heading3=@@heading3
+ if @per.is3==1
+ heading3=@per.heading3
ocn=(heading3[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]) \
? $1
: ''
@p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
txt_obj={ txt: heading3, ocn_display: @p_num.ocn_display }
format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj)
- @@seg[:headings] \
+ @per.headings \
<< format_seg.title_heading3.gsub(clean,'')
- @@heading3=@@heading3.
+ @per.heading3=@per.heading3.
gsub(/&nbsp;<a name="-[\d*+]+" href="#_[\d*+]+">&nbsp;<sup>[\d*+]+<\/sup>&nbsp;<\/a>/,'')
end
- if @@is4==1
- heading4=@@heading4
+ if @per.is4==1
+ heading4=@per.heading4
ocn=(heading4[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]) \
? $1
: ''
@p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
txt_obj={ txt: heading4, ocn_display: @p_num.ocn_display }
format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj)
- @@seg[:headings] \
+ @per.headings \
<< format_seg.title_heading4.gsub(clean,'')
end
@@tracker=@@tracker+1
@@ -589,66 +577,73 @@ module SiSU_HTML_Seg
if (dob.is==:heading \
|| dob.is==:heading_insert) \
&& dob.ln==4
- @@seg[:main] << %{\n<div class="#{@cl}">\n}
- @@seg[:main] << dob_html
+ @per.main << %{\n<div class="#{@cl}">\n}
+ @per.main << dob_html
if @make.build.segsubtoc?
- @@seg[:main] << @@seg_subtoc[@@get_hash_fn] #% insertion of sub-toc
+ @per.main << @per.seg_subtoc[@per.get_hash_fn] #% insertion of sub-toc
end
else
- @@seg[:main] << dob_html #unless @@flag_alt==true
+ @per.main << dob_html #unless @@flag_alt==true
end
end
end
- def tail
+ def tail(md,per)
+ @md,@per=md,per
format_head_seg=SiSU_HTML_Format::HeadSeg.new(@md)
- if @md.flag_auto_endnotes and @@seg_endnotes[@@get_hash_fn]
- @@seg[:tail] << %{\n<div class="#{@cl}">\n<div class="endnote">\n}
- if @@seg_endnotes[@@get_hash_fn].flatten.length > 0
- @@seg[:tail] << format_head_seg.endnote_mark
- @@seg[:tail] << @@seg_endnotes[@@get_hash_fn].flatten #endnotes deposited at end of individual segments ||@|EXTRACTION OF ENDNOTES|
+ if @md.flag_auto_endnotes \
+ and @per.seg_endnotes[@per.get_hash_fn]
+ @per.tail << %{\n<div class="#{@cl}">\n<div class="endnote">\n}
+ if @per.seg_endnotes[@per.get_hash_fn].flatten.length > 0
+ @per.tail << format_head_seg.endnote_mark
+ @per.tail << @per.seg_endnotes[@per.get_hash_fn].flatten #endnotes deposited at end of individual segments ||@|EXTRACTION OF ENDNOTES|
end
- @@seg[:tail] << '</div>'
- @@seg[:tail] << '</div>' #this div closes div class content
+ @per.tail << '</div>'
+ @per.tail << '</div>' #this div closes div class content
end
ads=SiSU_HTML_Promo::Ad.new(@md)
- @@seg[:credits] << format_head_seg.credit << ads.div.close << ads.display << format_head_seg.html_close
+ @per.credits \
+ << format_head_seg.credit \
+ << ads.div.close \
+ << ads.display \
+ << format_head_seg.html_close
end
- def reinitialise
- @@seg[:title],@@seg[:dot_nav],@@seg[:tocband_banner],@@seg[:tocband_bannerless],@@seg[:headings],@@seg[:main],@@seg[:tail],@@seg[:credits]=Array.new(8){[]}
- @@segtocband=nil
+ def reinitialise(per)
+ per.title,per.dot_nav,per.tocband_banner,per.tocband_bannerless,per.headings,per.main,per.tail,per.credits=Array.new(8){[]}
+ @per.segtocband=nil
end
- def cleanup
- reinitialise
- @@seg_total,@@tracker=0,0
- @@seg_endnotes,@@seg_subtoc={},{}
- @@seg_endnotes_array,@@seg_subtoc_array=[],[]
- @@seg[:endnote_all]=[]
+ def cleanup(md,per)
+ #per=persist_init
+ reinitialise(per)
+ @@tracker=0
+ @per.seg_endnotes,@per.seg_subtoc={},{}
+ @per.seg_endnotes_array,@per.seg_subtoc_array=[],[]
+ per.endnote_all=[]
end
- def get_subtoc_endnotes(data) #get endnotes & sub-table of contents subtoc
+ def get_subtoc_endnotes(data,per) #get endnotes & sub-table of contents subtoc
+ @per=per
data.each do |dob|
dob.obj=dob.obj.gsub(/<a name=\"h\d.*?\">(.+?)<\/a>/mi,'\1')
if @md.flag_auto_endnotes
if (dob.is==:heading \
|| dob.is==:heading_insert) \
&& (dob.ln.to_s =~/^[0-4]/) \
- and not @@fn.to_s.empty?
- @@seg_endnotes[@@fn]=[]
- @@seg_endnotes[@@fn] << @@seg_endnotes_array
- @@seg_endnotes_array=[] if dob.ln==4
- @@fns_previous=@md.fns if dob.ln==4 and dob.name =~/^meta/
+ and not @per.fn.to_s.empty?
+ @per.seg_endnotes[@per.fn]=[]
+ @per.seg_endnotes[@per.fn] << @per.seg_endnotes_array
+ @per.seg_endnotes_array=[] if dob.ln==4
end
if (dob.is==:heading \
|| dob.is==:heading_insert) \
&& dob.ln==4 #% EXTRACTION OF SUB-TOCs & SEGMENT NAME, after EXTRACTION OF ENDNOTES & SUB-TOCs
- @@seg_subtoc[@@fn]=@@seg_subtoc_array
- @@seg_subtoc_array=[]
+ @per.seg_subtoc[@per.fn]=@per.seg_subtoc_array
+ @per.seg_subtoc_array=[]
if dob.name \
and dob.obj
- @@fn=dob.name
+ @per.fn=dob.name
else
if dob.name =~/\S+/
- @@fn=dob.name
- else @@fn=''
+ @per.fn=dob.name
+ else @per.fn=''
end
end
end
@@ -669,7 +664,7 @@ module SiSU_HTML_Seg
format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj)
subtoc=format_seg.subtoc_lev7 #keep and make available, this is the subtoc
end
- @@seg_subtoc_array << subtoc
+ @per.seg_subtoc_array << subtoc
end
if @md.flag_auto_endnotes
if (dob.obj =~/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]})[\d*+]+\s*<a href="##{Mx[:note_ref]}[\d*+]+"/) \
@@ -679,10 +674,12 @@ module SiSU_HTML_Seg
endnote_array << dob.obj.scan(/#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}/m)
end
if dob.obj=~/#{Mx[:en_b_o]}[*]\d+\s.+?#{Mx[:en_b_c]}/m
- endnote_array << dob.obj.scan(/#{Mx[:en_b_o]}[*]\d+\s.+?#{Mx[:en_b_c]}/m)
+ endnote_array \
+ << dob.obj.scan(/#{Mx[:en_b_o]}[*]\d+\s.+?#{Mx[:en_b_c]}/m)
end
if dob.obj=~/#{Mx[:en_b_o]}[+]\d+\s.+?#{Mx[:en_b_c]}/m
- endnote_array << dob.obj.scan(/#{Mx[:en_b_o]}[+]\d+\s.+?#{Mx[:en_b_c]}/m)
+ endnote_array \
+ << dob.obj.scan(/#{Mx[:en_b_o]}[+]\d+\s.+?#{Mx[:en_b_c]}/m)
end
endnote_array=endnote_array.flatten.compact #watch, check compacting
endnote_array.each do |note|
@@ -697,7 +694,7 @@ module SiSU_HTML_Seg
format_seg.endnote_body_indent
else format_seg.endnote_body
end
- @@seg_endnotes_array << note_match
+ @per.seg_endnotes_array << note_match
end
try.join('<br>')
#% creation of separate end segment/page of all endnotes referenced back to reference segment
@@ -706,8 +703,8 @@ module SiSU_HTML_Seg
endnote_part_b=note_match_seg[m,2]
txt_obj={ endnote_part_a: endnote_part_a, endnote_part_b: endnote_part_b }
format_seg=SiSU_HTML_Format::FormatSeg.new(@md,txt_obj)
- note_match_all_seg=format_seg.endnote_seg_body(@@fn) #BUG WATCH 200408
- @@seg[:endnote_all] << note_match_all_seg
+ note_match_all_seg=format_seg.endnote_seg_body(@per.fn) #BUG WATCH 200408
+ @per.endnote_all << note_match_all_seg
end
dob.obj=dob.obj.gsub(/(?:#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]})\s*/m,' ')
end
diff --git a/lib/sisu/develop/html_shared.rb b/lib/sisu/develop/html_shared.rb
new file mode 100644
index 00000000..5d716368
--- /dev/null
+++ b/lib/sisu/develop/html_shared.rb
@@ -0,0 +1,62 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_shared.rb;hb=HEAD>
+
+=end
+module SiSU_HTML_Shared
+ require_relative 'html_table' # html_table.rb
+ class TableHTML < SiSU_HTML_Table::TableHTML
+ end
+end
+__END__
diff --git a/lib/sisu/develop/html_table.rb b/lib/sisu/develop/html_table.rb
new file mode 100644
index 00000000..7cc005c8
--- /dev/null
+++ b/lib/sisu/develop/html_table.rb
@@ -0,0 +1,64 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts, table
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_table.rb;hb=HEAD>
+
+=end
+module SiSU_HTML_Table
+ require_relative 'xhtml_table' # xhtml_table.rb
+ require_relative 'html_parts' # html_parts.rb
+ class TableHTML < SiSU_XHTML_Table::TableXHTML
+ include SiSU_Parts_HTML
+ end
+end
+__END__
diff --git a/lib/sisu/v5/html_tune.rb b/lib/sisu/develop/html_tune.rb
index e241dcd3..70c7e0ee 100644
--- a/lib/sisu/v5/html_tune.rb
+++ b/lib/sisu/develop/html_tune.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** html generation, html pre-processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html_tune.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: html generation, html pre-processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_tune.rb;hb=HEAD>
=end
require_relative 'dp' # dp.rb
@@ -154,7 +151,6 @@ module SiSU_HTML_Tune
end
def songsheet_array(data)
data_tuned=[]
- #@tuned_file=[]
data.each do |dob|
dob=amp_angle_brackets(dob)
dob=endnotes_html(dob)
@@ -165,9 +161,8 @@ module SiSU_HTML_Tune
data_tuned
end
def urls(data)
- @words=[]
- data.each do |word|
- @words << if word=~/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}|image)/
+ @words=data.each.map do |word|
+ if word=~/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}|image)/
http_=true
if word =~/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/
m,u=/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/.match(word).captures
@@ -211,9 +206,7 @@ module SiSU_HTML_Tune
word
else word
end
- word
- end
- @words=@words.join(' ')
+ end.join(' ')
end
def url_markup(dob)
unless dob.is==:code
@@ -296,10 +289,9 @@ module SiSU_HTML_Tune
end
def output
data=@data
- @tuned_file=[]
- data.each do |dob|
+ @tuned_file=data.each.map do |dob|
dob.obj=dob.obj.strip.chomp
- @tuned_file << dob
+ dob
end
@tuned_file << "\n<EOF>" if (@md.fns =~/\.sst0/) #remove
@tuned_file
diff --git a/lib/sisu/v6/hub.rb b/lib/sisu/develop/hub.rb
index 13f95654..1ed7a8e7 100644
--- a/lib/sisu/v6/hub.rb
+++ b/lib/sisu/develop/hub.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** hub
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/hub.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: SiSU information Structuring Universe, text structuring,
- processing, publishing, search
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/hub.rb;hb=HEAD>
=end
module SiSU
@@ -76,9 +72,9 @@ module SiSU
error('uri NOT FOUND (LoadError)')
end
class HubMaster
- def initialize(argv,call_path)
+ def initialize(argv,sisu_runtime)
begin
- opt=SiSU_Commandline::Options.new(argv,call_path)
+ opt=SiSU_Commandline::Options.new(argv,sisu_runtime)
SiSU::Processing.new(opt).actions_without_files
SiSU::Processing.new(opt).actions_on_files
SiSU::Processing.new(opt).actions_without_files_post
@@ -137,6 +133,7 @@ module SiSU
actions.outputs.each_file.xml?
actions.outputs.each_file.pdf?
actions.outputs.each_file.man_or_info?
+ actions.outputs.each_file.po4a_make?
actions.outputs.each_file.sqlite_discrete?
actions.outputs.each_file.manifest?
end
@@ -185,6 +182,9 @@ module SiSU
if defined? actions.outputs.loop_files.run_termsheet?
actions.outputs.loop_files.run_termsheet?
end
+ if defined? actions.outputs.loop_files.po4a_setup?
+ actions.outputs.loop_files.po4a_setup?
+ end
if defined? actions.outputs.loop_files.sql?
actions.outputs.loop_files.sql?
end
@@ -202,7 +202,7 @@ module SiSU
def actions_without_files
actions=SiSU_Hub_Actions::HubActions.new(@opt)
actions.report.version_info?
- actions.report.version_dir?
+ actions.report.version_info_extra?
actions.prepare.site?
actions.prepare.sql?
end
diff --git a/lib/sisu/v5/hub_actions.rb b/lib/sisu/develop/hub_actions.rb
index 7781ef63..bc1ef948 100644
--- a/lib/sisu/v5/hub_actions.rb
+++ b/lib/sisu/develop/hub_actions.rb
@@ -1,65 +1,63 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** hub, perform selected actions
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/hub_actions.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: SiSU information Structuring Universe, text structuring,
- processing, publishing, search
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/hub_actions.rb;hb=HEAD>
=end
module SiSU_Hub_Actions
class HubActions
+ require_relative 'utils_composite' # utils_composite.rb
+ include SiSU_Composite_Doc_Utils # composite doc, .ssm, extract all related insert files, array of filenames test
def initialize(opt)
@opt=opt
end
@@ -69,6 +67,17 @@ module SiSU_Hub_Actions
SiSU_Env::InfoAbout.new(@opt).sisu_version
end
end
+ def version_number_git?
+ if @opt.act[:version_info][:set]==:on \
+ || @opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ ' ' + SiSU_is.git_version_info?
+ ).grey
+ end
+ end
def version_dir?
if @opt.act[:version_info][:set]==:on \
|| @opt.act[:verbose][:set]==:on \
@@ -80,6 +89,25 @@ module SiSU_Hub_Actions
).grey
end
end
+ def version_info_extra?
+ if @opt.act[:version_info][:set]==:on \
+ || @opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on
+ if SiSU_is.git_version_info?
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ ' ' + File.dirname(__FILE__) + \
+ ' vcr: ' + SiSU_is.git_version_info?
+ ).grey
+ else
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ ' ' + File.dirname(__FILE__)
+ ).grey
+ end
+ end
+ end
self
end
def prepare
@@ -160,7 +188,7 @@ module SiSU_Hub_Actions
def abstract_objects?
if @opt.act[:ao][:set]==:on #% --ao --dal, -m
if @opt.f_pths.length > 0
- unless @opt.act[:po4a][:set]==:on # --po4a, -P
+ unless @opt.act[:po4a_shelf][:set]==:on # --po4a-shelf
if @opt.fno =~ /\.ssm$/
require_relative 'ao_composite' # ao_composite.rb #pre-processing
SiSU_Assemble::Composite.new(@opt).read
@@ -282,6 +310,20 @@ module SiSU_Hub_Actions
end
end
end
+ if @opt.act[:txt_orgmode][:set]==:on #% --orgmode
+ if @opt.f_pths.length > 0
+ require_relative 'txt_orgmode' # txt_orgmode.rb
+ SiSU_Txt_OrgMode::Source.new(@opt).read
+ else
+ msg='orgmode request requires sisu markup files'
+ if (@opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
+ mark(msg)
+ else puts msg
+ end
+ end
+ end
end
def html?
if @opt.act[:html][:set]==:on #% --html, -h
@@ -536,15 +578,51 @@ module SiSU_Hub_Actions
end
end
end
+ def po4a_make?
+ if @opt.act[:po4a_sst_ao_sst][:set]==:on #% --po4a-ao
+ if @opt.f_pths.length > 0
+ require_relative 'src_po4a_sst_ao_sst'
+ SiSU_SStm_AO_SStm::Source.new(@opt).read_process_src_files # src_po4a_sst_ao_sst.rb
+ else
+ msg='sst request requires sisu markup files'
+ if (@opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
+ mark(msg)
+ else puts msg
+ end
+ end
+ end
+ end
+ def elasticsearch?
+ if @opt.act[:elasticsearch][:set]==:on #% --elastic, -x
+ if @opt.f_pths.length > 0
+ require_relative 'json_elastic' # json_elastic.rb
+ SiSU_Elastic::Source.new(@opt).read
+ else
+ msg='easticsearch request requires sisu markup files'
+ if (@opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow).
+ mark(msg)
+ else puts msg
+ end
+ end
+ end
+ end
def manifest?
if @opt.act[:manifest][:set]==:on #% --manifest, -y
if @opt.f_pths.length > 0
- require_relative 'html_manifest' # html_manifest.rb
- ((@opt.act[:sisupod][:set]==:on \
- || @opt.act[:share_source][:set]==:on) \
- && @opt.f_pths.length < 2 ) \
- ? nil
- : SiSU_Manifest::Source.new(@opt).read
+ begin
+ require_relative 'html_manifest' # html_manifest.rb
+ ((@opt.act[:sisupod][:set]==:on \
+ || @opt.act[:share_source][:set]==:on \
+ || @opt.act[:po4a_sstm][:set]==:on) \
+ && @opt.f_pths.length < 2 ) \
+ ? nil
+ : SiSU_Manifest::Source.new(@opt).read
+ rescue
+ end
else
msg='manifest request requires sisu markup files'
if (@opt.act[:verbose_plus][:set]==:on \
@@ -576,8 +654,9 @@ module SiSU_Hub_Actions
end
def loop_files
def share_source?
- if @opt.act[:share_source][:set]==:on \
- or @opt.act[:sisupod][:set]==:on \
+ if @opt.act[:sisupod][:set]==:on \
+ or @opt.act[:share_source][:set]==:on \
+ or @opt.act[:po4a_sstm][:set]==:on \
or @opt.act[:git][:set]==:on
begin
if @opt.f_pths.length > 0
@@ -595,26 +674,6 @@ module SiSU_Hub_Actions
else puts msg
end
end
- if @opt.act[:share_source][:set]==:on
- if @opt.f_pths.length > 0
- require_relative 'src_share' # src_share.rb
- begin
- ensure
- SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
- loop_files_on_given_option_bundle do
- SiSU_Markup::Source.new(@opt).read
- end
- end
- else
- msg='share markup source request requires sisu markup files'
- if (@opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on)
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
- mark(msg)
- else puts msg
- end
- end
- end
if @opt.act[:sisupod][:set]==:on #% --sisupod, -S
if @opt.f_pths.length > 0
require_relative 'src_sisupod_make' # src_sisupod_make.rb
@@ -660,7 +719,8 @@ module SiSU_Hub_Actions
end
end
if (@opt.act[:sisupod][:set]==:on \
- || @opt.act[:share_source][:set]==:on) \
+ || @opt.act[:share_source][:set]==:on \
+ || @opt.act[:po4a_sstm][:set]==:on) \
and @opt.act[:manifest][:set]==:on #% --manifest, -y
if @opt.f_pths.length > 0
require_relative 'html_manifest' # html_manifest.rb
@@ -695,18 +755,78 @@ module SiSU_Hub_Actions
end
end
end
- if @opt.act[:po4a][:set]==:on #% --po4a, -P
+ if @opt.act[:share_source][:set]==:on
+ if @opt.f_pths.length > 0
+ require_relative 'src_sisupod_sstm' # src_sisupod_sstm.rb
+ begin
+ ensure
+ SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
+ loop_files_on_given_option_bundle do
+ SiSU_Markup::Source_Sisupod.new(@opt).read
+ end
+ end
+ else
+ msg='share markup source request requires sisu markup files'
+ if (@opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
+ mark(msg)
+ else puts msg
+ end
+ end
+ end
+ if @opt.act[:po4a_sstm][:set]==:on #% --po4a-sst
+ if @opt.f_pths.length > 0
+ require_relative 'src_po4a_sstm'
+ begin
+ SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
+ loop_files_on_given_option do
+ SiSU_Markup::Source_Po4a.new(@opt).read # src_po4a_sstm.rb
+ end
+ ensure
+ end
+ else
+ msg='sst request requires sisu markup files'
+ if (@opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
+ mark(msg)
+ else puts msg
+ end
+ end
+ end
+ if @opt.act[:po4a_sst_ao_sst][:set]==:on #% --po4a-ao
+ if @opt.f_pths.length > 0
+ require_relative 'src_po4a_sst_ao_sst'
+ begin
+ SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
+ loop_files_on_given_option do
+ SiSU_SStm_AO_SStm::Source.new(@opt).read_setup # src_po4a_sst_ao_sst.rb
+ end
+ ensure
+ end
+ else
+ msg='sst request requires sisu markup files'
+ if (@opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
+ mark(msg)
+ else puts msg
+ end
+ end
+ end
+ if @opt.act[:po4a_shelf][:set]==:on #% --po4a-shelf
if @opt.f_pths.length > 0
- require_relative 'po4a'
+ require_relative 'src_po4a_shelf'
begin
SiSU_Hub_Loops::OptionLoopFiles.new(@opt).
loop_files_on_given_option do
- SiSU_Po4a::Source.new(@opt).read # po4a.rb
+ SiSU_Po4a::Source.new(@opt).read # src_po4a_shelf.rb
end
ensure
end
else
- msg='po4a request requires sisu markup files'
+ msg='src_po4a_shelf request requires sisu markup files'
if (@opt.act[:verbose_plus][:set]==:on \
|| @opt.act[:maintenance][:set]==:on)
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan).
diff --git a/lib/sisu/v6/hub_loop_markup_files.rb b/lib/sisu/develop/hub_loop_markup_files.rb
index cf56f23b..6b27b8d3 100644
--- a/lib/sisu/v6/hub_loop_markup_files.rb
+++ b/lib/sisu/develop/hub_loop_markup_files.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** hub
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/hub_loop_markup_files.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: SiSU information Structuring Universe, text structuring,
- processing, publishing, search
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/hub_loop_markup_files.rb;hb=HEAD>
=end
module SiSU_Hub_Loops
@@ -140,6 +136,9 @@ module SiSU_Hub_Loops
files_translated_idx << x[1]
end
end
+ #files_translated_idx=number_of_files.select do |x|
+ # x[1] if x[1].length > 1
+ #end
if files_translated_idx.flatten.length > 1
SiSU_Screen::Ansi.new(
@opt.act[:color_state][:set],
diff --git a/lib/sisu/v6/hub_options.rb b/lib/sisu/develop/hub_options.rb
index fb58f396..1c3f4e3d 100644
--- a/lib/sisu/v6/hub_options.rb
+++ b/lib/sisu/develop/hub_options.rb
@@ -1,61 +1,59 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** hub, command line options parsing
- * Author: Ralph Amissah
+*** hub
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * License: GPL 3 or later:
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- SiSU, a framework for document structuring, publishing and search
+** License: GPL 3 or later:
- Copyright (C) Ralph Amissah
+ SiSU, a framework for document structuring, publishing and search
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ Copyright (C) Ralph Amissah
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/hub_options.rb;hb=HEAD>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: SiSU information Structuring Universe, command line options
- parsing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/hub_options.rb;hb=HEAD>
=end
module SiSU_Commandline
@@ -154,9 +152,9 @@ module SiSU_Commandline
end
end
class Options
- attr_accessor :selections,:opt_ch,:act,:dir_structure_by,:lingual,:f_pths,:files,:files_mod,:call_path,:base_path,:base_stub,:sub_location,:image_src_path,:paths,:lngs,:f_pth,:pth,:fno,:fns,:fnb,:fnc,:fng,:fncb,:lng,:lng_base,:what,:make_instructions,:make_instructions_pod
+ attr_accessor :selections,:opt_ch,:act,:dir_structure_by,:lingual,:f_pths,:files,:files_mod,:call_path,:base_path,:base_stub,:sub_location,:image_src_path,:paths,:lngs,:f_pth,:pth,:fno,:fns,:fnb,:fnc,:fng,:fncb,:lng,:lng_base,:what,:make_instructions,:make_instructions_pod,:sisu_run_path,:sisu_install_type
@@act=nil
- def initialize(a,call_path)
+ def initialize(a,sisu_runtime)
@opt_ch=@f_pth=@pth=@fno=@fns=@fnb=@fnc=@fng=@fncb=@what=@lng=@lng_base=@call_path=@base_path=@base_stub=@image_src_path=@sub_location=''
@f_pths,@files,@files_mod,@paths,@select_arr,@act=Array.new(5){[]}
@select_str=nil
@@ -164,7 +162,9 @@ module SiSU_Commandline
@lng_base=@env.language_default_set
@dir_structure_by=SiSU_Env::EnvCall.new.output_dir_structure.by?
@lingual=SiSU_Env::EnvCall.new.mono_multi_lingual?
- @call_path=call_path
+ @sisu_run_from=sisu_runtime[:runtime_path]
+ @sisu_install_type=sisu_runtime[:runtime_type]
+ @call_path=sisu_runtime[:call_path]
pth=SiSU_Utils::Path.new(call_path)
@base_path=pth.base_markup
@base_stub=pth.base_markup_stub
@@ -175,6 +175,33 @@ module SiSU_Commandline
@make_instructions_pod=nil
init
end
+ def sisu_called_from?
+ @call_path
+ end
+ def sisu_bin_filepath?
+ @sisu_run_from
+ end
+ def sisu_install_type?
+ @sisu_install_type
+ end
+ def sisu_lib_dir?
+ File.dirname(__FILE__)
+ end
+ def sisu_data_dir?
+ env=RbConfig::CONFIG
+ if sisu_install_type? ==:full_path_to_sisu_bin_in_sisu_dir_tree
+ sisu_bin_filepath?.gsub(/\/bin\/sisu\S*/,'/data/sisu')
+ #sisu_lib_dir?.gsub(/\/lib\/sisu\/(?:current|develop)\S*/,'/data/sisu')
+ elsif sisu_install_type? ==:gem_install
+ #sisu_run_from?.gsub(/\/bin\/.+/,'/data/sisu')
+ env['datadir']
+ elsif sisu_install_type? ==:system_install
+ #SiSU_Info_Env::InfoEnv.new.path.share
+ env['datadir']
+ else
+ env['datadir']
+ end
+ end
def find_all(find_flag,opt)
if find_flag
x=Dir.glob('*.ss[tm]')
@@ -251,17 +278,15 @@ module SiSU_Commandline
end
end
def init_selected_lang_dirs(a)
- @z=[]
- a.each do |y|
+ @z=a.each.map do |y|
if y =~/^#{lng_base}\/(\S+?\.ss[tm])$/
@fn=$1
- @z << y
+ y
elsif y =~/^#{@lang_regx}\/?$/
- @z << "#{y}/#{@fn}"
- else @z << y
+ "#{y}/#{@fn}"
+ else y
end
end
- @z
end
def init
a=@a
@@ -616,7 +641,7 @@ module SiSU_Commandline
if ch =~/N/ then select_arr << '--digests'
ch=ch.gsub(/[N]/,'')
end
- if ch =~/P/ then select_arr << '--po4a'
+ if ch =~/P/ then select_arr << '--po4a-sst'
ch=ch.gsub(/[P]/,'')
end
if ch =~/d/ then select_arr << '--sqlite'
@@ -1152,6 +1177,10 @@ module SiSU_Commandline
=~/"--rst"|"--rest"|"--restructuredtext"/) \
? { bool: true, set: :on }
: { bool: false, set: :na }
+ act[:txt_orgmode]=(select_arr.inspect \
+ =~/"--org"|"--orgmode"/) \
+ ? { bool: true, set: :on }
+ : { bool: false, set: :na }
act[:manpage]=(select_arr.inspect \
=~/"--manpage"|"--man"/) \
? { bool: true, set: :on }
@@ -1299,10 +1328,56 @@ module SiSU_Commandline
=~/"--harvest"/) \
? { bool: true, set: :on }
: { bool: false, set: :na }
- act[:po4a]=(select_arr.inspect \
- =~/"--po4a"|"--pot?"/) \
+ act[:po4a_sstm]=(select_arr.inspect \
+ =~/"--po4a-ss[tm]"/) \
+ ? { bool: true, set: :on }
+ : { bool: false, set: :na }
+ act[:po4a_sst_ao_sst]=(select_arr.inspect \
+ =~/"--po4a-ao(?:-ss[tm])?"/) \
+ ? { bool: true, set: :on }
+ : { bool: false, set: :na }
+ act[:po4a_shelf]=(select_arr.inspect \
+ =~/"--po4a-shelf"|"--pot?-shelf"/) \
? { bool: true, set: :on }
: { bool: false, set: :na }
+ if act[:po4a_shelf][:set]==:on \
+ or act[:po4a_sst_ao_sst][:set]==:on \
+ or act[:po4a_sstm][:set]==:on
+ act[:po4a_lang]=if select_arr.inspect \
+ =~/"--(?:trans|init)-([a-z]{2}):((?:(?:[a-z]{2}\b),?)+)/
+ lng_src,lng_trn=$1,$2.split(',')
+ { bool: true, set: :on, src: lng_src, trn: lng_trn }
+ elsif select_arr.inspect \
+ =~/"--trans"/
+ { bool: true, set: :on }
+ { bool: true, set: :on, src: 'en', trn: [] }
+ else
+ { bool: false, set: :na }
+ end
+ act[:po4a_lang_trans]=if select_arr.inspect \
+ =~/"--trans-([a-z]{2}):((?:(?:[a-z]{2}\b),?)+)/
+ lng_src,lng_trn=$1,$2.split(',')
+ { bool: true, set: :on, src: lng_src, trn: lng_trn }
+ elsif select_arr.inspect \
+ =~/"--trans"/
+ { bool: true, set: :on }
+ { bool: true, set: :on, src: 'en', trn: [] }
+ else
+ { bool: false, set: :na }
+ end
+ act[:po4a_lang_init]=if select_arr.inspect \
+ =~/"--init-([a-z]{2}):((?:(?:[a-z]{2}\b),?)+)/
+ lng_src,lng_trn=$1,$2.split(',')
+ { bool: true, set: :on, src: lng_src, trn: lng_trn }
+ else
+ { bool: false, set: :na }
+ end
+ else
+ act[:po4a_lang_trans]= \
+ { bool: false, set: :na }
+ act[:po4a_lang_init]= \
+ { bool: false, set: :na }
+ end
act[:git]=(select_arr.inspect \
=~/"--git"/) \
? { bool: true, set: :on }
@@ -1409,6 +1484,7 @@ module SiSU_Commandline
|| act[:txt_asciidoc][:set]==:on \
|| act[:txt_markdown][:set]==:on \
|| act[:txt_rst][:set]==:on \
+ || act[:txt_orgmode][:set]==:on \
|| act[:xhtml][:set]==:on \
|| act[:epub][:set]==:on \
|| act[:html][:set]==:on \
@@ -1422,8 +1498,9 @@ module SiSU_Commandline
|| act[:pdf_p][:set]==:on \
|| act[:pdf_l][:set]==:on \
|| act[:qrcode][:set]==:on \
- || act[:share_source][:set]==:on \
|| act[:sisupod][:set]==:on \
+ || act[:share_source][:set]==:on \
+ || act[:po4a_sstm][:set]==:on \
|| act[:concordance][:set]==:on \
|| act[:sqlite_discrete][:set]==:on \
|| act[:sqlite_import][:set]==:on \
@@ -1457,6 +1534,7 @@ module SiSU_Commandline
|| act[:txt_asciidoc][:set]==:on \
|| act[:txt_markdown][:set]==:on \
|| act[:txt_rst][:set]==:on \
+ || act[:txt_orgmode][:set]==:on \
|| act[:xhtml][:set]==:on \
|| act[:epub][:set]==:on \
|| act[:html][:set]==:on \
@@ -1470,8 +1548,9 @@ module SiSU_Commandline
|| act[:pdf_p][:set]==:on \
|| act[:pdf_l][:set]==:on \
|| act[:qrcode][:set]==:on \
- || act[:share_source][:set]==:on \
|| act[:sisupod][:set]==:on \
+ || act[:share_source][:set]==:on \
+ || act[:po4a_sstm][:set]==:on \
|| act[:concordance][:set]==:on \
|| act[:xml_dom][:set]==:on \
|| act[:xml_sax][:set]==:on \
diff --git a/lib/sisu/v6/i18n.rb b/lib/sisu/develop/i18n.rb
index c80d0e9a..5e30b760 100644
--- a/lib/sisu/v6/i18n.rb
+++ b/lib/sisu/develop/i18n.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** internationalisation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/i18n.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: internationalisation
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/i18n.rb;hb=HEAD>
=end
module SiSU_i18n
diff --git a/lib/sisu/v5/manpage.rb b/lib/sisu/develop/manpage.rb
index 1dff0bde..a39e3a8a 100644
--- a/lib/sisu/v5/manpage.rb
+++ b/lib/sisu/develop/manpage.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** manpage text generation, stripped manpage output (unix, linefeed)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/manpage.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: manpage text generation, stripped manpage output (unix,
- linefeed)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/manpage.rb;hb=HEAD>
=end
module SiSU_Manpage
@@ -67,10 +63,13 @@ module SiSU_Manpage
include SiSU_ManpageFormat
require_relative 'shared_metadata' # shared_metadata.rb
require_relative 'generic_parts' # generic_parts.rb
+ require_relative 'txt_read' # txt_read.rb
+ require_relative 'txt_output' # txt_output.rb
require_relative 'txt_shared' # txt_shared.rb
- @@alt_id_count,@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0,0
+ @@alt_id_count,@@alt_id_count=0,0
@@tablefoot=''
class Source
+ include SiSU_Txt_Read
def initialize(opt)
@opt=opt
if @opt.fns =~/(.+?)\.(?:-|ssm\.)?sst$/
@@ -81,37 +80,14 @@ module SiSU_Manpage
end
def read
begin
- @md=SiSU_Param::Parameters.new(@opt).get
- @env=SiSU_Env::InfoEnv.new(@opt.fns)
- tool=(@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? "#{@env.program.text_editor} #{@md.file.output_path.manpage.dir}/#{@md.file.base_filename.manpage}"
- : "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}"
- (@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- && @opt.act[:quiet][:set]==:on \
- ? SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'Manpage',
- tool
- ).green_hi_blue
- : SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'Manpage',
- tool
- ).green_title_hi
- if (@opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on)
- SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- @opt.fns,
- "#{@md.file.output_path.manpage.dir}/#{@md.file.base_filename.manpage}"
- ).flow
- end
- @ao_array=SiSU_AO::Source.new(@opt).get # ao file drawn here
- SiSU_Manpage::Source::Scroll.new(@md,@ao_array).songsheet
+ md=SiSU_Param::Parameters.new(@opt).get
+ specific={
+ description: 'Manpage',
+ output_path: md.file.output_path.manpage.dir,
+ output_file: md.file.base_filename.manpage,
+ }
+ read_generic(@opt,specific)
+ SiSU_Manpage::Source::Scroll.new(md,@ao_array,@wrap_width).songsheet
rescue
SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
@@ -125,8 +101,8 @@ module SiSU_Manpage
include SiSU_Parts_Generic
include SiSU_TextUtils
@@endnotes={ para: [], end: [] }
- def initialize(md,data)
- @md,@data=md,data
+ def initialize(md,data,wrap_width)
+ @md,@data,@wrap_width=md,data,wrap_width
@tab="\t"
@@notes=:end
@manpage={ body: [], open: [], close: [], head: [], metadata: [], tail: [], endnotes: [] }
@@ -157,8 +133,8 @@ module SiSU_Manpage
notes=@n.flatten
notes.each do |e|
util=(e.to_s =~/^\[[\d*+]+\]:/) \
- ? (SiSU_TextUtils::Wrap.new(e.to_s,78,4,1))
- : (SiSU_TextUtils::Wrap.new(e.to_s,78,0,1))
+ ? (SiSU_TextUtils::Wrap.new(e.to_s,@wrap_width,4,1))
+ : (SiSU_TextUtils::Wrap.new(e.to_s,@wrap_width,0,1))
wrap=util.line_wrap
wrap=if wrap =~ /^\s*[\d*+]+\s+.+?\s*\Z/m
wrap.gsub(/(^|&nbsp;|#{Mx[:nbsp]}|\s|\*)\\\*/,'\1\\\\\*'). #man page requires
@@ -223,19 +199,19 @@ WOK
if dob.indent =~/[1-9]/ \
and dob.indent == dob.hang
util=if dob.bullet_
- SiSU_TextUtils::Wrap.new("* #{paragraph}",78,dob.indent.to_i*2)
- else SiSU_TextUtils::Wrap.new(paragraph,78,dob.indent.to_i*2)
+ SiSU_TextUtils::Wrap.new("* #{paragraph}",@wrap_width,dob.indent.to_i*2)
+ else SiSU_TextUtils::Wrap.new(paragraph,@wrap_width,dob.indent.to_i*2)
end
elsif dob.hang =~/[0-9]/ \
and dob.indent != dob.hang # NOT yet implemented
- util=SiSU_TextUtils::Wrap.new(paragraph,78,dob.indent.to_i*2)
+ util=SiSU_TextUtils::Wrap.new(paragraph,@wrap_width,dob.indent.to_i*2)
else
util=if dob.bullet_
- SiSU_TextUtils::Wrap.new("* #{paragraph}",78,0)
- else SiSU_TextUtils::Wrap.new(paragraph,78,0)
+ SiSU_TextUtils::Wrap.new("* #{paragraph}",@wrap_width,0)
+ else SiSU_TextUtils::Wrap.new(paragraph,@wrap_width,0)
end
end
- else util=SiSU_TextUtils::Wrap.new(paragraph,78,0)
+ else util=SiSU_TextUtils::Wrap.new(paragraph,@wrap_width,0)
end
w=util.line_wrap
w=w.gsub(/^(\\\.)/,' \1')
@@ -243,7 +219,7 @@ WOK
end
if lv
times=wrapped.length
- times=78 if times > 78
+ times=@wrap_width if times > @wrap_width
@manpage[:body] << case lv
when 0 then '.SH ' << wrapped.upcase << break_line << break_line
when 1..3 then '.SH ' << wrapped.upcase << break_line << break_line
@@ -384,49 +360,18 @@ WOK
else SiSU_Env::InfoDate.new.year #date missing decide on action
end
proj=SiSU_Env::InfoVersion.instance.get_version
- manpage[:open] = %{.TH "#{@md.fnb}" "#{@md.make.manpage['section']}" "#{date}" "#{proj[:version]}" "#{@md.title.main}"#{@md.make.manpage['name']}#{@md.make.manpage['synopsis']}}
+ manpage[:open] = %{.TH "#{@md.fnb}" "#{@md.make.manpage['section']}" "#{date}" "#{proj.version}" "#{@md.title.main}"#{@md.make.manpage['name']}#{@md.make.manpage['synopsis']}}
content << manpage[:open]
content << manpage[:head]
content << manpage[:body]
content << @@endnotes[:end] if @@notes==:end
content << manpage[:metadata]
content << manpage[:tail]
- Output.new(@md,content).manpage
+ outputfile=SiSU_Env::FileOp.new(@md).write_file.manpage
+ Txt_Output::Output.new.document(content,outputfile)
@@endnotes={ para: [], end: [] }
end
end
- class Output <Source
- include SiSU_Param
- include SiSU_Env
- def initialize(md,content)
- @md,@content=md,content
- end
- def manpage #%manpage output
- SiSU_Env::FileOp.new(@md).mkdir
- filename_manpage=SiSU_Env::FileOp.new(@md).write_file.manpage
- @sisu=[]
- emptyline=0
- @content.each do |para| # this is a hack
- if para.is_a?(Array) \
- and para.length > 0
- para.each do |line|
- if line
- line=line.gsub(/[ \t]+$/m,'').
- gsub(/^\A[ ]*\Z/m,'')
- (line=~/^\A\Z/) \
- ? (emptyline+=1)
- : emptyline=0
- if emptyline < 2 #remove additional empty lines
- filename_manpage.puts line #unix manpage
- end
- end
- end
- else filename_manpage.puts para #unix manpage # /^([*=-]|\.){5}/
- end
- end
- filename_manpage.close
- end
- end
end
end
__END__
diff --git a/lib/sisu/develop/manpage_format.rb b/lib/sisu/develop/manpage_format.rb
new file mode 100644
index 00000000..4885fb75
--- /dev/null
+++ b/lib/sisu/develop/manpage_format.rb
@@ -0,0 +1,85 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** manpage formatting template
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/manpage_format.rb;hb=HEAD>
+
+=end
+module SiSU_ManpageFormat
+ require_relative 'dp' # dp.rb
+ include SiSU_Param
+ class ParagraphNumber
+ def initialize(paranum)
+ @paranum=/(\d+)/m.match(paranum)[1]
+ end
+ def display
+ @paranum.gsub(/(\d+)/,'<font size="1" color="#777777">&nbsp;&nbsp;\1</font>')
+ end
+ def name
+ @paranum.gsub(/(\d+)/,'<a name="\1"></a>')
+ end
+ def goto
+ @paranum.gsub(/(\d+)/,'<a href="#\1">')
+ end
+ end
+ class FormatTextObject
+ def initialize(md,dob)
+ @md,@dob=md,dob
+ rgx=/#{Mx[:en_a_o]}[\d*+]+\s+(.+?)#{Mx[:en_a_c]}/
+ @dob.obj.gsub!(rgx,'\1') if @dob.obj =~rgx
+ end
+ def scr_endnote_body
+ "<endnote>#{@dob.obj}</endnote> "
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/develop/object_munge.rb b/lib/sisu/develop/object_munge.rb
new file mode 100644
index 00000000..0c2b5137
--- /dev/null
+++ b/lib/sisu/develop/object_munge.rb
@@ -0,0 +1,307 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** object munge
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_parts.rb;hb=HEAD>
+
+=end
+module SiSU_Object_Munge
+ def i_src_o_strip_markup(txtobj)
+ txtobj=txtobj.
+ gsub(/#{Mx[:srcrgx_bold_o]}(.+?)#{Mx[:srcrgx_bold_c]}/m,'\1').
+ gsub(/#{Mx[:srcrgx_italics_o]}(.+?)#{Mx[:srcrgx_italics_c]}/m,'\1').
+ gsub(/#{Mx[:srcrgx_underscore_o]}(.+?)#{Mx[:srcrgx_underscore_c]}/m,'\1').
+ gsub(/#{Mx[:srcrgx_cite_o]}(.+?)#{Mx[:srcrgx_cite_c]}/m,'\1').
+ gsub(/#{Mx[:srcrgx_insert_o]}(.+?)#{Mx[:srcrgx_insert_c]}/m,'\1').
+ gsub(/#{Mx[:srcrgx_strike_o]}(.+?)#{Mx[:srcrgx_strike_c]}/m,'\1').
+ gsub(/#{Mx[:srcrgx_superscript_o]}(\d+)#{Mx[:srcrgx_superscript_c]}/m,'[\1]').
+ gsub(/#{Mx[:srcrgx_superscript_o]}(.+?)#{Mx[:srcrgx_superscript_c]}/m,'\1').
+ gsub(/#{Mx[:srcrgx_subscript_o]}(.+?)#{Mx[:srcrgx_subscript_c]}/m,'\1').
+ gsub(/#{Mx[:srcrgx_hilite_o]}(.+?)#{Mx[:srcrgx_hilite_c]}/m,'\1').
+ gsub(/#{Mx[:gl_o]}#(?:126|152)#{Mx[:gl_c]}/i,'~').
+ gsub(/#{Mx[:en_a_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_a_c]}/m,''). # endnote removed
+ gsub(/#{Mx[:en_b_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_b_c]}/m,''). # endnote removed
+ gsub(/(?:#{Mx[:nbsp]})+/,' ').
+ gsub(/(?:#{Mx[:br_nl]})+/,"\n").
+ gsub(/(?:#{Mx[:br_paragraph]})+/,"\n").
+ gsub(/(?:#{Mx[:br_line]})+/,"\n").
+ gsub(/#{Mx[:gl_o]}(?:#lt|#060)#{Mx[:gl_c]}/,'<').
+ gsub(/#{Mx[:gl_o]}(?:#gt|#062)#{Mx[:gl_c]}/,'>').
+ gsub(/#{Mx[:gl_o]}#(?:038|amp)#{Mx[:gl_c]}/,'&').
+ gsub(/#{Mx[:gl_o]}#033#{Mx[:gl_c]}/,'!').
+ gsub(/#{Mx[:gl_o]}#035#{Mx[:gl_c]}/,'#').
+ gsub(/#{Mx[:gl_o]}#042#{Mx[:gl_c]}/,'*').
+ gsub(/#{Mx[:gl_o]}#045#{Mx[:gl_c]}/,'-').
+ gsub(/#{Mx[:gl_o]}#047#{Mx[:gl_c]}/,'/').
+ gsub(/#{Mx[:gl_o]}#095#{Mx[:gl_c]}/,'_').
+ gsub(/#{Mx[:gl_o]}#123#{Mx[:gl_c]}/,'{').
+ gsub(/#{Mx[:gl_o]}#125#{Mx[:gl_c]}/,'}').
+ gsub(/#{Mx[:gl_o]}#126#{Mx[:gl_c]}/,'~').
+ gsub(/#{Mx[:gl_o]}#169#{Mx[:gl_c]}/,'©').
+ gsub(/[ ][ ]s+/,' ').
+ strip
+if txtobj =~/Reading this/
+ puts txtobj
+ if txtobj =~ /#{Mx[:srcrgx_italics_o]}(.+?)#{Mx[:srcrgx_italics_c]}/
+ puts __LINE__
+ puts Mx[:srcrgx_italics_o]
+ puts txtobj
+ end
+end
+; txtobj
+ end
+ def i_ao_o_strip_markup(txtobj)
+ txtobj=txtobj.gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,'\1').
+ gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,'\1').
+ gsub(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/,'\1').
+ gsub(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,'\1').
+ gsub(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/,'\1').
+ gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'\1').
+ gsub(/#{Mx[:fa_superscript_o]}(\d+)#{Mx[:fa_superscript_c]}/,'[\1]').
+ gsub(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/,'\1').
+ gsub(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/,'\1').
+ gsub(/#{Mx[:fa_hilite_o]}(.+?)#{Mx[:fa_hilite_c]}/,'\1').
+ gsub(/#{Mx[:gl_o]}#(?:126|152)#{Mx[:gl_c]}/i,'~').
+ gsub(/#{Mx[:en_a_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_a_c]}/,''). # endnote removed
+ gsub(/#{Mx[:en_b_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_b_c]}/,''). # endnote removed
+ gsub(/(?:#{Mx[:nbsp]})+/,' ').
+ gsub(/(?:#{Mx[:br_nl]})+/,"\n").
+ gsub(/(?:#{Mx[:br_paragraph]})+/,"\n").
+ gsub(/(?:#{Mx[:br_line]})+/,"\n").
+ gsub(/#{Mx[:gl_o]}(?:#lt|#060)#{Mx[:gl_c]}/,'<').
+ gsub(/#{Mx[:gl_o]}(?:#gt|#062)#{Mx[:gl_c]}/,'>').
+ gsub(/#{Mx[:gl_o]}#(?:038|amp)#{Mx[:gl_c]}/,'&').
+ gsub(/#{Mx[:gl_o]}#033#{Mx[:gl_c]}/,'!').
+ gsub(/#{Mx[:gl_o]}#035#{Mx[:gl_c]}/,'#').
+ gsub(/#{Mx[:gl_o]}#042#{Mx[:gl_c]}/,'*').
+ gsub(/#{Mx[:gl_o]}#045#{Mx[:gl_c]}/,'-').
+ gsub(/#{Mx[:gl_o]}#047#{Mx[:gl_c]}/,'/').
+ gsub(/#{Mx[:gl_o]}#095#{Mx[:gl_c]}/,'_').
+ gsub(/#{Mx[:gl_o]}#123#{Mx[:gl_c]}/,'{').
+ gsub(/#{Mx[:gl_o]}#125#{Mx[:gl_c]}/,'}').
+ gsub(/#{Mx[:gl_o]}#126#{Mx[:gl_c]}/,'~').
+ gsub(/#{Mx[:gl_o]}#169#{Mx[:gl_c]}/,'©').
+ gsub(/[ ][ ]s+/,' ').
+ strip
+ end
+ def i_ao_o_src_markup_restore(txtobj)
+ @txtobj=txtobj
+ def textface_marks
+ @txtobj.gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,'*{\1}*').
+ gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,'/{\1}/').
+ gsub(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/,'_{\1}_').
+ gsub(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,'"{\1}"').
+ gsub(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/,'+{\1}+').
+ gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'-{\1}-').
+ gsub(/#{Mx[:fa_superscript_o]}(\d+)#{Mx[:fa_superscript_c]}/,'^{[\1]}^').
+ gsub(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/,'^{\1}^').
+ gsub(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/,',{\1},').
+ gsub(/#{Mx[:fa_hilite_o]}(.+?)#{Mx[:fa_hilite_c]}/,'\1').
+ gsub(/#{Mx[:gl_o]}#(?:126|152)#{Mx[:gl_c]}/i,'~').
+ gsub(/#{Mx[:en_a_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_a_c]}/,'~{\1 \2}~').
+ gsub(/#{Mx[:en_b_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_b_c]}/,''). # endnote removed
+ gsub(/(?:#{Mx[:nbsp]})+/,' ').
+ gsub(/(?:#{Mx[:br_nl]})+/,"\n").
+ gsub(/(?:#{Mx[:br_paragraph]})+/,"\n").
+ gsub(/(?:#{Mx[:br_line]})+/,"\n").
+ gsub(/#{Mx[:gl_o]}(?:#lt|#060)#{Mx[:gl_c]}/,'<').
+ gsub(/#{Mx[:gl_o]}(?:#gt|#062)#{Mx[:gl_c]}/,'>').
+ gsub(/#{Mx[:gl_o]}#(?:038|amp)#{Mx[:gl_c]}/,'&').
+ gsub(/#{Mx[:gl_o]}#033#{Mx[:gl_c]}/,'!').
+ gsub(/#{Mx[:gl_o]}#035#{Mx[:gl_c]}/,'#').
+ gsub(/#{Mx[:gl_o]}#042#{Mx[:gl_c]}/,'*').
+ gsub(/#{Mx[:gl_o]}#045#{Mx[:gl_c]}/,'-').
+ gsub(/#{Mx[:gl_o]}#047#{Mx[:gl_c]}/,'/').
+ gsub(/#{Mx[:gl_o]}#095#{Mx[:gl_c]}/,'_').
+ gsub(/#{Mx[:gl_o]}#123#{Mx[:gl_c]}/,'{').
+ gsub(/#{Mx[:gl_o]}#125#{Mx[:gl_c]}/,'}').
+ gsub(/#{Mx[:gl_o]}#126#{Mx[:gl_c]}/,'~').
+ gsub(/#{Mx[:gl_o]}#169#{Mx[:gl_c]}/,'©').
+ gsub(/[ ][ ]s+/,' ').
+ strip
+ end
+ def object_marks
+ @txtobj
+ end
+ self
+ end
+ def clean_text(txtobj,markup=:ao)
+ if txtobj.class==String
+ txtobj=if markup ==:ao
+ i_ao_o_strip_markup(txtobj)
+ elsif markup ==:src
+ i_src_o_strip_markup(txtobj)
+ else p __FILE__; p __LINE__
+ end
+ elsif txtobj.class.inspect=~/^SiSU_AO_DocumentStructure::/
+ txtobj.obj=i_ao_o_strip_markup(txtobj.obj)
+ else p 'error'
+ end
+ txtobj
+ end
+ def footnotes_inline(txtobj)
+ end
+ def footnotes_ref_and_note(txtobj)
+ end
+ def src_markup(txtobj)
+ txtobj
+ end
+ def extract_endnotes(doc_obj_txt,endnotes_) #% used for extraction of endnotes from paragraphs
+ if endnotes_ ==:separate
+ notes_a=doc_obj_txt.scan(/#{Mx[:en_a_o]}([\d]+\s+.+?)#{Mx[:en_a_c]}/)
+ ##notes_a=doc_obj_txt.scan(/#{Mx[:en_a_o]}([\d*+]+\s+.+?)#{Mx[:en_a_c]}/)
+ #notes_b=doc_obj_txt.scan(/#{Mx[:en_b_o]}([\d*+]+\s+.+?)#{Mx[:en_b_c]}/)
+ n=[]
+ notes_a.flatten.each do |note| #high cost to deal with <br> appropriately within plaintext, consider
+ note=note.dup.to_s
+ note=note.gsub(/^([\d]+)\s+/,'^~\1 ').
+ gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,
+ ' \\\\\\ ')
+ n << note
+ end
+ notes_a=n.flatten
+ doc_obj_txt=doc_obj_txt.
+ gsub(/#{Mx[:en_a_o]}([\d]+)\s+(?:.+?)#{Mx[:en_a_c]}/,'~^') # endnote marker marked up
+ else
+ doc_obj_txt=doc_obj_txt.
+ gsub(/#{Mx[:en_b_o]}[\d]+\s+(.+?)#{Mx[:en_b_c]}/,
+ '~[ \1 ]~'). # inline endnote with marker marked up
+ gsub(/#{Mx[:en_a_o]}([*+]+)\s+(.+?)#{Mx[:en_a_c]}/,
+ '~{\1 \2 }~'). # inline endnote with marker marked up
+ gsub(/#{Mx[:en_b_o]}([*+]+)\s+(.+?)#{Mx[:en_b_c]}/,
+ '~[\1 \2 ]~') # inline endnote with marker marked up
+ end
+ [doc_obj_txt,notes_a]
+ end
+ def objects #def i_ao_o_src_markup_restore(txtobj)
+ def code_(dob)
+ if dob.is==:code
+ dob.obj=dob.obj.gsub(/(^|[^}])_([<>])/m,'\1\2'). # _> _<
+ gsub(/(^|[^}])_([<>])/m,'\1\2') # _<_<
+ end
+ dob
+ end
+ def block_(dob)
+ dob.obj=if dob.of==:block # watch
+ dob.obj.gsub(/#{Mx[:gl_o]}●#{Mx[:gl_c]}/,"* ").
+ gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,"\n")
+ else dob.obj.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,"\n\n")
+ end
+ dob
+ end
+ def textface_marks_po4a(dob,endnotes_=:inline)
+ notes=''
+ dob.obj=dob.obj.
+ gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,
+ Mx[:src_bold_o] + '\1' + Mx[:src_bold_c]).
+ gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,
+ Mx[:src_italics_o] + '\1' + Mx[:src_italics_c]).
+ gsub(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/,
+ Mx[:src_underscore_o] + '\1' + Mx[:src_underscore_c]).
+ gsub(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/,
+ Mx[:src_subscript_o] + '\1' + Mx[:src_subscript_c]).
+ gsub(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/,
+ Mx[:src_superscript_o] + '\1' + Mx[:src_superscript_c]).
+ gsub(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/,
+ Mx[:src_insert_o] + '\1' + Mx[:src_insert_c]).
+ gsub(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,
+ Mx[:src_cite_o] + '\1' + Mx[:src_cite_c]).
+ gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,
+ Mx[:src_strike_o] + '\1' + Mx[:src_strike_c]).
+ gsub(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,
+ Mx[:src_monospace_o] + '\1' + Mx[:src_monospace_c])
+ unless dob.is==:code
+ dob.obj=dob.obj.
+ gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}/,'\1').
+ gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'\1').
+ gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,
+ '\1 [link: <\2>]').
+ gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}image/,
+ '\1 [link: local image]').
+ gsub(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,'\1')
+ dob.obj,notes=extract_endnotes(dob.obj,endnotes_)
+ dob.obj=dob.obj.
+ gsub(/#{Mx[:gl_o]}(?:#lt|#060)#{Mx[:gl_c]}/,'<').
+ gsub(/#{Mx[:gl_o]}(?:#gt|#062)#{Mx[:gl_c]}/,'>').
+ gsub(/#{Mx[:gl_o]}#(?:038|amp)#{Mx[:gl_c]}/,'&').
+ gsub(/#{Mx[:gl_o]}#033#{Mx[:gl_c]}/,'!').
+ gsub(/#{Mx[:gl_o]}#035#{Mx[:gl_c]}/,'#').
+ gsub(/#{Mx[:gl_o]}#042#{Mx[:gl_c]}/,'*').
+ gsub(/#{Mx[:gl_o]}#045#{Mx[:gl_c]}/,'-').
+ gsub(/#{Mx[:gl_o]}#047#{Mx[:gl_c]}/,'/').
+ gsub(/#{Mx[:gl_o]}#095#{Mx[:gl_c]}/,'_').
+ gsub(/#{Mx[:gl_o]}#123#{Mx[:gl_c]}/,'{').
+ gsub(/#{Mx[:gl_o]}#125#{Mx[:gl_c]}/,'}').
+ gsub(/#{Mx[:gl_o]}#126#{Mx[:gl_c]}/,'~').
+ gsub(/#{Mx[:gl_o]}#169#{Mx[:gl_c]}/,'©')
+ end
+ dob=block_(dob)
+ dob=code_(dob)
+ dob.obj=dob.obj.gsub(/#{Mx[:br_page]}\s*|#{Mx[:br_page_new]}/,''). # remove page breaks
+ gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'\1').
+ gsub(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,''). # remove name links
+ gsub(/&nbsp;|#{Mx[:nbsp]}/,' '). # decide on
+ gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/,
+ ' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]")
+ gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}image/,
+ ' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]")
+ gsub(/(?:^|[^_\\])\{\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*\}\S+/,
+ '[image: "\1"]')
+ [dob,notes]
+ end
+ def object_marks
+ @txtobj
+ end
+ self
+ end
+end
+__END__
diff --git a/lib/sisu/v6/prog_text_translation.rb b/lib/sisu/develop/prog_text_translation.rb
index 222d8940..a13f75d3 100644
--- a/lib/sisu/v6/prog_text_translation.rb
+++ b/lib/sisu/develop/prog_text_translation.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** internationalisation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/prog_text_translation.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: internationalisation
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/prog_text_translation.rb;hb=HEAD>
=end
module SiSU_Translate
diff --git a/lib/sisu/v6/qrcode.rb b/lib/sisu/develop/qrcode.rb
index 902411b6..4cdc5b2d 100644
--- a/lib/sisu/v6/qrcode.rb
+++ b/lib/sisu/develop/qrcode.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** summary of generated outputs and metadata
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/qrcode.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: summary of generated outputs and metadata
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/qrcode.rb;hb=HEAD>
=end
module SiSU_QRcode
diff --git a/lib/sisu/v6/relaxng.rb b/lib/sisu/develop/relaxng.rb
index 95d227bb..194e2e3d 100644
--- a/lib/sisu/v6/relaxng.rb
+++ b/lib/sisu/develop/relaxng.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** relaxng flow/logic
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/relaxng.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- ** Description: relaxng flow/logic
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/relaxng.rb;hb=HEAD>
=end
module SiSU_Relaxng
diff --git a/lib/sisu/v6/remote.rb b/lib/sisu/develop/remote.rb
index 9862c62a..56275227 100644
--- a/lib/sisu/v6/remote.rb
+++ b/lib/sisu/develop/remote.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** remote operations, get source from or copy output to remote server
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/remote.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: remote operations, get source from or copy output to remote server
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/remote.rb;hb=HEAD>
=end
module SiSU_Remote
diff --git a/lib/sisu/v6/rexml.rb b/lib/sisu/develop/rexml.rb
index db5019f4..977bf33c 100644
--- a/lib/sisu/v6/rexml.rb
+++ b/lib/sisu/develop/rexml.rb
@@ -1,67 +1,64 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** rexml testing of xml
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/rexml.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: rexml testing of xml
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/rexml.rb;hb=HEAD>
=end
module SiSU_Rexml
# load XML file for REXML parsing
begin
require 'rexml/document' \
- if FileTest.directory?("#{Config::CONFIG['rubylibdir']}/rexml") #Config::CONFIG['sitedir']
+ if FileTest.directory?("#{RbConfig::CONFIG['rubylibdir']}/rexml") #RbConfig::CONFIG['sitedir']
rescue LoadError
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
error('rexml/document NOT FOUND (LoadError)')
@@ -73,7 +70,7 @@ module SiSU_Rexml
class Rexml
begin
require 'rexml/document' \
- if FileTest.directory?("#{Config::CONFIG['rubylibdir']}/rexml") #Config::CONFIG['sitedir']
+ if FileTest.directory?("#{RbConfig::CONFIG['rubylibdir']}/rexml") #RbConfig::CONFIG['sitedir']
rescue LoadError
SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
error('rexml/document NOT FOUND (LoadError)')
diff --git a/lib/sisu/v6/se.rb b/lib/sisu/develop/se.rb
index 5afb5ee3..5525f46f 100644
--- a/lib/sisu/v6/se.rb
+++ b/lib/sisu/develop/se.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se.rb;hb=HEAD>
=end
@@cX=nil
diff --git a/lib/sisu/v6/se_cleanoutput.rb b/lib/sisu/develop/se_cleanoutput.rb
index e8395a1d..99833ccb 100644
--- a/lib/sisu/v6/se_cleanoutput.rb
+++ b/lib/sisu/develop/se_cleanoutput.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_cleanoutput.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_cleanoutput.rb;hb=HEAD>
=end
module SiSU_Clean_Output
diff --git a/lib/sisu/develop/se_clear.rb b/lib/sisu/develop/se_clear.rb
new file mode 100644
index 00000000..f86a2477
--- /dev/null
+++ b/lib/sisu/develop/se_clear.rb
@@ -0,0 +1,105 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_clear.rb;hb=HEAD>
+
+=end
+module SiSU_Clear
+ require_relative 'constants' # constants.rb
+ require_relative 'utils' # utils.rb
+ require_relative 'se_info_env' # se_info_env.rb
+ begin
+ require 'singleton'
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('singleton NOT FOUND (LoadError)')
+ end
+ class Clear < SiSU_Info_Env::InfoEnv # se_info_env.rb
+ #todo unify with FileOp
+ def initialize(cmd,fns,operation='')
+ @cmd=cmd
+ begin
+ super(fns)
+ @env=SiSU_Env::InfoEnv.new(fns)
+ SiSU_Env::InfoVersion.instance
+ if operation.class.inspect =~/SiSU_Param/
+ @md=operation
+ end
+ case operation #watch
+ when /pdf/ then @env_out=''
+ when /sql/
+ when /xml|plaintext|ascii/ then @env_out=@env.path.output + @fnb #check change of name to plaintext from ascii
+ else
+ if defined? @md.sfx_src \
+ and @md.sfx_src =~/ss[ftsumc]/
+ @env_out_root=@env.path.output
+ @env_out="#{@env.path.output}/#{@fnb}"
+ @@publisher='SiSU http://www.jus.uio.no/sisu'
+ @env_pdf="#{@env_out_root}/pdf"
+ end
+ end
+ rescue
+ SiSU_Screen::Ansi.new(@cmd,$!,$@).rescue do
+ __LINE__.to_s + ':' + __FILE__
+ end
+ ensure
+ end
+ end
+ def param_instantiate
+ @cX||=SiSU_Screen::Ansi.new(@cmd)
+ @@date=SiSU_Env::InfoDate.new
+ @@publisher='SiSU scribe'
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/se_createsite.rb b/lib/sisu/develop/se_createsite.rb
index 943cf8c5..4981eda0 100644
--- a/lib/sisu/v5/se_createsite.rb
+++ b/lib/sisu/develop/se_createsite.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_createsite.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_createsite.rb;hb=HEAD>
=end
module SiSU_Create_Site
@@ -166,7 +163,7 @@ module SiSU_Create_Site
cp_images(src,dest) if FileTest.directory?(src)
end
def cp_base_images #fix images
- src=SiSU_is[:path_base_system_data] + '/image'
+ src=SiSU_is.path_base_system_data? + '/image'
dest_arr=[
"#{@env.path.webserv}/_sisu/image_sys",
"#{@env.path.webserv}/#{@env.path.base_markup_dir_stub}/_sisu/image_sys"
diff --git a/lib/sisu/v5/se_css.rb b/lib/sisu/develop/se_css.rb
index 4d4713e1..5654d09d 100644
--- a/lib/sisu/v5/se_css.rb
+++ b/lib/sisu/develop/se_css.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_css.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_css.rb;hb=HEAD>
=end
module SiSU_CSS
diff --git a/lib/sisu/develop/se_date.rb b/lib/sisu/develop/se_date.rb
new file mode 100644
index 00000000..8c2ca8ea
--- /dev/null
+++ b/lib/sisu/develop/se_date.rb
@@ -0,0 +1,92 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_date.rb;hb=HEAD>
+
+=end
+module SiSU_Info_Date
+ require_relative 'constants' # constants.rb
+ require_relative 'utils' # utils.rb
+ class InfoDate
+ begin
+ require 'date'
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('date NOT FOUND (LoadError)')
+ end
+ attr_accessor :dt,:t
+ def initialize
+ @dt,@t=Date.today.to_s,Time.now
+ end
+ def week
+ w=@t.strftime('%W')
+ "#{@t.year}w#{w}"
+ end
+ def month
+ "#{@t.year}#{@t.month}"
+ end
+ def year
+ @t.year
+ end
+ def weekonly
+ @t.strftime('%W')
+ end
+ def monthonly
+ @t.month
+ end
+ def year_static
+ YEAR
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/se_db.rb b/lib/sisu/develop/se_db.rb
index 373fcfab..39701ef6 100644
--- a/lib/sisu/v5/se_db.rb
+++ b/lib/sisu/develop/se_db.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_db.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_db.rb;hb=HEAD>
=end
module SiSU_Info_Db
diff --git a/lib/sisu/v6/se_envcall.rb b/lib/sisu/develop/se_envcall.rb
index 840092eb..b5a9500d 100644
--- a/lib/sisu/v6/se_envcall.rb
+++ b/lib/sisu/develop/se_envcall.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_envcall.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_envcall.rb;hb=HEAD>
=end
module SiSU_Env_Call
diff --git a/lib/sisu/v6/se_file_op.rb b/lib/sisu/develop/se_file_op.rb
index ff9aa65a..342f75f1 100644
--- a/lib/sisu/v6/se_file_op.rb
+++ b/lib/sisu/develop/se_file_op.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_file_op.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_file_op.rb;hb=HEAD>
=end
module SiSU_Info_File
@@ -350,11 +347,17 @@ module SiSU_File_Op
fn=base_filename.rst
make_file(path,fn)
end
+ def orgmode
+ path=output_path.orgmode.dir
+ make_path(path)
+ fn=base_filename.orgmode
+ make_file(path,fn)
+ end
def html_scroll
pth=output_path.html.dir
make_path(pth)
p_fn=place_file.html_scroll.dir
- @@filename_html_scroll=File.new(p_fn,'w+')
+ File.new(p_fn,'w+')
end
def html_seg_index
pth=((output_dir_structure.by_filename?) \
@@ -363,7 +366,7 @@ module SiSU_File_Op
: "#{output_path.html.dir}/#{@md.fnb}"
make_path(pth)
p_fn=place_file.html_seg_index.dir
- @@filename_html_index=File.new(p_fn,'w+')
+ File.new(p_fn,'w+')
end
def html_segtoc
pth=((output_dir_structure.by_filename?) \
@@ -373,7 +376,7 @@ module SiSU_File_Op
: "#{output_path.html.dir}/#{@md.fnb}"
make_path(pth)
p_fn=place_file.html_segtoc.dir
- @@filename_html_index=File.new(p_fn,'w+')
+ File.new(p_fn,'w+')
end
def xhtml
path=output_path.xhtml.dir
@@ -459,18 +462,30 @@ module SiSU_File_Op
fn=base_filename.manifest_txt
make_file(path,fn)
end
+ def po4a_cfg
+ path=output_path.po4a.dir
+ make_path(path)
+ fn=base_filename.po4a_cfg
+ make_file(path,fn)
+ end
def pot
path=output_path.pot.dir
make_path(path)
fn=base_filename.pot
make_file(path,fn)
end
- def po
- path=output_path.po.dir
+ def po(lng=@md.opt.lng)
+ path=output_path.po(lng).dir
make_path(path)
fn=base_filename.po
make_file(path,fn)
end
+ def po4a_sst(lng=@md.opt.lng)
+ path=output_path.po4a_sst(lng).dir
+ make_path(path)
+ fn=base_filename.po4a_sst
+ make_file(path,fn)
+ end
self
end
def place_file
@@ -529,6 +544,17 @@ module SiSU_File_Op
end
self
end
+ def orgmode
+ def dir
+ output_path.orgmode.dir + '/' \
+ + base_filename.orgmode
+ end
+ def rel
+ output_path.orgmode.rel + '/' \
+ + base_filename.orgmode
+ end
+ self
+ end
def html_scroll
def dir
output_path.html_scroll.dir + '/' \
@@ -964,6 +990,24 @@ module SiSU_File_Op
end
i18n(fnh)
end
+ def orgmode(fh=nil)
+ fh=default_hash_build(fh,Sfx[:txt_orgmode])
+ fh[:lng]=lang_code?(fh[:lng])
+ fnh=if output_dir_structure.by_filename?
+ {
+ fn: 'plain',
+ ft: fh[:ft],
+ lng: fh[:lng],
+ }
+ else
+ {
+ fn: fh[:fn],
+ ft: fh[:ft],
+ lng: fh[:lng],
+ }
+ end
+ i18n(fnh)
+ end
def html_scroll(fh=nil)
fh=default_hash_build(fh,Sfx[:html])
fh[:lng]=lang_code?(fh[:lng])
@@ -1011,19 +1055,11 @@ module SiSU_File_Op
def html_seg(fh)
fh=default_hash_build(fh,Sfx[:html])
fh[:lng]=lang_code?(fh[:lng])
- fnh=if output_dir_structure.by_filename?
- {
- fn: 'scroll',
- ft: fh[:ft],
- lng: fh[:lng],
- }
- else
- {
- fn: fh[:fn],
- ft: fh[:ft],
- lng: fh[:lng],
- }
- end
+ fnh={
+ fn: fh[:fn],
+ ft: fh[:ft],
+ lng: fh[:lng],
+ }
i18n(fnh)
end
def html_book_index(fh=nil)
@@ -1422,6 +1458,9 @@ module SiSU_File_Op
def src
@md.fno
end
+ def po4a_cfg
+ 'po4a.cfg'
+ end
def po #check
(@fno.empty?) \
? (@md.fn[:po])
@@ -1432,6 +1471,9 @@ module SiSU_File_Op
? (@md.fn[:pot])
: (@fno + '.pot')
end
+ def po4a_sst #check
+ @fno
+ end
def sisupod
(@md.fns =~/\.ssm\.sst$/) \
? @md.fns.gsub(/(?:\~\S{2,3})?\.ssm\.sst$/,'.ssm.txz')
@@ -1723,17 +1765,33 @@ module SiSU_File_Op
end
self
end
- def po
+ def po4a
+ def dir
+ output_path.base.dir + '/' \
+ + Gt[:src] + '/' \
+ + @md.opt.fng + '/po4a'
+ end
+ def url
+ output_path.base.url + '/po4a/' \
+ + @md.fnb
+ end
+ def rcp
+ #p "#{output_path.base.dir}/po4a/#{@md.fnb}"
+ end
+ self
+ end
+ def po(lng=@md.opt.lng)
+ @lng=lng
def dir
output_path.base.dir + '/' \
+ Gt[:src] + '/' \
+ @md.opt.fng + '/po4a/po/' \
- + @md.opt.lng
+ + @lng
end
def url
output_path.base.url + '/po4a/' \
+ @md.fnb + '/po/' \
- + @md.opt.lng
+ + @lng
end
self
end
@@ -1777,6 +1835,21 @@ module SiSU_File_Op
end
self
end
+ def po4a_sst(lng=@md.opt.lng)
+ @lng=lng
+ def dir
+ output_path.base.dir + '/' \
+ + Gt[:src] + '/' \
+ + @md.opt.fng + '/po4a/' \
+ + @lng
+ end
+ def url
+ output_path.base.url + '/po4a/' \
+ + @md.fnb \
+ + @lng
+ end
+ self
+ end
def md_harvest
manifest
self
@@ -1890,6 +1963,28 @@ module SiSU_File_Op
end
self
end
+ def orgmode
+ def ft
+ 'orgmode' \
+ + DEVELOPER[:under_construction]
+ end
+ def dir
+ set_path(ft).dir.abc
+ end
+ def url
+ set_path(ft).url.abc
+ end
+ def rel
+ set_path(ft).rel.abc
+ end
+ def rcp
+ set_path(ft).rcp.abc
+ end
+ def rel_sm
+ set_path(ft).rel_sm.ab
+ end
+ self
+ end
def html_scroll
def ft
'html'
@@ -2579,11 +2674,11 @@ module SiSU_Create_File
end
def file_semantic
fn='./semantic.yaml'
- @@filename_semantic=File.new(fn,'w+')
+ File.new(fn,'w+')
end
def file_rss
fn='./semantic.xml'
- @@filename_rss=File.new(fn,'w+')
+ File.new(fn,'w+')
end
def epub
@pth=@env.processing_path.epub
diff --git a/lib/sisu/v5/se_filemap.rb b/lib/sisu/develop/se_filemap.rb
index 867111bb..10931b74 100644
--- a/lib/sisu/v5/se_filemap.rb
+++ b/lib/sisu/develop/se_filemap.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_filemap.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_filemap.rb;hb=HEAD>
=end
module SiSU_File_Map
@@ -99,6 +96,9 @@ module SiSU_File_Map
if @md.opt.act[:txt_rst][:set]==:on #% --rst, --rest
ft << @md.fn[:txt_rst]
end
+ if @md.opt.act[:txt_orgmode][:set]==:on #% --orgmode
+ ft << @md.fn[:txt_orgmode]
+ end
if @md.opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml
ft << @md.fn[:xhtml]
end
@@ -167,6 +167,9 @@ module SiSU_File_Map
if @opt.act[:txt_rst][:set]==:on #% --rst, --rest
ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt'
end
+ if @opt.act[:txt_orgmode][:set]==:on #% --orgmode
+ ft << 'plain.txt' << '??.plain.txt' << 'plain.??.txt'
+ end
if @opt.act[:xhtml][:set]==:on #% --xhtml, -b xhtml
ft << 'scroll.xhtml' << '??.scroll.xhtml' << 'scroll.??.xhtml'
end
diff --git a/lib/sisu/v5/se_get_init.rb b/lib/sisu/develop/se_get_init.rb
index a74e22f9..dd767d05 100644
--- a/lib/sisu/v5/se_get_init.rb
+++ b/lib/sisu/develop/se_get_init.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_get_init.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_get_init.rb;hb=HEAD>
=end
module SiSU_Get_Init
@@ -82,15 +79,39 @@ module SiSU_Get_Init
@@tx ||=SiSU_Parts_TeXpdf::TeX.new
end
def rc_path_options
+ v=SiSU_Env::InfoVersion.instance.get_version
[
- "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:version_dir]}",
- "#{$sisu_document_markup_directory_base_fixed_path}/.sisu",
- "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:version_dir]}",
- "#{$sisu_document_markup_directory_base_fixed_path}/_sisu",
- "#{@@home}/.sisu/#{SiSU_is[:version_dir]}",
- "#{@@home}/.sisu",
- "#{@@sisu_etc}/#{SiSU_is[:version_dir]}",
- "#{@@sisu_etc}",
+ $sisu_document_markup_directory_base_fixed_path \
+ + '/.sisu/' \
+ + v.branch_name,
+ $sisu_document_markup_directory_base_fixed_path \
+ + '/.sisu/' \
+ + v.branch_version,
+ $sisu_document_markup_directory_base_fixed_path \
+ + '/.sisu',
+ $sisu_document_markup_directory_base_fixed_path \
+ + '/_sisu/' \
+ + v.branch_name,
+ $sisu_document_markup_directory_base_fixed_path \
+ + '/_sisu/' \
+ + v.branch_version,
+ $sisu_document_markup_directory_base_fixed_path \
+ + '/_sisu',
+ @@home \
+ + '/.sisu/' \
+ + v.branch_name,
+ @@home \
+ + '/.sisu/' \
+ + v.branch_version,
+ @@home \
+ + '/.sisu', \
+ @@sisu_etc \
+ + '/' \
+ + v.branch_name,
+ @@sisu_etc \
+ + '/' \
+ + v.branch_version,
+ @@sisu_etc,
]
end
def sisu_document_make
@@ -170,13 +191,17 @@ module SiSU_Get_Init
tell_no_yaml='WARNING - YAML loading switched off, to enable delete the file:'
if @markup_dir_changed_
@ad_path=[
- "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:version_dir]}/skin/yml",
+ "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is.branch_name?}/skin/yml",
+ "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is.branch_version?}/skin/yml",
"#{$sisu_document_markup_directory_base_fixed_path}/.sisu/skin/yml",
- "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:version_dir]}/skin/yml",
+ "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is.branch_name?}/skin/yml",
+ "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is.branch_version?}/skin/yml",
"#{$sisu_document_markup_directory_base_fixed_path}/_sisu/skin/yml",
- "#{@@home}/.sisu/#{SiSU_is[:version_dir]}/skin/yml",
+ "#{@@home}/.sisu/#{SiSU_is.branch_name?}/skin/yml",
+ "#{@@home}/.sisu/#{SiSU_is.branch_version?}/skin/yml",
"#{@@home}/.sisu/skin/yml",
- "#{@@sisu_etc}/#{SiSU_is[:version_dir]}/skin/yml",
+ "#{@@sisu_etc}/#{SiSU_is.branch_name?}/skin/yml",
+ "#{@@sisu_etc}/#{SiSU_is.branch_version?}/skin/yml",
"#{@@sisu_etc}/skin/yml",
]
@ad_path.each do |v|
diff --git a/lib/sisu/v6/se_hub_particulars.rb b/lib/sisu/develop/se_hub_particulars.rb
index ca9a8a06..e7e9decf 100644
--- a/lib/sisu/v6/se_hub_particulars.rb
+++ b/lib/sisu/develop/se_hub_particulars.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
- particulars, composite information about document being processed
+** Description: documents, structuring, processing, publishing, search
+*** particulars, composite information about document being processed
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_hub_particulars.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_hub_particulars.rb;hb=HEAD>
=end
module SiSU_Particulars
diff --git a/lib/sisu/v5/se_info_env.rb b/lib/sisu/develop/se_info_env.rb
index 495b7a04..7cd4041b 100644
--- a/lib/sisu/v5/se_info_env.rb
+++ b/lib/sisu/develop/se_info_env.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_info_env.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_info_env.rb;hb=HEAD>
=end
@@current_document=Dir.pwd #nil #''
@@ -571,6 +568,12 @@ module SiSU_Info_Env
? @rc['rst']['ocn']
: false
end
+ def orgmode_ocn?
+ ((defined? @rc['orgmode']['ocn']) \
+ && @rc['orgmode']['ocn']==true) \
+ ? @rc['orgmode']['ocn']
+ : false
+ end
def widget #needs (md) #move
@rc=SiSU_Env::GetInit.new.sisu_yaml.rc
@ad=SiSU_Env::GetInit.new.ads
@@ -1063,7 +1066,7 @@ WOK
@sys.home
end
def sisurc_path
- GetInit.new.sisu_yaml.rc_path
+ SiSU_Get_Init::GetInit.new.sisu_yaml.rc_path
end
def pwd
@sys.pwd
@@ -1084,7 +1087,7 @@ WOK
@stub_pod
end
def etc
- defaults[:sisu_etc] #live/dynamic
+ defaults[:sisu_etc] #live/dynamic
end
def arch
@sys.dir_arch
@@ -1128,7 +1131,7 @@ WOK
def webserv_path #testing, check need, remove
webserv
end
- def webserv #separation required for webrick which cannot use path.output (different requirements as no file is passed)
+ def webserv #separation required for webrick which cannot use path.output (different requirements as no file is passed)
man_path=if @@man_path.nil?
man_path=if defined? @rc['webserv']['path'] \
and @rc['webserv']['path'] =~/\S\S+/
@@ -1166,17 +1169,17 @@ WOK
def webserv_map_pwd #dir
"#{path.webserv}/#{base_markup_dir_stub}"
end
- def webserv_dir #fixed/hard path to /www web/presentation directory, on Debian /var/www subdirectories are created within it, depending on markup directory stub-name (last segment of markup directory name)
+ def webserv_dir #fixed/hard path to /www web/presentation directory, on Debian /var/www subdirectories are created within it, depending on markup directory stub-name (last segment of markup directory name)
defaults[:webserv_dir]
end
- def webserv_image #web/presentation directory, subdirectories are created within it, depending on markup directory stub-name (last segment of markup directory name)
+ def webserv_image #web/presentation directory, subdirectories are created within it, depending on markup directory stub-name (last segment of markup directory name)
images=if defined? @rc['webserv']['images']
@rc['webserv']['images']
else defaults[:images]
end
"#{path.webserv}/#{images}"
end
- def output #web/webserv output directory... subdirectory into which further subdirectories are made based on file names
+ def output #web/webserv output directory... subdirectory into which further subdirectories are made based on file names
r=Px[:lng_lst_rgx]
u=/.+?\/([^\/]+)(?:\/(?:#{r})$|$)/
base_stub=@sys.pwd.gsub(u,'\1')
@@ -1194,7 +1197,7 @@ WOK
def feed_home
"#{public_output}/#{@rc['webserv']['feed_home']}"
end
- def scripts #used previously only to include tla version info
+ def scripts #used previously only to include tla version info
if defined? @rc['project']['path']
"#{home}/#{@rc['project']['path']}"
end
@@ -1213,19 +1216,28 @@ WOK
def output_tell
url.webserv_map_pwd
end
- def image_source #image repository source directory
+ def image_source_sisu_includes(md=nil)
+ if md \
+ and (md.opt.sisu_install_type? == \
+ :full_path_to_sisu_bin_in_sisu_dir_tree) \
+ and FileTest.directory?(
+ "#{md.opt.sisu_data_dir?}/image"
+ )==true
+ "#{md.opt.sisu_data_dir?}/image"
+ else
+ "#{share}/image"
+ end
+ end
+ def image_source(md=nil) #image repository source directory
if defined? @rc['image']['path'] \
and defined? @rc['image']['public']
pth="#{@rc['image']['path']}"
"#{pth}/#{@rc['image']['public']}"
else
- "#{share}/image"
+ image_source_sisu_includes(md)
end
end
- def image_source_sisu_includes
- "#{share}/image"
- end
- def image_source_include #image repository source directory
+ def image_source_include(md=nil) #image repository source directory
if defined? @rc['image']['path'] \
and defined? @rc['image']['public'] \
and FileTest.directory?(
@@ -1239,7 +1251,7 @@ WOK
)==true
"#{SiSU_Utils::Path.new.base_markup}/#{defaults[:image_stub]}"
else
- "#{share}/image"
+ image_source_sisu_includes(md)
end
end
def image_external
@@ -1251,7 +1263,8 @@ WOK
end
end
def image_source_include_remote
- if FileTest.directory?(image_external); image_external
+ if FileTest.directory?(image_external)
+ image_external
end
end
self
@@ -1286,7 +1299,7 @@ WOK
end
v=SiSU_Env::InfoVersion.instance.get_version
v_dev=(DEVELOPER[:maintenance]==:true) \
- ? "_#{v[:version]}"
+ ? "_#{v.version}"
: ''
path=if proposed_path_base \
and FileTest.directory?(proposed_path_base) \
@@ -1476,7 +1489,9 @@ WOK
def epub_cp_images(md)
pth="#{processing_path.epub}/#{Ep[:d_oebps]}/image"
FileUtils::mkdir_p(pth) unless FileTest.directory?(pth)
- src="#{path.share}/image"
+ src=(md.opt.sisu_install_type? == :full_path_to_sisu_bin_in_sisu_dir_tree) \
+ ? "#{md.opt.sisu_data_dir?}/image"
+ : "#{md.opt.sisu_data_dir?}/sisu/image"
images=%W[bullet_09.png arrow_next_red.png arrow_prev_red.png arrow_up_red.png]
images.each do |i| #move to avoid repeated tests
if FileTest.file?("#{src}/#{i}")
@@ -2103,13 +2118,6 @@ WOK
? @rc['default']['papersize'].downcase
: (defaults[:papersize].downcase)
end
- def odf_structure
- FileUtils::rm_rf(processing_path.processing_path.odf_pth)
- FileUtils::mkdir_p(processing_path.processing_path.odf_pth)
- system(
- "unzip -q #{path.share}/#{SiSU_is[:version_dir]}/odf/odt.zip -d #{processing_path.odf_pth}"
- )
- end
def sisupod_gen(fns_pod)
sisupod_gen_v3(fns_pod)
end
diff --git a/lib/sisu/develop/se_info_port.rb b/lib/sisu/develop/se_info_port.rb
new file mode 100644
index 00000000..f878142b
--- /dev/null
+++ b/lib/sisu/develop/se_info_port.rb
@@ -0,0 +1,70 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_info_port.rb;hb=HEAD>
+
+=end
+module SiSU_Info_Port
+ require_relative 'constants' # constants.rb
+ require_relative 'utils' # utils.rb
+ require_relative 'se_info_env' # se_info_env.rb
+ class InfoPort < SiSU_Info_Env::InfoEnv # se_info_env.rb
+ def initialize
+ @env=SiSU_Env::InfoEnv.new
+ end
+ def webrick
+ @env.port.webrick_port
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/se_info_system.rb b/lib/sisu/develop/se_info_system.rb
index 0216d0a1..e688395c 100644
--- a/lib/sisu/v5/se_info_system.rb
+++ b/lib/sisu/develop/se_info_system.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_info_system.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_info_system.rb;hb=HEAD>
=end
module SiSU_Info_Sys_Gen
@@ -68,15 +65,15 @@ module SiSU_Info_Sys_Gen
error('rbconfig NOT FOUND (LoadError)')
end
@@user, @@home, @@hostname, @@pwd, @@sisu_etc, @@host, @@arch, @@rbver, @@dir_arch, @@dir_sitearch, @@dir_bin, @@locale, @@rc,@@sisurc_path,@@ad=
- ENV['USER'],ENV['HOME'],ENV['HOSTNAME'],ENV['PWD'],Config::CONFIG['sysconfdir'] + '/sisu',Config::CONFIG['host'],Config::CONFIG['arch'],%x{ruby -v}.strip,Config::CONFIG['archdir'],Config::CONFIG['sitearchdir'],Config::CONFIG['bindir'],%x{locale charmap}.strip,nil, nil, {} # %x{ruby -v}.strip # Config::CONFIG['rb_ver']
- out=Config::CONFIG['localstatedir']
- etc=Config::CONFIG['sysconfdir'] + '/sisu'
- share=Config::CONFIG['datadir'] + '/sisu'
- data=Config::CONFIG['datadir'] + '/doc/sisu'
+ 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']
+ out=RbConfig::CONFIG['localstatedir']
+ etc=RbConfig::CONFIG['sysconfdir'] + '/sisu'
+ share=RbConfig::CONFIG['datadir'] + '/sisu'
+ data=RbConfig::CONFIG['datadir'] + '/doc/sisu'
m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@stub_pwd ||=@@pwd[m,1]
@base_markup_dir_stub=SiSU_Utils::Path.new.base_markup_stub
- prcss_dir='_sisu_processing_' + '.' + SiSU_is[:version_dir]
+ prcss_dir='_sisu_processing_' + '.' + SiSU_is.branch_version?
prcss_dir_tmp_root="/tmp/#{prcss_dir}"
prcss_dir_stub="#{prcss_dir}/#{@stub_pwd}"
if @@user
diff --git a/lib/sisu/develop/se_load.rb b/lib/sisu/develop/se_load.rb
new file mode 100644
index 00000000..6f61ddd6
--- /dev/null
+++ b/lib/sisu/develop/se_load.rb
@@ -0,0 +1,108 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_load.rb;hb=HEAD>
+
+=end
+module SiSU_Load
+ require_relative 'constants' # constants.rb
+ require_relative 'utils' # utils.rb
+ class Load
+ def initialize(prog,mandatory=false)
+ @prog,@mandatory=prog,mandatory
+ end
+ def prog
+ load_prog=false
+ $:.each do |reqpath|
+ if FileTest.exist?("#{reqpath}/#{@prog}.rb")
+ load_prog=true
+ #SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).ok("#{reqpath}/#{@prog}.rb loaded")
+ break
+ #else SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).warn("#{reqpath}/#{@prog}.rb not found")
+ end
+ end
+ if load_prog \
+ and @prog=~/dbi/
+ begin
+ require 'dbi'
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('dbi NOT FOUND (LoadError)')
+ end
+ end
+ if load_prog
+ begin
+ require @prog
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error("#{@prog} NOT FOUND (LoadError)")
+ end
+ else
+ @mandatory \
+ ? (SiSU_Screen::Ansi.new(@prog,"*WARN* module required: #{@prog}").warn)
+ : '' #(SiSU_Screen::Ansi.new(@prog,"*WARN* #{@prog} load requested").warn)
+ end
+ load_prog
+ end
+ def prog?
+ load_prog=false
+ $:.each do |reqpath|
+ if FileTest.exist?("#{reqpath}/#{@prog}.rb"); load_prog=true
+ break
+ end
+ end
+ load_prog
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/se_processing.rb b/lib/sisu/develop/se_processing.rb
index 8646b5e0..b40dfc59 100644
--- a/lib/sisu/v5/se_processing.rb
+++ b/lib/sisu/develop/se_processing.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_processing.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_processing.rb;hb=HEAD>
=end
module SiSU_Processing_Settings
diff --git a/lib/sisu/v6/se_programs.rb b/lib/sisu/develop/se_programs.rb
index 5c8bb70f..e3949882 100644
--- a/lib/sisu/v6/se_programs.rb
+++ b/lib/sisu/develop/se_programs.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_programs.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_programs.rb;hb=HEAD>
=end
module SiSU_Sys_Call
@@ -75,7 +72,7 @@ module SiSU_Sys_Call
@sys=SiSU_Info_Sys::InfoSystem.instance
end
def program_found?(program)
- found=`which #{program}` #`whereis #{program}`
+ found=`which #{program} 2>&1` #`whereis #{program}`
(found =~/bin\/#{program}\b/) ? true : false
end
def locale #locales utf8 or other
@@ -137,6 +134,16 @@ module SiSU_Sys_Call
false
end
end
+ def po4a #po4a
+ program='po4a'
+ program_ref="\n\t\tpo4a"
+ if program_found?(program); true
+ else
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ warn("#{program} is not installed #{program_ref}")
+ false
+ end
+ end
def zip #zip
program='zip'
program_ref="\n\t\tused to in the making of number of file formats, odf, epub"
@@ -250,7 +257,7 @@ module SiSU_Sys_Call
#STDERR.puts "\t*WARN* #{program} is not installed #{program_ref}" unless found
found
end
- def graphicksmagick #graphicsmagick is a image manipulation program
+ def graphicsmagick #graphicsmagick is a image manipulation program
program='gm'
#program_ref="\n\t\tsee <http://www.graphicsmagick.org/>"
found=(program_found?(program)) ? true : false
diff --git a/lib/sisu/v6/se_remotes.rb b/lib/sisu/develop/se_remotes.rb
index 3b4ded45..23f1386d 100644
--- a/lib/sisu/v6/se_remotes.rb
+++ b/lib/sisu/develop/se_remotes.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_remotes.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_remotes.rb;hb=HEAD>
=end
module SiSU_Info_Remote_Host
diff --git a/lib/sisu/v5/se_standardise_lang.rb b/lib/sisu/develop/se_standardise_lang.rb
index f7be20df..94c6baa3 100644
--- a/lib/sisu/v5/se_standardise_lang.rb
+++ b/lib/sisu/develop/se_standardise_lang.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_standardise_lang.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_standardise_lang.rb;hb=HEAD>
=end
@@lang_info=nil
diff --git a/lib/sisu/develop/se_version.rb b/lib/sisu/develop/se_version.rb
new file mode 100644
index 00000000..157ecc9c
--- /dev/null
+++ b/lib/sisu/develop/se_version.rb
@@ -0,0 +1,183 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/se_version.rb;hb=HEAD>
+
+=end
+module SiSU_Info_Version
+ require_relative 'constants' # constants.rb
+ require_relative 'utils' # utils.rb
+ require_relative 'se_info_env' # se_info_env.rb
+ begin
+ require 'singleton'
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('singleton NOT FOUND (LoadError)')
+ end
+ class InfoVersion < SiSU_Info_Env::InfoEnv # se_info_env.rb
+ include Singleton
+ begin
+ require 'rbconfig'
+ require 'yaml'
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('rbconfig or yaml NOT FOUND (LoadError)')
+ end
+ @@lib_path=nil
+ def get_version
+ version={}
+ @pwd=ENV['PWD']
+ lib_path=
+ @@lib_path \
+ ? @@lib_path
+ : `echo $RUBYLIB`.split(':')
+ @@lib_path ||=lib_path
+ if File.exist?(SiSU_is.version_info_path?)
+ version=YAML::load(File::open(SiSU_is.version_info_path?))
+ end
+ version[:branch_version]=SiSU_is.branch_version?
+ version[:branch_number]=/^v([0-9]+)/.match(version[:branch_version])[1]
+ version[:branch_name]=SiSU_is.branch_name?
+ version[:install_method]=if SiSU_is.runtime_type? ==:gem_install
+ spec = Gem::Specification.find_by_name("sisu")
+ gem_root = spec.gem_dir
+ (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_is.branch_name?}/,'')) == gem_root) \
+ ? ' (ruby gem install)' : ''
+ else ''
+ end
+ @version=version
+ def version_details_hash
+ @version
+ end
+ def project
+ version_details_hash[:project]
+ end
+ def date
+ version_details_hash[:date]
+ end
+ def date_stamp
+ version_details_hash[:date_stamp]
+ end
+ def version
+ version_details_hash[:version]
+ end
+ def branch_version
+ version_details_hash[:branch_version]
+ end
+ def branch_number
+ version_details_hash[:branch_number]
+ end
+ def branch_name
+ version_details_hash[:branch_name]
+ end
+ def install_method
+ version_details_hash[:install_method]
+ end
+ self
+ end
+ def rbversion
+ %x{ruby -v}.strip
+ end
+ end
+end
+module SiSU_Info_About
+ require_relative 'constants' # constants.rb
+ require_relative 'utils' # utils.rb
+ begin
+ require 'singleton'
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('singleton NOT FOUND (LoadError)')
+ end
+ class InfoAbout
+ def initialize(color='')
+ @color=color
+ end
+ def sisu_version
+ version=SiSU_Env::InfoVersion.instance.get_version
+ rb_ver=SiSU_Env::InfoVersion.instance.rbversion
+ if version.version
+ opt_cmd=if defined? @color.cmd \
+ and @color.cmd =~/[ck]/
+ @color.cmd
+ else '-v'
+ end
+ SiSU_Screen::Ansi.new(
+ opt_cmd,
+ version.project,
+ version.version,
+ version.date_stamp,
+ version.date,
+ version.install_method,
+ rb_ver
+ ).version
+ else puts 'SiSU (version information not available)'
+ end
+ end
+ def sisu_about
+ puts <<-WOK
+ sisu: documents; markup, structuring, publishing in multiple standard formats, & search
+ most (not all) useful commands (are made in a directory containing a sisu markup file &) take the form:
+ sisu [action(s)] [filename(s)]
+ where filename refers to a valid sisu marked up file, e.g.:
+ cd /usr/share/doc/sisu/markup-samples/sisu_manual
+ sisu --html --verbose sisu_commands.sst
+ sisu --txt --html --epub --odt --pdf --sqlite --manpage --texinfo --concordance --qrcode --verbose sisu.ssm
+ cd -
+ See output produced, or see man pages: man sisu
+ <http://www.sisudoc.org/> <http://www.jus.uio.no/sisu/>
+ WOK
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/shared_images.rb b/lib/sisu/develop/shared_images.rb
index 85520a51..e617676e 100644
--- a/lib/sisu/v6/shared_images.rb
+++ b/lib/sisu/develop/shared_images.rb
@@ -1,60 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** common file for xml generation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/shared_images.rb;hb=HEAD>
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/shared_images.rb;hb=HEAD>
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: common file for xml generation
=end
module SiSU_Images
require_relative 'se_hub_particulars' # se_hub_particulars.rb
@@ -127,7 +125,7 @@ module SiSU_Images
end
def select_sisu_base
images=%w[arrow_next_red.png arrow_prev_red.png arrow_up_red.png dot_clear.png dot_white.png b_doc.png b_epub.png b_odf.png b_pdf.png b_toc.png]
- src_path="#{SiSU_is[:path_base_system_data]}/image"
+ src_path="#{SiSU_is.path_base_system_data?}/image"
dest=dest_path(:image_sys)
copy(src_path,dest,images)
end
diff --git a/lib/sisu/v5/shared_markup_alt.rb b/lib/sisu/develop/shared_markup_alt.rb
index 3869dea4..f862c46c 100644
--- a/lib/sisu/v5/shared_markup_alt.rb
+++ b/lib/sisu/develop/shared_markup_alt.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/shared_markup_alt.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/shared_markup_alt.rb;hb=HEAD>
=end
module SiSU_TextRepresentation
@@ -82,9 +79,8 @@ module SiSU_TextRepresentation
gsub(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/,'\1').
gsub(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,'\1').
gsub(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/,'\1').
- gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strke_c]}/,'\1').
+ gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,'\1').
gsub(/#{Mx[:fa_superscript_o]}(\d+)#{Mx[:fa_superscript_c]}/,'[\1]').
- gsub(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/,'\1').
gsub(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/,'\1').
gsub(/#{Mx[:fa_hilite_o]}(.+?)#{Mx[:fa_hilite_c]}/,'\1').
gsub(/#{Mx[:gl_o]}#(?:126|152)#{Mx[:gl_c]}/i,'~').
diff --git a/lib/sisu/v5/shared_metadata.rb b/lib/sisu/develop/shared_metadata.rb
index 17e0a4c4..3cfd72f1 100644
--- a/lib/sisu/v5/shared_metadata.rb
+++ b/lib/sisu/develop/shared_metadata.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, resource control and configuration details
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/shared_metadata.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/shared_metadata.rb;hb=HEAD>
=end
module SiSU_Metadata
@@ -283,13 +280,13 @@ module SiSU_Metadata
@tag,@inf=%{<b><u>Generated</u></b>},''
meta << self.meta_para
end
- if defined? @md.sisu_version \
- and @md.sisu_version[:version]=~/\S+/
+ if defined? @md.project_details \
+ and @md.project_details.version=~/\S+/
v="#{tr.sisu_version}: " +
- "#{@md.sisu_version[:project]} " +
- "#{@md.sisu_version[:version]} " +
- "of #{@md.sisu_version[:date_stamp]} " +
- "(#{@md.sisu_version[:date]})"
+ "#{@md.project_details.project} " +
+ "#{@md.project_details.version} " +
+ "of #{@md.project_details.date_stamp} " +
+ "(#{@md.project_details.date})"
@tag,@inf,@class='Generated by',v,'ver'
meta << self.meta_para
end
@@ -464,7 +461,7 @@ module SiSU_Metadata
def language
if defined? @md.title.language \
and @md.title.language
- ' :language: ' + @md.title.language.join(', ')
+ ' :language: ' + @md.title.language
else nil
end
end
@@ -677,13 +674,13 @@ module SiSU_Metadata
# end
nil
end
- def identifier
- if defined? @md.classify.identifier \
- and @md.classify.identifier
- ' :identifier: ' + @md.classify.identifier
- else nil
- end
- end
+ #def identifier
+ # if defined? @md.classify.identifier \
+ # and @md.classify.identifier
+ # ' :identifier: ' + @md.classify.identifier
+ # else nil
+ # end
+ #end
def loc
if defined? @md.classify.loc \
and @md.classify.loc
@@ -1219,13 +1216,13 @@ WOK
tag,inf=tr.last_generated,@md.generated
meta << meta_para(tag,inf)
end
- if defined? @md.sisu_version \
- and @md.sisu_version[:version]=~/\S+/
+ if defined? @md.project_details \
+ and @md.project_details.version=~/\S+/
tag=tr.sisu_version
- inf="#{@md.sisu_version[:project]} " +
- "#{@md.sisu_version[:version]} " +
- "of #{@md.sisu_version[:date_stamp]} " +
- "(#{@md.sisu_version[:date]})"
+ inf="#{@md.project_details.project} " +
+ "#{@md.project_details.version} " +
+ "of #{@md.project_details.date_stamp} " +
+ "(#{@md.project_details.date})"
meta << meta_para(tag,inf)
end
if defined? @md.ruby_version \
diff --git a/lib/sisu/v5/shared_sem.rb b/lib/sisu/develop/shared_sem.rb
index 397aaa62..1866cc3b 100644
--- a/lib/sisu/v5/shared_sem.rb
+++ b/lib/sisu/develop/shared_sem.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
- Sematic tags
+** Description: documents, structuring, processing, publishing, search
+*** Sematic tags
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/shared_sem.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/shared_sem.rb;hb=HEAD>
=end
module SiSU_Sem
diff --git a/lib/sisu/develop/sisu_thor_lib.rb b/lib/sisu/develop/sisu_thor_lib.rb
new file mode 100644
index 00000000..3212e923
--- /dev/null
+++ b/lib/sisu/develop/sisu_thor_lib.rb
@@ -0,0 +1,407 @@
+module SiSU_Po4a_Actions
+ require_relative 'utils_response' # utils_response.rb
+ include SiSU_Response
+ @@source=@@targets=nil
+ def project_details
+ def name
+ 'SiSU translations under po4a management'
+ end
+ def name_warning
+ <<-WOK
+#{name}
+
+WARNING all sisu markup files (.ssm, .sst, .ssi) in languages other than #{language.source_language_selected}
+are managed by po4a, through translations of the source language to other languages.
+
+#{language.info_on_selection}
+ WOK
+ end
+ def setup_project
+ "Setup file for placing #{name}"
+ end
+ self
+ end
+ def notice
+ def warn_and_proceed?
+ '*WARNING* this software module creates, destroys, overwrites directories' + "\n" \
+ + '*WARNING*: Use this Software at your own risk!'
+ end
+ def default(selection=nil)
+ selections=:strict #selections=:short
+ ans=if selection
+ case selection
+ when selection.is_a?(String)
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ Default action selected - "#{selection} #{project_details.name}"
+#{warn_and_proceed?}
+ WOK
+ when :make
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ "--#{selection}" selected - #{selection} #{project_details.name}
+ selected (or configured) languages to be used
+ source language: #{language.source_language_available_str}
+ target languages: #{language.translation_languages_selected_that_are_available.inspect}
+
+ WARNING: this action assumes (and places) this project is under po4a
+ (translation) management. It will create sub-directories for the
+ selected (or configured) target languages:
+ #{language.translation_languages_selected_that_are_available.inspect}
+ & the po4a configuration file: #{filename.po4a_cfg}
+ in the current directory:
+ #{Dir.pwd}
+ It will populate the sub-directories with translation files created from
+ the pot and po files found under the corresponding language
+ sub-directories, (under #{dir.pot}/ & #{dir.po}/).
+ (OVERWRITING any existing translated .ssm .sst .ssi files
+ in language subdirectories that are not under po4a management).
+
+ You should backup the current directory:
+ #{Dir.pwd}
+
+#{warn_and_proceed?}
+ WOK
+ when :clean
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ "--#{selection}" selected - #{selection} #{project_details.name}
+#{warn_and_proceed?}
+ WOK
+ when :distclean
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ "--#{selection}" selected - #{selection} #{project_details.name}
+ WARNING: this action assumes (and places) this project is under po4a
+ (translation) management. It will remove the sub-directories (if they exist):
+ #{language.possible_translations.inspect}
+
+ #{language.translation_languages_selected_that_are_available.inspect}
+ & file: #{filename.po4a_cfg}
+ in the current directory:
+ #{Dir.pwd}
+ Note: these sub-directories & the config file #{filename.po4a_cfg}
+ should be auto-generated from pot and po files if this project translation
+ is under po4a management.
+ This query is to give you the chance to make sure you know what you are doing.
+#{warn_and_proceed?}
+ WOK
+ when :rebuild
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ "--#{selection}" selected - #{selection} #{project_details.name}
+ WARNING: this action assumes (and places) this project is under po4a
+ (translation) management. It will destroy/clobber and then create again the
+ sub-directories:
+ #{language.translation_languages_selected_that_are_available.inspect}
+ populating them with translation files created from the pot and po files
+ found under the corresponding language sub-directories in (#{dir.pot}/
+ & #{dir.po}/).
+ It will also generate the file: #{filename.po4a_cfg}
+ These actions will be taken in the current directory:
+ #{Dir.pwd}
+ This query is to give you the chance to make sure you know what you are doing.
+#{warn_and_proceed?}
+ WOK
+ else
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ Default action selected - "#{selection} #{project_details.name}"
+#{warn_and_proceed?}
+ WOK
+ end
+ else
+ selections=:strict
+ <<-WOK
+ #{project_details.setup_project}
+ Default action selected - "install and to setup #{project_details.name}"
+#{warn_and_proceed?}
+ WOK
+ end
+ exit unless query.answer?(ans)
+ end
+ def project_help
+ puts <<-WOK
+#{project_details.name}
+#{project_details.setup_project}
+
+This setup file is primarily to assist with having sisu markup files under po4a
+translation management. It assumes that the source language files are placed
+under the sub-directory identifying the source language set, which is currently
+#{language.source_language_selected}
+The files there are used to make the source translation file in the directory #{dir.pot}/
+Which is then used to create files for translation under the directory #{dir.po}/
+in sub-directories bearing the translation languages ISO code.
+
+The current language translation selection is: #{translation_languages_selected_str}
+The languages selected are located in the file: #{filename.languages_src_tgt}
+
+sisu available language list: #{sisu_languages_available_str}
+
+ WOK
+ end
+ self
+ end
+ def generate
+ def readme
+ system(%{ruby ../../../../../bin/sisu6 --txt -v --no-manifest --dump='../../../../../..' en/README.ssm})
+ end
+ def manpage
+ system(%{ruby ../../../../../bin/sisu6 --manpage -v --no-manifest --dump='../../../../../../man/man1' en/sisu.ssm})
+ end
+ self
+ end
+ def filename
+ def languages_src_tgt
+ #'translation_languages'
+ 'languages_source_and_targets'
+ end
+ def po4a_cfg
+ 'po4a.cfg'
+ end
+ self
+ end
+ def dir
+ def pwd
+ Dir.pwd
+ end
+ def po4a_
+ 'po4a/' # ''
+ end
+ def pot
+ po4a_ + 'pot'
+ end
+ def po
+ po4a_ + 'po'
+ end
+ self
+ end
+ def dir_mk(dir)
+ FileUtils::mkdir_p(dir) unless FileTest.directory?(dir)
+ end
+ def po4a_flags
+ def debug
+ '-d -v'
+ end
+ def normal
+ ''
+ end
+ def quiet
+ '-q'
+ end
+ self
+ end
+ def languages_from_file
+ def language_source
+ if @@source.is_a?(String) \
+ and @@source =~ /w{2,4}/
+ else languages_extract_from_file
+ end
+ @@source
+ end
+ def language_targets
+ if @@targets.is_a?(Array) \
+ and @@targets.length > 0
+ else languages_extract_from_file
+ end
+ @@targets
+ end
+ def languages_extract_from_file
+ if (@@source.is_a?(String) \
+ and @@source =~/\w{2,4}/) \
+ and (@@targets.is_a?(Array) \
+ and @@targets.length > 0)
+ else
+ if FileTest.file?(filename.languages_src_tgt)
+ puts 'file: "' + filename.languages_src_tgt + '" found and used (unless overridden)'
+ langs=IO.read(filename.languages_src_tgt, mode: 'r:utf-8').scan(/source:\s+\w+|target:\s+\w.+/)
+ langs.each do |sel|
+ case sel
+ when /source:/
+ source=sel.split(/source:\s*|\s+/).join
+ source=(source =~/\w{2,4}/) ? source : nil
+ @@source=unless @@source.is_a?(String) \
+ and @@source =~/\w{2,4}/
+ source
+ else @@source
+ end
+ when /target:/
+ @@targets=unless @@targets.is_a?(Array)
+ sel.split(/targets?:\s*|\s+/) - ['']
+ else @@targets
+ end
+ end
+ end
+ else
+ puts %{(create) missing instruction file: "#{filename.languages_src_tgt}"\n contents e.g.:\n source: en\n target: de fr es ja ru zh\n no po target languages found}
+ exit
+ end
+ end
+ end
+ self
+ end
+ def language
+ def source_language_selected(src=nil)
+ @@source=if not @@source.nil? \
+ and @@source.is_a?(String) \
+ and @@source =~/\w{2,4}/
+ @@source
+ elsif (src \
+ && src.is_a?(String) \
+ && src.length > 1)
+ src
+ else
+ src=languages_from_file.language_source
+ end
+ end
+ def translation_languages_selected(targets=nil) #translation_languages
+ @@targets=if not @@targets.nil? \
+ and @@targets.is_a?(Array) \
+ and @@targets.length > 0
+ @@targets
+ elsif (targets \
+ && targets.is_a?(Array) \
+ && targets.length > 0)
+ targets
+ else
+ targets=languages_from_file.language_targets
+ end
+ end
+ def source_language_available
+ [source_language_selected] & sisu_languages_available
+ end
+ def translation_languages_selected_that_are_available
+ translation_languages_selected & sisu_languages_available
+ end
+ def info_on_selection
+ if translation_languages_selected != translation_languages_selected_that_are_available
+ <<-WOK
+WARNING: language selections mismatch
+
+The current language translation selection appears to be: #{translation_languages_selected_str}
+Of which the following are valid (available) selections: #{translation_languages_selected_that_are_available_str}
+
+sisu available language list: #{sisu_languages_available_str}
+
+the following will be used: #{translation_languages_selected_that_are_available_str}
+The languages selected are located in the file: #{filename.languages_src_tgt}
+ WOK
+ else
+ <<-WOK
+The current language translation selection is: #{translation_languages_selected_str}
+The languages selected are located in the file: #{filename.languages_src_tgt}
+
+sisu available language list: #{sisu_languages_available_str}
+ WOK
+ end
+ end
+ def sisu_languages_available
+ $SiSU_Language_Codes.language_list.codes
+ end
+ def possible_translations
+ sisu_languages_available - [source_language_selected]
+ end
+ def translation_languages_selected_str
+ language.translation_languages_selected.join(' ')
+ end
+ def source_language_available_str
+ source_language_available.join
+ end
+ def translation_languages_selected_that_are_available_str
+ language.translation_languages_selected_that_are_available.join(' ')
+ end
+ def sisu_languages_available_str
+ language.sisu_languages_available.join(' ')
+ end
+ def posible_translations_str
+ language.posible_translations.join(' ')
+ end
+ self
+ end
+ def files_src
+ def ssm
+ Dir.glob("#{language.source_language_selected}/*.ssm").sort
+ end
+ def sst
+ Dir.glob("#{language.source_language_selected}/*.sst").sort
+ end
+ def ssi
+ Dir.glob("#{language.source_language_selected}/*.ssi").sort
+ end
+ def all
+ Dir.glob("#{language.source_language_selected}/*{.ssm,.sst,.ssi}").sort
+ end
+ self
+ end
+ def po4a_cfg_file
+ File.open("#{Dir.pwd}/#{filename.po4a_cfg}",'w')
+ end
+ def po4a_create
+ def configure #po4a_cfg
+ po4a_cfg_arr=[]
+ po4a_cfg_arr \
+ << "[po4a_langs] #{language.translation_languages_selected_that_are_available_str}"
+ po4a_cfg_arr \
+ << "[po4a_paths] #{dir.pot}/$master.pot $lang:#{dir.po}/$lang/$master.po"
+ files_src.ssm.each do |file_src|
+ file_src_fn=file_src.gsub(/#{language.source_language_selected}\//,'')
+ po4a_cfg_arr \
+ << "[type: text] #{file_src} $lang:$lang/#{file_src_fn}"
+ end
+ files_src.sst.each do |file_src|
+ file_src_fn=file_src.gsub(/#{language.source_language_selected}\//,'')
+ po4a_cfg_arr \
+ << "[type: text] #{file_src} $lang:$lang/#{file_src_fn}"
+ end
+ files_src.ssi.each do |file_src|
+ file_src_fn=file_src.gsub(/#{language.source_language_selected}\//,'')
+ po4a_cfg_arr \
+ << "[type: text] #{file_src} $lang:$lang/#{file_src_fn}"
+ end
+ file=po4a_cfg_file
+ po4a_cfg_arr.each do |txt|
+ puts txt
+ file << txt << "\n"
+ end
+ file.close
+ cmd='po4a --keep 0 ' \
+ + po4a_flags.normal + ' ' \
+ + filename.po4a_cfg
+ #cmd='po4a --keep 0 --no-backups --package-name ' \
+ #+ 'sisu-manual' + ' ' \
+ #+ po4a_flags.normal + ' ' \
+ #+ filename.po4a_cfg
+ system(cmd); puts cmd
+ end
+ self
+ end
+ def project
+ def make
+ dir_mk(dir.pot)
+ language.translation_languages_selected_that_are_available.each do |lang_dir|
+ dir_lang="#{Dir.pwd}/#{dir.po}/#{lang_dir}"
+ dir_mk(dir_lang)
+ end
+ po4a_create.configure
+ end
+ def clean
+ #rm -f po/*/*.po~
+ #rm -rf ../build
+ FileUtils.rm_f Dir.glob("./#{dir.po}/*/*.po~")
+ end
+ def distclean
+ #rm -f po4a.cfg
+ #rm -rf $(LANGUAGES)
+ FileUtils::rm_f(filename.po4a_cfg)
+ FileUtils::rm_r(language.possible_translations,:force => true)
+ end
+ self
+ end
+end
+__END__
diff --git a/lib/sisu/v6/sitemaps.rb b/lib/sisu/develop/sitemaps.rb
index 39432146..b34ff57c 100644
--- a/lib/sisu/v6/sitemaps.rb
+++ b/lib/sisu/develop/sitemaps.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** sitemap created from document parameters
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/sitemaps.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: sitemap created from document parameters
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/sitemaps.rb;hb=HEAD>
=end
module SiSU_Sitemaps
diff --git a/lib/sisu/develop/src_kdissert_share.rb b/lib/sisu/develop/src_kdissert_share.rb
new file mode 100644
index 00000000..351e5004
--- /dev/null
+++ b/lib/sisu/develop/src_kdissert_share.rb
@@ -0,0 +1,102 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** share sisu source markup file, copy it to output directory!
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/src_share_kdissert.rb;hb=HEAD>
+
+=end
+module SiSU_KdiSource
+ require_relative 'se' # se.rb
+ include SiSU_Env
+ class Source
+ begin
+ require 'fileutils'
+ include FileUtils
+ rescue LoadError
+ SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
+ error('fileutils NOT FOUND (LoadError)')
+ end
+ def initialize(opt)
+ @opt=opt
+ @env=SiSU_Env::InfoEnv.new(@opt.fns)
+ @output_path="#{@env.path.output}/#{@opt.fnb}"
+ end
+ def read
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'Share Kdissert Source Document!',
+ @opt.fnb
+ ).green_hi_blue unless @opt.act[:quiet][:set]==:on
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ "Copy kdissert file to output directory",
+ "#{@opt.fnb} -> #{@output_path}"
+ ).warn unless @opt.act[:quiet][:set]==:on
+ FileUtils::mkdir_p(@env.path.output) unless FileTest.directory?(@env.path.output)
+ FileUtils::mkdir_p(@output_path) unless FileTest.directory?(@output_path)
+ if FileTest.directory?(@output_path)
+ if @opt.fns =~/\.kdi\._sst$/ \
+ and FileTest.file?(@opt.fnb)
+ FileUtils::cp(@opt.fnb,@output_path)
+ end
+ else
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ "Output directory does not exist",
+ "#{@opt.fnb} -> #{@output_path}"
+ ).warn unless @opt.act[:quiet][:set]==:on
+ exit
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/develop/src_po4a_share.rb b/lib/sisu/develop/src_po4a_share.rb
new file mode 100644
index 00000000..3c34115a
--- /dev/null
+++ b/lib/sisu/develop/src_po4a_share.rb
@@ -0,0 +1,309 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** pot file generation
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/src_po4a_share.rb;hb=HEAD>
+
+=end
+#module SiSU_SStm_AO_SStm
+module SiSU_Languages_Selected
+ require_relative 'utils_response' # utils_response.rb
+ def language
+ def sisu_languages_available
+ Px[:lng_lst]
+ end
+ def source_language_selected_str
+ @opt.act[:po4a_lang][:src] \
+ ? @opt.act[:po4a_lang][:src]
+ : 'en'
+ end
+ def translation_languages_selected
+ @opt.act[:po4a_lang][:trn] \
+ ? @opt.act[:po4a_lang][:trn]
+ : []
+ end
+ def translation_languages_available
+ sisu_languages_available - [source_language_selected_str]
+ end
+ def translation_languages_selected_that_are_available
+ translation_languages_selected & sisu_languages_available
+ end
+ def translation_languages_selected_that_are_available_str
+ translation_languages_selected_that_are_available.join(' ')
+ end
+ def translation_languages_selected_str
+ @opt.act[:po4a_lang][:trn].join(' ')
+ end
+ self
+ end
+end
+module SiSU_Po4a_Project
+ class Po4aCfg
+ include SiSU_Composite_Doc_Utils # composite doc, .ssm, extract all related insert files, array of filenames test
+ include SiSU_Response
+ include SiSU_Languages_Selected
+ def initialize(opt,file)
+ @opt,@file=opt,file
+ end
+ def song
+ if @opt.lng==language.source_language_selected_str
+ ans=response?('po4a config file')
+ if ans
+ po4a_cfg
+ end
+ end
+ end
+ def po4a_cfg_filename
+ 'po4a.cfg'
+ end
+ def dir
+ def pwd
+ Dir.pwd
+ end
+ def po4a_
+ 'po4a/' # ''
+ end
+ def pot
+ #po4a_ + 'pot'
+ 'pot'
+ end
+ def po
+ #po4a_ + 'po'
+ 'po'
+ end
+ self
+ end
+ def po4a_cfg_file
+ File.open("#{Dir.pwd}/#{po4a_cfg_filename}",'w')
+ end
+ def po4a_cfg
+ lng=language.source_language_selected_str
+ doc_import_list=composite_and_imported_filenames_array(@opt.fno)
+ po4a_cfg_arr=[]
+ po4a_cfg_arr \
+ << "[po4a_langs] #{language.translation_languages_selected_that_are_available_str}"
+ po4a_cfg_arr \
+ << "[po4a_paths] #{dir.pot}/$master.pot $lang:#{dir.po}/$lang/$master.po"
+ doc_import_list.each do |file_src|
+ file_src_fn=
+ file_src.gsub(/#{language.source_language_selected_str}\//,'')
+ po4a_cfg_arr \
+ << "[type: text] #{lng}/#{file_src} $lang:$lang/#{file_src_fn}"
+ end
+ file=@file.write_file.po4a_cfg
+ po4a_cfg_arr.each do |txt|
+ puts txt
+ file << txt << "\n"
+ end
+ file.close
+ end
+ end
+ class Po4aProject
+ include SiSU_Languages_Selected
+ include SiSU_Response
+ def initialize(opt,file)
+ @opt,@file=opt,file
+ end
+ def song
+ make_paths
+ if FileTest.directory?(@file.output_path.po4a.dir)
+ Dir.chdir(@file.output_path.po4a.dir)
+ dirs=Dir['*/']
+ dirs_language=[]
+ dirs.each do |x|
+ dirs_language << x.gsub(/\/$/,'')
+ end
+ dirs_translation = \
+ (language.translation_languages_available & dirs_language)
+ end
+ if (language.translation_languages_available & [@opt.lng]).length == 1
+ puts %{gettext for: #{dirs_translation}
+in #{Dir.pwd}}
+ ans=response?('gettext?')
+ if ans
+ gettext_if_any_build_src_trans_po
+ end
+ end
+ ans=response?('build project?')
+ if ans
+ build_src_master_to_pot_and_po_and_srcs
+ end
+ end
+ def flags
+ def debug
+ '-d -v'
+ end
+ def normal
+ ''
+ end
+ def quiet
+ '-q'
+ end
+ self
+ end
+ def build_src_master_to_pot_and_po_and_srcs
+ if SiSU_Sys_Call::SystemCall.new.po4a
+ pwd=Dir.pwd
+ #cmd='po4a --keep 0 -M UTF-8 --no-backups ' \
+ #+ '--package-name ' \
+ #+ 'sisu-manual' + ' ' \
+ #+ flags.normal + ' ' \
+ #+ filename.po4a_cfg
+ cmd='po4a --keep 0 -M UTF-8' \
+ + flags.normal + ' ' \
+ + @file.base_filename.po4a_cfg
+ Dir.chdir(@file.output_path.po4a.dir)
+ system("
+ cd #{@file.output_path.po4a.dir}
+ #{cmd}
+ cd -
+ "); puts cmd
+ Dir.chdir(pwd)
+ end
+ end
+ def gettext_if_any_build_src_trans_po
+ Dir.chdir(@file.output_path.po4a.dir)
+ dirs=Dir['*/']
+ dirs_language=[]
+ dirs.each do |x|
+ dirs_language << x.gsub(/\/$/,'')
+ end
+ dirs_translation = \
+ (language.translation_languages_available & dirs_language)
+ files_src=Dir.glob("./#{source_language_selected_str}/*.ss[tmi]")
+ dirs_translation.each do |lng|
+ files_src.each do |file|
+ fn=file.gsub(/\.\/#{source_language_selected_str}\//,'')
+ system("
+ po4a-gettextize -f text -M utf-8 \
+ -m ./#{source_language_selected_str}/#{fn} \
+ -l ./#{lng}/#{fn} \
+ -p ./po/#{lng}/#{fn}.po
+ ")
+ puts fn
+ end
+ end
+ end
+ def dir_mk(dir)
+ unless FileTest.directory?(dir)
+ FileUtils::mkdir_p(dir)
+ end
+ end
+ def make_paths
+ dir_mk(@file.output_path.pot.dir)
+ dir_mk(@file.output_path.po.dir)
+ end
+ def clean
+ #rm -f po/*/*.po~
+ #rm -rf ../build
+ FileUtils.rm_f Dir.glob("./#{dir.po}/*/*.po~")
+ end
+ def distclean
+ #rm -f po4a.cfg
+ #rm -rf $(LANGUAGES)
+ FileUtils::rm_f(filename.po4a_cfg)
+ FileUtils::rm_r(language.possible_translations,:force => true)
+ #FileUtils::rm_r(language.translation_languages_selected_that_are_available,:force => true)
+ end
+ end
+ class Po4aDistClean
+ include SiSU_Languages_Selected
+ include SiSU_Response
+ def initialize(opt,file)
+ @opt,@file=opt,file
+ end
+ def song
+ pwd=Dir.pwd
+ if FileTest.directory?(@file.output_path.po4a.dir)
+ Dir.chdir(@file.output_path.po4a.dir)
+ dirs=Dir['*/']
+ dirs_language=[]
+ dirs.each do |x|
+ dirs_language << x.gsub(/\/$/,'')
+ end
+ dirs_translation = \
+ (language.translation_languages_available & dirs_language)
+ if dirs_translation.length > 0
+ puts %{remove language translation directorie(s): #{dirs_translation}
+in #{Dir .pwd}}
+ ans=response?('disclean?')
+ if ans
+ FileUtils::rm_f(@file.base_filename.po4a_cfg)
+ FileUtils::rm_r(dirs_translation,:force => true)
+ #FileUtils::rm_r(language.translation_languages_available,:force => true)
+ end
+ end
+ Dir.chdir(pwd)
+ end
+ end
+ end
+end
+#end
+__END__
+REMOVE
+&#033;\|&#035;\|&&#042;\|&#045;\|&#047;\|&#095;\|&#123;\|&#125;\|&#126;\|&#
+
+tables are problematic, difficult to reconstitute instruction, check
+
+metadata, move to top? and work on
+
+footnotes, different types, asterisk, also do you want to have separate
+paragraphs, or breaks within one block?
+
+where no ocn appropriately use ~# or -# or indeed 1~name-
+
+comments in document, what to do about them, not sure they are currently
+retained in dal, could be quite valuable to keep
+
+Translate Shell
+http://www.soimort.org/translate-shell/
+translate.google.com
diff --git a/lib/sisu/develop/src_po4a_shelf.rb b/lib/sisu/develop/src_po4a_shelf.rb
new file mode 100644
index 00000000..dee6818f
--- /dev/null
+++ b/lib/sisu/develop/src_po4a_shelf.rb
@@ -0,0 +1,1217 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** pot file generation
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/src_po4a_shelf.rb;hb=HEAD>
+
+=end
+module SiSU_Po4a
+ require_relative 'ao' # ao.rb
+ require_relative 'se' # se.rb
+ include SiSU_Env
+ require_relative 'ao_composite' # ao_composite.rb
+ require_relative 'shared_metadata' # shared_metadata.rb
+ require_relative 'src_po4a_shelf_set' # src_po4a_shelf_set.rb
+ include SiSU_Param
+ require_relative 'object_munge' # object_munge.rb
+ require_relative 'utils_composite' # utils_composite.rb
+ class Source
+ include SiSU_Object_Munge
+ @@opt_src,@@opt_trn,@@opt_src_,@@opt_trn_,@@md_src,@@md_trn=
+ nil, nil, nil, nil, nil, nil
+ @@auto_translation_ = :go
+ def initialize(opt,fn=nil)
+ @opt,@fn=opt,fn
+ #unless @opt.fns =~/(.+?\.(?:-|ssm\.)?sst)$/
+ # puts "#{@opt.fns} not a processed file type"
+ #end
+ file_arr=SiSU_Info_Env::InfoEnv.new.source_file_processing_array(@opt.fns)
+ SiSU_Param::Parameters::Instructions.new(file_arr,@opt).extract
+ r=Px[:lng_lst_rgx].gsub(/\|en\|/,'|')
+ @lang_regx=%r{(?:#{r})}
+ if opt.fns =~/\S+?~#{@lang_regx}\.ss[mti]/ \
+ and opt.f_pth[:lng]!=@opt.lng_base
+ @@opt_src_=false
+ @@opt_trn=opt
+ @@md_trn=SiSU_Param::Parameters.new(opt).get
+ else
+ @@opt_src_=true
+ @@opt_src=opt
+ @@md_src=SiSU_Param::Parameters.new(opt).get
+ end
+ end
+ def wrap_width_set(md,env)
+ if defined? md.make.plaintext_wrap \
+ and md.make.plaintext_wrap
+ md.make.plaintext_wrap
+ elsif defined? env.plaintext_wrap \
+ and env.plaintext_wrap
+ env.plaintext_wrap
+ else 78
+ end
+ end
+ def process_file(md,env,file,wrap_width,fn)
+ unless @opt.act[:quiet][:set]==:on
+ tool=(@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on) \
+ ? "#{env.program.text_editor} #{file.output_path.pot.dir}/"
+ : @opt.fns
+ (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on) \
+ ? SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'Pot po4a',
+ tool
+ ).green_hi_blue
+ : SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'Pot po4a',
+ tool
+ ).green_title_hi
+ if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ @opt.fns,
+ file.output_path.pot.dir
+ ).flow
+ end
+ end
+ if @opt.fns =~/\S+?~#{@lang_regx}\.ss[mti]/ \
+ or @opt.f_pth[:lng] !=@opt.lng_base
+ opt_lang_trn_fn=fn
+ @ao_arr_lang_trans=
+ SiSU_AO::Source.new(@opt,opt_lang_trn_fn,:po4a).get # ao file drawn here
+ opt_lang_src_fn=(fn =~/\S+?~\S{2}(?:_\S{2})?\.ss[mti]/) \
+ ? (fn.gsub(/(\S+?)~\S{2}(?:_\S{2})?(\.ss[mti])/,'\1\2')) #check i
+ : fn
+ transdir,srcdir=Dir.pwd,Dir.pwd
+ if Dir.pwd.to_s =~/\/#{@lang_regx}$/
+ transdir=Dir.pwd
+ srcdir=transdir.
+ gsub(/\/#{@lang_regx}$/,
+ "/#{@opt.lng_base}")
+ if FileTest.directory?(srcdir)
+ Dir.chdir(srcdir)
+ end
+ else nil
+ end
+ if FileTest.file?("#{srcdir}/#{opt_lang_src_fn}")
+ @ao_arr_lang_src=
+ SiSU_AO::Source.new(
+ @@opt_src,
+ opt_lang_src_fn,
+ :po4a
+ ).get # ao file drawn here
+ else
+ puts "no identified source document"
+ exit
+ end
+ Dir.chdir(transdir) if transdir
+ else
+ @ao_arr_lang_src=
+ SiSU_AO::Source.new(
+ @opt,
+ fn,
+ :po4a
+ ).get # ao file drawn here
+ @ao_arr_lang_trans=nil
+ end
+ SiSU_Po4a::Source::Scroll.new(
+ fn,
+ @ao_arr_lang_src,
+ @ao_arr_lang_trans,
+ @@md_src,
+ @@md_trn,
+ wrap_width
+ ).songsheet
+ end
+ def read
+ begin
+ src={}
+ src[:pth]=@opt.f_pth[:pth]
+ src[:files]=if @opt.fns =~ /\.(?:(?:-|ssm\.)sst|ssm)$/
+ @opt.fns=@opt.fns.gsub(/\.ssm\.sst$/,'.ssm')
+ SiSU_Assemble::CompositeFileList.new(@opt).read
+ else
+ [@opt.fns]
+ end
+ md=SiSU_Param::Parameters.new(@opt).get
+ env=SiSU_Env::InfoEnv.new(@opt.fns)
+ file=SiSU_Env::FileOp.new(md)
+ Po4aCfg.new(@opt,file).po4a_cfg
+ wrap_width=wrap_width_set(md,env)
+ src[:files].each do |fn|
+ process_file(md,env,file,wrap_width,fn)
+ end
+ rescue
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
+ __LINE__.to_s + ':' + __FILE__
+ end
+ ensure
+ end
+ end
+ private
+ class Scroll <Source
+ include SiSU_Po4aUtils
+ @@endnotes={ para: [], end: [] }
+ def initialize(fn,data_src,data_trn,md_src,md_trn,wrap_width)
+ @fn,@data_src,@data_trn,@md_src,@md_trn,@wrap_width=
+ fn, data_src, data_trn, md_src, md_trn, wrap_width
+ @md=(md_trn.nil?) \
+ ? md_src
+ : md_trn
+ @tab="\t"
+ @@endnotes_=(@md.opt.selections.str =~/--endnote/) \
+ ? true
+ : false # --footnote
+ @pot={
+ body: [],
+ open: [],
+ close: [],
+ head: [],
+ metadata: [],
+ tail: []
+ }
+ end
+ def br
+ (@md.opt.selections.str =~/--dos/) ? "\r\n" : "\n" # --unix
+ end
+ def songsheet
+ fn=@fn
+ pot=pot_markup(@data_src,@data_trn)
+ publish(fn,pot)
+ end
+ def pot_structure_wrap(desc,orig,trans,indent=0,hang=0)
+ SiSU_Po4aUtils::Wrap.new(
+ @md,
+ orig,
+ trans,
+ desc,
+ @wrap_width,
+ indent,
+ hang
+ )
+ end
+ def wrap_endnotes(orig_notes='',trn_notes='')
+ nt=@@endnotes_ ? 'endnote' : 'footnote'
+ @fn=0
+ a_l=orig_notes.length
+ 0.upto(a_l-1) do |i|
+ @fn=if orig_notes[i].to_s =~/^\^~([\d*+]+)/ # provides endnote number within paragraph
+ @fn += 1
+ else @fn
+ end
+ d="#{nt} #{@fn}"
+ mark="^~ "
+ instruct=s_mark=''
+ if @md.opt.act[:maintenance][:set]==:on
+ instruct=%{\n# footnotes, the preferred sisu markup for a footnote is~{this is a footnote}~ } \
+ + %{however, for translation a footnote reference marker in the text~^ } \
+ + %{with a set of notes following the paragraph starting on a newline with "^~ this is a footnote", } \
+ + %{is easier to deal with, if possible these should be converted back to~{inline notes}~}
+ s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
+ end
+ desc="#{d}#{s_mark}#{instruct}"
+ orig=(orig_notes[i].to_s =~/^\^~[\d*+]+/) \
+ ? (orig_notes[i].to_s.gsub(/^\^~[\d*+]+/,'^~'))
+ : orig_notes[i].to_s
+ trans=if trn_notes.is_a?(Array) \
+ and trn_notes.length==orig_notes.length
+ (trn_notes[i].to_s =~/^\^~[\d*+]+/) \
+ ? (trn_notes[i].to_s.gsub(/^\^~[\d*+]+/,'^~'))
+ : trn_notes[i].to_s
+ else ''
+ end
+ util=pot_structure_wrap(desc,orig,trans)
+ wrap=util.line_wrap
+ wrap=if wrap =~ /^\s*\^~[\d*+]+\s+.+?\s*\Z/m
+ wrap.gsub(/^\s*(\^~[\d*+]+)\s+(.+?)\s*\Z/m, <<GSUB
+\\1 \\2
+GSUB
+ )
+ else
+ wrap.gsub(/^(.+)\Z/m, <<GSUB
+\\1
+GSUB
+ )
+ end
+ @@endnotes[:para] << wrap
+ @@endnotes[:end] << '' << wrap
+ end
+ @@endnotes[:para].each {|e| @pot[:body] << e << br}
+ @@endnotes[:para]=[]
+ @@endnotes
+ end
+ def pot_metadata_src
+ @po4a_identify_type='type: SiSU doc' #'type: Plain text'
+ meta_src=SiSU_Metadata::Summary.new(@md_src)
+ w=[]
+ w << [
+ "#. #{@po4a_identify_type} - metadata: title",
+ "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
+ 'msgid ""',
+ meta_src.metadata_tags.title.main,
+ meta_src.metadata_tags.title.sub,
+ meta_src.metadata_tags.title.edition,
+ meta_src.metadata_tags.title.note,
+ meta_src.metadata_tags.title.short,
+ meta_src.metadata_tags.title.language,
+ meta_src.metadata_tags.title.language_char,
+ 'msgstr ""',
+ ]
+ w << [
+ "#. #{@po4a_identify_type} - metadata: creator",
+ "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
+ 'msgid ""',
+ meta_src.metadata_tags.creator.head,
+ meta_src.metadata_tags.creator.author,
+ meta_src.metadata_tags.creator.contributor,
+ meta_src.metadata_tags.creator.illustrator,
+ meta_src.metadata_tags.creator.photographer,
+ meta_src.metadata_tags.creator.translator,
+ meta_src.metadata_tags.creator.audio,
+ meta_src.metadata_tags.creator.digitized_by,
+ meta_src.metadata_tags.creator.prepared_by,
+ 'msgstr ""',
+ ]
+ w << [
+ "#. #{@po4a_identify_type} - metadata: rights",
+ "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
+ 'msgid ""',
+ meta_src.metadata_tags.rights.head,
+ meta_src.metadata_tags.rights.copyright.text,
+ meta_src.metadata_tags.rights.copyright.translation,
+ meta_src.metadata_tags.rights.copyright.illustrations,
+ meta_src.metadata_tags.rights.copyright.photographs,
+ meta_src.metadata_tags.rights.copyright.digitization,
+ meta_src.metadata_tags.rights.copyright.audio,
+ meta_src.metadata_tags.rights.license,
+ 'msgstr ""',
+ ]
+ w << [
+ "#. #{@po4a_identify_type} - metadata: classify",
+ "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
+ 'msgid ""',
+ meta_src.metadata_tags.classify.head,
+ meta_src.metadata_tags.classify.subject,
+ meta_src.metadata_tags.classify.topic_register,
+ meta_src.metadata_tags.classify.loc,
+ meta_src.metadata_tags.classify.dewey,
+ #meta_src.metadata_tags.notes.relation,
+ #meta_src.metadata_tags.notes.type,
+ #meta_src.metadata_tags.identifier.oclc,
+ #meta_src.metadata_tags.identifier.isbn,
+ 'msgstr ""',
+ ]
+ w << [
+ "#. #{@po4a_identify_type} - metadata: date",
+ "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
+ 'msgid ""',
+ meta_src.metadata_tags.date.head,
+ meta_src.metadata_tags.date.added_to_site,
+ meta_src.metadata_tags.date.available,
+ meta_src.metadata_tags.date.created,
+ meta_src.metadata_tags.date.issued,
+ meta_src.metadata_tags.date.modified,
+ meta_src.metadata_tags.date.published,
+ meta_src.metadata_tags.date.valid,
+ 'msgstr ""',
+ ]
+ w << [
+ "#. #{@po4a_identify_type} - processing, make instruction",
+ "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
+ 'msgid ""',
+ meta_src.processing_tags.make.language,
+ meta_src.processing_tags.make.headings,
+ meta_src.processing_tags.make.num_top,
+ meta_src.processing_tags.make.breaks,
+ meta_src.processing_tags.make.emphasis,
+ meta_src.processing_tags.make.bold,
+ meta_src.processing_tags.make.italics,
+ meta_src.processing_tags.make.texpdf_font,
+ 'msgstr ""',
+ ]
+ w.each do |y|
+ z=''
+ y.each do |x|
+ if x
+ z += x + "\n" if x =~/^#|^msg(?:id|str)/
+ z += %{"#{x}"\n} if x =~/^@\S+?:(?: |$)/
+ z += %{"#{x}"\n} if x =~/^\s+:\S+?: /
+ end
+ end
+ @pot[:metadata] << z << br
+ #puts z unless z.empty?
+ end
+ end
+ def pot_metadata_src_trn
+ @po4a_identify_type='type: SiSU doc'
+ #@po4a_identify_type='type: Plain text'
+ meta_src=SiSU_Metadata::Summary.new(@md_src)
+ meta_trn=SiSU_Metadata::Summary.new(@md_trn)
+ w=[]
+ w << [
+ "#. #{@po4a_identify_type} - metadata: title",
+ "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
+ 'msgid ""',
+ meta_src.metadata_tags.title.main,
+ meta_src.metadata_tags.title.sub,
+ meta_src.metadata_tags.title.edition,
+ meta_src.metadata_tags.title.note,
+ meta_src.metadata_tags.title.short,
+ meta_src.metadata_tags.title.language,
+ meta_src.metadata_tags.title.language_char,
+ 'msgstr ""',
+ meta_trn.metadata_tags.title.main,
+ meta_trn.metadata_tags.title.sub,
+ meta_trn.metadata_tags.title.edition,
+ meta_trn.metadata_tags.title.note,
+ meta_trn.metadata_tags.title.short,
+ meta_trn.metadata_tags.title.language,
+ meta_trn.metadata_tags.title.language_char,
+ ]
+ w << [
+ "#. #{@po4a_identify_type} - metadata: creator",
+ "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
+ 'msgid ""',
+ meta_src.metadata_tags.creator.head,
+ meta_src.metadata_tags.creator.author,
+ meta_src.metadata_tags.creator.contributor,
+ meta_src.metadata_tags.creator.illustrator,
+ meta_src.metadata_tags.creator.photographer,
+ meta_src.metadata_tags.creator.translator,
+ meta_src.metadata_tags.creator.audio,
+ meta_src.metadata_tags.creator.digitized_by,
+ meta_src.metadata_tags.creator.prepared_by,
+ 'msgstr ""',
+ meta_trn.metadata_tags.creator.head,
+ meta_trn.metadata_tags.creator.author,
+ meta_trn.metadata_tags.creator.contributor,
+ meta_trn.metadata_tags.creator.illustrator,
+ meta_trn.metadata_tags.creator.photographer,
+ meta_trn.metadata_tags.creator.translator,
+ meta_trn.metadata_tags.creator.audio,
+ meta_trn.metadata_tags.creator.digitized_by,
+ meta_trn.metadata_tags.creator.prepared_by,
+ ]
+ w << [
+ "#. #{@po4a_identify_type} - metadata: rights",
+ "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
+ 'msgid ""',
+ meta_src.metadata_tags.rights.head,
+ meta_src.metadata_tags.rights.copyright.text,
+ meta_src.metadata_tags.rights.copyright.translation,
+ meta_src.metadata_tags.rights.copyright.illustrations,
+ meta_src.metadata_tags.rights.copyright.photographs,
+ meta_src.metadata_tags.rights.copyright.digitization,
+ meta_src.metadata_tags.rights.copyright.audio,
+ meta_src.metadata_tags.rights.license,
+ 'msgstr ""',
+ meta_trn.metadata_tags.rights.head,
+ meta_trn.metadata_tags.rights.copyright.text,
+ meta_trn.metadata_tags.rights.copyright.translation,
+ meta_trn.metadata_tags.rights.copyright.illustrations,
+ meta_trn.metadata_tags.rights.copyright.photographs,
+ meta_trn.metadata_tags.rights.copyright.digitization,
+ meta_trn.metadata_tags.rights.copyright.audio,
+ meta_trn.metadata_tags.rights.license,
+ ]
+ w << [
+ "#. #{@po4a_identify_type} - metadata: classify",
+ "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
+ 'msgid ""',
+ meta_src.metadata_tags.classify.head,
+ meta_src.metadata_tags.classify.subject,
+ meta_src.metadata_tags.classify.topic_register,
+ meta_src.metadata_tags.classify.loc,
+ meta_src.metadata_tags.classify.dewey,
+ #meta_src.metadata_tags.notes.relation,
+ #meta_src.metadata_tags.notes.type,
+ #meta_src.metadata_tags.identifier.oclc,
+ #meta_src.metadata_tags.identifier.isbn,
+ 'msgstr ""',
+ meta_trn.metadata_tags.classify.head,
+ meta_trn.metadata_tags.classify.subject,
+ meta_trn.metadata_tags.classify.topic_register,
+ meta_trn.metadata_tags.classify.loc,
+ meta_trn.metadata_tags.classify.dewey,
+ #meta_trn.metadata_tags.notes.relation,
+ #meta_trn.metadata_tags.notes.type,
+ #meta_trn.metadata_tags.identifier.oclc,
+ #meta_trn.metadata_tags.identifier.isbn,
+ ]
+ w << [
+ "#. #{@po4a_identify_type} - metadata: date",
+ "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
+ 'msgid ""',
+ meta_src.metadata_tags.date.head,
+ meta_src.metadata_tags.date.added_to_site,
+ meta_src.metadata_tags.date.available,
+ meta_src.metadata_tags.date.created,
+ meta_src.metadata_tags.date.issued,
+ meta_src.metadata_tags.date.modified,
+ meta_src.metadata_tags.date.published,
+ meta_src.metadata_tags.date.valid,
+ 'msgstr ""',
+ meta_trn.metadata_tags.date.head,
+ meta_trn.metadata_tags.date.added_to_site,
+ meta_trn.metadata_tags.date.available,
+ meta_trn.metadata_tags.date.created,
+ meta_trn.metadata_tags.date.issued,
+ meta_trn.metadata_tags.date.modified,
+ meta_trn.metadata_tags.date.published,
+ meta_trn.metadata_tags.date.valid,
+ ]
+ w << [
+ "#. #{@po4a_identify_type} - processing, make instruction",
+ "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
+ 'msgid ""',
+ meta_src.processing_tags.make.language,
+ meta_src.processing_tags.make.headings,
+ meta_src.processing_tags.make.num_top,
+ meta_src.processing_tags.make.breaks,
+ meta_src.processing_tags.make.emphasis,
+ meta_src.processing_tags.make.bold,
+ meta_src.processing_tags.make.italics,
+ meta_src.processing_tags.make.texpdf_font,
+ 'msgstr ""',
+ meta_trn.processing_tags.make.language,
+ meta_trn.processing_tags.make.headings,
+ meta_trn.processing_tags.make.num_top,
+ meta_trn.processing_tags.make.breaks,
+ meta_trn.processing_tags.make.emphasis,
+ meta_trn.processing_tags.make.bold,
+ meta_trn.processing_tags.make.italics,
+ meta_trn.processing_tags.make.texpdf_font,
+ ]
+ w.each do |y|
+ z=''
+ y.each do |x|
+ if x
+ z += x + "\n" if x =~/^#|^msg(?:id|str)/
+ z += %{"#{x}"\n} if x =~/^@\S+?:(?: |$)/
+ z += %{"#{x}"\n} if x =~/^\s+:\S+?: /
+ end
+ end
+ @pot[:metadata] << z << br
+ #puts z unless z.empty?
+ end
+ end
+ def auto_translate?(set_to=nil)
+ @@auto_translation_=
+ if @md.opt.act[:po4a_lang_trans][:set]==:on
+ set_to \
+ ? set_to
+ : @@auto_translation_
+ else :skip
+ end
+ end
+ def auto_translation(src_txt,markup=:src) # check for an appropriate request flag
+ auto_translate?(:skip)
+ begin
+ src_txt_clean=clean_text(src_txt,markup)
+ src_txt_clean=src_txt_clean.
+ gsub(/\n/,' ').
+ gsub(/"/,'\"').
+ gsub(/([()])/,'\\\\\1')
+ trans=''
+ unless auto_translate? == :skip
+ require 'timeout'
+ Timeout::timeout(60) {
+ trans=`trans -b -no-ansi en:#{@md.opt.f_pth[:lng_is]} #{src_txt_clean}`.strip
+ unless trans.empty?
+ trans + ' {[G.Tr]}http://translate.google.com'
+ end
+ }
+ end
+ trans
+ rescue
+ auto_translate?(:skip)
+ p 'timeout issues with translation, skip remaining'
+ end
+ end
+ def pot_structure
+ def heading(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
+ lv=n=n3=nil
+ lv=dob_src.ln
+ n=lv - 1
+ n3=lv + 2
+ util=nil
+ fn=(dob_src.name=~/[a-z\d]/i) ? dob_src.name : ''
+ mark="#{dob_src.lv}~#{fn} "
+ d="#{dob_src.is.to_s} (level #{dob_src.lv})"
+ instruct=s_mark=''
+ if @md.opt.act[:maintenance][:set]==:on
+ instruct=%{\n# markup for headings is marker at the start of the line/object, } \
+ + %{indicating the heading level, and if provided an associated name tag, } \
+ + %{this heading is "#{mark}"}
+ s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
+ end
+ desc="#{d}#{s_mark}#{instruct}"
+ orig="#{s_mark}#{dob_src.obj}"
+ trans=((dob_trn=='') \
+ || (dob_src.obj == dob_trn.obj)) \
+ ? ''
+ : "#{s_mark}#{dob_trn.obj}"
+ if @md.opt.f_pth[:lng_is] !=@md.opt.lng_base \
+ and trans.empty? \
+ and auto_translate?
+ trans=auto_translation(dob_src.obj,:src)
+ end
+ util=pot_structure_wrap(desc,orig,trans)
+ wrapped=util.line_wrap
+ @pot[:body] << wrapped << br # main text, contents, body KEEP
+ if @@endnotes[:para] \
+ and notes_s.length > 0 \
+ and not @@endnotes_
+ @pot[:body] << br
+ wrap_endnotes(notes_s,notes_t)
+ elsif @@endnotes[:para] \
+ and @@endnotes_
+ @pot[:body] << br*2
+ end
+ end
+ def para(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
+ util=nil
+ wrapped=if dob_src.indent =~/[1-9]/ \
+ and dob_src.indent == dob_src.hang
+ s_mark=desc=orig=trans=''
+ if dob_src.bullet_
+ mark="_#{dob_src.indent}* "
+ d="#{dob_src.is.to_s}: indent #{dob_src.indent}, bullet"
+ instruct=s_mark=''
+ if @md.opt.act[:maintenance][:set]==:on
+ instruct=%{\n# markup for indented bullet text is at the start of the line/object, } \
+ + %{an underscore followed by the indent level and an asterisk "#{mark}"}
+ s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
+ end
+ desc="#{d}#{s_mark}#{instruct}"
+ else
+ mark="_#{dob_src.indent} "
+ d="#{dob_src.is.to_s}: indent #{dob_src.indent}"
+ instruct=s_mark=''
+ if @md.opt.act[:maintenance][:set]==:on
+ instruct=%{\n# markup for indented text is at the start of the line/object, } \
+ + %{an underscore followed by the indent level "#{mark}"}
+ s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
+ end
+ desc="#{d}#{s_mark}#{instruct}"
+ end
+ orig="#{s_mark}#{dob_src.obj}"
+ trans=((dob_trn=='') \
+ || (dob_src.obj == dob_trn.obj)) \
+ ? ''
+ : "#{s_mark}#{dob_trn.obj}"
+ if @md.opt.f_pth[:lng_is] !=@md.opt.lng_base \
+ and trans.empty? \
+ and auto_translate?
+ trans=auto_translation(dob_src.obj,:src)
+ end
+ util=pot_structure_wrap(desc,orig,trans)
+ elsif dob_src.hang =~/[0-9]/ \
+ and dob_src.indent != dob_src.hang
+ s_mark=desc=orig=trans=''
+ mark="_#{dob_src.hang}_#{dob_src.indent} "
+ d="#{dob_src.is.to_s}: hang #{dob_src.hang} indent #{dob_src.indent}"
+ instruct=s_mark=''
+ if @md.opt.act[:maintenance][:set]==:on
+ instruct=%{\n# markup for indented text with a first line indented } \
+ + %{to a different level from the rest of the paragraph, } \
+ + %{is at the start of the line/object, } \
+ + %{an underscore and the first indent level } \
+ + %{a second underscore and the indent level for the rest of the paragraph, "#{mark1}"}
+ s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
+ end
+ desc="#{d}#{s_mark}#{instruct}"
+ orig="#{s_mark}#{dob_src.obj}"
+ trans=((dob_trn=='') \
+ || (dob_src.obj == dob_trn.obj)) \
+ ? ''
+ : "#{s_mark}#{dob_trn.obj}"
+ if @md.opt.f_pth[:lng_is] !=@md.opt.lng_base \
+ and trans.empty? \
+ and auto_translate?
+ trans=auto_translation(dob_src.obj,:src)
+ end
+ util=pot_structure_wrap(desc,orig,trans)
+ else
+ s_mark=desc=orig=trans=''
+ if dob_src.bullet_
+ mark='_* '
+ d="#{dob_src.is.to_s}: bullet"
+ instruct=s_mark=''
+ if @md.opt.act[:maintenance][:set]==:on
+ instruct=%{\n# markup for indented text is at the start of the line/object, } \
+ + %{an underscore followed by an asterisk "#{mark}"}
+ s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
+ end
+ desc="#{d}#{s_mark}#{instruct}"
+ orig="#{s_mark}#{dob_src.obj}"
+ trans=((dob_trn=='') \
+ || (dob_src.obj == dob_trn.obj)) \
+ ? ''
+ : "#{s_mark}#{dob_trn.obj}"
+ if @md.opt.f_pth[:lng_is] !=@md.opt.lng_base \
+ and trans.empty? \
+ and auto_translate?
+ trans=auto_translation(dob_src.obj,:src)
+ end
+ else
+ mark=''
+ d=dob_src.is.to_s
+ instruct=%{\n# regular paragraph, no special markup}
+ if @md.opt.act[:maintenance][:set]==:on
+ instruct="\n# "
+ s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
+ end
+ desc="#{d}#{s_mark}#{instruct}"
+ orig=dob_src.obj
+ trans=((dob_trn=='') \
+ || (dob_src.obj == dob_trn.obj)) \
+ ? ''
+ : "#{s_mark}#{dob_trn.obj}"
+ if @md.opt.f_pth[:lng_is] !=@md.opt.lng_base \
+ and trans.empty? \
+ and auto_translate?
+ trans=auto_translation(dob_src.obj,:src)
+ end
+ end
+ util=pot_structure_wrap(desc,orig,trans)
+ end
+ wrapped=util.line_wrap
+ @pot[:body] << wrapped << br # main text, contents, body KEEP
+ if @@endnotes[:para] \
+ and notes_s.length > 0 \
+ and not @@endnotes_
+ @pot[:body] << br
+ wrap_endnotes(notes_s,notes_t)
+ elsif @@endnotes[:para] \
+ and @@endnotes_
+ @pot[:body] << br*2
+ end
+ end
+ def block(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
+ mark="block{\\n\\n...\\n\\n}block"
+ d=dob_src.is.to_s
+ instruct=s_mark=''
+ if @md.opt.act[:maintenance][:set]==:on
+ instruct=%{\n# block text is a text block with an opening and closing marker, } \
+ + %{the content of which may be wrapped}
+ s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
+ end
+ desc="#{d}#{s_mark}#{instruct}"
+ orig=dob_src.obj
+ trans=((dob_trn=='') \
+ || (dob_src.obj == dob_trn.obj)) \
+ ? ''
+ : "#{s_mark}#{dob_trn.obj}"
+ if @md.opt.f_pth[:lng_is] !=@md.opt.lng_base \
+ and trans.empty? \
+ and auto_translate?
+ trans=auto_translation(dob_src.obj,:src)
+ end
+ util=pot_structure_wrap(desc,orig,trans)
+ unwrapped=util.no_line_wrap_block
+ @pot[:body] << unwrapped << br
+ end
+ def group(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
+ mark="group{\\n\\n...\\n\\n}group"
+ d=dob_src.is.to_s
+ instruct=s_mark=''
+ if @md.opt.act[:maintenance][:set]==:on
+ instruct=%{\n# group text is a text block with an opening and closing marker, } \
+ + %{the content of which may be wrapped}
+ s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
+ end
+ desc="#{d}#{s_mark}#{instruct}"
+ orig=dob_src.obj
+ trans=((dob_trn=='') \
+ || (dob_src.obj == dob_trn.obj)) \
+ ? ''
+ : "#{s_mark}#{dob_trn.obj}"
+ if @md.opt.f_pth[:lng_is] !=@md.opt.lng_base \
+ and trans.empty? \
+ and auto_translate?
+ trans=auto_translation(dob_src.obj,:src)
+ end
+ util=pot_structure_wrap(desc,orig,trans)
+ unwrapped=util.no_line_wrap_block
+ @pot[:body] << unwrapped << br
+ end
+ def verse(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
+ mark="poem{\n\nverse\n\nverse\n\n...\n\n}poem"
+ d=dob_src.is.to_s
+ instruct=s_mark=''
+ if @md.opt.act[:maintenance][:set]==:on
+ instruct=%{\n# verse are part of the text block described as a poem, } \
+ + %{the first verse is preceeded by an opening marker, } \
+ + %{and the last verse by a closing marker, } \
+ + %{the content of which should remain unwrapped}
+ s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
+ end
+ desc="#{d}#{s_mark}#{instruct}"
+ orig=dob_src.obj
+ trans=(dob_trn=='') ? '' : dob_trn.obj
+ util=pot_structure_wrap(desc,orig,trans)
+ unwrapped=util.no_line_wrap_block
+ @pot[:body] << unwrapped << br
+ end
+ def code(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
+ mark="code{\\n\\n...\\n\\n}code"
+ d=dob_src.is.to_s
+ instruct=s_mark=''
+ if @md.opt.act[:maintenance][:set]==:on
+ instruct=%{\n# codeblocks are a text block with an opening and closing marker, } \
+ + %{the content of which should remain unwrapped}
+ s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
+ end
+ desc="#{d}#{s_mark}#{instruct}"
+ orig=dob_src.obj
+ trans=(dob_trn=='') ? '' : dob_trn.obj
+ util=pot_structure_wrap(desc,orig,trans)
+ unwrapped=util.no_line_wrap_block
+ @pot[:body] << unwrapped << br
+ end
+ def table(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
+ mark="table{\\n\\n...\\n\\n}table"
+ d=dob_src.is.to_s
+ instruct=s_mark=''
+ if @md.opt.act[:maintenance][:set]==:on
+ instruct=%{\n# tables are a text block with an opening and closing marker, } \
+ + %{the content of which should remain unwrapped}
+ s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
+ end
+ desc="#{d}#{s_mark}#{instruct}"
+ orig=dob_src.obj
+ orig=orig.gsub(/#{Mx[:tc_c]}/,"\n")
+ trans=(dob_trn=='') ? '' : dob_trn.obj
+ trans=trans.gsub(/#{Mx[:tc_c]}/,"\n")
+ util=pot_structure_wrap(desc,orig,trans)
+ unwrapped=util.no_line_wrap_block
+ @pot[:body] << unwrapped << br
+ end
+ def idx_markup(idx)
+ struct=['={']
+ idx.sort.each do |x|
+ x.each_with_index do |y,i0|
+ case y
+ when String
+ struct << ';' unless struct[-1] =~/=\{/
+ struct << y
+ if x[i0+1].class == Hash \
+ and x[i0+1][:sub].length > 0
+ struct << ':'
+ end
+ when Hash
+ if y[:plus].to_i > 0
+ struct << '+' + y[:plus].to_s
+ end
+ if y[:sub].length > 0
+ y[:sub].each_with_index do |z,i1|
+ z.each_with_index do |a,i2|
+ #p a
+ if z.length > 0
+ struct << a[0]
+ if a[1][:plus].to_i > 0
+ struct << '+' + a[1][:plus].to_s
+ end
+ if (i1 + 1) < y[:sub].length
+ struct << '|'
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ struct << '}'
+ #puts struct.join
+ struct.join
+ end
+ def idx(dob_src='',dob_trn='') #% used for book index but broken as original markup lost, already abstracted, fix
+ mark="={ ... }"
+ instruct=s_mark=''
+ if @md.opt.act[:maintenance][:set]==:on
+ instruct=%{\n# the book index should be attached unwrapped to the preceding text block } \
+ + %{(there should be a new line, but no empty line)}
+ s_mark="\n# " + %{"\\n#{mark}\\n\\n"}
+ end
+ d='book-idx'
+ desc="#{d}#{s_mark}#{instruct}"
+ orig=pot_structure.idx_markup(dob_src.idx) #'={' + dob_src.idx + '}'
+ trans=if defined? dob_trn.idx \
+ and not dob_trn.idx.nil? \
+ and not dob_trn.idx.empty?
+ pot_structure.idx_markup(dob_trn.idx) #'={' + dob_trn.idx + '}'
+ else ''
+ end
+ util=pot_structure_wrap(desc,orig,trans)
+ unwrapped=util.no_line_wrap_block
+ @pot[:body] << unwrapped << br
+ end
+ self
+ end
+ def pot_markup(data_src,data_trn)
+ #@endnotes,@copen,@pot_contents_close=Array.new(3){[]}
+ a_l=if data_trn
+ a_l=(data_src.length >= data_trn.length) \
+ ? data_src.length
+ : data_trn.length
+ else
+ data_src.length
+ end
+ s,t=0,0
+ if @md.fns =~ /\.(?:(?:-|ssm\.)?sst|ssm)$/
+ (data_trn.nil?) \
+ ? pot_metadata_src
+ : pot_metadata_src_trn
+ end
+ 0.upto(a_l-1) do |i|
+ if data_trn
+ unless data_src[s] \
+ and data_trn[t]
+ break
+ end
+ if data_src[s].of == :comment \
+ and data_trn[t].of == :comment \
+ and (data_src[s].is == data_trn[t].is)
+ s+=1;t+=1
+ next
+ end
+ if ((data_src[s].is == :comment) \
+ || (data_trn[t].is == :comment)) \
+ and (data_src[s].is != data_trn[t].is)
+ if data_src[s].is == :comment
+ if @md.opt.act[:maintenance][:set]==:on
+ puts "src (comment):\n\t" \
+ + data_src[s].obj
+ end
+ s+=1
+ #next if data_src[s].is == :comment
+ elsif data_trn[t].is == :comment
+ if @md.opt.act[:maintenance][:set]==:on
+ puts "trans (comment):\n\t" \
+ + data_trn[t].obj
+ end
+ t+=1
+ #next if data_trn[t].is == :comment
+ end
+ end
+ if ((defined? data_src[s].ocn) \
+ && (data_src[s].ocn.is_a?(Fixnum))) \
+ and ((defined? data_trn[t].ocn) \
+ && (data_trn[t].ocn.is_a?(Fixnum))) \
+ and (data_src[s].ocn == data_trn[t].ocn)
+ @m_s,@m_t=s,t
+ elsif ((defined? data_src[s].ocn) \
+ && (data_src[s].ocn.is_a?(Fixnum))) \
+ and ((defined? data_trn[t].ocn) \
+ && (data_trn[t].ocn.is_a?(Fixnum))) \
+ and (data_src[s].ocn != data_trn[t].ocn)
+ p '--- OCN ---'
+ p 'mis-match'
+ p data_src[s].ocn
+ p data_src[s].obj
+ p data_trn[t].ocn
+ p data_trn[t].obj
+ p '---'
+ p 'previous match'
+ p data_src[@m_s].ocn
+ p data_src[@m_s].obj
+ p data_trn[@m_t].ocn
+ p data_trn[@m_t].obj
+ exit
+ elsif (((defined? data_src[s].ocn) \
+ && (defined? data_trn[t].ocn)) \
+ and data_src[s].ocn.class != data_trn[t].ocn.class)
+ p '--- OCN class ---'
+ p 'mis-match'
+ p data_src[s].ocn if defined? data_src[s].ocn
+ p data_src[s].obj
+ p data_trn[t].ocn if defined? data_trn[t].ocn
+ p data_trn[t].obj
+ #p '---'
+ #p 'previous match'
+ #p data_src[@m_s].ocn
+ #p data_src[@m_s].obj
+ #p data_trn[@m_t].ocn
+ #p data_trn[@m_t].obj
+ #elsif (defined? data_src[s].ocn != defined? data_trn[t].ocn) \
+ #and (data_src[s].ocn.nil? != data_trn[t].ocn.nil?)
+ # p '--- missing OCN? ---'
+ # p 'mis-match'
+ # p data_src[s].ocn if defined? data_src[s].ocn
+ # p data_src[s].obj
+ # p data_trn[t].ocn if defined? data_trn[t].ocn
+ # p data_trn[t].obj
+ else
+ end
+ end
+ notes_s,notes_t='',''
+ data_src[s],notes_s=markup(data_src[s])
+ if data_trn
+ data_trn[t],notes_t=markup(data_trn[t])
+ #data_src[s],data_trn[t]=pot_data(data_src[s],notes_s,data_trn[t],notes_t)
+ pot_data(data_src[s],notes_s,data_trn[t],notes_t)
+ else
+ #data_src[s],nul=pot_data(data_src[s],notes_s)
+ pot_data(data_src[s],notes_s)
+ end
+ s+=1;t+=1
+ end
+ @pot #watch
+ end
+ def pot_data(dob_src='',notes_s='',dob_trn='',notes_t='')
+ if dob_src.obj !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/
+ if defined? dob_src.ocn \
+ and dob_src.ocn.to_s =~/\d+/
+ paranum=dob_src.ocn.to_s
+ @p_num=SiSU_Po4aUtils::ParagraphNumber.new(paranum)
+ end
+ case dob_src.is
+ when :heading
+ pot_structure.heading(dob_src,notes_s,dob_trn,notes_t)
+ when :para
+ pot_structure.para(dob_src,notes_s,dob_trn,notes_t)
+ when :group
+ pot_structure.group(dob_src,notes_s,dob_trn,notes_t)
+ when :block
+ pot_structure.block(dob_src,notes_s,dob_trn,notes_t)
+ when :verse
+ pot_structure.verse(dob_src,notes_s,dob_trn,notes_t)
+ when :code
+ pot_structure.code(dob_src,notes_s,dob_trn,notes_t)
+ when :table
+ pot_structure.table(dob_src,notes_s,dob_trn,notes_t)
+ end
+ if defined? dob_src.idx \
+ and not dob_src.idx.nil? \
+ and not dob_src.idx.empty?
+ pot_structure.idx(dob_src,dob_trn)
+ end
+ dob_src='' if (dob_src.obj =~/<a name="n\d+">/ \
+ and dob_src.obj =~/^(-\{{2}~\d+|<!e[:_]\d+!>)/) # -endnote
+ if dob_src ## Clean Prepared Text
+ dob_src.obj=dob_src.obj.gsub(/<!.+!>/,' ').
+ gsub(/<:\S+>/,' ') if dob_src ## Clean Prepared Text
+ end
+ end
+ #[dob_src,dob_trn]
+ end
+ def markup(dob)
+ dob,notes=objects.textface_marks_po4a(dob,:separate)
+ [dob,notes]
+ end
+ def publish(fn,pot)
+ content=[]
+ content << pot[:open]
+ content << pot[:head]
+ content << pot[:metadata]
+ content << pot[:body]
+ content << @@endnotes[:end] if @@endnotes_
+ Output.new(fn,content,@md,@process).po4a
+ @@endnotes={ para: [], end: [] }
+ end
+ end
+ class Po4aCfg
+ include SiSU_Composite_Doc_Utils # composite doc, .ssm, extract all related insert files, array of filenames test
+ def initialize(opt,file)
+ @opt,@file=opt,file
+ end
+ def po4a_cfg_filename
+ 'po4a.cfg'
+ end
+ def dir
+ def pwd
+ Dir.pwd
+ end
+ def po4a_
+ 'po4a/' # ''
+ end
+ def pot
+ po4a_ + 'pot'
+ end
+ def po
+ po4a_ + 'po'
+ end
+ self
+ end
+ def po4a_cfg_file
+ File.open("#{Dir.pwd}/#{po4a_cfg_filename}",'w')
+ end
+ def language
+ def sisu_languages_available
+ Px[:lng_lst]
+ end
+ def translation_languages_selected
+ @opt.act[:po4a_lang_trans][:trn] \
+ ? @opt.act[:po4a_lang_trans][:trn]
+ : []
+ end
+ def translation_languages_selected_that_are_available
+ translation_languages_selected & sisu_languages_available
+ end
+ def source_language_selected_str
+ @opt.act[:po4a_lang_trans][:src] \
+ ? @opt.act[:po4a_lang_trans][:src]
+ : 'en'
+ end
+ def translation_languages_selected_that_are_available_str
+ translation_languages_selected_that_are_available.join(' ')
+ end
+ def translation_languages_selected_str
+ @opt.act[:po4a_lang_trans][:trn].join(' ')
+ end
+ self
+ end
+ def po4a_cfg
+ doc_import_list=composite_and_imported_filenames_array(@opt.fno)
+ po4a_cfg_arr=[]
+ po4a_cfg_arr \
+ << "[po4a_langs] #{language.translation_languages_selected_that_are_available_str}"
+ po4a_cfg_arr \
+ << "[po4a_paths] #{dir.pot}/$master.pot $lang:#{dir.po}/$lang/$master.po"
+ doc_import_list.each do |file_src|
+ file_src_fn=
+ file_src.gsub(/#{language.source_language_selected_str}\//,'')
+ po4a_cfg_arr \
+ << "[type: text] #{file_src} $lang:$lang/#{file_src_fn}"
+ end
+ file=@file.write_file.po4a_cfg
+ po4a_cfg_arr.each do |txt|
+ puts txt
+ file << txt << "\n"
+ end
+ file.close
+ end
+ end
+ class Output <Source
+ include SiSU_Param
+ include SiSU_Env
+ def initialize(fn,content,md,process=:complete)
+ @fn,@content,@md,@process=fn,content,md,process
+ @file=SiSU_Env::FileOp.new(md,fn)
+ end
+ def po4a #%pot output
+ file_pot=(@md.opt.f_pth[:lng] == @md.opt.lng_base) \
+ ? @file.write_file.pot
+ : @file.write_file.po
+ @sisu=[]
+ emptyline=0
+ @content.each do |para| # this is a hack
+ if para.is_a?(Array) \
+ and para.length > 0
+ para.each do |line|
+ if line
+ line=line.gsub(/\s+$/m,'').
+ gsub(/^\A[ ]*\Z/m,'')
+ if line=~/^\A[ ]*\Z/m
+ emptyline+=1
+ else emptyline=0
+ end
+ file_pot.puts line if emptyline < 2 #remove extra line spaces (fix upstream)
+ end
+ end
+ else file_pot.puts para #unix plaintext # /^([*=-]|\.){5}/
+ end
+ end
+ file_pot.close
+ SiSU_Po4aUtils::PotNumber.new.reset
+ po4a_git
+ end
+ def po4a_git
+ unless @md.opt.act[:maintenance][:set]==:on
+ require_relative 'git' # git.rb
+ git=SiSU_Git::Source.new(@md.opt,@process)
+ unless FileTest.directory?(@file.output_path.pot_git.dir)
+ git.create_file_structure_git
+ end
+ if @md.opt.f_pth[:lng] == @md.opt.lng_base
+ FileUtils::cp(
+ @file.place_file.pot.dir,
+ @file.output_path.pot_git.dir
+ )
+ else # naive, work on -->
+ FileUtils::cp(
+ @file.place_file.po.dir,
+ @file.output_path.po_git.dir
+ ) #unless FileTest.file?(@file.place_file.po_git.dir)
+ end
+ git.read
+ end
+ end
+ end
+ end
+end
+__END__
+&#033;\|&#035;\|&&#042;\|&#045;\|&#047;\|&#095;\|&#123;\|&#125;\|&#126;\|&#
+
+tables are problematic, difficult to reconstitute instruction, check
+
+metadata, move to top? and work on
+
+footnotes, different types, asterisk, also do you want to have separate
+paragraphs, or breaks within one block?
+
+where no ocn appropriately use ~# or -# or indeed 1~name-
+
+comments in document, what to do about them, not sure they are currently
+retained in dal, could be quite valuable to keep
+
+Translate Shell
+http://www.soimort.org/translate-shell/
+translate.google.com
diff --git a/lib/sisu/v5/po4a_set.rb b/lib/sisu/develop/src_po4a_shelf_set.rb
index b0d2baaa..a281060d 100644
--- a/lib/sisu/v5/po4a_set.rb
+++ b/lib/sisu/develop/src_po4a_shelf_set.rb
@@ -1,66 +1,64 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** po4a
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/po4a_set.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by flatfile output generators
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/src_po4a_shelf_set.rb;hb=HEAD>
=end
module SiSU_Po4aUtils
class Wrap
def initialize(md,orig='',trans='',is_desc='',n_char_max=76,n_indent=0,n_hang=nil)
- @md,@orig,@trans,@is_desc,@n_char_max,@n_indent=md,orig,trans,is_desc,n_char_max,n_indent
+ @md,@orig,@trans,@is_desc,@n_char_max,@n_indent=
+ md, orig, trans, is_desc, n_char_max, n_indent
@n_char_max_extend = n_char_max
@br="\n"
@n_hang=n_hang ? n_hang : @n_indent
@@ -69,7 +67,8 @@ module SiSU_Po4aUtils
end
def line_wrap
space=' '
- spaces_indent,spaces_hang="#{@br}#{space*@n_indent}",space*@n_hang
+ spaces_indent,spaces_hang=
+ "#{@br}#{space*@n_indent}",space*@n_hang
pot,i=[],0
pot_array=(@trans.empty?) ? [@orig] : [@orig,@trans]
pot_array.each do |pa|
@@ -79,7 +78,7 @@ module SiSU_Po4aUtils
@oldword='' #REMOVE @oldword
pa=pa.gsub(/<br>/,' <br> ').
gsub(/#{Mx[:br_nl]}/,"\n\n")
- words=pa.scan(/\n\n|<br>|\S+/m)
+ words=pa.scan(/\n\n|\\\\\\|<br>|\S+/m)
while words != ''
word=words.shift
if not word
diff --git a/lib/sisu/develop/src_po4a_sst_ao_sst.rb b/lib/sisu/develop/src_po4a_sst_ao_sst.rb
new file mode 100644
index 00000000..c1c85052
--- /dev/null
+++ b/lib/sisu/develop/src_po4a_sst_ao_sst.rb
@@ -0,0 +1,893 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** pot file generation
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/src_po4a_sst_ao_sst.rb;hb=HEAD>
+
+=end
+module SiSU_SStm_AO_SStm
+ require_relative 'ao' # ao.rb
+ require_relative 'se' # se.rb
+ include SiSU_Env
+ require_relative 'ao_composite' # ao_composite.rb
+ require_relative 'shared_metadata' # shared_metadata.rb
+ require_relative 'src_po4a_share' # src_po4a_share.rb
+ require_relative 'src_po4a_sst_ao_sst_set' # src_po4a_sst_ao_sst_set.rb
+ include SiSU_Param
+ require_relative 'object_munge' # object_munge.rb
+ require_relative 'utils_composite' # utils_composite.rb
+ require_relative 'utils_response' # utils_response.rb
+ class Source
+ include SiSU_Object_Munge
+ include SiSU_Languages_Selected
+ include SiSU_Response
+ @@md_src,@@md_master=
+ nil, nil
+ @@auto_translation_ = :go
+ def initialize(opt,fn=nil)
+ @opt,@fn=opt,fn
+ #unless @opt.fns =~/(.+?\.(?:-|ssm\.)?sst)$/
+ # puts "#{@opt.fns} not a processed file type"
+ #end
+ file_arr=SiSU_Info_Env::InfoEnv.new.
+ source_file_processing_array(@opt.fno)
+ SiSU_Param::Parameters::Instructions.new(file_arr,@opt).extract
+ r=Px[:lng_lst_rgx].gsub(/\|#{language.source_language_selected_str}\|/,'|')
+ @lang_regx=%r{(?:#{r})}
+ @@todo=if source_language_selected_str == opt.f_pth[:lng]
+ :same_file
+ else :compare
+ end
+ if opt.f_pth[:lng]==@opt.lng_base \
+ and opt.f_pth[:lng]==source_language_selected_str
+ @@md_master=SiSU_Param::Parameters.new(opt).get
+ end
+ end
+ def wrap_width_set(md,env)
+ if defined? md.make.plaintext_wrap \
+ and md.make.plaintext_wrap
+ md.make.plaintext_wrap
+ elsif defined? env.plaintext_wrap \
+ and env.plaintext_wrap
+ #env.plaintext_wrap # 78 use 75
+ 75
+ else 75 #78
+ end
+ end
+ def process_file(md,env,file,wrap_width,fn)
+ if source_language_selected_str == @opt.f_pth[:lng]
+ @@ao_arr_lang_trans=
+ SiSU_AO::Source.new(
+ @opt,
+ fn,
+ :po4a
+ ).get # ao file drawn here
+ end
+ @ao_arr_lang_src=
+ SiSU_AO::Source.new(
+ @opt,
+ fn,
+ :po4a
+ ).get # ao file drawn here
+ SiSU_SStm_AO_SStm::Source::Scroll.new(
+ fn,
+ @ao_arr_lang_src,
+ @@ao_arr_lang_trans,
+ @@md_src,
+ @@md_master,
+ wrap_width
+ ).songsheet
+ end
+ def read_process_src_files
+ begin
+ src={}
+ src[:pth]=@opt.f_pth[:pth]
+ src[:files]=if @opt.fns =~ /\.(?:(?:-|ssm\.)sst|ssm)$/
+ @opt.fns=@opt.fns.gsub(/\.ssm\.sst$/,'.ssm')
+ SiSU_Assemble::CompositeFileList.new(@opt).read
+ else
+ [@opt.fns]
+ end
+ md=SiSU_Param::Parameters.new(@opt).get
+ env=SiSU_Env::InfoEnv.new(@opt.fns)
+ file=SiSU_Env::FileOp.new(md)
+ lng=/\/([^\/]+)$/.match(src[:pth])[1]
+ if language.source_language_selected_str == lng
+ SiSU_Po4a_Project::Po4aDistClean.new(@opt,file).song
+ end
+ wrap_width=wrap_width_set(md,env)
+ lng = /\/([^\/]+)$/.match(src[:pth])[1]
+ ans=response?('process files?')
+ if ans
+ src[:files].each do |fn|
+ puts "[#{lng}] #{fn}"
+ process_file(md,env,file,wrap_width,fn)
+ end
+ end
+ rescue
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
+ __LINE__.to_s + ':' + __FILE__
+ end
+ ensure
+ end
+ end
+ def read_setup
+ begin
+ md=SiSU_Param::Parameters.new(@opt).get
+ file=SiSU_Env::FileOp.new(md)
+ SiSU_Po4a_Project::Po4aCfg.new(@opt,file).song
+ SiSU_Po4a_Project::Po4aProject.new(@opt,file).song
+ rescue
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
+ __LINE__.to_s + ':' + __FILE__
+ end
+ ensure
+ end
+ end
+ private
+ class Scroll <Source
+ include SiSU_Po4aUtils
+ @@endnotes={ para: [], end: [] }
+ def initialize(fn,data_src,data_master,md_src,md_master,wrap_width)
+ @fn,@data_src,@data_master,@md_src,@md_master,@wrap_width=
+ fn, data_src, data_master, md_src, md_master, wrap_width
+ @md=md_src
+ @tab="\t"
+ @@endnotes_=(@md.opt.selections.str =~/--endnote/) \
+ ? true
+ : false # --footnote
+ @pot={
+ body: [],
+ open: [],
+ close: [],
+ head: [],
+ metadata: [],
+ tail: []
+ }
+ end
+ def br
+ (@md.opt.selections.str =~/--dos/) ? "\r\n" : "\n" # --unix
+ end
+ def songsheet
+ fn=@fn
+ pot=compare_structure_src_trn(@data_src,@data_master,@@todo)
+ publish(fn,pot)
+ end
+ def pot_structure_wrap(orig,trans,indent=0,hang=0)
+ SiSU_Po4aUtils::Wrap.new(
+ @md,
+ orig,
+ trans,
+ @wrap_width,
+ indent,
+ hang
+ )
+ end
+ def wrap_endnotes(orig_notes='',trn_notes='')
+ #nt=@@endnotes_ ? 'endnote' : 'footnote'
+ @fn=0
+ a_l=orig_notes.length
+ 0.upto(a_l-1) do |i|
+ @fn=if orig_notes[i].to_s =~/^\^~([\d*+]+)/ # provides endnote number within paragraph
+ @fn += 1
+ else @fn
+ end
+ #mark="^~ "
+ orig=(orig_notes[i].to_s =~/^\^~[\d*+]+/) \
+ ? (orig_notes[i].to_s.gsub(/^\^~[\d*+]+/,'^~'))
+ : orig_notes[i].to_s
+ trans=if trn_notes.is_a?(Array) \
+ and trn_notes.length==orig_notes.length
+ (trn_notes[i].to_s =~/^\^~[\d*+]+/) \
+ ? (trn_notes[i].to_s.gsub(/^\^~[\d*+]+/,'^~'))
+ : trn_notes[i].to_s
+ else ''
+ end
+ util=pot_structure_wrap(orig,trans)
+ wrap=util.line_wrap
+ wrap=if wrap =~ /^\s*\^~[\d*+]+\s+.+?\s*\Z/m
+ wrap.gsub(/^\s*(\^~[\d*+]+)\s+(.+?)\s*\Z/m, <<GSUB
+\\1 \\2
+GSUB
+ )
+ else
+ wrap.gsub(/^(.+)\Z/m, <<GSUB
+\\1
+GSUB
+ )
+ end
+ @@endnotes[:para] << wrap
+ @@endnotes[:end] << '' << wrap
+ end
+ @@endnotes[:para].each {|e| @pot[:body] << e << br}
+ @@endnotes[:para]=[]
+ @@endnotes
+ end
+ def pot_metadata_src
+ @po4a_identify_type='type: SiSU doc' #'type: Plain text'
+ meta_src=SiSU_Metadata::Summary.new(@md_src)
+ w=[]
+ w << [
+ meta_src.metadata_tags.title.main,
+ meta_src.metadata_tags.title.sub,
+ meta_src.metadata_tags.title.edition,
+ meta_src.metadata_tags.title.note,
+ meta_src.metadata_tags.title.short,
+ meta_src.metadata_tags.title.language,
+ meta_src.metadata_tags.title.language_char,
+ ]
+ w << [
+ meta_src.metadata_tags.creator.head,
+ meta_src.metadata_tags.creator.author,
+ meta_src.metadata_tags.creator.contributor,
+ meta_src.metadata_tags.creator.illustrator,
+ meta_src.metadata_tags.creator.photographer,
+ meta_src.metadata_tags.creator.translator,
+ meta_src.metadata_tags.creator.audio,
+ meta_src.metadata_tags.creator.digitized_by,
+ meta_src.metadata_tags.creator.prepared_by,
+ ]
+ w << [
+ meta_src.metadata_tags.rights.head,
+ meta_src.metadata_tags.rights.copyright.text,
+ meta_src.metadata_tags.rights.copyright.translation,
+ meta_src.metadata_tags.rights.copyright.illustrations,
+ meta_src.metadata_tags.rights.copyright.photographs,
+ meta_src.metadata_tags.rights.copyright.digitization,
+ meta_src.metadata_tags.rights.copyright.audio,
+ meta_src.metadata_tags.rights.license,
+ ]
+ w << [
+ meta_src.metadata_tags.classify.head,
+ meta_src.metadata_tags.classify.subject,
+ meta_src.metadata_tags.classify.topic_register,
+ meta_src.metadata_tags.classify.loc,
+ meta_src.metadata_tags.classify.dewey,
+ ]
+ w << [
+ meta_src.metadata_tags.date.head,
+ meta_src.metadata_tags.date.added_to_site,
+ meta_src.metadata_tags.date.available,
+ meta_src.metadata_tags.date.created,
+ meta_src.metadata_tags.date.issued,
+ meta_src.metadata_tags.date.modified,
+ meta_src.metadata_tags.date.published,
+ meta_src.metadata_tags.date.valid,
+ ]
+ w << [
+ meta_src.processing_tags.make.language,
+ meta_src.processing_tags.make.headings,
+ meta_src.processing_tags.make.num_top,
+ meta_src.processing_tags.make.breaks,
+ meta_src.processing_tags.make.emphasis,
+ meta_src.processing_tags.make.bold,
+ meta_src.processing_tags.make.italics,
+ meta_src.processing_tags.make.texpdf_font,
+ ]
+ w.each do |y|
+ z=''
+ y.each do |x|
+ if x
+ z += x + "\n" if x =~/^#|^msg(?:id|str)/
+ z += %{#{x}\n} if x =~/^@\S+?:(?: |$)/
+ z += %{#{x}\n} if x =~/^\s+:\S+?: /
+ end
+ end
+ @pot[:metadata] << z << br
+ #puts z unless z.empty?
+ end
+ end
+ def pot_metadata_src_trn
+ #@po4a_identify_type='type: Plain text'
+ meta_src=SiSU_Metadata::Summary.new(@md_src)
+ w=[]
+ w << [
+ meta_src.metadata_tags.title.main,
+ meta_src.metadata_tags.title.sub,
+ meta_src.metadata_tags.title.edition,
+ meta_src.metadata_tags.title.note,
+ meta_src.metadata_tags.title.short,
+ meta_src.metadata_tags.title.language,
+ meta_src.metadata_tags.title.language_char,
+ ]
+ w << [
+ meta_src.metadata_tags.creator.head,
+ meta_src.metadata_tags.creator.author,
+ meta_src.metadata_tags.creator.contributor,
+ meta_src.metadata_tags.creator.illustrator,
+ meta_src.metadata_tags.creator.photographer,
+ meta_src.metadata_tags.creator.translator,
+ meta_src.metadata_tags.creator.audio,
+ meta_src.metadata_tags.creator.digitized_by,
+ meta_src.metadata_tags.creator.prepared_by,
+ ]
+ w << [
+ meta_src.metadata_tags.rights.head,
+ meta_src.metadata_tags.rights.copyright.text,
+ meta_src.metadata_tags.rights.copyright.translation,
+ meta_src.metadata_tags.rights.copyright.illustrations,
+ meta_src.metadata_tags.rights.copyright.photographs,
+ meta_src.metadata_tags.rights.copyright.digitization,
+ meta_src.metadata_tags.rights.copyright.audio,
+ meta_src.metadata_tags.rights.license,
+ ]
+ w << [
+ meta_src.metadata_tags.classify.head,
+ meta_src.metadata_tags.classify.subject,
+ meta_src.metadata_tags.classify.topic_register,
+ meta_src.metadata_tags.classify.loc,
+ meta_src.metadata_tags.classify.dewey,
+ ]
+ w << [
+ meta_src.metadata_tags.date.head,
+ meta_src.metadata_tags.date.added_to_site,
+ meta_src.metadata_tags.date.available,
+ meta_src.metadata_tags.date.created,
+ meta_src.metadata_tags.date.issued,
+ meta_src.metadata_tags.date.modified,
+ meta_src.metadata_tags.date.published,
+ meta_src.metadata_tags.date.valid,
+ ]
+ w << [
+ meta_src.processing_tags.make.language,
+ meta_src.processing_tags.make.headings,
+ meta_src.processing_tags.make.num_top,
+ meta_src.processing_tags.make.breaks,
+ meta_src.processing_tags.make.emphasis,
+ meta_src.processing_tags.make.bold,
+ meta_src.processing_tags.make.italics,
+ meta_src.processing_tags.make.texpdf_font,
+ ]
+ w.each do |y|
+ z=''
+ y.each do |x|
+ if x
+ z += x + "\n" if x =~/^#|^msg(?:id|str)/
+ z += %{#{x}\n} if x =~/^@\S+?:(?: |$)/
+ z += %{#{x}\n} if x =~/^\s+:\S+?: /
+ end
+ end
+ @pot[:metadata] << z << br
+ #puts z unless z.empty?
+ end
+ end
+ def auto_translate?(set_to=nil)
+ @@auto_translation_=
+ if @md.opt.act[:po4a_lang_trans][:set]==:on
+ set_to \
+ ? set_to
+ : @@auto_translation_
+ else :skip
+ end
+ end
+ def auto_translation(src_txt,markup=:src) # check for an appropriate request flag
+ auto_translate?(:skip)
+ begin
+ src_txt_clean=clean_text(src_txt,markup)
+ src_txt_clean=src_txt_clean.
+ gsub(/\n/,' ').
+ gsub(/"/,'\"').
+ gsub(/([()])/,'\\\\\1')
+ trans=''
+ unless auto_translate? == :skip
+ require 'timeout'
+ Timeout::timeout(60) {
+ trans=`trans -b -no-ansi en:#{@md.opt.f_pth[:lng_is]} #{src_txt_clean}`.strip
+ unless trans.empty?
+ trans + ' {[G.Tr]}http://translate.google.com'
+ end
+ }
+ end
+ trans
+ rescue
+ auto_translate?(:skip)
+ p 'timeout issues with translation, skip remaining'
+ end
+ end
+ def pot_structure
+ def heading(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
+ lv=n=n3=nil
+ lv=dob_src.ln
+ n=lv - 1
+ n3=lv + 2
+ util=nil
+ fn=(dob_src.name=~/[a-z\d]/i) ? dob_src.name : ''
+ mark="#{dob_src.lv}~#{fn} "
+ orig="#{mark}#{dob_src.obj}"
+ trans=((dob_trn=='') \
+ || (dob_src.obj == dob_trn.obj)) \
+ ? ''
+ : "#{mark}#{dob_trn.obj}"
+ if @md.opt.f_pth[:lng_is] !=@md.opt.lng_base \
+ and trans.empty? \
+ and auto_translate?
+ trans=auto_translation(dob_src.obj,:src)
+ end
+ util=pot_structure_wrap(orig,trans)
+ wrapped=util.line_wrap
+ @pot[:body] << wrapped << br # main text, contents, body KEEP
+ if @@endnotes[:para] \
+ and notes_s.length > 0 \
+ and not @@endnotes_
+ @pot[:body] << br
+ wrap_endnotes(notes_s,notes_t)
+ elsif @@endnotes[:para] \
+ and @@endnotes_
+ @pot[:body] << br*2
+ end
+ end
+ def para(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
+ util=nil
+ wrapped=if dob_src.indent =~/[1-9]/ \
+ and dob_src.indent == dob_src.hang
+ s_mark=desc=orig=trans=''
+ mark=if dob_src.bullet_
+ "_#{dob_src.indent}* "
+ else
+ "_#{dob_src.indent} "
+ end
+ orig="#{mark}#{dob_src.obj}"
+ trans=((dob_trn=='') \
+ || (dob_src.obj == dob_trn.obj)) \
+ ? ''
+ : "#{mark}#{dob_trn.obj}"
+ if @md.opt.f_pth[:lng_is] !=@md.opt.lng_base \
+ and trans.empty? \
+ and auto_translate?
+ trans=auto_translation(dob_src.obj,:src)
+ end
+ util=pot_structure_wrap(orig,trans)
+ elsif dob_src.hang =~/[0-9]/ \
+ and dob_src.indent != dob_src.hang
+ s_mark=desc=orig=trans=''
+ mark="_#{dob_src.hang}_#{dob_src.indent} "
+ orig="#{mark}#{dob_src.obj}"
+ trans=((dob_trn=='') \
+ || (dob_src.obj == dob_trn.obj)) \
+ ? ''
+ : "#{mark}#{dob_trn.obj}"
+ if @md.opt.f_pth[:lng_is] !=@md.opt.lng_base \
+ and trans.empty? \
+ and auto_translate?
+ trans=auto_translation(dob_src.obj,:src)
+ end
+ util=pot_structure_wrap(orig,trans)
+ else
+ s_mark=desc=orig=trans=''
+ if dob_src.bullet_
+ mark='_* '
+ orig="#{mark}#{dob_src.obj}"
+ trans=((dob_trn=='') \
+ || (dob_src.obj == dob_trn.obj)) \
+ ? ''
+ : "#{mark}#{dob_trn.obj}"
+ if @md.opt.f_pth[:lng_is] !=@md.opt.lng_base \
+ and trans.empty? \
+ and auto_translate?
+ trans=auto_translation(dob_src.obj,:src)
+ end
+ else
+ mark=''
+ orig=dob_src.obj
+ trans=((dob_trn=='') \
+ || (dob_src.obj == dob_trn.obj)) \
+ ? ''
+ : "#{mark}#{dob_trn.obj}"
+ if @md.opt.f_pth[:lng_is] !=@md.opt.lng_base \
+ and trans.empty? \
+ and auto_translate?
+ trans=auto_translation(dob_src.obj,:src)
+ end
+ end
+ util=pot_structure_wrap(orig,trans)
+ end
+ wrapped=util.line_wrap
+ @pot[:body] << wrapped << br # main text, contents, body KEEP
+ if @@endnotes[:para] \
+ and notes_s.length > 0 \
+ and not @@endnotes_
+ @pot[:body] << br
+ wrap_endnotes(notes_s,notes_t)
+ elsif @@endnotes[:para] \
+ and @@endnotes_
+ @pot[:body] << br*2
+ end
+ end
+ def block(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
+ mark_o ="block{\n\n"
+ mark_c ="\n\n}block"
+ orig="#{mark_o}#{dob_src.obj}#{mark_c}"
+ trans=((dob_trn=='') \
+ || (dob_src.obj == dob_trn.obj)) \
+ ? ''
+ : "#{mark_o}#{dob_trn.obj}#{mark_c}"
+ if @md.opt.f_pth[:lng_is] !=@md.opt.lng_base \
+ and trans.empty? \
+ and auto_translate?
+ trans=auto_translation(dob_src.obj,:src)
+ end
+ util=pot_structure_wrap(orig,trans)
+ unwrapped=util.no_line_wrap_block
+ @pot[:body] << unwrapped << br
+ end
+ def group(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
+ mark_o ="group{\n\n"
+ mark_c ="\n\n}group"
+ orig="#{mark_o}#{dob_src.obj}#{mark_c}"
+ trans=((dob_trn=='') \
+ || (dob_src.obj == dob_trn.obj)) \
+ ? ''
+ : "#{mark_o}#{dob_trn.obj}#{mark_c}"
+ if @md.opt.f_pth[:lng_is] !=@md.opt.lng_base \
+ and trans.empty? \
+ and auto_translate?
+ trans=auto_translation(dob_src.obj,:src)
+ end
+ util=pot_structure_wrap(orig,trans)
+ unwrapped=util.no_line_wrap_block
+ @pot[:body] << unwrapped << br
+ end
+ def verse(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
+ mark="poem{\n\nverse\n\nverse\n\n...\n\n}poem"
+ instruct=s_mark=''
+ if @md.opt.act[:maintenance][:set]==:on
+ instruct=%{\n# verse are part of the text block described as a poem, } \
+ + %{the first verse is preceeded by an opening marker, } \
+ + %{and the last verse by a closing marker, } \
+ + %{the content of which should remain unwrapped}
+ s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
+ end
+ orig=dob_src.obj
+ trans=(dob_trn=='') \
+ ? ''
+ : dob_trn.obj
+ util=pot_structure_wrap(orig,trans)
+ unwrapped=util.no_line_wrap_block
+ @pot[:body] << unwrapped << br
+ end
+ def code(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
+ mark_o ="code{\n\n"
+ mark_c ="\n\n}code"
+ orig="#{mark_o}#{dob_src.obj}#{mark_c}"
+ trans=(dob_trn=='') \
+ ? ''
+ : "#{mark_o}#{dob_trn.obj}#{mark_c}"
+ util=pot_structure_wrap(orig,trans)
+ unwrapped=util.no_line_wrap_block
+ @pot[:body] << unwrapped << br
+ end
+ def table(dob_src='',notes_s='',dob_trn='',notes_t='') #% used to extract the structure of a document
+ mark_o ="table{\n\n"
+ mark_c ="\n\n}table"
+ orig="#{mark_o}#{dob_src.obj}#{mark_c}"
+ orig=orig.gsub(/#{Mx[:tc_c]}/m,"\n")
+ trans=(dob_trn=='') \
+ ? ''
+ : "#{mark_o}#{dob_trn.obj}#{mark_c}"
+ trans=trans.gsub(/#{Mx[:tc_c]}/m,"\n")
+ util=pot_structure_wrap(orig,trans)
+ unwrapped=util.no_line_wrap_block
+ @pot[:body] << unwrapped << br
+ end
+ def idx_markup(idx)
+ struct=['={' + "\n "]
+ idx.sort.each do |x|
+ x.each_with_index do |y,i0|
+ case y
+ when String
+ unless struct[-1] =~/=\{/
+ struct << ' ;' + "\n "
+ end
+ struct << y
+ if x[i0+1].class == Hash \
+ and x[i0+1][:sub].length > 0
+ struct << ' :' + "\n "
+ end
+ when Hash
+ if y[:plus].to_i > 0
+ struct << '+' + y[:plus].to_s
+ end
+ if y[:sub].length > 0
+ y[:sub].each_with_index do |z,i1|
+ z.each_with_index do |a,i2|
+ if z.length > 0
+ struct << a[0]
+ if a[1][:plus].to_i > 0
+ struct << '+' + a[1][:plus].to_s
+ end
+ if (i1 + 1) < y[:sub].length
+ struct << '|'
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ struct << "\n" + '}'
+ #puts struct.join
+ struct.join
+ end
+ def idx(dob_src='') #% used for book index but broken as original markup lost, already abstracted, fix
+ orig=pot_structure.idx_markup(dob_src.idx) #'={' + dob_src.idx + '}'
+ util=pot_structure_wrap(orig,'')
+ unwrapped=util.no_line_wrap_block
+ if @pot[:body][-1] == "\n"
+ @pot[:body][-1] = unwrapped #<< br
+ @pot[:body] << br
+ else # expect to catch all above, problem if wraps, must =~/^=\{/
+ @pot[:body] << unwrapped << br # places idx in separate object
+ end
+ end
+ self
+ end
+ def compare_structure_src_trn(data_src,data_trn,todo)
+ #@endnotes,@copen,@pot_contents_close=Array.new(3){[]}
+ a_l= data_src.length
+ s,t=0,0
+ 0.upto(a_l-1) do |i|
+ if todo==:compare
+ unless data_src[s] \
+ and data_trn[t]
+ break
+ end
+ if data_src[s].of == :comment \
+ and data_trn[t].of == :comment \
+ and (data_src[s].is == data_trn[t].is)
+ s+=1;t+=1
+ next
+ end
+ if ((data_src[s].is == :comment) \
+ || (data_trn[t].is == :comment)) \
+ and (data_src[s].is != data_trn[t].is)
+ if data_src[s].is == :comment
+ if @md.opt.act[:maintenance][:set]==:on
+ puts "src (comment):\n\t" \
+ + data_src[s].obj
+ end
+ s+=1
+ #next if data_src[s].is == :comment
+ elsif data_trn[t].is == :comment
+ if @md.opt.act[:maintenance][:set]==:on
+ puts "trans (comment):\n\t" \
+ + data_trn[t].obj
+ end
+ t+=1
+ #next if data_trn[t].is == :comment
+ end
+ end
+ if ((defined? data_src[s].ocn) \
+ && (data_src[s].ocn.is_a?(Fixnum))) \
+ and ((defined? data_trn[t].ocn) \
+ && (data_trn[t].ocn.is_a?(Fixnum))) \
+ and (data_src[s].ocn == data_trn[t].ocn)
+ @m_s,@m_t=s,t
+ elsif ((defined? data_src[s].ocn) \
+ && (data_src[s].ocn.is_a?(Fixnum))) \
+ and ((defined? data_trn[t].ocn) \
+ && (data_trn[t].ocn.is_a?(Fixnum))) \
+ and (data_src[s].ocn != data_trn[t].ocn)
+ p '--- OCN ---'
+ p 'mis-match'
+ p data_src[s].ocn if defined? data_src[s].ocn
+ p data_src[s].obj if defined? data_src[s].obj
+ p data_trn[t].ocn if defined? data_trn[t].ocn
+ p data_trn[t].obj if defined? data_trn[t].obj
+ p '---'
+ p 'previous match'
+ p data_src[@m_s].ocn if defined? data_src[@m_s].ocn
+ p data_src[@m_s].obj if defined? data_src[@m_s].obj
+ p data_trn[@m_t].ocn if defined? data_trn[@m_t].ocn
+ p data_trn[@m_t].obj if defined? data_trn[@m_s].obj
+ exit
+ elsif (((defined? data_src[s].ocn) \
+ && (defined? data_trn[t].ocn)) \
+ and data_src[s].ocn.class != data_trn[t].ocn.class)
+ p '--- OCN class ---'
+ p 'mis-match'
+ p data_src[s].ocn if defined? data_src[s].ocn
+ p data_src[s].obj if defined? data_src[s].obj
+ p data_trn[t].ocn if defined? data_trn[t].ocn
+ p data_trn[t].obj if defined? data_trn[t].obj
+ #p '---'
+ #p 'previous match'
+ #p data_src[@m_s].ocn
+ #p data_src[@m_s].obj
+ #p data_trn[@m_t].ocn
+ #p data_trn[@m_t].obj
+ #elsif (defined? data_src[s].ocn != defined? data_trn[t].ocn) \
+ #and (data_src[s].ocn.nil? != data_trn[t].ocn.nil?)
+ # p '--- missing OCN? ---'
+ # p 'mis-match'
+ # p data_src[s].ocn if defined? data_src[s].ocn
+ # p data_src[s].obj
+ # p data_trn[t].ocn if defined? data_trn[t].ocn
+ # p data_trn[t].obj
+ else
+ end
+ end
+ notes_s=''
+ data_src[s],notes_s=markup(data_src[s])
+ data_src[s],nul=pot_data(data_src[s],notes_s)
+ s+=1;t+=1
+ end
+ @pot #watch
+ end
+ def pot_data(dob_src='',notes_s)
+ if dob_src.obj !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/
+ if defined? dob_src.ocn \
+ and dob_src.ocn.to_s =~/\d+/
+ paranum=dob_src.ocn.to_s
+ @p_num=SiSU_Po4aUtils::ParagraphNumber.new(paranum)
+ end
+ case dob_src.is
+ when :heading
+ pot_structure.heading(dob_src,notes_s)
+ when :para
+ pot_structure.para(dob_src,notes_s)
+ when :group
+ pot_structure.group(dob_src,notes_s)
+ when :block
+ pot_structure.block(dob_src,notes_s)
+ when :verse
+ pot_structure.verse(dob_src,notes_s)
+ when :code
+ pot_structure.code(dob_src,notes_s)
+ when :table
+ pot_structure.table(dob_src,notes_s)
+ end
+ if defined? dob_src.idx \
+ and not dob_src.idx.nil? \
+ and not dob_src.idx.empty?
+ pot_structure.idx(dob_src)
+ end
+ #if dob_src ## Clean Prepared Text
+ # dob_src.obj=dob_src.obj.gsub(/<!.+!>/,' ').
+ # gsub(/<:\S+>/,' ') if dob_src ## Clean Prepared Text
+ #end
+ end
+ #[dob_src,dob_trn]
+ end
+ def markup(dob)
+ dob,notes=objects.textface_marks_po4a(dob,:separate)
+ [dob,notes]
+ end
+ def publish(fn,pot)
+ content=[]
+ content << pot[:open]
+ content << pot[:head]
+ content << pot[:metadata]
+ content << pot[:body]
+ content << @@endnotes[:end] if @@endnotes_
+ Output.new(fn,content,@md,@process).po4a
+ @@endnotes={ para: [], end: [] }
+ end
+ end
+ class Output <Source
+ include SiSU_Param
+ include SiSU_Env
+ def initialize(fn,content,md,process=:complete)
+ @fn,@content,@md,@process=fn,content,md,process
+ @file=SiSU_Env::FileOp.new(md,fn)
+ end
+ def po4a #%pot output
+ file_pot=@file.write_file.po4a_sst
+ #file_pot=(@md.opt.f_pth[:lng] == @md.opt.lng_base) \
+ #? @file.write_file.pot
+ #: @file.write_file.po
+ @sisu=[]
+ emptyline=0
+ @content.each do |para| # this is a hack
+ if para.is_a?(Array) \
+ and para.length > 0
+ para.each do |line|
+ if line
+ line=line.gsub(/\s+$/m,'').
+ gsub(/^\A[ ]*\Z/m,'')
+ if line=~/^\A[ ]*\Z/m
+ emptyline+=1
+ else emptyline=0
+ end
+ file_pot.puts line if emptyline < 2 #remove extra line spaces (fix upstream)
+ end
+ end
+ else file_pot.puts para #unix plaintext # /^([*=-]|\.){5}/
+ end
+ end
+ file_pot.close
+ SiSU_Po4aUtils::PotNumber.new.reset
+ #po4a_git
+ end
+ def po4a_git
+ unless @md.opt.act[:maintenance][:set]==:on
+ require_relative 'git' # git.rb
+ git=SiSU_Git::Source.new(@md.opt,@process)
+ unless FileTest.directory?(@file.output_path.pot_git.dir)
+ git.create_file_structure_git
+ end
+ if @md.opt.f_pth[:lng] == @md.opt.lng_base
+ FileUtils::cp(
+ @file.place_file.pot.dir,
+ @file.output_path.pot_git.dir
+ )
+ else # naive, work on -->
+ FileUtils::cp(
+ @file.place_file.po.dir,
+ @file.output_path.po_git.dir
+ ) #unless FileTest.file?(@file.place_file.po_git.dir)
+ end
+ git.read
+ end
+ end
+ end
+ end
+end
+__END__
+REMOVE
+&#033;\|&#035;\|&&#042;\|&#045;\|&#047;\|&#095;\|&#123;\|&#125;\|&#126;\|&#
+
+tables are problematic, difficult to reconstitute instruction, check
+
+metadata, move to top? and work on
+
+footnotes, different types, asterisk, also do you want to have separate
+paragraphs, or breaks within one block?
+
+where no ocn appropriately use ~# or -# or indeed 1~name-
+
+comments in document, what to do about them, not sure they are currently
+retained in dal, could be quite valuable to keep
+
+Translate Shell
+http://www.soimort.org/translate-shell/
+translate.google.com
diff --git a/lib/sisu/develop/src_po4a_sst_ao_sst_set.rb b/lib/sisu/develop/src_po4a_sst_ao_sst_set.rb
new file mode 100644
index 00000000..46630866
--- /dev/null
+++ b/lib/sisu/develop/src_po4a_sst_ao_sst_set.rb
@@ -0,0 +1,284 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** po4a
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/src_po4a_sst_ao_sst_set.rb;hb=HEAD>
+
+=end
+module SiSU_Po4aUtils
+ class Wrap
+ def initialize(md,orig='',trans='',n_char_max=76,n_indent=0,n_hang=nil)
+ @md,@orig,@trans,@n_char_max,@n_indent=
+ md, orig, trans, n_char_max, n_indent
+ @n_char_max_extend = n_char_max
+ @br="\n"
+ @n_hang=n_hang ? n_hang : @n_indent
+ @po4a_identify_type='type: SiSU doc'
+ #@po4a_identify_type='type: Plain text'
+ end
+ def line_wrap
+ space=' '
+ spaces_indent,spaces_hang=
+ "#{@br}#{space*@n_indent}",space*@n_hang
+ pot,i=[],0
+ pot_array=(@trans.empty?) ? [@orig] : [@orig,@trans]
+ pot_array.each do |pa|
+ line=0
+ out=[]
+ out[line]=''
+ @oldword='' #REMOVE @oldword
+ pa=pa.gsub(/<br>/,' <br> ').
+ gsub(/#{Mx[:br_nl]}/,"\n\n")
+ words=pa.scan(/\n\n|\\\\\\|<br>|\S+/m)
+ while words != ''
+ word=words.shift
+ if not word
+ out[line] unless out[line].empty? #check
+ break
+ elsif word =~/\n\n/
+ word="\n"
+ @n_char_max_extend = @n_char_max + out[line].length
+ line=line
+ elsif (out[line].length + word.length) > (@n_char_max_extend - @n_indent) \
+ and out[line] =~/\S+/
+ @n_char_max_extend = @n_char_max
+ out[line].squeeze!(' ')
+ line += 1
+ end
+ if word
+ out[line]=if out[line] \
+ and out[line] !~/\S+$/m
+ "#{out[line]}#{word}"
+ elsif out[line] \
+ and out[line] =~/\S+/
+ "#{out[line]} #{word}"
+ else "#{word.strip}"
+ end
+ end
+ @oldword=word if word =~/\S+/
+ end
+ x=out.join(spaces_indent).gsub(/\A\n+/m,'').insert(0,spaces_hang)
+ z=[]
+ x.split(/\n/).each do |y|
+ z << y
+ end
+ pot[i]=z.join("\n")
+ i +=1
+ pot
+ end
+ trans=(pot.length == 2) ? pot[1] : ''
+ po_str=<<WOK
+#{pot[0]}
+WOK
+#{trans}
+ po_str
+ end
+ def no_line_wrap_block
+ pot,i=[],0
+ pot_array=(@trans.empty?) ? [@orig] : [@orig,@trans]
+ pot_array.each do |pa|
+ z=[]
+ pa.split(/\n\n/).each do |y|
+ z << y if not y.empty?
+ end
+ pot[i]=z.join("\n")
+ i +=1
+ pot
+ end
+ trans=(pot.length == 2) ? pot[1] : ''
+ po_str=<<WOK
+#{pot[0]}
+WOK
+#{trans}
+ po_str
+ end
+ def line_wrap_indent1
+ @n_indent,@n_hang=2,2
+ line_wrap
+ end
+ def line_wrap_endnote
+ @n_indent,@n_hang=4,2
+ line_wrap
+ end
+ def array_wrap
+ if @orig.is_a?(Array)
+ @arr=[]
+ @orig.each do |line|
+ @arr << SiSU_TextUtils::Wrap.new(line,@n_char_max,@n_indent,@n_hang).line_wrap
+ end
+ end
+ @arr
+ end
+ end
+ class HeaderScan
+ def initialize(md,para)
+ @md,@p=md,para
+ end
+ def extract(tag,tag_content,type,attrib)
+ if dc_tag \
+ and dc_content
+ [dc_tag,dc_content,{dc_tag=>dc_content}]
+ else nil
+ end
+ end
+ def header(tag,tag_content,type='',attrib='') #this will break stuff and must be tested thoroughly 20060825
+ @tag,@tag_content,@type,@attrib=tag,tag_content,type,attrib
+ def label #element
+ @tag
+ end
+ def type
+ @type
+ end
+ def text
+ @tag_content
+ end
+ def info #element text
+ @tag_content
+ end
+ def attribute
+ @attrib
+ end
+ def element
+ @tag
+ end
+ def attrib
+ @attrib
+ end
+ def el
+ @tag
+ end
+ self
+ end
+ def start_is_match
+ case @p
+ when /^#{Mx[:meta_o]}(title)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,@md.title.full,'meta','dc') #dc 1
+ when /^#{Mx[:meta_o]}(creator|author)#{Mx[:meta_c]}\s*(.+?)$/ then header('creator',$2,'meta','dc') #dc 2
+ when /^#{Mx[:meta_o]}(subject)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 3
+ when /^#{Mx[:meta_o]}(description)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 4
+ when /^#{Mx[:meta_o]}(publisher)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 5
+ when /^#{Mx[:meta_o]}(contributor)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 6
+ when /^#{Mx[:meta_o]}(date)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 7
+ when /^#{Mx[:meta_o]}(date\.created)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(date\.issued)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(date\.available)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(date\.valid)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(date\.modified)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(type)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 8
+ when /^#{Mx[:meta_o]}(format)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 9
+ when /^#{Mx[:meta_o]}(identifier)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 10
+ when /^#{Mx[:meta_o]}(source)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 11
+ when /^#{Mx[:meta_o]}(language)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 12
+ when /^#{Mx[:meta_o]}(relation)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 13
+ when /^#{Mx[:meta_o]}(coverage)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 14
+ when /^#{Mx[:meta_o]}(rights)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','dc') #dc 15
+ when /^#{Mx[:meta_o]}(keywords)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(copyright)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(translator|translated_by)#{Mx[:meta_c]}\s*(.+?)$/ then header('translator',$2)
+ when /^#{Mx[:meta_o]}(illustrator|illustrated_by)#{Mx[:meta_c]}\s*(.+?)$/ then header('illustrator',$2)
+ when /^#{Mx[:meta_o]}(prepared_by)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(digitized_by)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(comments?)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(abstract)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(tags?)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(catalogue)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(class(?:ify)?_loc)#{Mx[:meta_c]}\s*(.+?)$/ then header('classify_loc',$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(class(?:ify)?_dewey)#{Mx[:meta_c]}\s*(.+?)$/ then header('classify_dewey',$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(class(?:ify)?_pg)#{Mx[:meta_c]}\s*(.+?)$/ then header('classify_pg',$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(class(?:ify)?_isbn)#{Mx[:meta_c]}\s*(.+?)$/ then header('classify_isbn',$2,'meta','extra')
+ when /^#{Mx[:meta_o]}(toc|structure)#{Mx[:meta_c]}\s*(.+?)$/ then header('structure',$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(level|page|markup)#{Mx[:meta_c]}\s*(.+?)$/ then header('markup',$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(bold)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(italics|itali[sz]e)#{Mx[:meta_c]}\s*(.+?)$/ then header('italicize',$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(vocabulary|wordlist)#{Mx[:meta_c]}\s*(.+?)$/ then header('vocabulary',$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(css|stylesheet)#{Mx[:meta_c]}\s*(.+?)$/ then header('css',$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(links)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(prefix)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'process','instruct') #add a & b
+ when /^#{Mx[:meta_o]}(suffix)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(information)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(contact)#{Mx[:meta_c]}\s*(.+?)$/ then header($1,$2,'process','instruct')
+ when /^#{Mx[:meta_o]}(rcs|cvs)#{Mx[:meta_c]}\s*(.+?)$/ then header('version',$2,'process','instruct')
+ else nil
+ end
+ end
+ def dublin
+ (@p =~/^#{Mx[:meta_o]}\S+?#{Mx[:meta_c]}/) \
+ ? start_is_match
+ : nil
+ end
+ def meta
+ (@p =~/^#{Mx[:meta_o]}\S+?#{Mx[:meta_c]}/) \
+ ? start_is_match
+ : nil
+ end
+ end
+ class ParagraphNumber
+ def initialize(paranum)
+ @paranum=/(\d+)/m.match(paranum)[1]
+ end
+ def display
+ @paranum.gsub(/(\d+)/,'#\1')
+ end
+ end
+ class PotNumber
+ @@n=0
+ def initialize
+ @@n +=2
+ end
+ def num
+ @@n
+ end
+ def reset
+ @@n=0
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/develop/src_po4a_sstm.rb b/lib/sisu/develop/src_po4a_sstm.rb
new file mode 100644
index 00000000..74c5ac28
--- /dev/null
+++ b/lib/sisu/develop/src_po4a_sstm.rb
@@ -0,0 +1,135 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** share sisu source markup file, copy it to output directory!
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/src_po4a_sstm.rb;hb=HEAD>
+
+=end
+module SiSU_Markup
+ require_relative 'src_shared' # src_shared.rb
+ include SiSU_Source
+ require_relative 'src_po4a_share' # src_po4a_share.rb
+ require_relative 'se' # se.rb
+ include SiSU_Env
+ class Source_Po4a < SiSU_Source::SiSUpodSource
+ def initialize(opt,build=nil,place=nil)
+ super(opt,build,place)
+ @opt=opt
+ md=SiSU_Param::Parameters.new(opt).get
+ @file=SiSU_Env::FileOp.new(md,opt.fno)
+ end
+ def dir_mk(dir)
+ unless FileTest.directory?(dir)
+ FileUtils::mkdir_p(dir)
+ end
+ end
+ def make_paths
+ dir_mk(@file.output_path.pot.dir)
+ dir_mk(@file.output_path.po.dir)
+ end
+ def language
+ def source_language_selected_str
+ @opt.act[:po4a_lang][:src] \
+ ? @opt.act[:po4a_lang][:src]
+ : 'en'
+ end
+ self
+ end
+ def read
+ unless @opt.act[:quiet][:set]==:on
+ (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on) \
+ ? SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'Share document markup text source',
+ @opt.fns
+ ).cyan_hi_blue
+ : SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'Share document markup text source',
+ @opt.fns
+ ).cyan_title_hi
+ end
+ make_paths
+ if FileTest.directory?(@path_pod[:fnb])
+ FileUtils::mkdir_p(@file.output_path.src.dir) \
+ unless FileTest.directory?(@file.output_path.src.dir)
+ v=(@opt.act[:maintenance][:set]==:on) \
+ ? 'v' : ''
+ system(%{
+ #rsync -a#{v} #{@path_pod[:fnb]}/sisupod/doc/* #{@file.output_path.po4a.dir}
+ rsync -a#{v} #{@path_pod[:fnb]}/sisupod/doc/#{language.source_language_selected_str}* #{@file.output_path.po4a.dir}
+ chbk=`pwd`
+ cd #{@file.output_path.sisupod.dir}
+ for I in `find -type d` ; do chmod 755 $I ; done
+ for I in `find -type f` ; do chmod 644 $I ; done
+ cd ${chbk}
+ })
+ md=SiSU_Param::Parameters.new(@opt).get
+ file=SiSU_Env::FileOp.new(md)
+ SiSU_Po4a_Project::Po4aCfg.new(@opt,file).song
+ SiSU_Po4a_Project::Po4aProject.new(@opt,file).song
+ else
+ if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Screen::Ansi.new(
+ '',
+ "#{@opt.fno} not available"
+ ).blue_tab
+ end
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/src_shared.rb b/lib/sisu/develop/src_shared.rb
index b047fe08..150ce84e 100644
--- a/lib/sisu/v5/src_shared.rb
+++ b/lib/sisu/develop/src_shared.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** create sisupod filetype and copy it to output directory!
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/src_shared.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: create sisupod filetype and copy it to output directory!
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/src_shared.rb;hb=HEAD>
=end
module SiSU_Source
@@ -62,11 +59,13 @@ module SiSU_Source
class SiSUpodSource
require_relative 'se' # se.rb
require_relative 'se_hub_particulars' # se_hub_particulars.rb
+ require_relative 'utils_composite' # utils_composite.rb
+ include SiSU_Composite_Doc_Utils # composite doc, .ssm, extract all related insert files, array of filenames test
def initialize(opt,build=nil,place=nil)
@opt=opt
@date=SiSU_Env::InfoDate.new.dt
@env=SiSU_Env::InfoEnv.new(opt.fns)
- @ver=SiSU_Env::InfoVersion.instance.get_version
+ #@ver=SiSU_Env::InfoVersion.instance.get_version
@v=(@opt.act[:verbose_plus][:set]==:on \
|| @opt.act[:maintenance][:set]==:on) \
? 'v' : ''
@@ -77,7 +76,6 @@ module SiSU_Source
processing_sisupod.make
path_pod=processing_sisupod.paths[:sisupod]
path_pod_fnb=processing_sisupod.paths[:fnb]
- @doc_import_list=[]
FileUtils::mkdir_p(path_pod) unless FileTest.directory?(path_pod)
@path_pod={
fnb: path_pod_fnb,
@@ -105,8 +103,7 @@ module SiSU_Source
end
unless @opt.fns.empty?
directories
- file_array=IO.readlines(@opt.fno,'')
- doc_import_list=pod_source_build(file_array) #this needs to be built in case of multi-lingual for all of them, before single pass tar
+ doc_import_list=composite_and_imported_filenames_array(@opt.fno)
doc_import_list=[@opt.fno, doc_import_list].flatten
image_extraction(doc_import_list)
language_versions
@@ -168,25 +165,37 @@ module SiSU_Source
images=images.uniq
images.each do |i|
if FileTest.file?("#{images_pwd}/#{i}")
- FileUtils::cp("#{images_pwd}/#{i}","#{@path_pod[:image]}/#{i}")
+ FileUtils::cp(
+ "#{images_pwd}/#{i}",
+ "#{@path_pod[:image]}/#{i}"
+ )
else
STDERR.puts \
- %{\t*WARN* did not find image - "#{images_pwd}/#{i}" [#{__FILE__}:#{__LINE__}]}
+ %{\t*WARN* did not find image - } \
+ + %{"#{images_pwd}/#{i}" } \
+ + %{[#{__FILE__}:#{__LINE__}]}
end
end
else
STDERR.puts \
- %{\t*WARN* did not find - #{images_pwd} #{@path_pod[:image]} [#{__FILE__}:#{__LINE__}]}
+ %{\t*WARN* did not find - } \
+ + %{#{images_pwd} #{@path_pod[:image]} } \
+ + %{[#{__FILE__}:#{__LINE__}]}
end
end
if doc_import_list.length > 0 \
and @opt.fno =~/\.ssm$/
doc_import_list.each do |f|
if FileTest.file?("#{@opt.base_path}#{doc_import_dir}/#{f}")
- FileUtils::cp("#{@opt.base_path}#{doc_import_dir}/#{f}","#{@path_pod[:doc]}/#{f}")
+ FileUtils::cp(
+ "#{@opt.base_path}#{doc_import_dir}/#{f}",
+ "#{@path_pod[:doc]}/#{f}"
+ )
else
STDERR.puts \
- %{\t*WARN* did not find image - "#{@opt.base_path}#{doc_import_dir}/#{f}" [#{__FILE__}:#{__LINE__}]}
+ %{\t*WARN* did not find image - } \
+ + %{"#{@opt.base_path}#{doc_import_dir}/#{f}" } \
+ + %{[#{__FILE__}:#{__LINE__}]}
end
end
end
@@ -197,17 +206,22 @@ module SiSU_Source
if x[:f] \
and x[:f].length > 0 #store multiple document language versions, sisupod
x[:f].each do |f|
- FileUtils::mkdir_p(@path_pod[:doc]) unless FileTest.directory?(@path_pod[:doc])
+ FileUtils::mkdir_p(@path_pod[:doc]) \
+ unless FileTest.directory?(@path_pod[:doc])
if f[:f] =~/\~(\S{2,3})\.ss[tm]$/
lng_f=$1
if @opt.lng == lng_f
if @opt.fno =~/\.ssm$/
if FileTest.file?("#{@opt.base_path}#{doc_import_dir}/#{f[:f]}")
- FileUtils::cp("#{@opt.base_path}#{doc_import_dir}/#{f[:f]}",
- "#{@path_pod[:doc]}/#{f[:n]}")
+ FileUtils::cp(
+ "#{@opt.base_path}#{doc_import_dir}/#{f[:f]}",
+ "#{@path_pod[:doc]}/#{f[:n]}"
+ )
else
STDERR.puts \
- %{\t*WARN* did not find - "#{@opt.base_path}#{doc_import_dir}/#{f[:f]}" [#{__FILE__}:#{__LINE__}]}
+ %{\t*WARN* did not find - } \
+ + %{"#{@opt.base_path}#{doc_import_dir}/#{f[:f]}" } \
+ + %{[#{__FILE__}:#{__LINE__}]}
end
else
if FileTest.file?("#{@opt.base_path}/#{f[:f]}")
@@ -221,23 +235,31 @@ module SiSU_Source
else :no
end
if cpy == :yes
- FileUtils::cp("#{@opt.base_path}/#{f[:f]}",
- "#{@path_pod[:doc]}/#{f[:n]}")
+ FileUtils::cp(
+ "#{@opt.base_path}/#{f[:f]}",
+ "#{@path_pod[:doc]}/#{f[:n]}"
+ )
end
else
STDERR.puts \
- %{\t*WARN* did not find - "#{@opt.base_path}/#{f[:f]}" [#{__FILE__}:#{__LINE__}]}
+ %{\t*WARN* did not find - } \
+ + %{"#{@opt.base_path}/#{f[:f]}" } \
+ + %{[#{__FILE__}:#{__LINE__}]}
end
end
end
else
if @opt.fno =~/\.ssm$/
if FileTest.file?("#{@opt.base_path}#{doc_import_dir}/#{f[:f]}")
- FileUtils::cp_r("#{@opt.base_path}#{doc_import_dir}/#{f[:f]}",
- "#{@path_pod[:doc]}/#{f[:n]}")
+ FileUtils::cp_r(
+ "#{@opt.base_path}#{doc_import_dir}/#{f[:f]}",
+ "#{@path_pod[:doc]}/#{f[:n]}"
+ )
else
STDERR.puts \
- %{\t*WARN* did not find - "#{@opt.base_path}#{doc_import_dir}/#{f[:f]}" [#{__FILE__}:#{__LINE__}]}
+ %{\t*WARN* did not find - } \
+ + %{"#{@opt.base_path}#{doc_import_dir}/#{f[:f]}" } \
+ + %{[#{__FILE__}:#{__LINE__}]}
end
else
if FileTest.file?("#{@opt.base_path}#{doc_import_dir}/#{f[:f]}")
@@ -251,12 +273,16 @@ module SiSU_Source
else :no
end
if cpy == :yes
- FileUtils::cp("#{@opt.base_path}#{doc_import_dir}/#{f[:f]}",
- "#{@path_pod[:doc]}/#{f[:n]}")
+ FileUtils::cp(
+ "#{@opt.base_path}#{doc_import_dir}/#{f[:f]}",
+ "#{@path_pod[:doc]}/#{f[:n]}"
+ )
end
else
STDERR.puts \
- %{\t*WARN* did not find - "#{@opt.base_path}#{doc_import_dir}/#{f[:f]}" [#{__FILE__}:#{__LINE__}]}
+ %{\t*WARN* did not find - } \
+ + %{"#{@opt.base_path}#{doc_import_dir}/#{f[:f]}" } \
+ + %{[#{__FILE__}:#{__LINE__}]}
end
end
end
@@ -266,35 +292,6 @@ module SiSU_Source
def directories
SiSU_Env::InfoEnv.new.sisupod_v4(@opt)
end
- def ssm_doc_import_list(f)
- if @opt.fno =~/\.ss[mi]$/
- doc_import_list=[]
- if f =~@rgx_doc_import
- doc_import_list << f.scan(@rgx_doc_import)
- end
- doc_import_list.flatten.each do |i|
- if i =~/.ssi/
- file_array=IO.readlines(i,'')
- pod_source_build(file_array)
- end
- end
- end
- doc_import_list.uniq.flatten
- end
- def pod_source_build(file_array)
- @pwd=Dir.pwd
- @rgx_doc_import=/^<<\s*(\S+?\.ss[ti])/
- doc_import_list=[]
- file_array.each do |f| #% work area
- if f !~/^%+\s/
- if @opt.fno =~/\.ss[mi]$/
- @doc_import_list << ssm_doc_import_list(f)
- doc_import_list=@doc_import_list.flatten.uniq
- end
- end
- end
- doc_import_list
- end
end
end
__END__
diff --git a/lib/sisu/v6/src_sisupod_make.rb b/lib/sisu/develop/src_sisupod_make.rb
index a8dee5c8..0d3194ba 100644
--- a/lib/sisu/v6/src_sisupod_make.rb
+++ b/lib/sisu/develop/src_sisupod_make.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** create sisupod filetype and copy it to output directory!
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/src_sisupod_make.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: create sisupod filetype and copy it to output directory!
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/src_sisupod_make.rb;hb=HEAD>
=end
module SiSU_Doc
diff --git a/lib/sisu/develop/src_sisupod_sstm.rb b/lib/sisu/develop/src_sisupod_sstm.rb
new file mode 100644
index 00000000..e1ffd8cb
--- /dev/null
+++ b/lib/sisu/develop/src_sisupod_sstm.rb
@@ -0,0 +1,109 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** share sisu source markup file, copy it to output directory!
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/src_sisupod_sstm.rb;hb=HEAD>
+
+=end
+module SiSU_Markup
+ require_relative 'src_shared' # src_shared.rb
+ include SiSU_Source
+ require_relative 'se' # se.rb
+ include SiSU_Env
+ class Source_Sisupod < SiSU_Source::SiSUpodSource
+ def initialize(opt,build=nil,place=nil)
+ super(opt,build,place)
+ @opt=opt
+ end
+ def read
+ unless @opt.act[:quiet][:set]==:on
+ (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on) \
+ ? SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'Share document markup text source',
+ @opt.fns
+ ).cyan_hi_blue
+ : SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'Share document markup text source',
+ @opt.fns
+ ).cyan_title_hi
+ end
+ if FileTest.directory?(@path_pod[:fnb])
+ FileUtils::mkdir_p(@file.output_path.src.dir) \
+ unless FileTest.directory?(@file.output_path.src.dir)
+ v=(@opt.act[:maintenance][:set]==:on) \
+ ? 'v' : ''
+ system(%{
+ rsync -a#{v} #{@path_pod[:fnb]} #{@file.output_path.sisupod.dir}
+ chbk=`pwd`
+ cd #{@file.output_path.sisupod.dir}
+ for I in `find -type d` ; do chmod 755 $I ; done
+ for I in `find -type f` ; do chmod 644 $I ; done
+ cd ${chbk}
+ })
+ else
+ if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Screen::Ansi.new(
+ '',
+ "#{@opt.fno} not available"
+ ).blue_tab
+ end
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/sst_convert_markup.rb b/lib/sisu/develop/sst_convert_markup.rb
index 70615d1c..8a63636f 100644
--- a/lib/sisu/v5/sst_convert_markup.rb
+++ b/lib/sisu/develop/sst_convert_markup.rb
@@ -1,62 +1,59 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** A conversion script for canned substitutions, a fairly generic
+ simple tool that can be used to store other canned conversions, used here for
+ altering SiSU markup
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/sst_convert_markup.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: A conversion script for canned substitutions, a fairly generic
- simple tool that can be used to store other canned conversions, used here for
- altering SiSU markup
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/sst_convert_markup.rb;hb=HEAD>
=end
module SiSU_Modify
@@ -64,11 +61,10 @@ module SiSU_Modify
require_relative 'sst_from_xml' # sst_from_xml.rb
require_relative 'utils_response' # utils_response.rb
class ConvertMarkup
+ include SiSU_Response
def initialize(opt)
@opt=opt
@description='This is a script that contains canned text conversions for reuse'
- @response=SiSU_Response::Response.new
- @ask=SiSU_Response::Response.new
@warn='WARNING, PROCEED AT YOUR OWN RISK, will make file changes.'
end
def current_match_and_replace
@@ -78,7 +74,7 @@ module SiSU_Modify
response=''
unless @opt.cmd=~/QQ/ \
or @opt.act[:quiet][:set]==:on
- response=@ask.response?(%{#{ text}\nProceed? })
+ response=response?(%{#{ text}\nProceed? })
end
end
def help
diff --git a/lib/sisu/v5/sst_do_inline_footnotes.rb b/lib/sisu/develop/sst_do_inline_footnotes.rb
index fab94edf..42e70b05 100644
--- a/lib/sisu/v5/sst_do_inline_footnotes.rb
+++ b/lib/sisu/develop/sst_do_inline_footnotes.rb
@@ -1,61 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** preprocessing, convert bi-footnotemarker-footnote to inline
+ footnotes, invoked using: sisu --to-footnotes filename.sst
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/set_do_inline_footnotes.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: preprocessing, convert bi-footnotemarker-footnote to inline
- footnotes, invoked using: sisu --to-footnotes filename.sst
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/set_do_inline_footnotes.rb;hb=HEAD>
=end
module SiSU_ConvertFootnotes
diff --git a/lib/sisu/v6/sst_from_xml.rb b/lib/sisu/develop/sst_from_xml.rb
index d42d5e6a..6e3f5f47 100644
--- a/lib/sisu/v6/sst_from_xml.rb
+++ b/lib/sisu/develop/sst_from_xml.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** Conversion script from kdissert .kdi to sisu markup .ssm (master document)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/sst_from_xml.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: Conversion script from kdissert .kdi to sisu markup .ssm
- (master document)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/sst_from_xml.rb;hb=HEAD>
=end
module SiSU_sstFromXML
@@ -120,7 +116,7 @@ module SiSU_sstFromXML
out_file=File.new(@output_file_name,'w')
head=@doc.root.get_elements('//head/header')
body=@doc.root.get_elements('//object/text')
- out_file.puts "% SiSU text #{@ver[:version]} (generated from a SiSU XML markup representation)\n\n"
+ out_file.puts "% SiSU text #{@ver.version} (generated from a SiSU XML markup representation)\n\n"
head.each do |x|
if x.name=='header'
head=markup_head(x.to_s)
diff --git a/lib/sisu/v5/sst_identify_markup.rb b/lib/sisu/develop/sst_identify_markup.rb
index e7cae892..e8cc954f 100644
--- a/lib/sisu/v5/sst_identify_markup.rb
+++ b/lib/sisu/develop/sst_identify_markup.rb
@@ -1,62 +1,59 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** A conversion script for canned substitutions, a fairly generic
+ simple tool that can be used to store other canned conversions, used here for
+ altering SiSU markup
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/sst_identify_markup.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: A conversion script for canned substitutions, a fairly generic
- simple tool that can be used to store other canned conversions, used here for
- altering SiSU markup
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/sst_identify_markup.rb;hb=HEAD>
=end
module SiSU_Markup
diff --git a/lib/sisu/v5/sst_to_s_xml_sax.rb b/lib/sisu/develop/sst_to_s_xml_sax.rb
index 80d6269b..8b1386b2 100644
--- a/lib/sisu/v5/sst_to_s_xml_sax.rb
+++ b/lib/sisu/develop/sst_to_s_xml_sax.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** simple xml representation (sax style)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/sst_to_s_xml_sax.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: simple xml representation (sax style)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/sst_to_s_xml_sax.rb;hb=HEAD>
=end
module SiSU_SimpleXML_ModelSax
@@ -72,7 +69,7 @@ module SiSU_SimpleXML_ModelSax
include SiSU_XML_Format
require_relative 'rexml' # rexml.rb
include SiSU_Rexml
- @@alt_id_count,@@tablehead,@@number_of_cols=0,0,0
+ @@alt_id_count=0
@@tablefoot=''
class Convert
@@fns=nil
diff --git a/lib/sisu/v5/termsheet.rb b/lib/sisu/develop/termsheet.rb
index 9349816a..08bba53a 100644
--- a/lib/sisu/v5/termsheet.rb
+++ b/lib/sisu/develop/termsheet.rb
@@ -1,62 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** specialised pre-processing wrapper
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/termsheet.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: SiSU information Structuring Universe, specialised pre-processing wrapper
- ** NOTE wrapper makes little sense without additional components, additional
- sample files must be provided - (saved till later as may confuse)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/termsheet.rb;hb=HEAD>
=end
require_relative 'se' # se.rb
@@ -151,6 +146,9 @@ report_html.join("\n")
summary_file << "#{report_thlnk}"
summary_html << "#{report_html}"
__END__
+** NOTE wrapper makes little sense without additional components, additional
+ sample files must be provided - (saved till later as may confuse)
+*** bits
sisu -t x_bank.and.*
e.g. sisu -t x_bank.and.*.termsheet.rb
e.g. sisu_termsheet.rb -t x_bank.and.c*.termsheet.rb
diff --git a/lib/sisu/v5/texinfo.rb b/lib/sisu/develop/texinfo.rb
index 92b7241c..807173e0 100644
--- a/lib/sisu/v5/texinfo.rb
+++ b/lib/sisu/develop/texinfo.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** texinfo processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/texinfo.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: texinfo processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/texinfo.rb;hb=HEAD>
=end
module SiSU_TexInfo
diff --git a/lib/sisu/v5/texinfo_format.rb b/lib/sisu/develop/texinfo_format.rb
index 46a5ed69..18276d7a 100644
--- a/lib/sisu/v5/texinfo_format.rb
+++ b/lib/sisu/develop/texinfo_format.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** texinfo formatting template
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/texinfo_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: texinfo formatting template
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/texinfo_format.rb;hb=HEAD>
=end
module SiSU_TexInfoFormat
@@ -93,7 +90,7 @@ module SiSU_TexInfoFormat
author=@md.author if @md.author
author ||=''
author=author.gsub(/[\*]/,'') #if author
- SiSU_Env::InfoVersion.instance.get_version
+ #SiSU_Env::InfoVersion.instance.get_version
head =<<WOK
\\input texinfo @c -*-texinfo-*-
@comment %**start of header
diff --git a/lib/sisu/v5/texpdf.rb b/lib/sisu/develop/texpdf.rb
index e61595e0..451f9ff8 100644
--- a/lib/sisu/v5/texpdf.rb
+++ b/lib/sisu/develop/texpdf.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** LaTeX generation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/texpdf.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: LaTeX generation
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/texpdf.rb;hb=HEAD>
=end
module SiSU_TeX
diff --git a/lib/sisu/v5/texpdf_format.rb b/lib/sisu/develop/texpdf_format.rb
index 96b5dc91..85a2ceeb 100644
--- a/lib/sisu/v5/texpdf_format.rb
+++ b/lib/sisu/develop/texpdf_format.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** LaTeX formatting template, unicode utf-8 version, used for pdf
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/texpdf_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: LaTeX formatting template, unicode utf-8 version, used for pdf
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/texpdf_format.rb;hb=HEAD>
=end
module SiSU_TeX_Pdf
@@ -893,7 +890,7 @@ module SiSU_TeX_Pdf
end
end
def tex_head_info
- generator="Generated by: #{@md.sisu_version[:project]} #{@md.sisu_version[:version]} of #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" if @md.sisu_version[:version]
+ generator="Generated by: #{@md.project_details.project} #{@md.project_details.version} of #{@md.project_details.date_stamp} (#{@md.project_details.date})" if @md.project_details.version
lastdone="Last Generated on: #{Time.now}"
rubyv="Ruby version: #{@md.ruby_version}"
<<-WOK
@@ -1563,7 +1560,7 @@ module SiSU_TeX_Pdf
<<-WOK
\\\\ ~
{\\begin{footnotesize}#{base_prog_txt}
-\\\\ Generated by \\href{http://www.jus.uio.no/sisu}{SiSU} \\begin{tiny}[ #{v[:project]} #{v[:version]} of #{v[:date_stamp]} ]\\end{tiny} \\href{http://www.jus.uio.no/sisu}{www.jus.uio.no/sisu}
+\\\\ Generated by \\href{http://www.jus.uio.no/sisu}{SiSU} \\begin{tiny}[ #{v.project} #{v.version} of #{v.date_stamp} ]\\end{tiny} \\href{http://www.jus.uio.no/sisu}{www.jus.uio.no/sisu}
\\\\ Copyright #{@copymark} 1997, current #{@date.year_static} Ralph Amissah, All Rights Reserved.
\\\\ SiSU is software for document structuring, publishing and search (with object citation numbering), \\href{http://www.sisudoc.org}{www.sisudoc.org}
\\\\ SiSU is released under \\href{http://www.fsf.org/licenses/gpl.html}{GPL 3 } or later, #{url_brace.tex_open}\\href{http://www.fsf.org/licenses/gpl.html}{http://www.fsf.org/licenses/gpl.html}#{url_brace.tex_close}.
@@ -1587,7 +1584,7 @@ module SiSU_TeX_Pdf
Document version information: \\\\
\\emph{sourcefile} \\uline{#{@md.fnstex}}; \\emph{version} \\uline{#{@md.sc_number}}; \\emph{date} \\uline{#{@md.sc_date}}; \\emph{time} \\uline{#{@md.sc_time}} \\\\
Generated by \\href{http://www.jus.uio.no/sisu}{SiSU www.jus.uio.no/sisu }\\- version information: \\\\
-\\uline{ #{v[:project]} #{v[:version]} of #{v[:date_stamp]}}
+\\uline{ #{v.project} #{v.version} of #{v.date_stamp}}
\\end{footnotesize}}&
WOK
end
@@ -1599,7 +1596,7 @@ Generated by \\href{http://www.jus.uio.no/sisu}{SiSU www.jus.uio.no/sisu }\\- ve
Document information: \\\\
\\emph{sourcefile} \\uline{#{@md.fnstex}} \\\\
Generated by \\href{http://www.jus.uio.no/sisu}{SiSU www.jus.uio.no/sisu } \\\\ version information: \\
-\\uline{ #{v[:project]} #{v[:version]} of #{v[:date_stamp]}}
+\\uline{ #{v.project} #{v.version} of #{v.date_stamp}}
\\end{small}}&
WOK
diff --git a/lib/sisu/v6/texpdf_parts.rb b/lib/sisu/develop/texpdf_parts.rb
index dbd669ff..6ede6454 100644
--- a/lib/sisu/v6/texpdf_parts.rb
+++ b/lib/sisu/develop/texpdf_parts.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xhtml_parts.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xhtml_parts.rb;hb=HEAD>
=end
module SiSU_Parts_TeXpdf
diff --git a/lib/sisu/v5/txt_asciidoc.rb b/lib/sisu/develop/txt_asciidoc.rb
index 3545fcb0..14bb3f09 100644
--- a/lib/sisu/v5/txt_asciidoc.rb
+++ b/lib/sisu/develop/txt_asciidoc.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** plaintext (smarttext) generation, asciidoc
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/plaintext_asciidoc.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: plaintext (smarttext) generation, asciidoc
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt_asciidoc.rb;hb=HEAD>
=end
module SiSU_Txt_AsciiDoc
@@ -63,11 +60,15 @@ module SiSU_Txt_AsciiDoc
include SiSU_Env
require_relative 'shared_metadata' # shared_metadata.rb
require_relative 'generic_parts' # generic_parts.rb
+ require_relative 'txt_read' # txt_read.rb
require_relative 'txt_shared' # txt_shared.rb
+ require_relative 'txt_asciidoc_decorate' # txt_decorate.rb
+ require_relative 'txt_output' # txt_output.rb
include SiSU_Param
- @@alt_id_count,@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0,0
+ @@alt_id_count,@@alt_id_count=0,0
@@tablefoot=''
class Source
+ include SiSU_Txt_Read
def initialize(opt)
@opt=opt
unless @opt.fns =~/(.+?)\.(?:-|ssm\.)?sst$/
@@ -77,46 +78,13 @@ module SiSU_Txt_AsciiDoc
def read
begin
md=SiSU_Param::Parameters.new(@opt).get
- env=SiSU_Env::InfoEnv.new(@opt.fns)
- unless @opt.act[:quiet][:set]==:on
- tool=(@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? "#{env.program.text_editor} #{md.file.output_path.asciidoc.dir}/#{md.file.base_filename.asciidoc}"
- : "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}"
- (@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'AsciiDoc (plaintext utf-8)',
- tool
- ).green_hi_blue
- : SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'AsciiDoc (plaintext utf-8)',
- tool
- ).green_title_hi
- if (@opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on)
- SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- @opt.fns,
- "#{md.file.output_path.asciidoc.dir}/#{md.file.base_filename.asciidoc}"
- ).flow
- end
- end
- ao_array=SiSU_AO::Source.new(@opt).get # ao file drawn here
- wrap_width=if defined? md.make.plaintext_wrap \
- and md.make.plaintext_wrap
- md.make.plaintext_wrap
- elsif defined? env.plaintext_wrap \
- and env.plaintext_wrap
- env.plaintext_wrap
- else 78
- end
- #wrap_width=(defined? md.make.plaintext_wrap) ? md.make.plaintext_wrap : 78
- SiSU_Txt_AsciiDoc::Source::Scroll.new(md,ao_array,wrap_width).songsheet
+ specific={
+ description: 'AsciiDoc (plaintext utf-8)',
+ output_path: md.file.output_path.asciidoc.dir,
+ output_file: md.file.base_filename.asciidoc,
+ }
+ read_generic(@opt,specific)
+ SiSU_Txt_AsciiDoc::Source::Scroll.new(md,@ao_array,@wrap_width).songsheet
rescue
SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
@@ -128,6 +96,7 @@ module SiSU_Txt_AsciiDoc
class Scroll <Source
include SiSU_Parts_Generic
include SiSU_TextUtils
+ include SiSU_Decorate_Txt_AsciiDoc
@@endnotes={ para: [], end: [] }
def initialize(md,data,wrap_width)
@md,@data,@wrap_width=md,data,wrap_width
@@ -164,7 +133,7 @@ WOK
end
def plaintext_tail
# env=SiSU_Env::InfoEnv.new(@md.fns)
- generator="Generated by: #{@md.sisu_version[:project]} #{@md.sisu_version[:version]} of #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" if @md.sisu_version[:version]
+ generator="Generated by: #{@md.project_details.project} #{@md.project_details.version} of #{@md.project_details.date_stamp} (#{@md.project_details.date})" if @md.project_details.version
lastdone="Last Generated on: #{Time.now}"
rubyv="Ruby version: #{@md.ruby_version}"
sc=if @md.sc_info
@@ -188,153 +157,6 @@ at:
* SiSU #{the_url.sisu_txt}
WOK
end
- def decorate
- def heading
- def inline
- def l0
- '='
- end
- def l1
- '=='
- end
- def l2
- '==='
- end
- def l3
- '===='
- end
- def l4
- '====='
- end
- def l5
- '' #'======' #logical
- end
- self
- end
- def underscore
- def l0
- '='
- end
- def l1
- '-'
- end
- def l2
- '~'
- end
- def l3
- '^'
- end
- def l4
- '+'
- end
- def l5
- '.' #'.' #proposed
- end
- self
- end
- self
- end
- def bold
- def open
- '*'
- end
- def close
- '*'
- end
- self
- end
- def italics
- def open
- '_'
- end
- def close
- '_'
- end
- self
- end
- def underscore
- def open
- ''
- end
- def close
- ''
- end
- self
- end
- #def emphasis
- # def open
- # ''
- # end
- # def close
- # ''
- # end
- # self
- #end
- def cite
- def open
- '"'
- end
- def close
- '"'
- end
- self
- end
- def insert
- def open
- ''
- end
- def close
- ''
- end
- self
- end
- def strike
- def open
- '-'
- end
- def close
- '-'
- end
- self
- end
- def superscript
- def open
- '^'
- end
- def close
- '^'
- end
- self
- end
- def subscript
- def open
- '~'
- end
- def close
- '~'
- end
- self
- end
- def hilite #bold
- def open
- '*'
- end
- def close
- '*'
- end
- self
- end
- def monospace
- def open
- '+'
- end
- def close
- '+'
- end
- self
- end
- self
- end
def heading_decorated_inline(dob)
if dob.is==:heading
heading_inline = case dob.lc
@@ -522,41 +344,11 @@ WOK
content << plaintext[:metadata]
content << "#{break_line}#{divider*@wrap_width}#{break_line}" if @md.stmp =~/\w+/ #not used?
content << plaintext[:tail]
- Output.new(content,@md).asciidoc
+ outputfile=SiSU_Env::FileOp.new(@md).write_file.asciidoc
+ Txt_Output::Output.new.document(content,outputfile)
@@endnotes={ para: [], end: [] }
end
end
- class Output <Source
- include SiSU_Param
- include SiSU_Env
- def initialize(content,md)
- @content,@md=content,md
- end
- def asciidoc
- file_plaintext=SiSU_Env::FileOp.new(@md).write_file.asciidoc
- @sisu=[]
- emptyline=0
- @content.each do |para| # this is a hack
- if para.is_a?(Array) \
- and para.length > 0
- para.each do |line|
- if line
- line=line.gsub(/[ \t]+$/m,'').
- gsub(/^\A[ ]*\Z/m,'')
- (line=~/^\A\Z/) \
- ? (emptyline+=1)
- : emptyline=0
- if emptyline < 2 #remove additional empty lines
- file_plaintext.puts line
- end
- end
- end
- else file_plaintext.puts para #unix plaintext # /^([*=-]|\.){5}/
- end
- end
- file_plaintext.close
- end
- end
end
end
__END__
diff --git a/lib/sisu/develop/txt_asciidoc_decorate.rb b/lib/sisu/develop/txt_asciidoc_decorate.rb
new file mode 100644
index 00000000..c63d508d
--- /dev/null
+++ b/lib/sisu/develop/txt_asciidoc_decorate.rb
@@ -0,0 +1,207 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** plaintext decoration
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt_asciidoc_decorate.rb;hb=HEAD>
+
+=end
+
+module SiSU_Decorate_Txt_AsciiDoc
+ def decorate
+ def heading
+ def inline
+ def l0
+ '='
+ end
+ def l1
+ '=='
+ end
+ def l2
+ '==='
+ end
+ def l3
+ '===='
+ end
+ def l4
+ '====='
+ end
+ def l5
+ '' #'======' #logical
+ end
+ self
+ end
+ def underscore
+ def l0
+ '='
+ end
+ def l1
+ '-'
+ end
+ def l2
+ '~'
+ end
+ def l3
+ '^'
+ end
+ def l4
+ '+'
+ end
+ def l5
+ '.' #'.' #proposed
+ end
+ self
+ end
+ self
+ end
+ def bold
+ def open
+ '*'
+ end
+ def close
+ '*'
+ end
+ self
+ end
+ def italics
+ def open
+ '_'
+ end
+ def close
+ '_'
+ end
+ self
+ end
+ def underscore
+ def open
+ ''
+ end
+ def close
+ ''
+ end
+ self
+ end
+ #def emphasis
+ # def open
+ # ''
+ # end
+ # def close
+ # ''
+ # end
+ # self
+ #end
+ def cite
+ def open
+ '"'
+ end
+ def close
+ '"'
+ end
+ self
+ end
+ def insert
+ def open
+ ''
+ end
+ def close
+ ''
+ end
+ self
+ end
+ def strike
+ def open
+ '-'
+ end
+ def close
+ '-'
+ end
+ self
+ end
+ def superscript
+ def open
+ '^'
+ end
+ def close
+ '^'
+ end
+ self
+ end
+ def subscript
+ def open
+ '~'
+ end
+ def close
+ '~'
+ end
+ self
+ end
+ def hilite #bold
+ def open
+ '*'
+ end
+ def close
+ '*'
+ end
+ self
+ end
+ def monospace
+ def open
+ '+'
+ end
+ def close
+ '+'
+ end
+ self
+ end
+ self
+ end
+end
+__END__
diff --git a/lib/sisu/v5/txt_markdown.rb b/lib/sisu/develop/txt_markdown.rb
index 9bbd85e4..e927c0ec 100644
--- a/lib/sisu/v5/txt_markdown.rb
+++ b/lib/sisu/develop/txt_markdown.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** plaintext (smarttext) generation, markdown
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/plaintext_markdown.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: plaintext (smarttext) generation, markdown
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt_markdown.rb;hb=HEAD>
=end
module SiSU_Txt_Markdown
@@ -63,11 +60,15 @@ module SiSU_Txt_Markdown
include SiSU_Env
require_relative 'shared_metadata' # shared_metadata.rb
require_relative 'generic_parts' # generic_parts.rb
+ require_relative 'txt_read' # txt_read.rb
require_relative 'txt_shared' # txt_shared.rb
+ require_relative 'txt_markdown_decorate' # txt_markdown_decorate.rb
+ require_relative 'txt_output' # txt_output.rb
include SiSU_Param
- @@alt_id_count,@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0,0
+ @@alt_id_count,@@alt_id_count=0,0
@@tablefoot=''
class Source
+ include SiSU_Txt_Read
def initialize(opt)
@opt=opt
unless @opt.fns =~/(.+?)\.(?:-|ssm\.)?sst$/
@@ -77,45 +78,13 @@ module SiSU_Txt_Markdown
def read
begin
md=SiSU_Param::Parameters.new(@opt).get
- env=SiSU_Env::InfoEnv.new(@opt.fns)
- unless @opt.act[:quiet][:set]==:on
- tool=(@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? "#{env.program.text_editor} #{md.file.output_path.markdown.dir}/#{md.file.base_filename.markdown}"
- : "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}"
- (@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'Markdown (plaintext utf-8)',
- tool
- ).green_hi_blue
- : SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'Markdown (plaintext utf-8)',
- tool
- ).green_title_hi
- if (@opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on)
- SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- @opt.fns,"#{md.file.output_path.markdown.dir}/#{md.file.base_filename.markdown}"
- ).flow
- end
- end
- ao_array=SiSU_AO::Source.new(@opt).get # ao file drawn here
- wrap_width=if defined? md.make.plaintext_wrap \
- and md.make.plaintext_wrap
- md.make.plaintext_wrap
- elsif defined? env.plaintext_wrap \
- and env.plaintext_wrap
- env.plaintext_wrap
- else 78
- end
- #wrap_width=(defined? md.make.plaintext_wrap) ? md.make.plaintext_wrap : 78
- SiSU_Txt_Markdown::Source::Scroll.new(md,ao_array,wrap_width).songsheet
+ specific={
+ description: 'Markdown (plaintext utf-8)',
+ output_path: md.file.output_path.markdown.dir,
+ output_file: md.file.base_filename.markdown,
+ }
+ read_generic(@opt,specific)
+ SiSU_Txt_Markdown::Source::Scroll.new(md,@ao_array,@wrap_width).songsheet
rescue
SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
@@ -127,6 +96,7 @@ module SiSU_Txt_Markdown
class Scroll <Source
include SiSU_Parts_Generic
include SiSU_TextUtils
+ include SiSU_Decorate_Txt_Markdown
@@endnotes={ para: [], end: [] }
def initialize(md,data,wrap_width)
@md,@data,@wrap_width=md,data,wrap_width
@@ -155,10 +125,10 @@ module SiSU_Txt_Markdown
if n =~/#{Mx[:br_line]}|#{Mx[:br_nl]}/
fix = n.split(/#{Mx[:br_line]}|#{Mx[:br_nl]}/) #watch #added
fix.each do |x|
- unless x.empty?; @n << x
+ unless x.empty? then @n << x
end
end
- else @n << n
+ else @n << n
end
end
notes=@n.flatten
@@ -199,7 +169,7 @@ WOK
end
def plaintext_tail
# env=SiSU_Env::InfoEnv.new(@md.fns)
- generator="Generated by: #{@md.sisu_version[:project]} #{@md.sisu_version[:version]} of #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" if @md.sisu_version[:version]
+ generator="Generated by: #{@md.project_details.project} #{@md.project_details.version} of #{@md.project_details.date_stamp} (#{@md.project_details.date})" if @md.project_details.version
lastdone="Last Generated on: #{Time.now}"
rubyv="Ruby version: #{@md.ruby_version}"
sc=if @md.sc_info
@@ -223,153 +193,6 @@ at:
* SiSU #{the_url.sisu_txt}
WOK
end
- def decorate
- def heading
- def inline #atx
- def l0
- '#'
- end
- def l1
- '##'
- end
- def l2
- '###'
- end
- def l3
- '####'
- end
- def l4
- '#####'
- end
- def l5
- '######'
- end
- self
- end
- def underscore #Setext
- def l1
- '='
- end
- def l2
- '-'
- end
- def l3
- ''
- end
- def l4
- ''
- end
- def l5
- ''
- end
- def l6
- ''
- end
- self
- end
- self
- end
- def bold
- def open
- '**'
- end
- def close
- '**'
- end
- self
- end
- def italics
- def open
- '*'
- end
- def close
- '*'
- end
- self
- end
- def underscore
- def open
- '_'
- end
- def close
- '_'
- end
- self
- end
- #def emphasis
- # def open
- # ''
- # end
- # def close
- # ''
- # end
- # self
- #end
- def cite
- def open
- '"'
- end
- def close
- '"'
- end
- self
- end
- def insert
- def open
- '+'
- end
- def close
- '+'
- end
- self
- end
- def strike
- def open
- '-'
- end
- def close
- '-'
- end
- self
- end
- def superscript
- def open
- '^'
- end
- def close
- '^'
- end
- self
- end
- def subscript
- def open
- '['
- end
- def close
- ']'
- end
- self
- end
- def hilite
- def open
- '**'
- end
- def close
- '**'
- end
- self
- end
- def monospace
- def open
- '`'
- end
- def close
- '`'
- end
- self
- end
- self
- end
def heading_decorated_inline(dob)
if dob.is==:heading
heading_inline = case dob.lc
@@ -556,41 +379,11 @@ WOK
content << plaintext[:metadata]
content << "#{break_line}#{divider*@wrap_width}#{break_line}" if @md.stmp =~/\w+/ #not used?
content << plaintext[:tail]
- Output.new(content,@md).markdown
+ outputfile=SiSU_Env::FileOp.new(@md).write_file.markdown
+ Txt_Output::Output.new.document(content,outputfile)
@@endnotes={ para: [], end: [] }
end
end
- class Output <Source
- include SiSU_Param
- include SiSU_Env
- def initialize(content,md)
- @content,@md=content,md
- end
- def markdown
- file_plaintext=SiSU_Env::FileOp.new(@md).write_file.markdown
- @sisu=[]
- emptyline=0
- @content.each do |para| # this is a hack
- if para.is_a?(Array) \
- and para.length > 0
- para.each do |line|
- if line
- line=line.gsub(/[ \t]+$/m,'').
- gsub(/^\A[ ]*\Z/m,'')
- (line=~/^\A\Z/) \
- ? (emptyline+=1)
- : emptyline=0
- if emptyline < 2 #remove additional empty lines
- file_plaintext.puts line
- end
- end
- end
- else file_plaintext.puts para #unix plaintext # /^([*=-]|\.){5}/
- end
- end
- file_plaintext.close
- end
- end
end
end
__END__
diff --git a/lib/sisu/develop/txt_markdown_decorate.rb b/lib/sisu/develop/txt_markdown_decorate.rb
new file mode 100644
index 00000000..20029efd
--- /dev/null
+++ b/lib/sisu/develop/txt_markdown_decorate.rb
@@ -0,0 +1,207 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** plaintext decoration
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt_markdown_decorate.rb;hb=HEAD>
+
+=end
+
+module SiSU_Decorate_Txt_Markdown
+ def decorate
+ def heading
+ def inline #atx
+ def l0
+ '#'
+ end
+ def l1
+ '##'
+ end
+ def l2
+ '###'
+ end
+ def l3
+ '####'
+ end
+ def l4
+ '#####'
+ end
+ def l5
+ '######'
+ end
+ self
+ end
+ def underscore #Setext
+ def l1
+ '='
+ end
+ def l2
+ '-'
+ end
+ def l3
+ ''
+ end
+ def l4
+ ''
+ end
+ def l5
+ ''
+ end
+ def l6
+ ''
+ end
+ self
+ end
+ self
+ end
+ def bold
+ def open
+ '**'
+ end
+ def close
+ '**'
+ end
+ self
+ end
+ def italics
+ def open
+ '*'
+ end
+ def close
+ '*'
+ end
+ self
+ end
+ def underscore
+ def open
+ '_'
+ end
+ def close
+ '_'
+ end
+ self
+ end
+ #def emphasis
+ # def open
+ # ''
+ # end
+ # def close
+ # ''
+ # end
+ # self
+ #end
+ def cite
+ def open
+ '"'
+ end
+ def close
+ '"'
+ end
+ self
+ end
+ def insert
+ def open
+ '+'
+ end
+ def close
+ '+'
+ end
+ self
+ end
+ def strike
+ def open
+ '-'
+ end
+ def close
+ '-'
+ end
+ self
+ end
+ def superscript
+ def open
+ '^'
+ end
+ def close
+ '^'
+ end
+ self
+ end
+ def subscript
+ def open
+ '['
+ end
+ def close
+ ']'
+ end
+ self
+ end
+ def hilite
+ def open
+ '**'
+ end
+ def close
+ '**'
+ end
+ self
+ end
+ def monospace
+ def open
+ '`'
+ end
+ def close
+ '`'
+ end
+ self
+ end
+ self
+ end
+end
+__END__
diff --git a/lib/sisu/develop/txt_orgmode.rb b/lib/sisu/develop/txt_orgmode.rb
new file mode 100644
index 00000000..e8fc38ad
--- /dev/null
+++ b/lib/sisu/develop/txt_orgmode.rb
@@ -0,0 +1,376 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** plaintext (smarttext) generation, orgmode structure
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt_orgmode.rb;hb=HEAD>
+
+=end
+module SiSU_Txt_OrgMode
+ require_relative 'ao' # ao.rb
+ require_relative 'se' # se.rb
+ include SiSU_Env
+ require_relative 'shared_metadata' # shared_metadata.rb
+ require_relative 'generic_parts' # generic_parts.rb
+ require_relative 'txt_read' # txt_read.rb
+ require_relative 'txt_shared' # txt_shared.rb
+ require_relative 'txt_orgmode_decorate' # txt_orgmode_decorate.rb
+ require_relative 'txt_output' # txt_output.rb
+ include SiSU_Param
+ @@alt_id_count,@@alt_id_count=0,0
+ @@tablefoot=''
+ class Source
+ include SiSU_Txt_Read
+ def initialize(opt)
+ @opt=opt
+ unless @opt.fns =~/(.+?)\.(?:-|ssm\.)?sst$/
+ puts "#{sf} not a processed file type"
+ end
+ end
+ def read
+ begin
+ md=SiSU_Param::Parameters.new(@opt).get
+ specific={
+ description: 'OrgMode (plaintext utf-8)',
+ output_path: md.file.output_path.orgmode.dir,
+ output_file: md.file.base_filename.orgmode,
+ }
+ read_generic(@opt,specific)
+ SiSU_Txt_OrgMode::Source::Scroll.new(md,@ao_array,@wrap_width).songsheet
+ rescue
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
+ __LINE__.to_s + ':' + __FILE__
+ end
+ ensure
+ end
+ end
+ private
+ class Scroll <Source
+ include SiSU_Parts_Generic
+ include SiSU_TextUtils
+ include SiSU_Decorate_Txt_OrgMode
+ @@endnotes={ para: [], end: [] }
+ def initialize(md,data,wrap_width)
+ @md,@data,@wrap_width=md,data,wrap_width
+ @env=SiSU_Env::InfoEnv.new(@md.fns)
+ @tab="\t"
+ @@endnotes_=case md.opt.selections.str
+ when /--footnote/ then false
+ when /--endnote/ then true
+ else true
+ end
+ @plaintext={ body: [], open: [], close: [], head: [], endnotes: [], metadata: [], tail: [] }
+ end
+ def songsheet
+ plaintext=markup(@data)
+ publish(plaintext)
+ end
+ def break_line
+ "\n"
+ end
+ def extract_endnotes(dob='')
+ notes=dob.obj.scan(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]})([\d*+]+\s+.+?)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/)
+ @n=[]
+ notes.flatten.each do |n| #high cost to deal with <br> appropriately within plaintext, consider
+ n=n.dup.to_s
+ if n =~/#{Mx[:br_line]}|#{Mx[:br_nl]}/
+ fix = n.split(/#{Mx[:br_line]}|#{Mx[:br_nl]}/) #watch #added
+ fix.each do |x|
+ unless x.empty? then @n << x
+ end
+ end
+ else @n << n
+ end
+ end
+ notes=@n.flatten
+ notes.each do |e|
+ util=(e.to_s =~/^\[[\d*+]+\]:/) \
+ ? (SiSU_TextUtils::Wrap.new(e.to_s,@wrap_width,4,1))
+ : (SiSU_TextUtils::Wrap.new(e.to_s,@wrap_width,1,1))
+ wrap=util.line_wrap
+ wrap=if wrap =~ /^\s*[\d*+]+\s+.+?\s*\Z/m
+ wrap.gsub(/^(\s*)([\d*+]+)\s+(.+?)\s*\Z/m, <<-GSUB
+\\1[\\2]: \\3
+ GSUB
+ )
+ else
+ wrap.gsub(/^(.+)\Z/m, <<-GSUB
+\\1
+ GSUB
+ )
+ end
+ @@endnotes[:para] << "-#{wrap}"
+ @@endnotes[:end] << '' << wrap
+ end
+ @@endnotes
+ end
+ # Used for extraction of endnotes from paragraphs
+ def plaintext_metadata
+ array=SiSU_Metadata::Summary.new(@md).plaintext.metadata
+ array.each do |meta|
+ tag,inf=meta.scan(/^.+?:\s|.+/)
+ if tag and inf
+ util=SiSU_TextUtils::Wrap.new(inf,@wrap_width,15,1)
+ txt=util.line_wrap
+ @plaintext[:metadata] <<<<WOK
+
+#{@tab}#{tag}#{txt}
+WOK
+ end
+ end
+ end
+ def plaintext_tail
+# env=SiSU_Env::InfoEnv.new(@md.fns)
+ generator="Generated by: #{@md.project_details.project} #{@md.project_details.version} of #{@md.project_details.date_stamp} (#{@md.project_details.date})" if @md.project_details.version
+ lastdone="Last Generated on: #{Time.now}"
+ rubyv="Ruby version: #{@md.ruby_version}"
+ sc=if @md.sc_info
+ "Source file: #{@md.sc_filename}#{break_line}Version number: #{@md.sc_number}#{break_line}Version date: #{@md.sc_date}#{break_line}"
+ else ''
+ end
+ @plaintext[:tail] <<<<WOK
+** Metadata
+#{break_line}
+plaintext (plain text):
+ #{@md.file.output_path.orgmode.url}/#{@md.file.base_filename.orgmode}#{break_line}
+Other versions of this document: #{break_line}
+manifest:
+ #{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}#{break_line}
+at:
+ #{@md.file.output_path.base.url}#{break_line}
+
+ #{sc}
+ * #{generator}
+ * #{rubyv}
+ * #{lastdone}
+ * SiSU #{the_url.sisu_txt}
+WOK
+ end
+ def heading_decorated_inline(dob)
+ if dob.is==:heading
+ heading_inline = case dob.lc
+ when 0 then decorate.heading.inline.l0
+ when 1 then decorate.heading.inline.l1
+ when 2 then decorate.heading.inline.l2
+ when 3 then decorate.heading.inline.l3
+ when 4 then decorate.heading.inline.l4
+ when 5 then decorate.heading.inline.l5
+ when 6 then decorate.heading.inline.l6
+ end
+ heading_inline + ' ' + dob.obj
+ end
+ end
+ def plaintext_structure(dob='',p_num='') #% Used to extract the structure of a document
+ heading_decoration=:inline #(:inline|:underscore) #switch heading decoration between inline & underscore options
+ util=nil
+ wrapped=if dob.is==:para \
+ || dob.is==:heading
+ if dob.is==:heading
+ util=(heading_decoration== :inline) \
+ ? (SiSU_TextUtils::Wrap.new(heading_decorated_inline(dob),@wrap_width,0))
+ : (SiSU_TextUtils::Wrap.new(dob.obj,@wrap_width,0))
+ elsif dob.is==:para
+ if dob.hang \
+ and dob.hang =~/[0-9]/ \
+ and dob.indent != dob.hang
+ util=SiSU_TextUtils::Wrap.new(dob.obj,@wrap_width,dob.indent.to_i*2,dob.hang.to_i*2)
+ #util=SiSU_TextUtils::Wrap.new(dob.obj,@wrap_width,dob.hang.to_i*2,0)
+ elsif dob.indent =~/[1-9]/
+ util=if dob.bullet_
+ SiSU_TextUtils::Wrap.new("* #{dob.obj}",@wrap_width,dob.indent.to_i*2)
+ else SiSU_TextUtils::Wrap.new(dob.obj,@wrap_width,dob.indent.to_i*2)
+ end
+ else
+ util=if dob.bullet_
+ SiSU_TextUtils::Wrap.new("* #{dob.obj}",@wrap_width,0)
+ else SiSU_TextUtils::Wrap.new(dob.obj,@wrap_width,0)
+ end
+ end
+ else util=SiSU_TextUtils::Wrap.new(dob.obj,@wrap_width,0)
+ end
+ dob.is==:heading ? util.no_wrap_no_breaks : util.line_wrap
+ end
+ if dob.is==:para \
+ || dob.is==:heading
+ @plaintext[:body] << wrapped + p_num << break_line # main text, contents, body KEEP
+ end
+# remove ...
+ if @@endnotes[:para] \
+ and not @@endnotes_
+ @@endnotes[:para].each {|e| @plaintext[:body] << e << break_line}
+ elsif @@endnotes[:para] \
+ and @@endnotes_
+ @@endnotes[:para].each {|e| @plaintext[:endnotes] << e << break_line}
+ end
+ @@endnotes[:para]=[]
+ end
+ def markup(data) # Used for major markup instructions
+ SiSU_Env::InfoEnv.new(@md.fns)
+ @data_mod,@endnotes,@level,@cont,@copen,@plaintext_contents_close=Array.new(6){[]}
+ (0..6).each { |x| @cont[x]=@level[x]=false }
+ (4..6).each { |x| @plaintext_contents_close[x]='' }
+ plaintext_tail #($1,$2)
+ plaintext_metadata
+ table_message='[table conversion awaited, see other document formats]'
+ data.each do |dob|
+ dob.obj=dob.obj.gsub(/#{Mx[:gr_o]}Th?#{Mx[:tc_p]}.+/um,"#{break_line}#{table_message}"). #fix
+ gsub(/.+?#{Mx[:gl_o]}-##{Mx[:gl_c]}/,''). # remove dummy headings (used by html) #check also [~-]#
+ gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,
+ "#{decorate.bold.open}\\1#{decorate.bold.close}").
+ gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,
+ "#{decorate.italics.open}\\1#{decorate.italics.close}").
+ gsub(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/,
+ "#{decorate.underscore.open}\\1#{decorate.underscore.close}").
+ gsub(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/,
+ "#{decorate.subscript.open}\\1#{decorate.subscript.close}").
+ gsub(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/,
+ "#{decorate.superscript.open}\\1#{decorate.superscript.close}").
+ gsub(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/,
+ "#{decorate.insert.open}\\1#{decorate.insert.close}").
+ gsub(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,
+ "#{decorate.cite.open}\\1#{decorate.cite.close}").
+ gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,
+ "#{decorate.strike.open}\\1#{decorate.strike.close}").
+ gsub(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,
+ "#{decorate.monospace.open}\\1#{decorate.monospace.close}")
+ unless dob.is==:code
+ dob.obj=dob.obj.gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}/,'\1').
+ gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'\1').
+ gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,'\1 [link: <\2>]').
+ gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}image/,'\1 [link: local image]').
+ gsub(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,"#{the_text.url_open}\\1#{the_text.url_close}")
+ extract_endnotes(dob)
+ dob.obj=dob.obj.gsub(/#{Mx[:en_a_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_a_c]}/,'[^\1]'). # endnote marker marked up
+ gsub(/#{Mx[:en_b_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_b_c]}/,'[^\1]'). # endnote marker marked up
+ gsub(/#{Mx[:gl_o]}(?:#lt|#060)#{Mx[:gl_c]}/,'<').
+ gsub(/#{Mx[:gl_o]}(?:#gt|#062)#{Mx[:gl_c]}/,'>').
+ gsub(/#{Mx[:gl_o]}#(?:038|amp)#{Mx[:gl_c]}/,'&').
+ gsub(/#{Mx[:gl_o]}#033#{Mx[:gl_c]}/,'!').
+ gsub(/#{Mx[:gl_o]}#035#{Mx[:gl_c]}/,'#').
+ gsub(/#{Mx[:gl_o]}#042#{Mx[:gl_c]}/,'*').
+ gsub(/#{Mx[:gl_o]}#045#{Mx[:gl_c]}/,'-').
+ gsub(/#{Mx[:gl_o]}#047#{Mx[:gl_c]}/,'/').
+ gsub(/#{Mx[:gl_o]}#095#{Mx[:gl_c]}/,'_').
+ gsub(/#{Mx[:gl_o]}#123#{Mx[:gl_c]}/,'{').
+ gsub(/#{Mx[:gl_o]}#125#{Mx[:gl_c]}/,'}').
+ gsub(/#{Mx[:gl_o]}#126#{Mx[:gl_c]}/,'~').
+ gsub(/#{Mx[:gl_o]}#169#{Mx[:gl_c]}/,'©').
+ gsub(/#{Mx[:gl_o]}#092#{Mx[:gl_c]}/,'\\')
+ end
+ dob.obj=if dob.of==:block # watch
+ dob.obj.gsub(/#{Mx[:gl_o]}●#{Mx[:gl_c]}/m,"* ").
+ gsub(/\n?#{Mx[:br_line]}\n?|\n?#{Mx[:br_nl]}\n?/m,break_line)
+ else dob.obj.gsub(/\n?#{Mx[:br_line]}\n?|\n?#{Mx[:br_nl]}\n?/m,break_line*2)
+ end
+ if dob.is==:code
+ dob.obj=dob.obj.gsub(/(^|[^}])_([<>])/m,'\1\2'). # _> _<
+ gsub(/(^|[^}])_([<>])/m,'\1\2') # _<_<
+ end
+ dob.obj=dob.obj.gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'\1').
+ gsub(/<a href=".+?">(.+?)<\/a>/m,'\1').
+ gsub(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,''). # remove name links
+ gsub(/&nbsp;|#{Mx[:nbsp]}/,' '). # decide on
+ gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/,' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]")
+ gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}image/,' [ \1 ]').
+ gsub(/(?:^|[^_\\])\{\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*\}\S+/,'[image: "\1"]')
+ if dob.obj !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/
+ p_num=''
+ #ocn
+ if dob.is==:heading \
+ or dob.is==:para
+ plaintext_structure(dob,p_num)
+ elsif dob.is==:group \
+ or dob.is==:block \
+ or dob.is==:verse \
+ or dob.is==:code \
+ or dob.is==:table
+ @plaintext[:body] << dob.obj + p_num << break_line
+ elsif dob.is==:break
+ sp=' '
+ ln='<' #ln='-'
+ @plaintext[:body] <<=if dob.obj==Mx[:br_page] \
+ or dob.obj==Mx[:br_page_new] \
+ or dob.obj==Mx[:br_page_line]
+ "#{break_line}#{ln*40}#{break_line*2}"
+ elsif dob.obj ==Mx[:br_obj]
+ "#{break_line}#{sp*20}* * *#{break_line*2}"
+ end # following empty line (break_line) missing, fix
+ end
+ dob='' if (dob.obj =~/<a name="n\d+">/ \
+ and dob.obj =~/^(-\{{2}~\d+|<!e[:_]\d+!>)/) # -endnote
+ if dob ## Clean Prepared Text
+ dob.obj=dob.obj.gsub(/<!.+!>/,' ').
+ gsub(/<:\S+>/,' ')
+ end
+ end
+ end
+ @plaintext
+ end
+ def publish(plaintext)
+ divider='='
+ content=[]
+ content << plaintext[:open]
+ content << plaintext[:head]
+ content << plaintext[:body]
+ if @@endnotes_
+ content << '** Endnotes' << @@endnotes[:end]
+ end
+ content << plaintext[:metadata]
+ content << "#{break_line}#{divider*@wrap_width}#{break_line}" if @md.stmp =~/\w+/ #not used?
+ content << plaintext[:tail]
+ outputfile=SiSU_Env::FileOp.new(@md).write_file.orgmode
+ Txt_Output::Output.new.document(content,outputfile)
+ @@endnotes={ para: [], end: [] }
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/develop/txt_orgmode_decorate.rb b/lib/sisu/develop/txt_orgmode_decorate.rb
new file mode 100644
index 00000000..67813729
--- /dev/null
+++ b/lib/sisu/develop/txt_orgmode_decorate.rb
@@ -0,0 +1,186 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** plaintext decoration
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt_orgmode_decorate.rb;hb=HEAD>
+
+=end
+
+module SiSU_Decorate_Txt_OrgMode
+ def decorate
+ def heading
+ def inline
+ def l0
+ '*'
+ end
+ def l1
+ '**'
+ end
+ def l2
+ '***'
+ end
+ def l3
+ '****'
+ end
+ def l4
+ '*****'
+ end
+ def l5
+ '******'
+ end
+ self
+ end
+ self
+ end
+ def bold
+ def open
+ '*'
+ end
+ def close
+ '*'
+ end
+ self
+ end
+ def italics
+ def open
+ '/'
+ end
+ def close
+ '/'
+ end
+ self
+ end
+ def underscore
+ def open
+ ''
+ end
+ def close
+ ''
+ end
+ self
+ end
+ #def emphasis
+ # def open
+ # ''
+ # end
+ # def close
+ # ''
+ # end
+ # self
+ #end
+ def cite
+ def open
+ '"'
+ end
+ def close
+ '"'
+ end
+ self
+ end
+ def insert
+ def open
+ ''
+ end
+ def close
+ ''
+ end
+ self
+ end
+ def strike
+ def open
+ '+'
+ end
+ def close
+ '+'
+ end
+ self
+ end
+ def superscript
+ def open
+ '^'
+ end
+ def close
+ '^'
+ end
+ self
+ end
+ def subscript
+ def open
+ '~'
+ end
+ def close
+ '~'
+ end
+ self
+ end
+ def hilite #bold
+ def open
+ '*'
+ end
+ def close
+ '*'
+ end
+ self
+ end
+ def monospace
+ def open
+ '~'
+ end
+ def close
+ '~'
+ end
+ self
+ end
+ self
+ end
+end
+__END__
diff --git a/lib/sisu/develop/txt_output.rb b/lib/sisu/develop/txt_output.rb
new file mode 100644
index 00000000..a70776ec
--- /dev/null
+++ b/lib/sisu/develop/txt_output.rb
@@ -0,0 +1,86 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** plaintext
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt_output.rb;hb=HEAD>
+
+=end
+module Txt_Output
+ class Output
+ include SiSU_Param
+ include SiSU_Env
+ def document(content,outputfile)
+ emptyline=0
+ content.each do |para| # this is a hack
+ if para.is_a?(Array) \
+ and para.length > 0
+ para.each do |line|
+ if line
+ line=line.gsub(/[ \t]+$/m,'').
+ gsub(/^\A[ ]*\Z/m,'')
+ (line=~/^\A\Z/) \
+ ? (emptyline+=1)
+ : emptyline=0
+ if emptyline < 2 #remove additional empty lines
+ outputfile.puts line
+ end
+ end
+ end
+ else outputfile.puts para #unix plaintext # /^([*=-]|\.){5}/
+ end
+ end
+ outputfile.close
+ end
+ end
+end
+__END__
+
diff --git a/lib/sisu/v5/txt_plain.rb b/lib/sisu/develop/txt_plain.rb
index 08f32b2f..2c19c7d2 100644
--- a/lib/sisu/v5/txt_plain.rb
+++ b/lib/sisu/develop/txt_plain.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** plaintext text generation, stripped plaintext output (unix, linefeed)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/plaintext.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: plaintext text generation, stripped plaintext output (unix,
- linefeed)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt.rb;hb=HEAD>
=end
module SiSU_Txt_Plain
@@ -64,11 +60,15 @@ module SiSU_Txt_Plain
include SiSU_Env
require_relative 'shared_metadata' # shared_metadata.rb
require_relative 'generic_parts' # generic_parts.rb
+ require_relative 'txt_read' # txt_read.rb
require_relative 'txt_shared' # txt_shared.rb
+ require_relative 'txt_plain_decorate' # txt_plain_decorate.rb
+ require_relative 'txt_output' # txt_output.rb
include SiSU_Param
- @@alt_id_count,@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0,0
+ @@alt_id_count,@@alt_id_count=0,0
@@tablefoot=''
class Source
+ include SiSU_Txt_Read
def initialize(opt)
@opt=opt
unless @opt.fns =~/(.+?)\.(?:-|ssm\.)?sst$/
@@ -78,46 +78,13 @@ module SiSU_Txt_Plain
def read
begin
md=SiSU_Param::Parameters.new(@opt).get
- env=SiSU_Env::InfoEnv.new(@opt.fns)
- unless @opt.act[:quiet][:set]==:on
- tool=(@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? "#{env.program.text_editor} #{md.file.output_path.txt.dir}/#{md.file.base_filename.txt}"
- : "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}"
- (@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'Plaintext',
- tool
- ).green_hi_blue
- : SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'Plaintext',
- tool
- ).green_title_hi
- if (@opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on)
- SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- @opt.fns,
- "#{md.file.output_path.txt.dir}/#{md.file.base_filename.txt}"
- ).flow
- end
- end
- ao_array=SiSU_AO::Source.new(@opt).get # ao file drawn here
- wrap_width=if defined? md.make.plaintext_wrap \
- and md.make.plaintext_wrap
- md.make.plaintext_wrap
- elsif defined? env.plaintext_wrap \
- and env.plaintext_wrap
- env.plaintext_wrap
- else 78
- end
- #wrap_width=(defined? md.make.plaintext_wrap) ? md.make.plaintext_wrap : 78
- SiSU_Txt_Plain::Source::Scroll.new(md,ao_array,wrap_width).songsheet
+ specific={
+ description: 'Plaintext (utf-8)',
+ output_path: md.file.output_path.txt.dir,
+ output_file: md.file.base_filename.txt,
+ }
+ read_generic(@opt,specific)
+ SiSU_Txt_Plain::Source::Scroll.new(md,@ao_array,@wrap_width).songsheet
rescue
SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
@@ -129,6 +96,7 @@ module SiSU_Txt_Plain
class Scroll <Source
include SiSU_Parts_Generic
include SiSU_TextUtils
+ include SiSU_Decorate_Txt_Plain
@@endnotes={ para: [], end: [] }
def initialize(md,data,wrap_width)
@md,@data,@wrap_width=md,data,wrap_width
@@ -137,7 +105,7 @@ module SiSU_Txt_Plain
@@endnotes_=case md.opt.selections.str
when /--footnote/ then false
when /--endnote/ then true
- else true
+ else true
end
@plaintext={ body: [], open: [], close: [], head: [], metadata: [], tail: [] }
end
@@ -201,7 +169,7 @@ WOK
end
def plaintext_tail
# env=SiSU_Env::InfoEnv.new(@md.fns)
- generator="Generated by: #{@md.sisu_version[:project]} #{@md.sisu_version[:version]} of #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" if @md.sisu_version[:version]
+ generator="Generated by: #{@md.project_details.project} #{@md.project_details.version} of #{@md.project_details.date_stamp} (#{@md.project_details.date})" if @md.project_details.version
lastdone="Last Generated on: #{Time.now}"
rubyv="Ruby version: #{@md.ruby_version}"
sc=if @md.sc_info
@@ -225,135 +193,6 @@ at:
* SiSU #{the_url.sisu_txt}
WOK
end
- def decorate
- def heading_underscore
- def l0
- '='
- end
- def l1
- '*'
- end
- def l2
- '+'
- end
- def l3
- '~'
- end
- def l4
- '-'
- end
- def l5
- '.'
- end
- def l6
- '.'
- end
- def l7
- '.'
- end
- self
- end
- def bold
- def open
- '*'
- end
- def close
- '*'
- end
- self
- end
- def italics
- def open
- '/'
- end
- def close
- '/'
- end
- self
- end
- def underscore
- def open
- '_'
- end
- def close
- '_'
- end
- self
- end
- #def emphasis
- # def open
- # ''
- # end
- # def close
- # ''
- # end
- # self
- #end
- def cite
- def open
- '"'
- end
- def close
- '"'
- end
- self
- end
- def insert
- def open
- '+'
- end
- def close
- '+'
- end
- self
- end
- def strike
- def open
- '-'
- end
- def close
- '-'
- end
- self
- end
- def superscript
- def open
- '^'
- end
- def close
- '^'
- end
- self
- end
- def subscript
- def open
- '['
- end
- def close
- ']'
- end
- self
- end
- def hilite
- def open
- '*'
- end
- def close
- '*'
- end
- self
- end
- def monospace
- def open
- '#'
- end
- def close
- '#'
- end
- self
- end
- self
- end
def plaintext_structure(dob='',p_num='') #% Used to extract the structure of a document
lv=n=n3=nil
if dob.is==:heading
@@ -539,41 +378,11 @@ WOK
content << plaintext[:metadata]
content << "#{break_line}#{divider*@wrap_width}#{break_line}" if @md.stmp =~/\w+/ #not used?
content << plaintext[:tail]
- Output.new(content,@md).plaintext
+ outputfile=SiSU_Env::FileOp.new(@md).write_file.txt
+ Txt_Output::Output.new.document(content,outputfile)
@@endnotes={ para: [], end: [] }
end
end
- class Output <Source
- include SiSU_Param
- include SiSU_Env
- def initialize(content,md)
- @content,@md=content,md
- end
- def plaintext #%plaintext output
- file_plaintext=SiSU_Env::FileOp.new(@md).write_file.txt
- @sisu=[]
- emptyline=0
- @content.each do |para| # this is a hack
- if para.is_a?(Array) \
- and para.length > 0
- para.each do |line|
- if line
- line=line.gsub(/[ \t]+$/m,'').
- gsub(/^\A[ ]*\Z/m,'')
- (line=~/^\A\Z/) \
- ? (emptyline+=1)
- : emptyline=0
- if emptyline < 2 #remove additional empty lines
- file_plaintext.puts line
- end
- end
- end
- else file_plaintext.puts para #unix plaintext # /^([*=-]|\.){5}/
- end
- end
- file_plaintext.close
- end
- end
end
end
__END__
@@ -589,13 +398,13 @@ __END__
subscript_o: '[', subscript_c: ']',
hilite_o: '*', hilite_c: '*',
monospace_o: '', monospace_c: '',
- po_bold_o: '!{', po_bold_c: '}!',
- po_italics_o: '/{', po_italics_c: '}/',
- po_underscore_o: '_{', po_underscore_c: '}_',
- po_cite_o: '"{', po_cite_c: '}"',
- po_insert_o: '+{', po_insert_c: '}+',
- po_strike_o: '-{', po_strike_c: '}-',
- po_superscript_o: '^{', po_superscript_c: '}^',
- po_subscript_o: ',{', po_subscript_c: '},',
- po_hilite_o: '*{', po_hilite_c: '}*',
- po_monospace_o: '#{', po_monospace_c: '}#',
+ p_bold_o: '!{', p_bold_c: '}!',
+ p_italics_o: '/{', p_italics_c: '}/',
+ p_underscore_o: '_{', p_underscore_c: '}_',
+ p_cite_o: '"{', p_cite_c: '}"',
+ p_insert_o: '+{', p_insert_c: '}+',
+ p_strike_o: '-{', p_strike_c: '}-',
+ p_superscript_o: '^{', p_superscript_c: '}^',
+ p_subscript_o: ',{', p_subscript_c: '},',
+ p_hilite_o: '*{', p_hilite_c: '}*',
+ p_monospace_o: '#{', p_monospace_c: '}#',
diff --git a/lib/sisu/develop/txt_plain_decorate.rb b/lib/sisu/develop/txt_plain_decorate.rb
new file mode 100644
index 00000000..6bceb9ce
--- /dev/null
+++ b/lib/sisu/develop/txt_plain_decorate.rb
@@ -0,0 +1,189 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** plaintext decoration
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt_plain_decorate.rb;hb=HEAD>
+
+=end
+
+module SiSU_Decorate_Txt_Plain
+ def decorate
+ def heading_underscore
+ def l0
+ '='
+ end
+ def l1
+ '*'
+ end
+ def l2
+ '+'
+ end
+ def l3
+ '~'
+ end
+ def l4
+ '-'
+ end
+ def l5
+ '.'
+ end
+ def l6
+ '.'
+ end
+ def l7
+ '.'
+ end
+ self
+ end
+ def bold
+ def open
+ '*'
+ end
+ def close
+ '*'
+ end
+ self
+ end
+ def italics
+ def open
+ '/'
+ end
+ def close
+ '/'
+ end
+ self
+ end
+ def underscore
+ def open
+ '_'
+ end
+ def close
+ '_'
+ end
+ self
+ end
+ #def emphasis
+ # def open
+ # ''
+ # end
+ # def close
+ # ''
+ # end
+ # self
+ #end
+ def cite
+ def open
+ '"'
+ end
+ def close
+ '"'
+ end
+ self
+ end
+ def insert
+ def open
+ '+'
+ end
+ def close
+ '+'
+ end
+ self
+ end
+ def strike
+ def open
+ '-'
+ end
+ def close
+ '-'
+ end
+ self
+ end
+ def superscript
+ def open
+ '^'
+ end
+ def close
+ '^'
+ end
+ self
+ end
+ def subscript
+ def open
+ '['
+ end
+ def close
+ ']'
+ end
+ self
+ end
+ def hilite
+ def open
+ '*'
+ end
+ def close
+ '*'
+ end
+ self
+ end
+ def monospace
+ def open
+ '#'
+ end
+ def close
+ '#'
+ end
+ self
+ end
+ self
+ end
+end
+__END__
diff --git a/lib/sisu/develop/txt_read.rb b/lib/sisu/develop/txt_read.rb
new file mode 100644
index 00000000..eddeaa9c
--- /dev/null
+++ b/lib/sisu/develop/txt_read.rb
@@ -0,0 +1,109 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** plaintext
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt_read.rb;hb=HEAD>
+
+=end
+module SiSU_Txt_Read
+ require_relative 'se' # se.rb
+ include SiSU_Env
+ def read_generic(opt,specific)
+ begin
+ env=SiSU_Env::InfoEnv.new(opt.fns)
+ unless opt.act[:quiet][:set]==:on
+ tool=(opt.act[:verbose][:set]==:on \
+ || opt.act[:verbose_plus][:set]==:on \
+ || opt.act[:maintenance][:set]==:on) \
+ ? "#{env.program.text_editor} #{specific[:output_path]}/#{specific[:output_file]}"
+ : "[#{opt.f_pth[:lng_is]}] #{opt.fno}"
+ (opt.act[:verbose][:set]==:on \
+ || opt.act[:verbose_plus][:set]==:on \
+ || opt.act[:maintenance][:set]==:on) \
+ ? SiSU_Screen::Ansi.new(
+ opt.act[:color_state][:set],
+ specific[:description],
+ tool
+ ).green_hi_blue
+ : SiSU_Screen::Ansi.new(
+ opt.act[:color_state][:set],
+ specific[:description],
+ tool
+ ).green_title_hi
+ if (opt.act[:verbose_plus][:set]==:on \
+ || opt.act[:maintenance][:set]==:on)
+ SiSU_Screen::Ansi.new(
+ opt.act[:color_state][:set],
+ opt.fns,
+ "#{specific[:output_path]}/#{specific[:output_file]}"
+ ).flow
+ end
+ end
+ @ao_array=SiSU_AO::Source.new(opt).get # ao file drawn here
+ @wrap_width=if defined? md.make.plaintext_wrap \
+ and md.make.plaintext_wrap
+ md.make.plaintext_wrap
+ elsif defined? env.plaintext_wrap \
+ and env.plaintext_wrap
+ env.plaintext_wrap
+ else 78
+ end
+ #wrap_width=(defined? md.make.plaintext_wrap) ? md.make.plaintext_wrap : 78
+ rescue
+ SiSU_Errors::Rescued.new($!,$@,opt.selections.str,opt.fns).location do
+ __LINE__.to_s + ':' + __FILE__
+ end
+ ensure
+ end
+ end
+end
+
diff --git a/lib/sisu/v6/txt_rst.rb b/lib/sisu/develop/txt_rst.rb
index 8e08ba81..a596fa85 100644
--- a/lib/sisu/v6/txt_rst.rb
+++ b/lib/sisu/develop/txt_rst.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** plaintext (smarttext) generation, rST
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/plaintext_rst.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: plaintext (smarttext) generation, rST
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt_rst.rb;hb=HEAD>
=end
module SiSU_Txt_rST
@@ -63,11 +60,15 @@ module SiSU_Txt_rST
include SiSU_Env
require_relative 'shared_metadata' # shared_metadata.rb
require_relative 'generic_parts' # generic_parts.rb
+ require_relative 'txt_read' # txt_read.rb
require_relative 'txt_shared' # txt_shared.rb
+ require_relative 'txt_rst_decorate' # txt_rst_decorate.rb
+ require_relative 'txt_output' # txt_output.rb
include SiSU_Param
- @@alt_id_count,@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0,0
+ @@alt_id_count,@@alt_id_count=0,0
@@tablefoot=''
class Source
+ include SiSU_Txt_Read
def initialize(opt)
@opt=opt
unless @opt.fns =~/(.+?)\.(?:-|ssm\.)?sst$/
@@ -77,46 +78,13 @@ module SiSU_Txt_rST
def read
begin
md=SiSU_Param::Parameters.new(@opt).get
- env=SiSU_Env::InfoEnv.new(@opt.fns)
- unless @opt.act[:quiet][:set]==:on
- tool=(@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? "#{env.program.text_editor} #{md.file.output_path.rst.dir}/#{md.file.base_filename.rst}"
- : "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}"
- (@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'rST (plaintext utf-8)',
- tool
- ).green_hi_blue
- : SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'rST (plaintext utf-8)',
- tool
- ).green_title_hi
- if (@opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on)
- SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- @opt.fns,
- "#{md.file.output_path.rst.dir}/#{md.file.base_filename.rst}"
- ).flow
- end
- end
- ao_array=SiSU_AO::Source.new(@opt).get # ao file drawn here
- wrap_width=if defined? md.make.plaintext_wrap \
- and md.make.plaintext_wrap
- md.make.plaintext_wrap
- elsif defined? env.plaintext_wrap \
- and env.plaintext_wrap
- env.plaintext_wrap
- else 78
- end
- #wrap_width=(defined? md.make.plaintext_wrap) ? md.make.plaintext_wrap : 78
- SiSU_Txt_rST::Source::Scroll.new(md,ao_array,wrap_width).songsheet
+ specific={
+ description: 'rST (plaintext utf-8)',
+ output_path: md.file.output_path.rst.dir,
+ output_file: md.file.base_filename.rst,
+ }
+ read_generic(@opt,specific)
+ SiSU_Txt_rST::Source::Scroll.new(md,@ao_array,@wrap_width).songsheet
rescue
SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
@@ -128,6 +96,7 @@ module SiSU_Txt_rST
class Scroll <Source
include SiSU_Parts_Generic
include SiSU_TextUtils
+ include SiSU_Decorate_Txt_rST
@@endnotes={ para: [], end: [] }
def initialize(md,data,wrap_width)
@md,@data,@wrap_width=md,data,wrap_width
@@ -200,7 +169,7 @@ WOK
end
def plaintext_tail
# env=SiSU_Env::InfoEnv.new(@md.fns)
- generator="Generated by: #{@md.sisu_version[:project]} #{@md.sisu_version[:version]} of #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" if @md.sisu_version[:version]
+ generator="Generated by: #{@md.project_details.project} #{@md.project_details.version} of #{@md.project_details.date_stamp} (#{@md.project_details.date})" if @md.project_details.version
lastdone="Last Generated on: #{Time.now}"
rubyv="Ruby version: #{@md.ruby_version}"
sc=if @md.sc_info
@@ -224,132 +193,6 @@ at:
* SiSU #{the_url.sisu_txt}
WOK
end
- def decorate
- def heading
- def underscore
- def l0
- '='
- end
- def l1
- '-'
- end
- def l2
- '`'
- end
- def l3
- ':'
- end
- def l4
- "'"
- end
- def l5
- '"'
- end
- self
- end
- self
- end
- def bold
- def open
- '*'
- end
- def close
- '*'
- end
- self
- end
- def italics
- def open
- '/'
- end
- def close
- '/'
- end
- self
- end
- def underscore
- def open
- '_'
- end
- def close
- '_'
- end
- self
- end
- #def emphasis
- # def open
- # ''
- # end
- # def close
- # ''
- # end
- # self
- #end
- def cite
- def open
- '"'
- end
- def close
- '"'
- end
- self
- end
- def insert
- def open
- '+'
- end
- def close
- '+'
- end
- self
- end
- def strike
- def open
- '-'
- end
- def close
- '-'
- end
- self
- end
- def superscript
- def open
- '^'
- end
- def close
- '^'
- end
- self
- end
- def subscript
- def open
- '['
- end
- def close
- ']'
- end
- self
- end
- def hilite
- def open
- '*'
- end
- def close
- '*'
- end
- self
- end
- def monospace
- def open
- '#'
- end
- def close
- '#'
- end
- self
- end
- self
- end
def heading_decorated_underscore(dob,times,p_num)
if dob.is==:heading
#times=@wrap_width if times > @wrap_width
@@ -518,41 +361,11 @@ WOK
content << plaintext[:metadata]
content << "#{break_line}#{divider*@wrap_width}#{break_line}" if @md.stmp =~/\w+/ #not used?
content << plaintext[:tail]
- Output.new(content,@md).rst
+ outputfile=SiSU_Env::FileOp.new(@md).write_file.rst
+ Txt_Output::Output.new.document(content,outputfile)
@@endnotes={ para: [], end: [] }
end
end
- class Output <Source
- include SiSU_Param
- include SiSU_Env
- def initialize(content,md)
- @content,@md=content,md
- end
- def rst
- file_plaintext=SiSU_Env::FileOp.new(@md).write_file.rst
- @sisu=[]
- emptyline=0
- @content.each do |para| # this is a hack
- if para.is_a?(Array) \
- and para.length > 0
- para.each do |line|
- if line
- line=line.gsub(/[ \t]+$/m,'').
- gsub(/^\A[ ]*\Z/m,'')
- (line=~/^\A\Z/) \
- ? (emptyline+=1)
- : emptyline=0
- if emptyline < 2 #remove additional empty lines
- file_plaintext.puts line
- end
- end
- end
- else file_plaintext.puts para #unix plaintext # /^([*=-]|\.){5}/
- end
- end
- file_plaintext.close
- end
- end
end
end
__END__
diff --git a/lib/sisu/develop/txt_rst_decorate.rb b/lib/sisu/develop/txt_rst_decorate.rb
new file mode 100644
index 00000000..6f1de7fd
--- /dev/null
+++ b/lib/sisu/develop/txt_rst_decorate.rb
@@ -0,0 +1,186 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** plaintext decoration
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt_rst_decorate.rb;hb=HEAD>
+
+=end
+
+module SiSU_Decorate_Txt_rST
+ def decorate
+ def heading
+ def underscore
+ def l0
+ '='
+ end
+ def l1
+ '-'
+ end
+ def l2
+ '`'
+ end
+ def l3
+ ':'
+ end
+ def l4
+ "'"
+ end
+ def l5
+ '"'
+ end
+ self
+ end
+ self
+ end
+ def bold
+ def open
+ '*'
+ end
+ def close
+ '*'
+ end
+ self
+ end
+ def italics
+ def open
+ '/'
+ end
+ def close
+ '/'
+ end
+ self
+ end
+ def underscore
+ def open
+ '_'
+ end
+ def close
+ '_'
+ end
+ self
+ end
+ #def emphasis
+ # def open
+ # ''
+ # end
+ # def close
+ # ''
+ # end
+ # self
+ #end
+ def cite
+ def open
+ '"'
+ end
+ def close
+ '"'
+ end
+ self
+ end
+ def insert
+ def open
+ '+'
+ end
+ def close
+ '+'
+ end
+ self
+ end
+ def strike
+ def open
+ '-'
+ end
+ def close
+ '-'
+ end
+ self
+ end
+ def superscript
+ def open
+ '^'
+ end
+ def close
+ '^'
+ end
+ self
+ end
+ def subscript
+ def open
+ '['
+ end
+ def close
+ ']'
+ end
+ self
+ end
+ def hilite
+ def open
+ '*'
+ end
+ def close
+ '*'
+ end
+ self
+ end
+ def monospace
+ def open
+ '#'
+ end
+ def close
+ '#'
+ end
+ self
+ end
+ self
+ end
+end
+__END__
diff --git a/lib/sisu/v6/txt_shared.rb b/lib/sisu/develop/txt_shared.rb
index f2b4a0bf..825d8041 100644
--- a/lib/sisu/v6/txt_shared.rb
+++ b/lib/sisu/develop/txt_shared.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** modules shared by flatfile output generators
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/txt_shared.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: modules shared by flatfile output generators
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt_shared.rb;hb=HEAD>
=end
module SiSU_TextUtils
diff --git a/lib/sisu/v6/txt_textile.rb b/lib/sisu/develop/txt_textile.rb
index 39e95bcb..d777587e 100644
--- a/lib/sisu/v6/txt_textile.rb
+++ b/lib/sisu/develop/txt_textile.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** plaintext (smarttext) generation, textile
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/plaintext_textile.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: plaintext (smarttext) generation, textile
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt_textile.rb;hb=HEAD>
=end
module SiSU_Txt_Textile
@@ -63,12 +60,16 @@ module SiSU_Txt_Textile
include SiSU_Env
require_relative 'shared_metadata' # shared_metadata.rb
require_relative 'generic_parts' # generic_parts.rb
+ require_relative 'txt_read' # txt_read.rb
require_relative 'txt_shared' # txt_shared.rb
+ require_relative 'txt_textile_decorate' # txt_textile_decorate.rb
+ require_relative 'txt_output' # txt_output.rb
include SiSU_Param
- @@alt_id_count,@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0,0
+ @@alt_id_count,@@alt_id_count=0,0
@@tablefoot=''
class Source
- include SiSU_Parts_Generic
+ include SiSU_Txt_Read
+ #include SiSU_Parts_Generic
def initialize(opt)
@opt=opt
unless @opt.fns =~/(.+?)\.(?:-|ssm\.)?sst$/
@@ -78,46 +79,13 @@ module SiSU_Txt_Textile
def read
begin
md=SiSU_Param::Parameters.new(@opt).get
- env=SiSU_Env::InfoEnv.new(@opt.fns)
- unless @opt.act[:quiet][:set]==:on
- tool=(@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? "#{env.program.text_editor} #{md.file.output_path.textile.dir}/#{md.file.base_filename.textile}"
- : "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}"
- (@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'Textile (plaintext utf-8)',
- tool
- ).green_hi_blue
- : SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'Textile (plaintext utf-8)',
- tool
- ).green_title_hi
- if (@opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on)
- SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- @opt.fns,
- "#{md.file.output_path.textile.dir}/#{md.file.base_filename.textile}"
- ).flow
- end
- end
- ao_array=SiSU_AO::Source.new(@opt).get # ao file drawn here
- wrap_width=if defined? md.make.plaintext_wrap \
- and md.make.plaintext_wrap
- md.make.plaintext_wrap
- elsif defined? env.plaintext_wrap \
- and env.plaintext_wrap
- env.plaintext_wrap
- else 78
- end
- #wrap_width=(defined? md.make.plaintext_wrap) ? md.make.plaintext_wrap : 78
- SiSU_Txt_Textile::Source::Scroll.new(md,ao_array,wrap_width).songsheet
+ specific={
+ description: 'Textile (plaintext utf-8)',
+ output_path: md.file.output_path.textile.dir,
+ output_file: md.file.base_filename.textile,
+ }
+ read_generic(@opt,specific)
+ SiSU_Txt_Textile::Source::Scroll.new(md,@ao_array,@wrap_width).songsheet
rescue
SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
__LINE__.to_s + ':' + __FILE__
@@ -129,6 +97,7 @@ module SiSU_Txt_Textile
class Scroll <Source
include SiSU_Parts_Generic
include SiSU_TextUtils
+ include SiSU_Decorate_Txt_Textile
@@endnotes={ para: [], end: [] }
def initialize(md,data,wrap_width)
@md,@data,@wrap_width=md,data,wrap_width
@@ -201,7 +170,7 @@ WOK
end
def plaintext_tail
# env=SiSU_Env::InfoEnv.new(@md.fns)
- generator="Generated by: #{@md.sisu_version[:project]} #{@md.sisu_version[:version]} of #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" if @md.sisu_version[:version]
+ generator="Generated by: #{@md.project_details.project} #{@md.project_details.version} of #{@md.project_details.date_stamp} (#{@md.project_details.date})" if @md.project_details.version
lastdone="Last Generated on: #{Time.now}"
rubyv="Ruby version: #{@md.ruby_version}"
sc=if @md.sc_info
@@ -225,143 +194,19 @@ at:
* SiSU #{the_url.sisu_txt}
WOK
end
- def decorate
- def heading
- def inline
- def l0
- 'h1. '
- end
- def l1
- 'h2. '
- end
- def l2
- 'h3. '
- end
- def l3
- 'h4. '
- end
- def l4
- 'h5. '
- end
- def l5
- 'h6. '
- end
- self
- end
- self
- end
- def bold
- def open
- '*'
- end
- def close
- '*'
- end
- self
- end
- def italics
- def open
- '_'
- end
- def close
- '_'
- end
- self
- end
- def underscore
- def open
- '+'
- end
- def close
- '+'
- end
- self
- end
- #def emphasis
- # def open
- # ''
- # end
- # def close
- # ''
- # end
- # self
- #end
- def cite
- def open
- '"'
- end
- def close
- '"'
- end
- self
- end
- def insert
- def open
- ''
- end
- def close
- ''
- end
- self
- end
- def strike
- def open
- '-'
- end
- def close
- '-'
- end
- self
- end
- def superscript
- def open
- '^'
- end
- def close
- '^'
- end
- self
- end
- def subscript
- def open
- '~'
- end
- def close
- '~'
- end
- self
- end
- def hilite
- def open
- '*'
- end
- def close
- '*'
- end
- self
- end
- def monospace
- def open
- ''
- end
- def close
- ''
- end
- self
- end
- self
- end
def heading_decorated_inline(dob)
- heading_inline = case dob.lc
- when 0 then decorate.heading.inline.l0
- when 1 then decorate.heading.inline.l1
- when 2 then decorate.heading.inline.l2
- when 3 then decorate.heading.inline.l3
- when 4 then decorate.heading.inline.l4
- when 5 then decorate.heading.inline.l5
- when 6 then decorate.heading.inline.l6
+ if dob.is==:heading
+ heading_inline = case dob.lc
+ when 0 then decorate.heading.inline.l0
+ when 1 then decorate.heading.inline.l1
+ when 2 then decorate.heading.inline.l2
+ when 3 then decorate.heading.inline.l3
+ when 4 then decorate.heading.inline.l4
+ when 5 then decorate.heading.inline.l5
+ when 6 then decorate.heading.inline.l6
+ end
+ heading_inline + ' ' + dob.obj
end
- heading_inline + ' ' + dob.obj
end
def plaintext_structure(dob='',p_num='') #% Used to extract the structure of a document
util=nil
@@ -512,41 +357,11 @@ WOK
content << plaintext[:metadata]
content << "#{break_line}#{divider*@wrap_width}#{break_line}" if @md.stmp =~/\w+/ #not used?
content << plaintext[:tail]
- Output.new(content,@md).textile
+ outputfile=SiSU_Env::FileOp.new(@md).write_file.textile
+ Txt_Output::Output.new.document(content,outputfile)
@@endnotes={ para: [], end: [] }
end
end
- class Output <Source
- include SiSU_Param
- include SiSU_Env
- def initialize(content,md)
- @content,@md=content,md
- end
- def textile
- file_plaintext=SiSU_Env::FileOp.new(@md).write_file.textile
- @sisu=[]
- emptyline=0
- @content.each do |para| # this is a hack
- if para.is_a?(Array) \
- and para.length > 0
- para.each do |line|
- if line
- line=line.gsub(/[ \t]+$/m,'').
- gsub(/^\A[ ]*\Z/m,'')
- (line=~/^\A\Z/) \
- ? (emptyline+=1)
- : emptyline=0
- if emptyline < 2 #remove additional empty lines
- file_plaintext.puts line
- end
- end
- end
- else file_plaintext.puts para #unix plaintext # /^([*=-]|\.){5}/
- end
- end
- file_plaintext.close
- end
- end
end
end
__END__
diff --git a/lib/sisu/develop/txt_textile_decorate.rb b/lib/sisu/develop/txt_textile_decorate.rb
new file mode 100644
index 00000000..03fdc68b
--- /dev/null
+++ b/lib/sisu/develop/txt_textile_decorate.rb
@@ -0,0 +1,186 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** plaintext decoration
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/txt_textile_decorate.rb;hb=HEAD>
+
+=end
+
+module SiSU_Decorate_Txt_Textile
+ def decorate
+ def heading
+ def inline
+ def l0
+ 'h1. '
+ end
+ def l1
+ 'h2. '
+ end
+ def l2
+ 'h3. '
+ end
+ def l3
+ 'h4. '
+ end
+ def l4
+ 'h5. '
+ end
+ def l5
+ 'h6. '
+ end
+ self
+ end
+ self
+ end
+ def bold
+ def open
+ '*'
+ end
+ def close
+ '*'
+ end
+ self
+ end
+ def italics
+ def open
+ '_'
+ end
+ def close
+ '_'
+ end
+ self
+ end
+ def underscore
+ def open
+ '+'
+ end
+ def close
+ '+'
+ end
+ self
+ end
+ #def emphasis
+ # def open
+ # ''
+ # end
+ # def close
+ # ''
+ # end
+ # self
+ #end
+ def cite
+ def open
+ '"'
+ end
+ def close
+ '"'
+ end
+ self
+ end
+ def insert
+ def open
+ ''
+ end
+ def close
+ ''
+ end
+ self
+ end
+ def strike
+ def open
+ '-'
+ end
+ def close
+ '-'
+ end
+ self
+ end
+ def superscript
+ def open
+ '^'
+ end
+ def close
+ '^'
+ end
+ self
+ end
+ def subscript
+ def open
+ '~'
+ end
+ def close
+ '~'
+ end
+ self
+ end
+ def hilite
+ def open
+ '*'
+ end
+ def close
+ '*'
+ end
+ self
+ end
+ def monospace
+ def open
+ ''
+ end
+ def close
+ ''
+ end
+ self
+ end
+ self
+ end
+end
+__END__
diff --git a/lib/sisu/v6/update.rb b/lib/sisu/develop/update.rb
index e72c26ee..eb1094ea 100644
--- a/lib/sisu/v6/update.rb
+++ b/lib/sisu/develop/update.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** update previous output (with similar output file type formats)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/update.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: update previous output (with similar output file type formats)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/update.rb;hb=HEAD>
=end
module SiSU_UpdateControlFlag
diff --git a/lib/sisu/v6/urls.rb b/lib/sisu/develop/urls.rb
index b4bf9d23..85ec1316 100644
--- a/lib/sisu/v6/urls.rb
+++ b/lib/sisu/develop/urls.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** urls for output files
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/urls.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: urls for output files
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/urls.rb;hb=HEAD>
=end
module SiSU_Urls
@@ -200,6 +197,15 @@ module SiSU_Urls
fn: @fn[:txt_textile],
}
end
+ def orgmode
+ {
+ cmd: '--orgmode',
+ viewer: @prog.web_browser,
+ f_pth: @md.file.output_path.orgmode.dir + '/' \
+ + @md.file.base_filename.orgmode,
+ fn: @fn[:txt_orgmode],
+ }
+ end
self
end
def html
@@ -560,6 +566,10 @@ module SiSU_Urls
show.report(report_info.text.rst)
#show.maintenance(report_info.text.rst)
end
+ if @opt.act[:txt_orgmode][:set]==:on
+ show.report(report_info.text.orgmode)
+ #show.maintenance(report_info.text.orgmode)
+ end
if (@opt.act[:html][:set]==:on \
or @opt.act[:html_scroll][:set]==:on \
or @opt.act[:html_seg][:set]==:on)
@@ -648,7 +658,7 @@ module SiSU_Urls
show.report(report_info.hash_digests)
#show.maintenance(report_info.hash_digests)
end
- if @opt.act[:po4a][:set]==:on
+ if @opt.act[:po4a_shelf][:set]==:on
#if @opt.fns =~/\S+?~\S{2}(?:_\S{2})?\.ss[mt]/
#else
#end
diff --git a/lib/sisu/v5/utils.rb b/lib/sisu/develop/utils.rb
index ba467bb4..a43154fd 100644
--- a/lib/sisu/v5/utils.rb
+++ b/lib/sisu/develop/utils.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, debug related
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/utils.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, debug related
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/utils.rb;hb=HEAD>
=end
module SiSU_Utils
@@ -135,6 +132,12 @@ module SiSU_Utils
def mark(v=nil,x=nil)
puts set(v,x)
end
+ def tell(v=nil,x=nil)
+ puts set(v,x)
+ end
+ def report(v=nil,x=nil)
+ puts set(v,x)
+ end
def ok(v=nil,x=nil)
if (v.is_a?(Symbol) \
and x.is_a?(String))
diff --git a/lib/sisu/develop/utils_composite.rb b/lib/sisu/develop/utils_composite.rb
new file mode 100644
index 00000000..ee8fe77c
--- /dev/null
+++ b/lib/sisu/develop/utils_composite.rb
@@ -0,0 +1,115 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** system environment, debug related
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/utils_composite.rb;hb=HEAD>
+
+=end
+module SiSU_Composite_Doc_Utils
+ def inserts_array(loadfilename)
+ IO.readlines(loadfilename,'')
+ end
+ def insert_filename?(para)
+ if para =~ /^<<\s+((?:https?|file):\/\/\S+?\.ss[it])$/ # and NetTest
+ url($1.strip)
+ elsif para =~/^<<\s*(\S+?\.ss[it])$/
+ $1.strip
+ end
+ end
+ def extract_filenames(loadfilename,file_names_arr)
+ file_names_arr << loadfilename
+ ssi_files=[]
+ if loadfilename =~/\S+?\.ss[im]$/
+ inserts_array(loadfilename).each do |para|
+ filen=insert_filename?(para)
+ file_names_arr << filen
+ if filen =~/\S+?\.ssi$/
+ ssi_files << filen
+ end
+ end
+ end
+ ssi_files.each do |fn|
+ extract_filenames(fn,file_names_arr)
+ end
+ file_names_arr.flatten.compact.uniq.sort
+ end
+ def composite_and_imported_filenames_array(loadfilename)
+ file_names_arr=[]
+ begin
+ if FileTest.file?(loadfilename)
+ if loadfilename =~/\S+?\.ss[itm]$/
+ if (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'loading:',
+ loadfilename,
+ ).txt_grey
+ end
+ file_names_arr=extract_filenames(loadfilename,file_names_arr)
+ end
+ end
+ if (@opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on)
+ p file_names_arr ;p file_names_arr.length
+ end
+ file_names_arr
+ rescue
+ SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
+ __LINE__.to_s + ':' + __FILE__
+ end
+ ensure
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/develop/utils_response.rb b/lib/sisu/develop/utils_response.rb
new file mode 100644
index 00000000..a29f2fcd
--- /dev/null
+++ b/lib/sisu/develop/utils_response.rb
@@ -0,0 +1,114 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** Request response
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/utils_response.rb;hb=HEAD>
+
+=end
+module SiSU_Response
+ def available_selections_
+ %{'yes', 'no', 'quit' or 'exit'; [ynqx]}
+ end
+ def response?(ask)
+ response='redo'
+ print ask + %{ [#{available_selections_}]: }
+ response=File.new('/dev/tty').gets.strip
+ case response
+ when /^(?:y|yes)$/ then true
+ when /^(?:n|no)$/ then false
+ when /^(?:[qx]|quit|exit)$/ then exit
+ else puts %{[please type: #{available_selections_}]}
+ response?(ask)
+ end
+ end
+ def query
+ def selections_available_(selections=:strict)
+ short_options=(selections == :strict) ? '' : '; [ynqx]'
+ %{'yes', 'no', 'quit' or 'exit'#{short_options}}
+ end
+ def selection_options
+ def response_strict(resp)
+ case resp
+ when /^(?:yes)$/ then true
+ when /^(?:no)$/ then false
+ when /^(?:quit|exit)$/ then exit
+ else
+ puts %{response was: #{resp}}
+ puts %{[please type to select: #{selections_available_(:strict)}]}
+ answer?('',:strict)
+ end
+ end
+ def response_short(resp)
+ case resp
+ when /^(?:y|yes)$/ then true
+ when /^(?:n|no)$/ then false
+ when /^(?:[qx]|quit|exit)$/ then exit
+ else
+ puts %{response was: #{resp}}
+ puts %{[please type to select: #{selections_available_(:short)}]}
+ answer?('',:short)
+ end
+ end
+ self
+ end
+ def answer?(ask,selections=:strict)
+ resp='redo'
+ print ask + %{PROCEED? [#{selections_available_(selections)}]: }
+ resp=File.new('/dev/tty').gets.strip
+ (selections==:strict) \
+ ? selection_options.response_strict(resp)
+ : selection_options.response_short(resp)
+ end
+ self
+ end
+end
+__END__
diff --git a/lib/sisu/v6/utils_screen_text_color.rb b/lib/sisu/develop/utils_screen_text_color.rb
index a1b194a3..fef7ba77 100644
--- a/lib/sisu/v6/utils_screen_text_color.rb
+++ b/lib/sisu/develop/utils_screen_text_color.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** system environment, screen colors text
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/utils_screen_text_color.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, screen colors text
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/utils_screen_text_color.rb;hb=HEAD>
=end
module SiSU_Screen
diff --git a/lib/sisu/develop/utils_spell.rb b/lib/sisu/develop/utils_spell.rb
new file mode 100644
index 00000000..ba401c69
--- /dev/null
+++ b/lib/sisu/develop/utils_spell.rb
@@ -0,0 +1,99 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** spellchecking
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/utils_spell.rb;hb=HEAD>
+
+=end
+module SiSU_SpellUtility
+ class Spell
+ def initialize(input,filesrc,flg)
+ @flg=flg
+ @filename, @filetype = /(.+?)(\.\w\w\w0$)/.match(filesrc)[1,2] #.gsub(/\.\w\w\w0$/, "")
+ @input=input
+ @allwords=[]
+ puts @filename
+ @speller='aspell' # 'ispell'
+ @dictionary='british'
+ @lang='en_GB'
+ end
+ def check
+ @input.each do |data|
+ data=data.gsub(/(https?|www|ftp|gopher|png|jpg|gif|html|htm)\S+/i,' ').
+ gsub(/(&nbsp;|#{Mx[:nbsp]})/i,' ').
+ gsub(/<\/?(table|tr|td|b|p|href).*?>/i,' ').
+ gsub(/(<==.+|<:\S+>|<!.+?!>|^@\S+?:.+|\{\{\{|~)/,' ').
+ gsub(/(["|<>)(\n'`.;&_-]|\=)/,' ').
+ gsub(/\b(altExternal|
+ target|externalimg|
+ srcimagebext|
+ img|src|toc|pdf|
+ cd|org|
+ helvetica|roman
+ )\b/i,' ').
+ gsub(/EOF/,'')
+ @words=data.scan(/\S+/)
+ @words.each { |y| @allwords << y }
+ end
+ @allwords=@allwords.uniq
+ if @flg =~ /S/
+ File.open('/home/ralph/spell_error','a+') do |file| #fix
+ file.puts %{\n\n<<#{@filename}>>}
+ end
+ @allwords.each { |y| puts y.inspect; system(%{cat #{y} | /usr/bin/#{@speller} -l -d #{@dictionary} >> ~/spell_error })}
+ else
+ @allwords.each { |y| sp=%x{echo #{y}|#{@speller} -l }; puts sp unless sp.empty?}
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/webrick.rb b/lib/sisu/develop/webrick.rb
index 9519f34b..9de19792 100644
--- a/lib/sisu/v5/webrick.rb
+++ b/lib/sisu/develop/webrick.rb
@@ -1,61 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** webrick share - note sisu by default does not link with file suffixes,
+ see man pages for options
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/webrick.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: webrick share - note sisu by default does not link with file
- suffixes, see man pages for options
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/webrick.rb;hb=HEAD>
=end
module SiSU_Webserv
diff --git a/lib/sisu/v6/wikispeak.rb b/lib/sisu/develop/wikispeak.rb
index b2fe65fc..d1682858 100644
--- a/lib/sisu/v6/wikispeak.rb
+++ b/lib/sisu/develop/wikispeak.rb
@@ -1,60 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** wiki text generation, stripped wiki output (unix, linefeed)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * License: GPL 3 or later:
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- SiSU, a framework for document structuring, publishing and search
+** License: GPL 3 or later:
- Copyright (C) Ralph Amissah
+ SiSU, a framework for document structuring, publishing and search
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ Copyright (C) Ralph Amissah
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/wikispeak.rb;hb=HEAD>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: wiki text generation, stripped wiki output (unix, linefeed)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/wikispeak.rb;hb=HEAD>
=end
module SiSU_Wikispeak
@@ -66,7 +64,7 @@ module SiSU_Wikispeak
include Format
require_relative 'html_parts' # html_parts.rb
require_relative 'txt_shared'
- @@alt_id_count,@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0,0
+ @@alt_id_count,@@alt_id_count=0,0
@@tablefoot=''
class Source
def initialize(opt)
@@ -187,7 +185,7 @@ WOK
end
end
def wiki_tail
- generator="Generated by: #{@md.sisu_version[:project]} #{@md.sisu_version[:version]} of #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" if @md.sisu_version[:version]
+ generator="Generated by: #{@md.project_details.project} #{@md.project_details.version} of #{@md.project_details.date_stamp} (#{@md.project_details.date})" if @md.project_details.version
lastdone="Last Generated on: #{Time.now}"
rubyv="Ruby version: #{@md.ruby_version}"
sc=if @md.sc_info
diff --git a/lib/sisu/v6/xhtml.rb b/lib/sisu/develop/xhtml.rb
index 40073ff3..d24a568e 100644
--- a/lib/sisu/v6/xhtml.rb
+++ b/lib/sisu/develop/xhtml.rb
@@ -1,61 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** Description: xhtml output logic, flow
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xhtml.rb;hb=HEAD>
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xhtml.rb;hb=HEAD>
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: xhtml output logic, flow
- ** Notes: tidy -xml scroll.xhtml >> index.tidy
=end
module SiSU_XHTML
require_relative 'se_hub_particulars' # se_hub_particulars.rb
@@ -66,10 +63,11 @@ module SiSU_XHTML
include SiSU_XML_Munge
require_relative 'xml_format' # xml_format.rb
include SiSU_XML_Format
+ require_relative 'xml_persist' # xml_persist.rb
require_relative 'rexml' # rexml.rb
include SiSU_Rexml
require_relative 'shared_metadata' # shared_metadata.rb
- @@alt_id_count,@@tablehead,@@number_of_cols=0,0,0
+ @@alt_id_count=0
@@tablefoot=''
class Source
def initialize(opt)
@@ -147,18 +145,22 @@ module SiSU_XHTML
require_relative 'txt_shared' # txt_shared.rb
include SiSU_TextUtils
require_relative 'css' # css.rb
- @@xml={ body: [], sisu: [], open: [], close: [], head: [] }
def initialize(particulars)
@env,@md,@ao_array=particulars.env,particulars.md,particulars.ao_array
@tab="\t"
@trans=SiSU_XML_Munge::Trans.new(@md)
@sys=SiSU_Env::SystemCall.new
+ @per=SiSU_XML_Persist::Persist.new
end
def songsheet
- pre
- @data=markup(@ao_array)
- post
- publish
+ begin
+ pre
+ @data=markup(@ao_array)
+ post
+ publish
+ ensure
+ SiSU_XML_Persist::Persist.new.persist_init
+ end
end
protected
def embedded_endnotes(dob='')
@@ -205,7 +207,7 @@ WOK
end
def xml_head
metadata=SiSU_Metadata::Summary.new(@md).xhtml_scroll.metadata
- @@xml[:head] << metadata
+ @per.head << metadata
end
def name_tags(dob)
tags=''
@@ -231,15 +233,15 @@ WOK
gsub(/#{Mx[:en_b_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_b_c]}/,'<en>\1</en>')
util=SiSU_TextUtils::Wrap.new(dob.obj,70)
wrapped=util.line_wrap
- @@xml[:body] << if defined? dob.ocn
+ @per.body << if defined? dob.ocn
%{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
else "#{Ax[:tab]*0}<object>"
end
- @@xml[:body] << %{#{Ax[:tab]*1}<text class="#{type}">#{named}\n#{Ax[:tab]*2}#{wrapped}\n#{Ax[:tab]*1}</text>} unless lv # main text, contents, body KEEP
- @@xml[:body] << %{#{Ax[:tab]*1}<text class="h#{lv}">#{named}\n#{Ax[:tab]*2}#{wrapped}\n#{Ax[:tab]*1}</text>} if lv # main text, contents, body KEEP
- @@xml[:body] << @endnotes.compact.join if @endnotes.length > 0 # main text, endnotes KEEP
- @@xml[:body] << "#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>" if defined? dob.ocn
- @@xml[:body] << "#{Ax[:tab]*0}</object>"
+ @per.body << %{#{Ax[:tab]*1}<text class="#{type}">#{named}\n#{Ax[:tab]*2}#{wrapped}\n#{Ax[:tab]*1}</text>} unless lv # main text, contents, body KEEP
+ @per.body << %{#{Ax[:tab]*1}<text class="h#{lv}">#{named}\n#{Ax[:tab]*2}#{wrapped}\n#{Ax[:tab]*1}</text>} if lv # main text, contents, body KEEP
+ @per.body << @endnotes.compact.join if @endnotes.length > 0 # main text, endnotes KEEP
+ @per.body << "#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>" if defined? dob.ocn
+ @per.body << "#{Ax[:tab]*0}</object>"
@endnotes=[]
end
end
@@ -249,12 +251,12 @@ WOK
dob.obj=dob.obj.strip.
gsub(/#{Mx[:en_a_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_a_c]}/,'<en>\1</en>'). #footnote/endnote clean
gsub(/#{Mx[:en_b_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_b_c]}/,'<en>\1</en>') #footnote/endnote clean
- @@xml[:body] << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
- @@xml[:body] << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
- @@xml[:body] << %{#{Ax[:tab]*1}<text class="block">#{named}#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*1}</text>}
- @@xml[:body] << "#{Ax[:tab]*0}</object>"
+ @per.body << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
+ @per.body << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
+ @per.body << %{#{Ax[:tab]*1}<text class="block">#{named}#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*1}</text>}
+ @per.body << "#{Ax[:tab]*0}</object>"
end
def group_structure(dob)
named=name_tags(dob)
@@ -262,42 +264,42 @@ WOK
dob.obj=dob.obj.strip.
gsub(/#{Mx[:en_a_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_a_c]}/,'<en>\1</en>'). #footnote/endnote clean
gsub(/#{Mx[:en_b_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_b_c]}/,'<en>\1</en>') #footnote/endnote clean
- @@xml[:body] << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
- @@xml[:body] << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
- @@xml[:body] << %{#{Ax[:tab]*1}<text class="group">#{named}#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*1}</text>}
- @@xml[:body] << "#{Ax[:tab]*0}</object>"
+ @per.body << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
+ @per.body << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
+ @per.body << %{#{Ax[:tab]*1}<text class="group">#{named}#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*1}</text>}
+ @per.body << "#{Ax[:tab]*0}</object>"
end
def poem_structure(dob)
named=name_tags(dob)
dob=@trans.markup_group(dob)
dob.obj=dob.obj.strip
- @@xml[:body] << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
- @@xml[:body] << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
- @@xml[:body] << %{#{Ax[:tab]*1}<text class="verse">#{named}#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*1}</text>}
- @@xml[:body] << "#{Ax[:tab]*0}</object>"
+ @per.body << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
+ @per.body << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
+ @per.body << %{#{Ax[:tab]*1}<text class="verse">#{named}#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*1}</text>}
+ @per.body << "#{Ax[:tab]*0}</object>"
end
def code_structure(dob)
named=name_tags(dob)
dob=@trans.markup_group(dob)
dob.obj=dob.obj.gsub(/\s\s/,'&#160;&#160;').strip
- @@xml[:body] << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
- @@xml[:body] << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
- @@xml[:body] << %{#{Ax[:tab]*1}<text class="code">#{named}#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*1}</text>}
- @@xml[:body] << "#{Ax[:tab]*0}</object>"
+ @per.body << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
+ @per.body << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
+ @per.body << %{#{Ax[:tab]*1}<text class="code">#{named}#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*1}</text>}
+ @per.body << "#{Ax[:tab]*0}</object>"
end
def table_structure(dob)
named=name_tags(dob)
table=SiSU_XHTML_Shared::TableXHTML.new(dob)
- @@xml[:body] << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
- @@xml[:body] << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
- @@xml[:body] << %{#{Ax[:tab]*2}#{named}#{table.table.obj}}
- @@xml[:body] << "#{Ax[:tab]*0}</object>"
+ @per.body << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
+ @per.body << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
+ @per.body << %{#{Ax[:tab]*2}#{named}#{table.table.obj}}
+ @per.body << "#{Ax[:tab]*0}</object>"
end
def markup(data)
@endnotes=[]
@@ -373,39 +375,38 @@ WOK
end
6.downto(4) do |x|
y=x - 1; v=x - 3
- @@xml[:body] << "#{Ax[:tab]*5}</content>\n#{Ax[:tab]*y}</contents#{v}>" if @level[x]==true
+ @per.body << "#{Ax[:tab]*5}</content>\n#{Ax[:tab]*y}</contents#{v}>" if @level[x]==true
end
3.downto(1) do |x|
y=x - 1
- @@xml[:body] << "#{Ax[:tab]*y}</heading#{x}>" if @level[x]==true
+ @per.body << "#{Ax[:tab]*y}</heading#{x}>" if @level[x]==true
end
end
def pre
rdf=SiSU_XML_Tags::RDF.new(@md)
- @@xml[:head],@@xml[:body]=[],[]
+ @per.head,@per.body=[],[]
stylesheet=SiSU_Style::CSS_HeadInfo.new(@md,'xhtml').stylesheet
encoding=(@sys.locale =~/utf-?8/i) \
? '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
: '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>'
- @@xml[:open] =<<WOK
+ @per.open =<<WOK
#{encoding}
#{stylesheet.css_head_xml}
#{rdf.comment_xml}
<document>
WOK
- @@xml[:head] << %{<head>\n\t<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />}
- @@xml[:body] << '<body>'
+ @per.head << %{<head>\n\t<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />}
+ @per.body << '<body>'
end
def post
- @@xml[:head] << '</head>'
- @@xml[:body] << '</body>'
- @@xml[:close] = '</document>'
+ @per.head << '</head>'
+ @per.body << '</body>'
+ @per.close = '</document>'
end
def publish
content=[]
- content << @@xml[:open] << @@xml[:head] << @@xml[:body] << @@xml[:metadata]
- content << @@xml[:owner_details] if @md.stmp =~/\w\w/
- content << @@xml[:tail] << @@xml[:close]
+ content << @per.open << @per.head << @per.body << @per.metadata
+ content << @per.tail << @per.close
content=content.flatten.compact
Output.new(content,@md).xhtml
@@xml={}
@@ -443,11 +444,11 @@ WOK
'check document structure'
).colorize
tell=SiSU_Screen::Ansi.new(
- @md.opt.act[:color_state][:set],
- 'invert',
- '',
- ''
- )
+ @md.opt.act[:color_state][:set],
+ 'invert',
+ '',
+ ''
+ )
tell.grey_open
end
tidyfile='/dev/null' #don't want one or screen output, check for alternative flags
@@ -461,6 +462,8 @@ WOK
end
end
__END__
+** Notes:
+tidy -xml scroll.xhtml >> index.tidy
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
diff --git a/lib/sisu/v6/xhtml_epub2.rb b/lib/sisu/develop/xhtml_epub2.rb
index 4850ad73..0c4e6245 100644
--- a/lib/sisu/v6/xhtml_epub2.rb
+++ b/lib/sisu/develop/xhtml_epub2.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** epub generation, processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/epub.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: epub generation, processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xhtml_epub2.rb;hb=HEAD>
=end
module SiSU_XHTML_EPUB2
@@ -76,6 +73,7 @@ module SiSU_XHTML_EPUB2
require_relative 'xhtml_epub2_tune' # xhtml_epub2_tune.rb
include SiSU_XHTML_EPUB2_Tune
require_relative 'xhtml_epub2_concordance' # xhtml_epub2_concordance.rb
+ require_relative 'xhtml_epub2_persist' # xhtml_epub2_persist.rb
class Source
def initialize(opt)
@opt=opt
@@ -127,9 +125,9 @@ module SiSU_XHTML_EPUB2
SiSU_Env::FileOp.new(@md).mkdir.output.epub
@tuned_file_array=SiSU_XHTML_EPUB2::Source::XHTML_Environment.new(@particulars).tuned_file_instructions
data=@tuned_file_array
- toc=SiSU_XHTML_EPUB2::Source::Toc.new(@md,data).songsheet
+ per=SiSU_XHTML_EPUB2::Source::Toc.new(@md,data).songsheet
data=@tuned_file_array
- SiSU_XHTML_EPUB2::Source::ScrollHeadAndSegToc.new(@md,toc).in_common #watch
+ SiSU_XHTML_EPUB2::Source::ScrollHeadAndSegToc.new(@md,per).in_common #watch
SiSU_XHTML_EPUB2::Source::Seg.new(@md,data).songsheet
SiSU_XHTML_EPUB2::Source::Output.new(@md).songsheet
rescue
@@ -147,11 +145,10 @@ module SiSU_XHTML_EPUB2
end
end
SiSU_Env::Clear.new(@opt.selections.str,@opt.fns).param_instantiate
- @@flag,@@scr,@@seg,@@seg_endnotes,@@seg_subtoc,@@seg_ad={},{},{},{},{},{}
- @@seg_total,@@tracker,@@loop_count,@@tablehead,@@number_of_cols=0,0,0,0,0
- @@seg_name,@@seg_name_html,@@seg_subtoc_array,@@seg_endnotes_array,@@segtocband,@@tablefoot=Array.new(7){[]}
- @@filename_seg,@@seg_url,@@fn,@@to_lev4,@@get_hash_to,@@get_hash_fn='','','','','','',''
- @@is4=@@is3=@@is2=@@is1=@@heading1=@@heading2=@@heading3=@@heading4=0
+ @@flag,@@scr,@@seg,@@seg_endnotes,@@seg_subtoc={},{},{},{},{}
+ @@tracker=0
+ @@seg_name,@@seg_name_html,@@seg_subtoc_array,@@seg_endnotes_array,@@tablefoot=Array.new(5){[]}
+ @@filename_seg,@@seg_url,@@to_lev4,@@get_hash_to,@@get_hash_fn='','','','',''
end
end
private
@@ -205,7 +202,6 @@ module SiSU_XHTML_EPUB2
end
end
class Toc
- @@toc={ seg: [], seg_mini: [], scr: [], ncx: [], opf: [] }
@@seg_url=''
@@firstseg=nil
def initialize(md=nil,data='')
@@ -213,237 +209,242 @@ module SiSU_XHTML_EPUB2
@epub=SiSU_XHTML_EPUB2_Format::HeadInformation.new(@md)
@tell=SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set]) if @md
@make=SiSU_Env::ProcessingSettings.new(@md)
+ @per=SiSU_XHTML_EPUB2_Persist::PersistTOC.new
end
def songsheet #extracts toc for scroll & seg
- if (@md.opt.act[:verbose][:set]==:on \
- || @md.opt.act[:verbose_plus][:set]==:on \
- || @md.opt.act[:maintenance][:set]==:on)
- SiSU_Screen::Ansi.new(
- @md.opt.act[:color_state][:set],
- 'Toc'
- ).txt_grey
- end
- toc=nil
- @@firstseg=nil
- @@toc={ seg: [], seg_mini: [], scr: [], ncx: [], opf: [] }
- md_opf_a_content,md_opf_a_spine,md_opf_a_guide=[],[],[]
- @nav_no=0
- @s_a_no,@s_b_no,@s_c_no,@s_d_no,@lv5_no,@lv6_no=0,0,0,0,0,0
- @@toc[:ncx] << @epub.toc_ncx.open #epub ncx navmap
- @@toc[:ncx] << @epub.toc_ncx.head_open << @epub.toc_ncx.head << @epub.toc_ncx.head_close
- @@toc[:ncx] << @epub.toc_ncx.doc_title << @epub.toc_ncx.doc_author
- @@toc[:ncx] << @epub.toc_ncx.navmap_open
- @@toc[:opf] << @epub.metadata_opf.package_open
- @@toc[:opf] << @epub.metadata_opf.metadata
- @@toc[:opf] << @epub.metadata_opf.manifest_open
- @@toc[:seg] << %{<div class="content">\n<div class="substance">}
- @@toc[:scr] << %{<div class="content">\n<div class="substance">}
- if defined? @md.make.cover_image \
- and @md.make.cover_image.is_a?(Hash) \
- and @md.make.cover_image[:cover] =~/\S+/
- md_opf_a_content << @epub.metadata_opf.manifest_cover_image_information(@md)
- md_opf_a_spine << @epub.metadata_opf.spine_cover_image
- md_opf_a_guide << @epub.metadata_opf.guide_cover_image
- end
- md_opf_a_content << @epub.metadata_opf.manifest_content_sisu_toc
- if @make.build.toc?
- md_opf_a_spine << @epub.metadata_opf.spine_sisu_toc
- md_opf_a_guide << @epub.metadata_opf.guide_sisu_toc
- end
- @ncxo=[false,false,false,false,false,false,false]
- @dob_toc2,@dob_toc3=nil,nil
- @ncx_cls=[]
- @level_a_first_occurrence=true
- @data.each do |dob|
- if dob.is==:heading \
- || dob.is==:heading_insert
- dob_toc=dob.dup
- toc=case dob_toc.ln
- when 0
- @s_a_no +=1
- lv_name='section_a' + @s_a_no.to_s
- @nav_no+=1
- @nav_no2=@nav_no
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[7]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[6]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[5]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[4]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[3]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[2]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[1]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[0]
- @ncxo[0],@ncxo[1],@ncxo[2],@ncxo[3],@ncxo[4],@ncxo[5],@ncxo[6],@ncxo[7]=
- true, false, false, false, false, false, false, false
- @epub.sections(dob_toc,lv_name)
- if @level_a_first_occurrence \
- && @make.build.toc?
- @@toc[:ncx] << @epub.toc_ncx.navmap_sisu_toc(@nav_no) #epub ncx navmap, toc
+ begin
+ if (@md.opt.act[:verbose][:set]==:on \
+ || @md.opt.act[:verbose_plus][:set]==:on \
+ || @md.opt.act[:maintenance][:set]==:on)
+ SiSU_Screen::Ansi.new(
+ @md.opt.act[:color_state][:set],
+ 'Toc'
+ ).txt_grey
+ end
+ toc=nil
+ @@firstseg=nil
+ SiSU_XHTML_EPUB2_Persist::PersistTOC.new.persist_init
+ md_opf_a_content,md_opf_a_spine,md_opf_a_guide=[],[],[]
+ @nav_no=0
+ @s_a_no,@s_b_no,@s_c_no,@s_d_no,@lv5_no,@lv6_no=0,0,0,0,0,0
+ @per.ncx << @epub.toc_ncx.open #epub ncx navmap
+ @per.ncx << @epub.toc_ncx.head_open << @epub.toc_ncx.head << @epub.toc_ncx.head_close
+ @per.ncx << @epub.toc_ncx.doc_title << @epub.toc_ncx.doc_author
+ @per.ncx << @epub.toc_ncx.navmap_open
+ @per.opf << @epub.metadata_opf.package_open
+ @per.opf << @epub.metadata_opf.metadata
+ @per.opf << @epub.metadata_opf.manifest_open
+ @per.seg << %{<div class="content">\n<div class="substance">}
+ @per.scr << %{<div class="content">\n<div class="substance">}
+ if defined? @md.make.cover_image \
+ and @md.make.cover_image.is_a?(Hash) \
+ and @md.make.cover_image[:cover] =~/\S+/
+ md_opf_a_content << @epub.metadata_opf.manifest_cover_image_information(@md)
+ md_opf_a_spine << @epub.metadata_opf.spine_cover_image
+ md_opf_a_guide << @epub.metadata_opf.guide_cover_image
+ end
+ md_opf_a_content << @epub.metadata_opf.manifest_content_sisu_toc
+ if @make.build.toc?
+ md_opf_a_spine << @epub.metadata_opf.spine_sisu_toc
+ md_opf_a_guide << @epub.metadata_opf.guide_sisu_toc
+ end
+ @ncxo=[false,false,false,false,false,false,false]
+ @dob_toc2,@dob_toc3=nil,nil
+ @ncx_cls=[]
+ @level_a_first_occurrence=true
+ @data.each do |dob|
+ if dob.is==:heading \
+ || dob.is==:heading_insert
+ dob_toc=dob.dup
+ toc=case dob_toc.ln
+ when 0
+ @s_a_no +=1
+ lv_name='section_a' + @s_a_no.to_s
+ @nav_no+=1
+ @nav_no2=@nav_no
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[7]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[6]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[5]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[4]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[3]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[2]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[1]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[0]
+ @ncxo[0],@ncxo[1],@ncxo[2],@ncxo[3],@ncxo[4],@ncxo[5],@ncxo[6],@ncxo[7]=
+ true, false, false, false, false, false, false, false
+ @epub.sections(dob_toc,lv_name)
+ if @level_a_first_occurrence \
+ && @make.build.toc?
+ @per.ncx << @epub.toc_ncx.navmap_sisu_toc(@nav_no) #epub ncx navmap, toc
+ @nav_no+=1
+ @level_a_first_occurrence=false
+ end
+ @per.ncx << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name) if dob_toc
+ md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name)
+ md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name)
+ md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name)
+ SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_0
+ when 1
+ @s_b_no +=1
+ lv_name='section_b' + @s_b_no.to_s
+ @nav_no+=1
+ @nav_no2=@nav_no
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[7]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[6]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[5]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[4]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[3]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[2]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[1]
+ @ncxo[1],@ncxo[2],@ncxo[3],@ncxo[4],@ncxo[5],@ncxo[6],@ncxo[7]=
+ true, false, false, false, false, false, false
+ @epub.sections(dob_toc,lv_name)
+ @per.ncx << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name) if dob_toc
+ md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name)
+ md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name)
+ md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name)
+ SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_1
+ when 2
+ @s_c_no +=1
+ lv_name='section_c' + @s_c_no.to_s
+ @nav_no+=1
+ @nav_no2=@nav_no
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[7]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[6]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[5]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[4]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[3]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[2]
+ @ncxo[2],@ncxo[3],@ncxo[4],@ncxo[5],@ncxo[6],@ncxo[7]=
+ true, false, false, false, false, false
+ @epub.sections(dob_toc,lv_name)
+ @per.ncx << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name) if dob_toc
+ md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name)
+ md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name)
+ md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name)
+ SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_2
+ when 3
+ @s_d_no +=1
+ lv_name='section_d' + @s_d_no.to_s
@nav_no+=1
- @level_a_first_occurrence=false
+ @nav_no3=@nav_no
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[7]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[6]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[5]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[4]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[3]
+ @ncxo[3],@ncxo[4],@ncxo[5],@ncxo[6],@ncxo[7]=
+ true, false, false, false, false
+ @epub.sections(dob_toc,lv_name)
+ @per.ncx << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name) if dob_toc
+ md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name)
+ md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name)
+ md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name)
+ SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_3
+ when 4
+ @ncx_cls=[]
+ lv_name=dob_toc.name
+ @nav_no+=1
+ @dob_name=dob.name
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[7]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[6]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[5]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[4]
+ @ncxo[4],@ncxo[5],@ncxo[6],@ncxo[7]=
+ true, false, false, false
+ @per.ncx << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name) if dob_toc
+ md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name)
+ md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name)
+ md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name)
+ SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_4
+ when 5
+ @ncx_cls=[]
+ hashtag='#o' + dob_toc.ocn.to_s
+ lv_name=@dob_name
+ @nav_no+=1
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[7]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[6]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[5]
+ @ncxo[5],@ncxo[6],@ncxo[7]=
+ true, false, false
+ @per.ncx << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name,hashtag) if dob_toc
+ md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name,hashtag)
+ md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name,hashtag)
+ md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name,hashtag)
+ SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_5
+ when 6
+ @ncx_cls=[]
+ hashtag='#o' + dob_toc.ocn.to_s
+ lv_name=@dob_name
+ @nav_no+=1
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[7]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[6]
+ @ncxo[6],@ncxo[7]=
+ true, false
+ @per.ncx << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name,hashtag) if dob_toc
+ md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name,hashtag)
+ md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name,hashtag)
+ md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name,hashtag)
+ SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_6
+ when 7
+ @ncx_cls=[]
+ hashtag='#o' + dob_toc.ocn.to_s
+ lv_name=@dob_name
+ @nav_no+=1
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[7]
+ @ncxo[7]=true
+ @per.ncx << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name,hashtag) if dob_toc
+ md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name,hashtag)
+ md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name,hashtag)
+ md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name,hashtag)
+ SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_7
+ else nil
end
- @@toc[:ncx] << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name) if dob_toc
- md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name)
- md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name)
- md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name)
- SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_0
- when 1
- @s_b_no +=1
- lv_name='section_b' + @s_b_no.to_s
- @nav_no+=1
- @nav_no2=@nav_no
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[7]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[6]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[5]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[4]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[3]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[2]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[1]
- @ncxo[1],@ncxo[2],@ncxo[3],@ncxo[4],@ncxo[5],@ncxo[6],@ncxo[7]=
- true, false, false, false, false, false, false
- @epub.sections(dob_toc,lv_name)
- @@toc[:ncx] << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name) if dob_toc
- md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name)
- md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name)
- md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name)
- SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_1
- when 2
- @s_c_no +=1
- lv_name='section_c' + @s_c_no.to_s
- @nav_no+=1
- @nav_no2=@nav_no
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[7]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[6]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[5]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[4]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[3]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[2]
- @ncxo[2],@ncxo[3],@ncxo[4],@ncxo[5],@ncxo[6],@ncxo[7]=
- true, false, false, false, false, false
- @epub.sections(dob_toc,lv_name)
- @@toc[:ncx] << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name) if dob_toc
- md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name)
- md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name)
- md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name)
- SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_2
- when 3
- @s_d_no +=1
- lv_name='section_d' + @s_d_no.to_s
- @nav_no+=1
- @nav_no3=@nav_no
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[7]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[6]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[5]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[4]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[3]
- @ncxo[3],@ncxo[4],@ncxo[5],@ncxo[6],@ncxo[7]=
- true, false, false, false, false
- @epub.sections(dob_toc,lv_name)
- @@toc[:ncx] << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name) if dob_toc
- md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name)
- md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name)
- md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name)
- SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_3
- when 4
- @ncx_cls=[]
- lv_name=dob_toc.name
- @nav_no+=1
- @dob_name=dob.name
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[7]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[6]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[5]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[4]
- @ncxo[4],@ncxo[5],@ncxo[6],@ncxo[7]=
- true, false, false, false
- @@toc[:ncx] << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name) if dob_toc
- md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name)
- md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name)
- md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name)
- SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_4
- when 5
- @ncx_cls=[]
- hashtag='#o' + dob_toc.ocn.to_s
- lv_name=@dob_name
- @nav_no+=1
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[7]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[6]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[5]
- @ncxo[5],@ncxo[6],@ncxo[7]=
- true, false, false
- @@toc[:ncx] << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name,hashtag) if dob_toc
- md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name,hashtag)
- md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name,hashtag)
- md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name,hashtag)
- SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_5
- when 6
- @ncx_cls=[]
- hashtag='#o' + dob_toc.ocn.to_s
- lv_name=@dob_name
- @nav_no+=1
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[7]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[6]
- @ncxo[6],@ncxo[7]=
- true, false
- @@toc[:ncx] << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name,hashtag) if dob_toc
- md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name,hashtag)
- md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name,hashtag)
- md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name,hashtag)
- SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_6
- when 7
- @ncx_cls=[]
- hashtag='#o' + dob_toc.ocn.to_s
- lv_name=@dob_name
- @nav_no+=1
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[7]
- @ncxo[7]=true
- @@toc[:ncx] << @epub.toc_ncx.navpoint(dob_toc,@nav_no,lv_name,hashtag) if dob_toc
- md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc,lv_name,hashtag)
- md_opf_a_spine << @epub.metadata_opf.spine(dob_toc,lv_name,hashtag)
- md_opf_a_guide << @epub.metadata_opf.guide(dob_toc,lv_name,hashtag)
- SiSU_XHTML_EPUB2::Source::Toc.new(@md,dob_toc).level_7
- else nil
- end
- toc.each do |k,d|
- d.gsub!(/(?:#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]})\s*/m,' ')
- end if toc
- if @@firstseg.nil? \
- and dob.ln==4 \
- and dob.name =~/\S+/
- @@firstseg=dob.name
- end
- if toc
- begin
- @@toc[:seg] << toc[:seg]
- @@toc[:scr] << toc[:seg]
- rescue
- SiSU_Errors::Rescued.new($!,$@,@md.opt.selections.str,@md.fns).location do
- __LINE__.to_s + ':' + __FILE__
+ toc.each do |k,d|
+ d.gsub!(/(?:#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]})\s*/m,' ')
+ end if toc
+ if @@firstseg.nil? \
+ and dob.ln==4 \
+ and dob.name =~/\S+/
+ @@firstseg=dob.name
+ end
+ if toc
+ begin
+ @per.seg << toc[:seg]
+ @per.scr << toc[:seg]
+ rescue
+ SiSU_Errors::Rescued.new($!,$@,@md.opt.selections.str,@md.fns).location do
+ __LINE__.to_s + ':' + __FILE__
+ end
end
end
end
end
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[6]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[5]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[4]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[3]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[2]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[1]
+ @per.ncx << @epub.toc_ncx.navpoint_close if @ncxo[0]
+ @ncxo[0],@ncxo[1],@ncxo[2],@ncxo[3],@ncxo[4],@ncxo[5],@ncxo[6]=false,false,false,false,false,false,false
+ md_opf_a_content << @epub.metadata_opf.manifest_images(@md.ec[:image])
+ @per.seg << "</div>\n</div>"
+ @per.scr << "</div>\n</div>"
+ @per.ncx << @epub.toc_ncx.navmap_close
+ @per.ncx << @epub.toc_ncx.close
+ @per.opf << md_opf_a_content << @epub.metadata_opf.manifest_close
+ @per.opf << @epub.metadata_opf.spine_open << md_opf_a_spine << @epub.metadata_opf.spine_close
+ @per.opf << @epub.metadata_opf.guide_open << md_opf_a_guide << @epub.metadata_opf.guide_close
+ @per.opf << @epub.metadata_opf.package_close
+ @per.opf=@per.opf.flatten
+ SiSU_XHTML_EPUB2::Source::Output.new(@md,@per.opf).epub_metadata_opf
+ SiSU_XHTML_EPUB2::Source::Output.new(@md,@per.ncx).epub_toc_ncx
+ @md.firstseg=@@firstseg
+ @per
+ ensure
+ SiSU_XHTML_EPUB2_Persist::Persist.new.persist_init
end
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[6]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[5]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[4]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[3]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[2]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[1]
- @@toc[:ncx] << @epub.toc_ncx.navpoint_close if @ncxo[0]
- @ncxo[0],@ncxo[1],@ncxo[2],@ncxo[3],@ncxo[4],@ncxo[5],@ncxo[6]=false,false,false,false,false,false,false
- md_opf_a_content << @epub.metadata_opf.manifest_images(@md.ec[:image])
- @@toc[:seg] << "</div>\n</div>"
- @@toc[:scr] << "</div>\n</div>"
- @@toc[:ncx] << @epub.toc_ncx.navmap_close
- @@toc[:ncx] << @epub.toc_ncx.close
- @@toc[:opf] << md_opf_a_content << @epub.metadata_opf.manifest_close
- @@toc[:opf] << @epub.metadata_opf.spine_open << md_opf_a_spine << @epub.metadata_opf.spine_close
- @@toc[:opf] << @epub.metadata_opf.guide_open << md_opf_a_guide << @epub.metadata_opf.guide_close
- @@toc[:opf] << @epub.metadata_opf.package_close
- @@toc[:opf]=@@toc[:opf].flatten
- SiSU_XHTML_EPUB2::Source::Output.new(@md,@@toc[:opf]).epub_metadata_opf
- SiSU_XHTML_EPUB2::Source::Output.new(@md,@@toc[:ncx]).epub_toc_ncx
- @md.firstseg=@@firstseg
- @@toc
end
protected
def level_0
@@ -457,7 +458,7 @@ module SiSU_XHTML_EPUB2
toc[:seg]=format_toc.lev1
title=if dob.ocn ==0 then linkname
else
- @@toc[:scr] << '<br />'
+ @per.scr << '<br />'
link=(dob.ln) \
? dob.ln
: ''
@@ -493,7 +494,7 @@ module SiSU_XHTML_EPUB2
else linkname
end
else
- @@toc[:scr] << '<br />'
+ @per.scr << '<br />'
link=(dob.ln) \
? dob.ln
: ''
@@ -639,8 +640,8 @@ module SiSU_XHTML_EPUB2
end
end
class ScrollHeadAndSegToc < Toc
- def initialize(md='',toc='',links_guide_toc='')
- @md,@toc,@links_guide_toc=md,toc,links_guide_toc
+ def initialize(md='',per='',links_guide_toc='')
+ @md,@per,@links_guide_toc=md,per,links_guide_toc
end
def in_common
toc_shared=[]
@@ -702,9 +703,9 @@ module SiSU_XHTML_EPUB2
toc_shared << prefix_b
end
#Table of Contents added/appended here
- toc_shared << @toc[:scr]
+ toc_shared << @per.scr
segtoc << @links_guide_toc
- segtoc << @toc[:seg]
+ segtoc << @per.seg
if defined? @md.rights.all \
and @md.rights.all
segtoc << rights
@@ -719,7 +720,7 @@ module SiSU_XHTML_EPUB2
SiSU_XHTML_EPUB2::Source::Output.new(@md).make_cover_image
SiSU_XHTML_EPUB2::Source::Output.new(@md,segtoc).make_segtoc
segtoc=[]
- @toc[:scr],@toc[:seg]=[],[]
+ @per.scr,@per.seg=[],[]
toc_shared
end
end
diff --git a/lib/sisu/v6/xhtml_epub2_concordance.rb b/lib/sisu/develop/xhtml_epub2_concordance.rb
index 0c70d858..024a5a5e 100644
--- a/lib/sisu/v6/xhtml_epub2_concordance.rb
+++ b/lib/sisu/develop/xhtml_epub2_concordance.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** epub concordance file (wordmap, linked index of words in document)
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/epub_concordance.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: epub concordance file (html concordance, wordmap, linked index
- of words in document)
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xhtml_epub2_concordance.rb;hb=HEAD>
=end
module SiSU_XHTML_EPUB2_Concordance
diff --git a/lib/sisu/v6/xhtml_epub2_format.rb b/lib/sisu/develop/xhtml_epub2_format.rb
index f6aa6be5..54c79434 100644
--- a/lib/sisu/v6/xhtml_epub2_format.rb
+++ b/lib/sisu/develop/xhtml_epub2_format.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** epub formating, css template
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/epub_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: epub formating, css template
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xhtml_epub2_format.rb;hb=HEAD>
=end
module SiSU_XHTML_EPUB2_Format
@@ -1254,8 +1251,9 @@ module SiSU_XHTML_EPUB2_Format
@md=md
# DublinCore 1 - title
@css=SiSU_Env::CSS_Stylesheet.new(md)
- @seg_name_xhtml=(SiSU_XHTML_EPUB2::Source::Seg.new.seg_name_xhtml || [])
- @seg_name_xhtml_tracker=(SiSU_XHTML_EPUB2::Source::Seg.new.seg_name_xhtml_tracker || [])
+ @per=SiSU_XHTML_EPUB2_Persist::Persist.new
+ @per.seg_name_x=SiSU_XHTML_EPUB2::Seg.new.seg_name_x
+ @per.seg_name_x_tracker=SiSU_XHTML_EPUB2::Seg.new.seg_name_x_tracker
@tocband_scroll,@tocband_segtoc=nil,nil
@index,@metalink='index','#metadata'
end
@@ -1830,7 +1828,7 @@ output_epub_cont_seg.close
%{#{doc_type}
<head>
<title>
- #{@seg_name_xhtml[@seg_name_xhtml_tracker]} -
+ #{@per.seg_name_x[@per.seg_name_x_tracker]} -
#{@md.html_title}
</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
diff --git a/lib/sisu/develop/xhtml_epub2_persist.rb b/lib/sisu/develop/xhtml_epub2_persist.rb
new file mode 100644
index 00000000..889cd1a3
--- /dev/null
+++ b/lib/sisu/develop/xhtml_epub2_persist.rb
@@ -0,0 +1,278 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** html segment generation, processing
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xhtml_epub2_persist.rb;hb=HEAD>
+
+=end
+module SiSU_XHTML_EPUB2_Persist
+ class Persist
+ @@persist=nil
+ attr_accessor :is0,:is1,:is2,:is3,:is4,:heading0,:heading1,:heading2,:heading3,:heading4, :title, :nav, :tocband_banner, :tocband_bannerless, :headings, :heading_endnotes, :main, :endnote_all, :tail, :credits, :heading_idx, :idx, :seg_endnotes, :seg_endnotes_array, :closed, :get_hash_fn, :get_hash_to, :seg_subtoc, :seg_subtoc_array, :fn, :seg_name ,:seg_name_x,:seg_name_x_tracker
+ def initialize(args=nil)
+ @@persist=args=(args ? args : (@@persist || persist_init_hash_values))
+ @is0=args[:is0]
+ @is1=args[:is1]
+ @is2=args[:is2]
+ @is3=args[:is3]
+ @is4=args[:is4]
+ @heading0=args[:heading0]
+ @heading1=args[:heading1]
+ @heading2=args[:heading2]
+ @heading3=args[:heading3]
+ @heading4=args[:heading4]
+ @title=args[:title]
+ @nav=args[:nav]
+ @tocband_banner=args[:tocband_banner]
+ @tocband_bannerless=args[:tocband_bannerless]
+ @headings=args[:headings]
+ @heading_endnotes=args[:heading_endnotes]
+ @main=args[:main]
+ @endnote_all=args[:endnote_all]
+ @tail=args[:tail]
+ @credits=args[:credits]
+ #@heading_idx=args[:heading_idx]
+ @idx=args[:idx]
+ @seg_endnotes=args[:seg_endnotes]
+ @seg_endnotes_array=args[:seg_endnotes_array]
+ @closed=args[:closed]
+ @get_hash_to=args[:get_hash_to]
+ @get_hash_fn=args[:get_hash_fn]
+ @seg_subtoc=args[:seg_subtoc]
+ @seg_subtoc_array=args[:seg_subtoc_array]
+ @fn=args[:fn]
+ @seg_name=args[:seg_name]
+ @seg_name_x=args[:seg_name_x]
+ @seg_name_x_tracker=args[:seg_name_x_tracker]
+ end
+ def is0
+ @is0
+ end
+ def is1
+ @is1
+ end
+ def is2
+ @is2
+ end
+ def is3
+ @is3
+ end
+ def is4
+ @is4
+ end
+ def heading0
+ @heading0
+ end
+ def heading1
+ @heading1
+ end
+ def heading2
+ @heading2
+ end
+ def heading3
+ @heading3
+ end
+ def heading4
+ @heading4
+ end
+ def title
+ @title
+ end
+ def nav
+ @nav
+ end
+ def tocband_banner
+ @tocband_banner
+ end
+ def tocband_bannerless
+ @tocband_bannerless
+ end
+ def headings
+ @headings
+ end
+ def heading_endnotes
+ @heading_endnotes
+ end
+ def main
+ @main
+ end
+ def endnote_all
+ @endnote_all
+ end
+ def tail
+ @tail
+ end
+ def credits
+ @credits
+ end
+ def heading_idx
+ @heading_idx
+ end
+ def idx
+ @idx
+ end
+ def seg_endnotes
+ @seg_endnotes
+ end
+ def seg_endnotes_array
+ @seg_endnotes_array
+ end
+ def closed
+ @closed
+ end
+ def get_hash_to
+ @get_hash_to
+ end
+ def get_hash_fn
+ @get_hash_fn
+ end
+ def seg_subtoc
+ @seg_subtoc
+ end
+ def seg_subtoc_array
+ @seg_subtoc_array
+ end
+ def fn
+ @fn
+ end
+ def seg_name
+ @seg_name
+ end
+ def seg_name_x
+ @seg_name_x
+ end
+ def seg_name_x_tracker
+ @seg_name_x_tracker
+ end
+ def persist_init_hash_values
+ {
+ is0: 0,
+ is1: 0,
+ is2: 0,
+ is3: 0,
+ is4: 0,
+ heading0: '',
+ heading1: '',
+ heading2: '',
+ heading3: '',
+ heading4: '',
+ tocband_banner: [],
+ tocband_bannerless: [],
+ title: [],
+ nav: [],
+ headings: [],
+ main: [],
+ idx: [],
+ tail: [],
+ credits: [],
+ endnote_all: [],
+ heading_endnotes: '',
+ seg_endnotes: {},
+ seg_endnotes_array: [],
+ closed: [],
+ get_hash_fn: '',
+ get_hash_to: '',
+ seg_subtoc: {},
+ seg_subtoc_array: [],
+ fn: '',
+ seg_name: [],
+ seg_name_x: [],
+ seg_name_x_tracker: 0,
+ }
+ end
+ def persist_init
+ @@persist=nil
+ Persist.new(persist_init_hash_values)
+ end
+ end
+ class PersistTOC
+ @@persist=nil
+ attr_accessor :seg,:seg_mini,:scr,:ncx,:opf
+ def initialize(args=nil)
+ @@persist=args=(args ? args : (@@persist || persist_init_hash_values))
+ @seg=args[:seg]
+ @seg_mini=args[:seg_mini]
+ @scr=args[:scr]
+ @ncx=args[:ncx]
+ @opf=args[:opf]
+ end
+ def seg
+ @seg
+ end
+ def seg_mini
+ @seg_mini
+ end
+ def scr
+ @scr
+ end
+ def ncx
+ @ncx
+ end
+ def opf
+ @opf
+ end
+ def persist_init_hash_values
+ {
+ seg: [],
+ seg_mini: [],
+ scr: [],
+ ncx: [],
+ opf: [],
+ }
+ end
+ def persist_init
+ @@persist=nil
+ PersistTOC.new(persist_init_hash_values)
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/xhtml_epub2_segments.rb b/lib/sisu/develop/xhtml_epub2_segments.rb
index fca2e729..436cf845 100644
--- a/lib/sisu/v6/xhtml_epub2_segments.rb
+++ b/lib/sisu/develop/xhtml_epub2_segments.rb
@@ -1,96 +1,116 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** epub segment generation, processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/epub_segments.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: epub segment generation, processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xhtml_epub2_segments.rb;hb=HEAD>
=end
module SiSU_XHTML_EPUB2_Seg
require_relative 'xhtml_shared' # xhtml_shared.rb
require_relative 'xhtml_epub2' # xhtml_epub2.rb
+ require_relative 'xhtml_epub2_persist' # xhtml_epub2_persist.rb
require_relative 'shared_metadata' # shared_metadata.rb
class Output
- def initialize(md,outputfile,seg,type='')
- @md,@output_epub_cont_seg,@seg,@type=md,outputfile,seg,type
+ def initialize(md,outputfile,per,type='')
+ @md, @output_epub_cont_seg,@per,@type=
+ md,outputfile, per, type
end
- def output #CONSIDER
- if @seg[:title] =~/\S/
+ def output
+ if @per.title =~/\S/
filename_seg=[]
- filename_seg << @seg[:title] << @seg[:nav]
+ filename_seg \
+ << @per.title \
+ << @per.nav
if @type=='endnotes'
- @seg[:headings]=[] #watch
+ @per.headings=[] #watch
txt_obj={ txt: 'Endnotes', ocn_display: ''}
format_seg=SiSU_XHTML_EPUB2_Format::FormatSeg.new(@md,txt_obj)
- @seg[:headings] << format_seg.title_heading1
- filename_seg << @seg[:heading_endnotes] << @seg[:headings] << %{\n<div class="content">\n} << @seg[:endnote_all] << '</div>'
+ @per.headings \
+ << format_seg.title_heading1
+ filename_seg \
+ << @per.heading_endnotes \
+ << @per.headings \
+ << %{\n<div class="content">\n} \
+ << @per.endnote_all \
+ << '</div>'
elsif @type=='idx'
- @seg[:headings]=[]
+ @per.headings=[]
txt_obj={ txt: 'Index', ocn_display: ''}
format_seg=SiSU_XHTML_EPUB2_Format::FormatSeg.new(@md,txt_obj)
- @seg[:headings] << format_seg.title_heading1
- filename_seg << @seg[:heading_idx] << @seg[:headings] << %{\n<div class="content">\n} << @seg[:idx] << '</div>'
+ @per.headings << format_seg.title_heading1
+ filename_seg \
+ << @per.heading_idx \
+ << @per.headings \
+ << %{\n<div class="content">\n} \
+ << @per.idx \
+ << '</div>'
elsif @type=='metadata'
metadata=SiSU_Metadata::Summary.new(@md).xhtml_display.metadata
- @seg[:headings]=[]
+ @per.headings=[]
txt_obj={ txt: 'Metadata', ocn_display: ''}
format_seg=SiSU_XHTML_EPUB2_Format::FormatSeg.new(@md,txt_obj)
- @seg[:headings] << format_seg.title_heading1
- filename_seg << @seg[:heading_idx] << @seg[:headings] << %{\n<div class="content">\n} << metadata << '</div>'
+ @per.headings \
+ << format_seg.title_heading1
+ filename_seg \
+ << @per.heading_idx \
+ << @per.headings \
+ << %{\n<div class="content">\n} \
+ << metadata \
+ << '</div>'
elsif @type=='sisu_manifest'
env=SiSU_Env::InfoEnv.new(@md.fns)
- path_and_name,url_and_name="#{env.path.output}/#{@md.fnb}/sisu_manifest.html","#{env.url.root}/#{@md.fnb}/sisu_manifest.html"
+ path_and_name,url_and_name= \
+ "#{env.path.output}/#{@md.fnb}/sisu_manifest.html",
+ "#{env.url.root}/#{@md.fnb}/sisu_manifest.html"
manifest=if FileTest.file?("#{path_and_name}")==true
<<WOK
<p>A list of available output types may be available at the following url:</p>
@@ -98,19 +118,32 @@ module SiSU_XHTML_EPUB2_Seg
WOK
else ''
end
- @seg[:headings]=[]
+ @per.headings=[]
txt_obj={ txt: 'Manifest', ocn_display: ''}
format_seg=SiSU_XHTML_EPUB2_Format::FormatSeg.new(@md,txt_obj)
- @seg[:headings] << format_seg.title_heading1
- filename_seg << @seg[:heading_idx] << @seg[:headings] << %{\n<div class="content">\n} << manifest << '</div>'
+ @per.headings \
+ << format_seg.title_heading1
+ filename_seg \
+ << @per.heading_idx \
+ << @per.headings \
+ << %{\n<div class="content">\n} \
+ << manifest \
+ << '</div>'
else
- filename_seg << @seg[:headings] << @seg[:main] << "\n</div>\n"
+ filename_seg \
+ << @per.headings \
+ << @per.main \
+ << "\n</div>\n"
end
- filename_seg << @seg[:tail] << @seg[:nav] << @seg[:close]
+ filename_seg \
+ << @per.tail \
+ << @per.nav \
+ << @per.closed
filename_seg=filename_seg.flatten.compact #watch
filename_seg.each do |str|
unless str =~/\A\s*\Z/
- @output_epub_cont_seg << str.strip
+ @output_epub_cont_seg \
+ << str.strip
end
end
@output_epub_cont_seg.close
@@ -118,68 +151,68 @@ WOK
end
end
class Seg
- @@seg,@@seg_subtoc,@@seg_endnotes,@@seg_ad={},{},{},{}
- @@seg_name,@@seg_name_xhtml=[],[]
- @@seg_url=@@fn=@@get_hash_to=@@get_hash_fn=''
- @@loop_count=@@seg_total=@@tracker=0
- @@is4=@@is3=@@is2=@@is1=@@is0=0
- @@heading0=@@heading1=@@heading2=@@heading3=@@heading4=0
- @@seg[:headings],@@seg[:main],@@seg[:idx],@@seg[:tail],@@seg_subtoc_array,@@seg_endnotes_array,@@seg[:endnote_all]=Array.new(7){[]}
- @@seg[:heading_endnotes]=''
- @@tablehead,@@number_of_cols=0,0
- @@fns_previous=''
- attr_reader :seg_name_xhtml,:seg_name_xhtml_tracker
+ @@seg_name=[]
+ @@seg_url=''
+ @@tracker=0
+ attr_reader :seg_name_x,:seg_name_x_tracker
def initialize(md='',data='')
@md,@data=md,data
- @seg_name_xhtml=@@seg_name_xhtml || nil
- @seg_name_xhtml_tracker=@@tracker || nil
+ @per=SiSU_XHTML_EPUB2_Persist::Persist.new
+ @seg_name_x=@per.seg_name_x=(@@seg_name || [])
+ @seg_name_x_tracker=@per.seg_name_x_tracker=(@@tracker || 0)
@make=SiSU_Env::ProcessingSettings.new(@md) if @md
end
def songsheet
begin
- data=get_subtoc_endnotes(@data)
- data=articles(data)
- SiSU_XHTML_EPUB2_Seg::Seg.new.cleanup # (((( added ))))
+ data=get_subtoc_endnotes(@data,@per)
+ data=articles(data,@per)
+ SiSU_XHTML_EPUB2_Seg::Seg.new.cleanup(@md,@per) # (((( added ))))
#### (((( END )))) ####
rescue
SiSU_Errors::Rescued.new($!,$@,@md.opt.selections.str,@md.fns).location do
__LINE__.to_s + ':' + __FILE__
end
ensure
- @@seg_name=[]
+ SiSU_XHTML_EPUB2_Persist::Persist.new.persist_init
+ @@seg_name=@per.seg_name=[]
end
end
protected
- def articles(data)
+ def articles(data,per)
+ @per=per
tracking,newfile=0,0
- @@is4=@@is3=@@is2=@@is1=@@is0=0
printed_endnote_seg='n'
idx_xhtml=nil
if @md.book_idx
- idx_xhtml=SiSU_Particulars::CombinedSingleton.instance.get_idx_xhtml(@md).xhtml_idx
- idx_xhtml.each {|x| @@seg[:idx] << x }
- @@seg[:heading_idx]=''
+ idx_xhtml=SiSU_Particulars::CombinedSingleton.
+ instance.get_idx_xhtml(@md).xhtml_idx
+ idx_xhtml.each do |x|
+ @per.idx << x
+ end
+ @per.heading_idx=''
end
data.each do |dob|
- if (dob.is==:heading \
- || dob.is==:heading_insert) \
- and dob.ln==4
+ if (dob.is == :heading \
+ || dob.is == :heading_insert) \
+ && dob.ln == 4
@@seg_name << dob.name
+ @per.seg_name = @@seg_name
dob.name
end
end
- @@seg_name_xhtml=@@seg_name
- @@seg_total=@@seg_name.length
- testforartnum=@@seg_name_xhtml
+ @per.seg_name_x=@per.seg_name
+ @per.seg_name.length
+ testforartnum=@per.seg_name_x
if (@md.opt.act[:verbose][:set]==:on \
|| @md.opt.act[:verbose_plus][:set]==:on \
|| @md.opt.act[:maintenance][:set]==:on)
SiSU_Screen::Ansi.new(
@md.opt.act[:color_state][:set],
- @@seg_name.length
+ @per.seg_name.length
)
end
- SiSU_Particulars::CombinedSingleton.instance.get_map_nametags(@md).nametags_map #p map_nametags
+ SiSU_Particulars::CombinedSingleton.
+ instance.get_map_nametags(@md).nametags_map #p map_nametags
data.each do |dob|
#if defined? dob.obj \
#and dob.obj =~/href="#{Xx[:segment]}#+\S+?"/
@@ -197,41 +230,41 @@ WOK
if (dob.is==:heading \
|| dob.is==:heading_insert) \
&& dob.ln==4
- @@heading4=dob.obj
- @@is4=newfile=1
+ @per.heading4=dob.obj
+ @per.is4=newfile=1
end
if (dob.is==:heading \
|| dob.is==:heading_insert) \
&& dob.ln==3
- @@heading3=dob.obj
- @@is4,@@is3=0,1
+ @per.heading3=dob.obj
+ @per.is4,@per.is3=0,1
end
if (dob.is==:heading \
|| dob.is==:heading_insert) \
&& dob.ln==2
- @@heading2=dob.obj
- @@is4,@@is3,@@is2=0,0,1
+ @per.heading2=dob.obj
+ @per.is4,@per.is3,@per.is2=0,0,1
end
if (dob.is==:heading \
|| dob.is==:heading_insert) \
&& dob.ln==1
- @@heading1=dob.obj
- @@is4,@@is3,@@is2,@@is1=0,0,0,1
+ @per.heading1=dob.obj
+ @per.is4,@per.is3,@per.is2,@per.is1=0,0,0,1
end
if (dob.is==:heading \
|| dob.is==:heading_insert) \
&& dob.ln==0
- @@heading0=dob.obj
- @@is4,@@is3,@@is2,@@is1,@@is0=0,0,0,0,1
+ @per.heading0=dob.obj
+ @per.is4,@per.is3,@per.is2,@per.is1,@per.is0=0,0,0,0,1
end
- if (@@is0 && !@@is1 && !@@is2 && !@@is3 && !@@is4)
+ if (@per.is0 && !@per.is1 && !@per.is2 && !@per.is3 && !@per.is4)
if not (dob.is==:heading \
|| dob.is==:heading_insert) \
&& dob.ln==0
$_ #; check
end
end
- if @@is4==1
+ if @per.is4==1
dir_epub_cont="#{@md.env.processing_path.epub}/#{Ep[:d_oebps]}"
if newfile==1 \
or dob.obj =~/^#{Mx[:br_endnotes]}|^#{Mx[:br_eof]}/
@@ -240,34 +273,36 @@ WOK
|| dob.is==:heading_insert) \
&& dob.ln==4
if tracking != 0
- SiSU_XHTML_EPUB2_Seg::Seg.new(@md).tail
- segfilename="#{dir_epub_cont}/#{@@seg_name_xhtml[tracking-1]}#{Sfx[:epub_xhtml]}"
- output_epub_cont_seg=File.new(segfilename,'w') if @@seg_name_xhtml[tracking-1]
+ tail(@md,@per)
+ #SiSU_XHTML_EPUB2_Seg::Seg.new(@md,@per).tail
+ segfilename="#{dir_epub_cont}/#{@per.seg_name_x[tracking-1]}#{Sfx[:epub_xhtml]}"
+ output_epub_cont_seg=File.new(segfilename,'w') if @per.seg_name_x[tracking-1]
if dob.is==:heading \
- or @@seg_name_xhtml[tracking-1] !~/endnotes|book_index|metadata/
- SiSU_XHTML_EPUB2_Seg::Output.new(@md,output_epub_cont_seg,@@seg).output
+ or @per.seg_name_x[tracking-1] !~/endnotes|book_index|metadata/
+ SiSU_XHTML_EPUB2_Seg::Output.new(@md,output_epub_cont_seg,@per).output
elsif dob.is==:heading_insert
- if @@seg_name_xhtml[tracking-1]=='endnotes'
- SiSU_XHTML_EPUB2_Seg::Output.new(@md,output_epub_cont_seg,@@seg,'endnotes').output
- elsif @@seg_name_xhtml[tracking-1]=='book_index'
- SiSU_XHTML_EPUB2_Seg::Output.new(@md,output_epub_cont_seg,@@seg,'idx').output
- @@seg[:idx]=[]
- elsif @@seg_name_xhtml[tracking-1]=='metadata' # navigation bug FIX
- SiSU_XHTML_EPUB2_Seg::Output.new(@md,output_epub_cont_seg,@@seg,'metadata').output
+ if @per.seg_name_x[tracking-1]=='endnotes'
+ SiSU_XHTML_EPUB2_Seg::Output.new(@md,output_epub_cont_seg,@per,'endnotes').output
+ elsif @per.seg_name_x[tracking-1]=='book_index'
+ SiSU_XHTML_EPUB2_Seg::Output.new(@md,output_epub_cont_seg,@per,'idx').output
+ @per.idx=[]
+ elsif @per.seg_name_x[tracking-1]=='metadata' # navigation bug FIX
+ SiSU_XHTML_EPUB2_Seg::Output.new(@md,output_epub_cont_seg,@per,'metadata').output
else puts "#{__FILE__}::#{__LINE__}"
end
else puts "#{__FILE__}::#{__LINE__}"
end
- SiSU_XHTML_EPUB2_Seg::Seg.new.reinitialise
+ SiSU_XHTML_EPUB2_Seg::Seg.new.reinitialise(per)
heading_art(dob)
head(dob)
- if @@seg_name_xhtml[tracking] =='metadata'
- segfilename="#{dir_epub_cont}/#{@@seg_name_xhtml[tracking]}#{Sfx[:epub_xhtml]}"
+ if @per.seg_name_x[tracking] =='metadata'
+ segfilename="#{dir_epub_cont}/#{@per.seg_name_x[tracking]}#{Sfx[:epub_xhtml]}"
output_epub_cont_seg=File.new(segfilename,'w')
- SiSU_XHTML_EPUB2_Seg::Output.new(@md,output_epub_cont_seg,@@seg,'metadata').output
- SiSU_XHTML_EPUB2_Seg::Seg.new.reinitialise #BUG navigation bug with items following metadata, and occurring before manifest, this becomes a bug ... work area for book index, FIX
+ SiSU_XHTML_EPUB2_Seg::Output.new(@md,output_epub_cont_seg,@per,'metadata').output
+ SiSU_XHTML_EPUB2_Seg::Seg.new.reinitialise(per)
+ #BUG navigation bug with items following metadata, and occurring before manifest, this becomes a bug ... work area for book index, FIX
end
- #@output_epub_cont_seg.close #%(((( EOF )))) -->
+ #@output_epub_cont_seg.closed #%(((( EOF )))) -->
end
if tracking==0
heading_art(dob)
@@ -280,8 +315,8 @@ WOK
|| dob.is==:heading_insert) \
&& dob.ln==4 \
&& dob.name
- @@get_hash_to=dob.name
- @@get_hash_fn=dob.name
+ @per.get_hash_to=dob.name
+ @per.get_hash_fn=dob.name
end
if dob.obj.is_a?(String)
markup(dob)
@@ -300,51 +335,56 @@ WOK
data
end
def heading_art(dob)
- @@seg[:title]=SiSU_XHTML_EPUB2_Format::HeadSeg.new(@md).head
+ @per.title=SiSU_XHTML_EPUB2_Format::HeadSeg.new(@md).head
end
def head(dob)
clean=/<!.*?!>|<:.*?>$/
@p_num ||= ''
- if @@is0==1
+ if @per.is0==1
if defined? @md.creator.author \
and @md.creator.author
@author=%{<b>#{@md.creator.author}</b>\n}
end
@p_num=SiSU_XHTML_EPUB2_Format::ParagraphNumber.new(@md,dob.ocn)
- txt_obj={ txt: @@heading0, ocn_display: @p_num.ocn_display }
+ txt_obj={ txt: @per.heading0, ocn_display: @p_num.ocn_display }
format_seg=SiSU_XHTML_EPUB2_Format::FormatSeg.new(@md,txt_obj)
- @@seg[:headings] << format_seg.title_heading0.gsub(clean,'')
- @@heading0=@@heading0.gsub(/#{$ep[:hsp]}<a name="-[\d*+]+" href="#_[\d*+]+">#{$ep[:hsp]}<sup>[\d*+]+<\/sup>#{$ep[:hsp]}<\/a>/,'')
+ @per.headings << format_seg.title_heading0.gsub(clean,'')
+ @per.heading0=@per.heading0.
+ gsub(/#{$ep[:hsp]}<a name="-[\d*+]+" href="#_[\d*+]+">#{$ep[:hsp]}<sup>[\d*+]+<\/sup>#{$ep[:hsp]}<\/a>/,'')
end
- if @@is1==1
+ if @per.is1==1
@p_num=SiSU_XHTML_EPUB2_Format::ParagraphNumber.new(@md,dob.ocn)
- txt_obj={ txt: @@heading1, ocn_display: @p_num.ocn_display }
+ txt_obj={ txt: @per.heading1, ocn_display: @p_num.ocn_display }
format_seg=SiSU_XHTML_EPUB2_Format::FormatSeg.new(@md,txt_obj)
- @@seg[:headings] << format_seg.title_heading1.gsub(clean,'')
- @@heading1=@@heading1.gsub(/#{$ep[:hsp]}<a name="-[\d*+]+" href="#_[\d*+]+">#{$ep[:hsp]}<sup>[\d*+]+<\/sup>#{$ep[:hsp]}<\/a>/,'')
+ @per.headings << format_seg.title_heading1.gsub(clean,'')
+ @per.heading1=@per.heading1.
+ gsub(/#{$ep[:hsp]}<a name="-[\d*+]+" href="#_[\d*+]+">#{$ep[:hsp]}<sup>[\d*+]+<\/sup>#{$ep[:hsp]}<\/a>/,'')
end
- if @@is2==1
- heading2=@@heading2
+ if @per.is2==1
+ heading2=@per.heading2
@p_num=SiSU_XHTML_EPUB2_Format::ParagraphNumber.new(@md,dob.ocn)
txt_obj={ txt: heading2, ocn_display: @p_num.ocn_display }
format_seg=SiSU_XHTML_EPUB2_Format::FormatSeg.new(@md,txt_obj)
- @@seg[:headings] << format_seg.title_heading2.gsub(clean,'')
- @@heading2=@@heading2.gsub(/#{$ep[:hsp]}<a name="-[\d*+]+" href="#_[\d*+]+">#{$ep[:hsp]}<sup>[\d*+]+<\/sup>#{$ep[:hsp]}<\/a>/,'')
+ @per.headings << format_seg.title_heading2.gsub(clean,'')
+ @per.heading2=@per.heading2.
+ gsub(/#{$ep[:hsp]}<a name="-[\d*+]+" href="#_[\d*+]+">#{$ep[:hsp]}<sup>[\d*+]+<\/sup>#{$ep[:hsp]}<\/a>/,'')
end
- if @@is3==1
- heading3=@@heading3
+ if @per.is3==1
+ heading3=@per.heading3
@p_num=SiSU_XHTML_EPUB2_Format::ParagraphNumber.new(@md,dob.ocn)
txt_obj={ txt: heading3, ocn_display: @p_num.ocn_display }
format_seg=SiSU_XHTML_EPUB2_Format::FormatSeg.new(@md,txt_obj)
- @@seg[:headings] << format_seg.title_heading3.gsub(clean,'')
- @@heading3=@@heading3.gsub(/#{$ep[:hsp]}<a name="-[\d*+]+" href="#_[\d*+]+">#{$ep[:hsp]}<sup>[\d*+]+<\/sup>#{$ep[:hsp]}<\/a>/,'')
+ @per.headings << format_seg.title_heading3.gsub(clean,'')
+ @per.heading3=@per.heading3.
+ gsub(/#{$ep[:hsp]}<a name="-[\d*+]+" href="#_[\d*+]+">#{$ep[:hsp]}<sup>[\d*+]+<\/sup>#{$ep[:hsp]}<\/a>/,'')
end
- if @@is4==1
- heading4=@@heading4
+ if @per.is4==1
+ heading4=@per.heading4
@p_num=SiSU_XHTML_EPUB2_Format::ParagraphNumber.new(@md,dob.ocn)
txt_obj={ txt: heading4, ocn_display: @p_num.ocn_display }
format_seg=SiSU_XHTML_EPUB2_Format::FormatSeg.new(@md,txt_obj)
- @@seg[:headings] << format_seg.title_heading4.gsub(clean,'')
+ @per.headings \
+ << format_seg.title_heading4.gsub(clean,'')
end
@@tracker=@@tracker+1
end
@@ -389,21 +429,23 @@ WOK
else sto.para
end
end
- elsif dob.is ==:block \
- || dob.is ==:group \
- || dob.is ==:alt
- sto.para #fix this should be block type specific #FIX
- elsif dob.is==:verse
- sto.verse
- elsif dob.is==:code
- sto.code
- elsif dob.is==:table
- sto.table
- elsif dob.is==:break
- sto.break
+ elsif dob.is ==:block \
+ || dob.is ==:group \
+ || dob.is ==:alt
+ sto.para #fix this should be block type specific #FIX
+ elsif dob.is==:verse
+ sto.verse
+ elsif dob.is==:code
+ sto.code
+ elsif dob.is==:table
+ sto.table
+ elsif dob.is==:break
+ sto.break
end
if @md.flag_separate_endnotes # may need to revisit, check
- dob.obj=dob.obj.gsub(/"\s+href="##{Mx[:note_ref]}(\d+)">/,%{" href=\"endnotes#{Sfx[:epub_xhtml]}##{Mx[:note_ref]}\\1">}) #endnote- twice #removed file type
+ dob.obj=dob.obj.gsub(/"\s+href="##{Mx[:note_ref]}(\d+)">/,
+ %{" href=\"endnotes#{Sfx[:epub_xhtml]}##{Mx[:note_ref]}\\1">})
+ #endnote- twice #removed file type
end
if (dob.is ==:heading \
|| dob.is==:heading_insert \
@@ -414,77 +456,82 @@ WOK
if (dob.is==:heading \
|| dob.is==:heading_insert \
|| dob.is==:para) \
- and dob.note_ #dob.obj =~/<a href="#note_ref\d+">&nbsp;<sup id=/ #endnote- note-
+ and dob.note_
+ #dob.obj =~/<a href="#note_ref\d+">&nbsp;<sup id=/ #endnote- note-
format_seg=SiSU_XHTML_EPUB2_Format::FormatSeg.new(@md,dob)
dob.obj=format_seg.no_paranum
end
if (dob.is==:heading \
|| dob.is==:heading_insert) \
and dob.ln==4
- @@seg[:main] << %{\n<div class="content">\n}
- @@seg[:main] << dob_xhtml
+ @per.main << %{\n<div class="content">\n}
+ @per.main << dob_xhtml
if @make.build.segsubtoc?
- @@seg[:main] << @@seg_subtoc[@@get_hash_fn] #% insertion of sub-toc
+ @per.main << @per.seg_subtoc[@per.get_hash_fn]
+ #% insertion of sub-toc
end
else
- @@seg[:main] << dob_xhtml
+ @per.main << dob_xhtml
end
end
- def tail
+ def tail(md,per)
+ @md,@per=md,per
format_head_seg=SiSU_XHTML_EPUB2_Format::HeadSeg.new(@md)
if @md.flag_auto_endnotes \
- and @@seg_endnotes[@@get_hash_fn]
- @@seg[:tail] << %{\n<div class="content">\n<div class="endnote">\n}
- if @@seg_endnotes[@@get_hash_fn].flatten.length > 0
- @@seg[:tail] << format_head_seg.endnote_mark
- @@seg[:tail] << @@seg_endnotes[@@get_hash_fn].flatten #endnotes deposited at end of individual segments ||@|EXTRACTION OF ENDNOTES|
+ and @per.seg_endnotes[@per.get_hash_fn]
+ @per.tail << %{\n<div class="content">\n<div class="endnote">\n}
+ if @per.seg_endnotes[@per.get_hash_fn].flatten.length > 0
+ @per.tail << format_head_seg.endnote_mark
+ @per.tail << @per.seg_endnotes[@per.get_hash_fn].flatten
+ #endnotes deposited at end of individual segments ||@|EXTRACTION OF ENDNOTES|
end
- @@seg[:tail] << '</div>'
- @@seg[:tail] << '</div>' #this div closes div class content
+ @per.tail << '</div>'
+ @per.tail << '</div>' #this div closes div class content
end
- @@seg[:close]=[]
- @@seg[:close] << format_head_seg.xhtml_close
+ @per.closed=[]
+ @per.closed << format_head_seg.xhtml_close
end
- def reinitialise
- @@seg[:headings],@@seg[:main],@@seg[:tail],@@seg[:credits]=Array.new(4){[]}
+ def reinitialise(per)
+ per.headings,per.main,per.tail,per.credits=Array.new(4){[]}
end
- def cleanup
- reinitialise
- @@seg_total,@@tracker=0,0
- @@seg_endnotes,@@seg_subtoc={},{}
- @@seg_endnotes_array,@@seg_subtoc_array=[],[]
- @@seg[:endnote_all]=[]
+ def cleanup(md,per)
+ reinitialise(per)
+ @@tracker=0
+ @per.seg_endnotes,@per.seg_subtoc={},{}
+ @per.seg_endnotes_array,@per.seg_subtoc_array=[],[]
+ per.endnote_all=[]
end
- def get_subtoc_endnotes(data) #get endnotes & sub-table of contents subtoc
+ def get_subtoc_endnotes(data,per) #get endnotes & sub-table of contents subtoc
+ @per=per
data.each do |dob|
dob.obj=dob.obj.gsub(/<a name=\"h\d.*?\">(.+?)<\/a>/mi,'\1')
if @md.flag_auto_endnotes
if (dob.is==:heading \
|| dob.is==:heading_insert) \
- and dob.ln.to_s =~/^[1234]/ \
- and not @@fn.to_s.empty?
- @@seg_endnotes[@@fn]=[]
- @@seg_endnotes[@@fn] << @@seg_endnotes_array
- @@seg_endnotes_array=[] if dob.ln==4
- @@fns_previous=@md.fns if dob.ln==4 and dob.name =~/^meta/
+ && dob.ln.to_s =~/^[1-4]/ \
+ and not @per.fn.to_s.empty?
+ @per.seg_endnotes[@per.fn]=[]
+ @per.seg_endnotes[@per.fn] << @per.seg_endnotes_array
+ @per.seg_endnotes_array=[] if dob.ln==4
end
if (dob.is==:heading \
|| dob.is==:heading_insert) \
- and dob.ln==4 #% EXTRACTION OF SUB-TOCs & SEGMENT NAME, after EXTRACTION OF ENDNOTES & SUB-TOCs
- @@seg_subtoc[@@fn]=@@seg_subtoc_array
- @@seg_subtoc_array=[]
+ && dob.ln==4
+ #% EXTRACTION OF SUB-TOCs & SEGMENT NAME, after EXTRACTION OF ENDNOTES & SUB-TOCs
+ @per.seg_subtoc[@per.fn]=@per.seg_subtoc_array
+ @per.seg_subtoc_array=[]
if dob.name \
and dob.obj
- @@fn=dob.name
+ @per.fn=dob.name
else
- @@fn=(dob.name =~/\S+/) \
+ @per.fn=(dob.name =~/\S+/) \
? dob.name
: ''
end
end
end
if dob.is==:heading \
- and dob.ln.to_s =~/^[5-7]/
+ && dob.ln.to_s =~/^[5-7]/
case dob.ln
when 5
format_seg=SiSU_XHTML_EPUB2_Format::FormatSeg.new(@md,dob)
@@ -496,7 +543,7 @@ WOK
format_seg=SiSU_XHTML_EPUB2_Format::FormatSeg.new(@md,dob)
subtoc=format_seg.subtoc_lev7 #keep and make available, this is the subtoc
end
- @@seg_subtoc_array << subtoc
+ @per.seg_subtoc_array << subtoc
end
if @md.flag_auto_endnotes
ast,pls='&#042;','&#043;'
@@ -507,17 +554,19 @@ WOK
endnote_array << dob.obj.scan(/#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}/m)
end
if dob.obj=~/#{Mx[:en_b_o]}#{ast}\d+\s.+?#{Mx[:en_b_c]}/m
- endnote_array << dob.obj.scan(/#{Mx[:en_b_o]}#{ast}\d+\s.+?#{Mx[:en_b_c]}/m)
+ endnote_array \
+ << dob.obj.scan(/#{Mx[:en_b_o]}#{ast}\d+\s.+?#{Mx[:en_b_c]}/m)
end
if dob.obj=~/#{Mx[:en_b_o]}#{pls}\d+\s.+?#{Mx[:en_b_c]}/m
- endnote_array << dob.obj.scan(/#{Mx[:en_b_o]}#{pls}\d+\s.+?#{Mx[:en_b_c]}/m)
+ endnote_array \
+ << dob.obj.scan(/#{Mx[:en_b_o]}#{pls}\d+\s.+?#{Mx[:en_b_c]}/m)
end
endnote_array=endnote_array.flatten #.compact #check compacting
endnote_array.each do |note|
note_match=note.dup
note_match_seg=note.dup
e_n=note_match_seg[/(?:#{Mx[:en_a_o]}(?:\d|#{ast}|#{pls})+|#{Mx[:en_b_o]}(?:#{ast}|#{pls})\d+)\s+(.+?)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/m,1]
- try=e_n.split(/<br \/>/)
+ try=e_n.split(/<br(?: \/)?>/)
try.each do |e|
txt_obj={ txt: e }
format_seg=SiSU_XHTML_EPUB2_Format::FormatSeg.new(@md,txt_obj)
@@ -525,17 +574,20 @@ WOK
format_seg.endnote_body_indent
else format_seg.endnote_body
end
- @@seg_endnotes_array << note_match
+ @per.seg_endnotes_array << note_match
end
try.join('<br \/>')
#% creation of separate end segment/page of all endnotes referenced back to reference segment
- m=/(?:#{Mx[:en_a_o]}(?:\d|#{ast}|#{pls})+|#{Mx[:en_b_o]}(?:#{ast}|#{pls})\d+)\s+(.+?href=")(#note_ref(?:\d|_a|_b)+".+)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/mi
+ m=/(?:#{Mx[:en_a_o]}(?:\d|#{ast}|#{pls})+|#{Mx[:en_b_o]}(?:#{ast}|#{pls})\d+)\s+(.+?href=")(##{Mx[:note_ref]}(?:\d|_a|_b)+".+)(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/mi
endnote_part_a=note_match_seg[m,1]
endnote_part_b=note_match_seg[m,2]
- txt_obj={ endnote_part_a: endnote_part_a, endnote_part_b: endnote_part_b }
+ txt_obj={
+ endnote_part_a: endnote_part_a,
+ endnote_part_b: endnote_part_b
+ }
format_seg=SiSU_XHTML_EPUB2_Format::FormatSeg.new(@md,txt_obj)
- note_match_all_seg=format_seg.endnote_seg_body(@@fn) #BUG WATCH 200408
- @@seg[:endnote_all] << note_match_all_seg
+ note_match_all_seg=format_seg.endnote_seg_body(@per.fn) #BUG WATCH 200408
+ @per.endnote_all << note_match_all_seg
end
dob.obj=dob.obj.gsub(/(?:#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]})\s*/m,' ')
end
diff --git a/lib/sisu/v6/xhtml_epub2_tune.rb b/lib/sisu/develop/xhtml_epub2_tune.rb
index 836ccce3..4f965fa5 100644
--- a/lib/sisu/v6/xhtml_epub2_tune.rb
+++ b/lib/sisu/develop/xhtml_epub2_tune.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** epub generation, epub pre-processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/epub_tune.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: epub generation, epub pre-processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xhtml_epub2_tune.rb;hb=HEAD>
=end
require_relative 'dp' # dp.rb
diff --git a/lib/sisu/v5/xhtml_parts.rb b/lib/sisu/develop/xhtml_parts.rb
index 7ae6cfc1..85d18ba7 100644
--- a/lib/sisu/v5/xhtml_parts.rb
+++ b/lib/sisu/develop/xhtml_parts.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xhtml_parts.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xhtml_parts.rb;hb=HEAD>
=end
module SiSU_Parts_XHTML
@@ -177,7 +174,7 @@ module SiSU_Proj_XHTML
end
def credits_sisu_epub
%{<div class="substance">
-<p class="center"><a href="http://www.openebook.org"><b>EPUB</b></a> generated by <a href="http://www.sisudoc.org"><b>#{@v[:project]}</b></a> v#{@v[:version]}, GPL3</p>
+<p class="center"><a href="http://www.openebook.org"><b>EPUB</b></a> generated by <a href="http://www.sisudoc.org"><b>#{@v.project}</b></a> v#{@v.version}, GPL3</p>
</div>}
''
end
diff --git a/lib/sisu/develop/xhtml_shared.rb b/lib/sisu/develop/xhtml_shared.rb
new file mode 100644
index 00000000..84d6a36b
--- /dev/null
+++ b/lib/sisu/develop/xhtml_shared.rb
@@ -0,0 +1,62 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xhtml_shared.rb;hb=HEAD>
+
+=end
+module SiSU_XHTML_Shared
+ require_relative 'xhtml_table' # xhtml_table.rb
+ class TableXHTML < SiSU_XHTML_Table::TableXHTML
+ end
+end
+__END__
diff --git a/lib/sisu/develop/xhtml_table.rb b/lib/sisu/develop/xhtml_table.rb
new file mode 100644
index 00000000..9c3618c5
--- /dev/null
+++ b/lib/sisu/develop/xhtml_table.rb
@@ -0,0 +1,97 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** shared html parts
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xhtml_table.rb;hb=HEAD>
+
+=end
+module SiSU_XHTML_Table
+ require_relative 'xhtml_parts' # xhtml_parts.rb
+ class TableXHTML
+ include SiSU_Parts_XHTML
+ @@tablefoot=[] #watch
+ def initialize(table)
+ @table_obj=table
+ end
+ def table
+ table_obj=@table_obj
+ if table_obj.obj !~/^<table\s/m
+ table_obj=table_rows_and_columns_array(table_obj)
+ else p __LINE__; p caller
+ end
+ table_obj
+ end
+ def table_rows_and_columns_array(table_obj) # provides basic (x)html table
+ table_rows,nr=[],0
+ table_obj.obj.split(Mx[:tc_c]).each do |table_row|
+ table_row_with_columns=table_row.split(Mx[:tc_p])
+ trc,nc=[],0
+ table_row_with_columns.each do |c|
+ c=c.gsub(/^~$/,''). # tilde / empty cell
+ gsub(/<:br>/,the_line_break)
+ trc <<= if table_obj.head_ and nr==0; %{<th width="#{table_obj.widths[nc]}%">#{c}</th>}
+ else %{<td width="#{table_obj.widths[nc]}%">#{c}</td>}
+ end
+ nc+=1
+ end
+ trc=(trc.is_a?(Array)) ? trc.flatten.join : trc
+ trc=" <tr>#{trc}</tr>\n"
+ nr+=1
+ table_rows << trc
+ end
+ table_rows=table_rows.flatten.join
+ table_obj.obj=%{<table summary="normal text css" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">\n#{table_rows} </table>}
+ table_obj
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/xml_docbook5.rb b/lib/sisu/develop/xml_docbook5.rb
index 73cfc75b..bfdfed7c 100644
--- a/lib/sisu/v5/xml_docbook5.rb
+++ b/lib/sisu/develop/xml_docbook5.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** Docbook book XML rendition
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xml_docbook_book.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: Docbook book XML rendition
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xml_docbook_book.rb;hb=HEAD>
=end
module SiSU_XML_Docbook_Book
diff --git a/lib/sisu/v5/xml_dom.rb b/lib/sisu/develop/xml_dom.rb
index 58fd4b64..199faed5 100644
--- a/lib/sisu/v5/xml_dom.rb
+++ b/lib/sisu/develop/xml_dom.rb
@@ -1,61 +1,58 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** xml (dom style) output processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xml_dom.rb;hb=HEAD>
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xml_dom.rb;hb=HEAD>
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: xml (dom style) output processing
- ** Notes: tidy -xml dom.xml >> index.tidy
=end
module SiSU_XML_DOM
require_relative 'se_hub_particulars' # se_hub_particulars.rb
@@ -67,10 +64,11 @@ module SiSU_XML_DOM
include SiSU_XML_Munge
require_relative 'xml_format' # xml_format.rb
include SiSU_XML_Format
+ require_relative 'xml_persist' # xml_persist.rb
require_relative 'rexml' # rexml.rb
include SiSU_Rexml
require_relative 'shared_metadata' # shared_metadata.rb
- @@alt_id_count,@@tablehead,@@number_of_cols=0,0,0
+ @@alt_id_count=0
@@tablefoot=''
class Source
def initialize(opt)
@@ -161,18 +159,22 @@ module SiSU_XML_DOM
require_relative 'txt_shared' # txt_shared.rb
include SiSU_TextUtils
require_relative 'xhtml_shared' # decide use, whether xml rather than xhtml
- @@xml={ body: [], open: [], close: [], head: [], sc: [] }
def initialize(particulars)
@env, @md, @ao_arr=
particulars.env,particulars.md,particulars.ao_array
@trans=SiSU_XML_Munge::Trans.new(@md)
@sys=SiSU_Env::SystemCall.new
+ @per=SiSU_XML_Persist::Persist.new
end
def songsheet
- pre
- @data=markup(@ao_arr)
- post
- publish
+ begin
+ pre
+ @data=markup(@ao_arr)
+ post
+ publish
+ ensure
+ SiSU_XML_Persist::Persist.new.persist_init
+ end
end
protected
def xml_markup(dob='')
@@ -185,7 +187,7 @@ module SiSU_XML_DOM
end
def xml_head
metadata=SiSU_Metadata::Summary.new(@md).xml_dom.metadata
- @@xml[:head] << metadata
+ @per.head << metadata
end
def xml_sc(md='')
sc=if @md.sc_info
@@ -207,7 +209,7 @@ module SiSU_XML_DOM
WOK
else ''
end
- @@xml[:sc]=sc
+ @per.sc=sc
end
def xml_element(dob,xml_el='',xml_content='',type='norm')
n=n1=n2=n3=0
@@ -224,7 +226,7 @@ WOK
else ''
end
xml_el ||=''
- @@xml[:body] <<<<WOK
+ @per.body <<<<WOK
#{Ax[:tab]*n}#{xml_el}
#{Ax[:tab]*n1}<heading>
#{Ax[:tab]*n2}<object id="#{dob.ocn}">
@@ -265,26 +267,26 @@ WOK
if @cont[1] \
or @cont[2] \
or @cont[3]
- @@xml[:body] << "#{Ax[:tab]*5}</content>"
+ @per.body << "#{Ax[:tab]*5}</content>"
end
@cont[1]=false if @cont[1]
@cont[2]=false if @cont[2]
@cont[3]=false if @cont[3]
####### attempt to close contents
if @copen[4] # 4~
- [4,3,2,1].each { |v| @@xml[:body] << "#{Ax[:tab]*n}</contents#{v}>" }
+ [4,3,2,1].each { |v| @per.body << "#{Ax[:tab]*n}</contents#{v}>" }
@copen[1]=@copen[2]=@copen[3]=@copen[4]=false
elsif @copen[3] # 3~
- [3,2,1].each { |v| @@xml[:body] << "#{Ax[:tab]*n}</contents#{v}>" }
+ [3,2,1].each { |v| @per.body << "#{Ax[:tab]*n}</contents#{v}>" }
@copen[1]=@copen[2]=@copen[3]=false
elsif @copen[2] # 2~
- [2,1].each { |v| @@xml[:body] << "#{Ax[:tab]*n}</contents#{v}>" }
+ [2,1].each { |v| @per.body << "#{Ax[:tab]*n}</contents#{v}>" }
@copen[1]=@copen[2]=@copen[3]=false
elsif @copen[1] # 1~
- [1].each { |v| @@xml[:body] << "#{Ax[:tab]*n}</contents#{v}>" }
+ [1].each { |v| @per.body << "#{Ax[:tab]*n}</contents#{v}>" }
@copen[1]=@copen[2]=@copen[3]=false
end
- @@xml[:body] << "#{Ax[:tab]*y}</heading#{x}>" if @level[x]
+ @per.body << "#{Ax[:tab]*y}</heading#{x}>" if @level[x]
@level[x]=false
end
when 4..7
@@ -298,29 +300,29 @@ WOK
xml_content="\n#{Ax[:tab]*5}<content>"
case lv
when 4
- @@xml[:body] << "#{Ax[:tab]*5}</content>" if @cont[1]
+ @per.body << "#{Ax[:tab]*5}</content>" if @cont[1]
if @copen[4]==true # 4~
- [4,3,2,1].each { |v| @@xml[:body] << "#{Ax[:tab]*n}</contents#{v}>" }
+ [4,3,2,1].each { |v| @per.body << "#{Ax[:tab]*n}</contents#{v}>" }
elsif @copen[3]==true # 3~
- [3,2,1].each { |v| @@xml[:body] << "#{Ax[:tab]*n}</contents#{v}>" }
+ [3,2,1].each { |v| @per.body << "#{Ax[:tab]*n}</contents#{v}>" }
elsif @copen[2]==true # 2~
- [2,1].each { |v| @@xml[:body] << "#{Ax[:tab]*n}</contents#{v}>" }
+ [2,1].each { |v| @per.body << "#{Ax[:tab]*n}</contents#{v}>" }
elsif @copen[1]==true # 1~
- [1].each { |v| @@xml[:body] << "#{Ax[:tab]*n}</contents#{v}>" }
+ [1].each { |v| @per.body << "#{Ax[:tab]*n}</contents#{v}>" }
end
@cont[1]=true
when 5
if @cont[3] \
or @cont[2] \
or @cont[1]
- @@xml[:body] << "#{Ax[:tab]*5}</content>"
+ @per.body << "#{Ax[:tab]*5}</content>"
end
if @copen[4]==true #4~
- [4,3,2].each { |v| @@xml[:body] << "#{Ax[:tab]*n}</contents#{v}>" }
+ [4,3,2].each { |v| @per.body << "#{Ax[:tab]*n}</contents#{v}>" }
elsif @copen[3]==true #3~
- [3,2].each { |v| @@xml[:body] << "#{Ax[:tab]*n}</contents#{v}>" }
+ [3,2].each { |v| @per.body << "#{Ax[:tab]*n}</contents#{v}>" }
elsif @copen[2]==true #2~
- [2].each { |v| @@xml[:body] << "#{Ax[:tab]*n}</contents#{v}>" }
+ [2].each { |v| @per.body << "#{Ax[:tab]*n}</contents#{v}>" }
end
@cont[2]=true
when 6
@@ -328,12 +330,12 @@ WOK
or @cont[3] \
or @cont[2] \
or @cont[1]
- @@xml[:body] << "#{Ax[:tab]*5}</content>"
+ @per.body << "#{Ax[:tab]*5}</content>"
end
if @copen[4] #4~
- [4,3].each { |v| @@xml[:body] << "#{Ax[:tab]*n}</contents#{v}>" }
+ [4,3].each { |v| @per.body << "#{Ax[:tab]*n}</contents#{v}>" }
elsif @copen[3] #3~
- [3].each { |v| @@xml[:body] << "#{Ax[:tab]*n}</contents#{v}>" }
+ [3].each { |v| @per.body << "#{Ax[:tab]*n}</contents#{v}>" }
end
@cont[3]=true
when 7
@@ -341,10 +343,10 @@ WOK
or @cont[3] \
or @cont[2] \
or @cont[1]
- @@xml[:body] << "#{Ax[:tab]*5}</content>"
+ @per.body << "#{Ax[:tab]*5}</content>"
end
if @copen[4] #4~
- [4].each { |v| @@xml[:body] << "#{Ax[:tab]*n}</contents#{v}>" }
+ [4].each { |v| @per.body << "#{Ax[:tab]*n}</contents#{v}>" }
end
@cont[4]=true
end
@@ -360,15 +362,15 @@ WOK
if defined? dob.obj # main text, contents, body KEEP
if defined? dob.ocn \
and dob.ocn
- @@xml[:body] << %{#{Ax[:tab]*6}<object id="#{dob.ocn}">}
- @@xml[:body] << %{#{Ax[:tab]*7}<ocn>#{dob.ocn}</ocn>} if defined? dob.ocn
+ @per.body << %{#{Ax[:tab]*6}<object id="#{dob.ocn}">}
+ @per.body << %{#{Ax[:tab]*7}<ocn>#{dob.ocn}</ocn>} if defined? dob.ocn
end
- #@@xml[:body] << %{#{Ax[:tab]*7}<text class="#{type}">#{dob.obj}</text>}
- #@@xml[:body] << %{#{Ax[:tab]*7}<text class="#{dob.is}">#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*7}<text class="#{type}">#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*8}#{dob.obj}#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*7}</text>}
- @@xml[:body] << %{#{Ax[:tab]*6}</object>}
+ #@per.body << %{#{Ax[:tab]*7}<text class="#{type}">#{dob.obj}</text>}
+ #@per.body << %{#{Ax[:tab]*7}<text class="#{dob.is}">#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*7}<text class="#{type}">#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*8}#{dob.obj}#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*7}</text>}
+ @per.body << %{#{Ax[:tab]*6}</object>}
end
end
def block_structure(dob)
@@ -526,16 +528,16 @@ WOK
y=x - 1; v=x - 3
if @level[x]==true #2004w36 bug fix? watch/test previous logic broke on free.for.all @coontent_flag introduced
if @content_flag==true
- @@xml[:body] << "#{Ax[:tab]*5}</content>\n#{Ax[:tab]*y}</contents#{v}>"
+ @per.body << "#{Ax[:tab]*5}</content>\n#{Ax[:tab]*y}</contents#{v}>"
@content_flag=false
else
- @@xml[:body] << "\n#{Ax[:tab]*y}</contents#{v}>"
+ @per.body << "\n#{Ax[:tab]*y}</contents#{v}>"
end
end
end
3.downto(1) do |x|
y=x - 1
- @@xml[:body] << "#{Ax[:tab]*y}</heading#{x}>" if @level[x]==true
+ @per.body << "#{Ax[:tab]*y}</heading#{x}>" if @level[x]==true
end
end
def pre
@@ -544,29 +546,28 @@ WOK
encoding=if @sys.locale =~/utf-?8/i then '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
else '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>'
end
- @@xml[:open] =<<WOK
+ @per.open =<<WOK
#{encoding}
#{stylesheet.css_head_xml}
#{rdf.comment_xml}
<document>
WOK
- @@xml[:head] << '<head>'
- @@xml[:body] << '<body>'
+ @per.head << '<head>'
+ @per.body << '<body>'
end
def post
- @@xml[:head] << @@xml[:sc]
- @@xml[:head] << '</head>'
- @@xml[:body] << '</body>'
- @@xml[:close] = '</document>'
+ @per.head << @per.sc
+ @per.head << '</head>'
+ @per.body << '</body>'
+ @per.close << '</document>'
end
def publish
content=[]
- content << @@xml[:open] << @@xml[:head] << @@xml[:body] << @@xml[:metadata]
- content << @@xml[:owner_details] if @md.stmp =~/\w\w/
- content << @@xml[:tail] << @@xml[:close]
+ content << @per.open << @per.head << @per.body # << @per.metadata
+ content << @per.tail << @per.close
content=content.flatten.compact
Output.new(content,@md).xml
- @@xml[:head],@@xml[:body],@@xml[:tail]=[],[],[] # check whether should be nil
+ @per.head,@per.body,@per.tail=[],[],[] # check whether should be nil
end
end
class Output
@@ -594,19 +595,21 @@ WOK
if @prog.tidy !=false
if (@md.opt.act[:verbose_plus][:set]==:on \
|| @md.opt.act[:maintenance][:set]==:on)
- SiSU_Screen::Ansi.new(
- @md.opt.act[:color_state][:set],
- 'invert',
- 'Using XML Tidy',
- 'check document structure'
- ).colorize unless @md.opt.act[:quiet][:set]==:on
- tell=SiSU_Screen::Ansi.new(
- @md.opt.act[:color_state][:set],
- 'invert',
- '',
- ''
- )
- tell.grey_open unless @md.opt.act[:quiet][:set]==:on
+ unless @md.opt.act[:quiet][:set]==:on
+ SiSU_Screen::Ansi.new(
+ @md.opt.act[:color_state][:set],
+ 'invert',
+ 'Using XML Tidy',
+ 'check document structure'
+ ).colorize
+ tell=SiSU_Screen::Ansi.new(
+ @md.opt.act[:color_state][:set],
+ 'invert',
+ '',
+ ''
+ )
+ tell.grey_open
+ end
tidyfile='/dev/null' #don't want one or screen output, check for alternative flags
tidy=SiSU_Env::SystemCall.new(@file,tidyfile)
tidy.well_formed?
@@ -618,3 +621,4 @@ WOK
end
end
__END__
+** Notes: tidy -xml dom.xml >> index.tidy
diff --git a/lib/sisu/v6/xml_fictionbook2.rb b/lib/sisu/develop/xml_fictionbook2.rb
index 94fac895..f3c1a0eb 100644
--- a/lib/sisu/v6/xml_fictionbook2.rb
+++ b/lib/sisu/develop/xml_fictionbook2.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** Fictionbook XML rendition
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xml_fictionbook.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: Fictionbook XML rendition
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xml_fictionbook.rb;hb=HEAD>
=end
module SiSU_XML_Fictionbook
@@ -207,8 +204,8 @@ module SiSU_XML_Fictionbook
<last-name/>
<nickname/>
</author>
- <program-used>#{version[:project]} #{version[:version]} and #{rb_ver}</program-used>
- <date value="#{version[:date]}">#{version[:date]}</date>
+ <program-used>#{version.project} #{version.version} and #{rb_ver}</program-used>
+ <date value="#{version.date}">#{version.date}</date>
<src-url>#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}</src-url>
<id></id>
<version>1.0</version>
diff --git a/lib/sisu/v5/xml_format.rb b/lib/sisu/develop/xml_format.rb
index 0b319683..80610911 100644
--- a/lib/sisu/v5/xml_format.rb
+++ b/lib/sisu/develop/xml_format.rb
@@ -1,61 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+** xml template
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xml_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: xml template
- ** Notes: tidy -xml index.xml >> index.tidy
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xml_format.rb;hb=HEAD>
=end
module SiSU_XML_Format
@@ -866,3 +862,4 @@ WOK
end
end
__END__
+** Notes: tidy -xml index.xml >> index.tidy
diff --git a/lib/sisu/v6/xml_md_oai_pmh_dc.rb b/lib/sisu/develop/xml_md_oai_pmh_dc.rb
index 3394d9c5..6d366f2d 100644
--- a/lib/sisu/v6/xml_md_oai_pmh_dc.rb
+++ b/lib/sisu/develop/xml_md_oai_pmh_dc.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** summary of generated outputs and metadata
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xml_md_oai_pmh_dc.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: summary of generated outputs and metadata
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xml_md_oai_pmh_dc.rb;hb=HEAD>
=end
module SiSU_XML_Metadata
diff --git a/lib/sisu/v6/xml_odf_odt.rb b/lib/sisu/develop/xml_odf_odt.rb
index 0351babc..85a85ddd 100644
--- a/lib/sisu/v6/xml_odf_odt.rb
+++ b/lib/sisu/develop/xml_odf_odt.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** opendocument text generation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/odf.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: opendocument text generation
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/odf.rb;hb=HEAD>
=end
module SiSU_XML_ODF_ODT
@@ -70,7 +67,8 @@ module SiSU_XML_ODF_ODT
require_relative 'txt_shared' # txt_shared.rb
require_relative 'xml_shared' # xml_shared.rb
include SiSU_XML_Munge
- @@alt_id_count,@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0,0
+ require_relative 'xml_persist' # xml_persist.rb
+ @@alt_id_count,@@alt_id_count=0,0
class Source
begin
require 'zlib'
@@ -131,7 +129,6 @@ module SiSU_XML_ODF_ODT
require_relative 'txt_shared' # txt_shared.rb
include SiSU_Parts_XML
@@img_count=0
- @@odf={ body: [], head: [], toc: [], metadata: [], tail: [], book_idx: [], endnotes: [] }
@@docstart=true
@@fns=nil
def initialize(particulars)
@@ -143,10 +140,12 @@ module SiSU_XML_ODF_ODT
end
def songsheet
begin
+ @per=SiSU_XML_Persist::Persist.new
pre
@data=markup(@ao_array)
publish
ensure
+ SiSU_XML_Persist::Persist.new.persist_init
unless (@md.opt.act[:verbose_plus][:set]==:on \
|| @md.opt.act[:maintenance][:set]==:on)
if @env.processing_path.odt =~/od[ft]/
@@ -190,18 +189,18 @@ module SiSU_XML_ODF_ODT
end
idx_arr << x.strip if x.is_a?(String)
end
- @@odf[:book_idx]=idx_arr.join
+ @per.book_idx=idx_arr.join
end
end
def odf_metadata
- @@odf[:metadata]=SiSU_Metadata::Summary.new(@md).
+ @per.metadata=SiSU_Metadata::Summary.new(@md).
odf.metadata
end
def odf_tail
manifest="#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}"
- @@odf[:tail] << %{<text:p text:style-name="P_normal">Available document outputs: <br /> &lt;<text:a xl:type="simple" xl:href="#{manifest}">#{manifest}</text:a>&gt;</text:p>}
- @@odf[:tail] << %{\n<text:p text:style-name="P_normal">SiSU: &lt;<text:a xl:type="simple" xl:href="http://www.jus.uio.no/lm">www.jus.uio.no/sisu</text:a>&gt; and &lt;<text:a xl:type="simple" xl:href="http://www.sisudoc.org">www.sisudoc.org</text:a>&gt;</text:p>}
- @@odf[:tail] << "\n</office:text></office:body></office:document-content>"
+ @per.tail << %{<text:p text:style-name="P_normal">Available document outputs: <br /> &lt;<text:a xl:type="simple" xl:href="#{manifest}">#{manifest}</text:a>&gt;</text:p>}
+ @per.tail << %{\n<text:p text:style-name="P_normal">SiSU: &lt;<text:a xl:type="simple" xl:href="http://www.jus.uio.no/lm">www.jus.uio.no/sisu</text:a>&gt; and &lt;<text:a xl:type="simple" xl:href="http://www.sisudoc.org">www.sisudoc.org</text:a>&gt;</text:p>}
+ @per.tail << "\n</office:text></office:body></office:document-content>"
end
def set_bookmark_tag(dob)
SiSU_XML_ODF_ODT_Format::Tags.new.set_bookmark_tag(dob)
@@ -619,26 +618,26 @@ module SiSU_XML_ODF_ODT
end
end
if dob.is==:heading
- @@odf[:body] << heading(dob,p_num).obj << break_line*2
+ @per.body << heading(dob,p_num).obj << break_line*2
if SiSU_Env::ProcessingSettings.new(md).build.toc?
if dob.lv =~/[A-D1]/i
- @@odf[:toc] << toc(dob,p_num).obj
+ @per.toc << toc(dob,p_num).obj
end
end
elsif dob.is ==:verse
- @@odf[:body] << poem(dob,p_num).obj << break_line*2
+ @per.body << poem(dob,p_num).obj << break_line*2
elsif dob.is==:group
- @@odf[:body] << group(dob,p_num).obj << break_line*2
+ @per.body << group(dob,p_num).obj << break_line*2
elsif dob.is==:block
- @@odf[:body] << block(dob,p_num).obj << break_line*2
+ @per.body << block(dob,p_num).obj << break_line*2
elsif dob.is==:code
- @@odf[:body] << code(dob,p_num).obj << break_line*2
+ @per.body << code(dob,p_num).obj << break_line*2
elsif dob.is==:table #elsif dob.obj =~ /<!Th?¡/u
- @@odf[:body] << table(dob,p_num).obj << break_line*2
+ @per.body << table(dob,p_num).obj << break_line*2
elsif dob.is==:break
- @@odf[:body] << obj_break(dob).obj << break_line*2
+ @per.body << obj_break(dob).obj << break_line*2
else
- @@odf[:body] << normal(dob,p_num).obj << break_line*2 # main text, contents, body KEEP
+ @per.body << normal(dob,p_num).obj << break_line*2 # main text, contents, body KEEP
end
@@endnotes_para=[]
end
@@ -806,20 +805,20 @@ WOK
WOK
x=x.strip
x=x.gsub(/\n+/m,'') unless @md.opt.act[:maintenance][:set]==:on
- @@odf[:head] << x
+ @per.head << x
end
def publish
content=[]
br_pg='<text:p text:style-name="P_normal_page_new"> </text:p>'
content <<
- @@odf[:head] <<
- @@odf[:toc] <<
+ @per.head <<
+ @per.toc <<
br_pg <<
- @@odf[:body] <<
- @@odf[:book_idx] <<
+ @per.body <<
+ @per.book_idx <<
br_pg <<
- @@odf[:metadata] <<
- @@odf[:tail]
+ @per.metadata <<
+ @per.tail
SiSU_XML_ODF_ODT::Source::Output.new(content,@md,@env).odf
@@odf={ head: [], toc: [], body: [], tail: [], book_idx: [], metadata: [] }
end
diff --git a/lib/sisu/v6/xml_odf_odt_format.rb b/lib/sisu/develop/xml_odf_odt_format.rb
index 7f8d2106..efe5e733 100644
--- a/lib/sisu/v6/xml_odf_odt_format.rb
+++ b/lib/sisu/develop/xml_odf_odt_format.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** opendocument formatting, default opendocument template
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/odf_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: opendocument formatting, default opendocument template
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/odf_format.rb;hb=HEAD>
=end
module SiSU_XML_ODF_ODT_Format
@@ -165,7 +162,7 @@ module SiSU_XML_ODF_ODT_Format
end
end
class Table
- @@tablehead,@@table_counter=0,0 #reinitialise on new file
+ @@table_counter=0
@@tablefoot=[] #watch
@@fns=''
def initialize(md,dob,p_num)
@@ -268,7 +265,7 @@ module SiSU_XML_ODF_ODT_Format
class ODT_Head_1_2
def initialize(md)
@md=md
- @generator="#{@md.sisu_version[:project]} #{@md.sisu_version[:version]} #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})"
+ @generator="#{@md.project_details.project} #{@md.project_details.version} #{@md.project_details.date_stamp} (#{@md.project_details.date})"
end
def manifest_rdf
x=<<WOK
diff --git a/lib/sisu/v6/xml_parts.rb b/lib/sisu/develop/xml_parts.rb
index e4d30de6..6974efa2 100644
--- a/lib/sisu/v6/xml_parts.rb
+++ b/lib/sisu/develop/xml_parts.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** shared xml parts
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html_parts.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/html_parts.rb;hb=HEAD>
=end
module SiSU_Parts_XML
diff --git a/lib/sisu/develop/xml_persist.rb b/lib/sisu/develop/xml_persist.rb
new file mode 100644
index 00000000..6fb52eba
--- /dev/null
+++ b/lib/sisu/develop/xml_persist.rb
@@ -0,0 +1,126 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** html segment generation, processing
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xml_persist.rb;hb=HEAD>
+
+=end
+module SiSU_XML_Persist
+ class Persist
+ @@persist=nil
+ attr_accessor :head,:toc,:body,:tail,:open,:close,:sc,:endnotes,:book_idx,:metadata
+ #attr_accessor :head,:body,:tail,:open,:close,:sc
+#@@odf={ body: [], head: [], toc: [], metadata: [], tail: [], book_idx: [], endnotes: [] }
+ def initialize(args=nil)
+ @@persist=args=(args ? args : (@@persist || persist_init_hash_values))
+ @head=args[:head]
+ @toc=args[:toc]
+ @body=args[:body]
+ @tail=args[:tail]
+ @open=args[:open]
+ @close=args[:close]
+ @sc=args[:sc]
+ @endnotes=args[:endnotes]
+ @book_idx=args[:book_idx]
+ @metadata=args[:metadata]
+ end
+ def head
+ @head
+ end
+ def toc
+ @toc
+ end
+ def body
+ @body
+ end
+ def tail
+ @tail
+ end
+ def open
+ @open
+ end
+ def close
+ @close
+ end
+ def sc
+ @sc
+ end
+ def endnotes
+ @endnotes
+ end
+ def book_idx
+ @book_idx
+ end
+ def metadata
+ @metadata
+ end
+ def persist_init_hash_values
+ {
+ head: [],
+ toc: [],
+ body: [],
+ tail: [],
+ open: [],
+ close: [],
+ sc: [],
+ endnotes: [],
+ book_idx: [],
+ metadata: [],
+ }
+ end
+ def persist_init
+ @@persist=nil
+ Persist.new(persist_init_hash_values)
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v6/xml_sax.rb b/lib/sisu/develop/xml_sax.rb
index 5603dcaf..8d552f92 100644
--- a/lib/sisu/v6/xml_sax.rb
+++ b/lib/sisu/develop/xml_sax.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** xml output (sax style) processing
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xml.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: xml output (sax style) processing
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xml.rb;hb=HEAD>
=end
module SiSU_XML_SAX
@@ -66,10 +63,11 @@ module SiSU_XML_SAX
include SiSU_XML_Munge
require_relative 'xml_format' # xml_format.rb
include SiSU_XML_Format
+ require_relative 'xml_persist' # xml_persist.rb
require_relative 'rexml' # rexml.rb
include SiSU_Rexml
require_relative 'shared_metadata' # shared_metadata.rb
- @@alt_id_count,@@tablehead,@@number_of_cols=0,0,0
+ @@alt_id_count=0
@@tablefoot=''
class Source
def initialize(opt)
@@ -162,18 +160,22 @@ module SiSU_XML_SAX
include SiSU_TextUtils
require_relative 'css' # css.rb
require_relative 'xhtml_shared' # decide use, whether xml rather than xhtml
- @@xml={ body: [], open: [], close: [], head: [] }
def initialize(particulars)
@env, @md, @ao_arr=
particulars.env,particulars.md,particulars.ao_array
@trans=SiSU_XML_Munge::Trans.new(@md)
@sys=SiSU_Env::SystemCall.new
+ @per=SiSU_XML_Persist::Persist.new
end
def songsheet
- pre
- @data=markup(@ao_arr)
- post
- publish
+ begin
+ pre
+ @data=markup(@ao_arr)
+ post
+ publish
+ ensure
+ SiSU_XML_Persist::Persist.new.persist_init
+ end
end
protected
def embedded_endnotes(dob='')
@@ -222,7 +224,7 @@ WOK
end
def xml_head
metadata=SiSU_Metadata::Summary.new(@md).xml_sax.metadata
- @@xml[:head] << metadata
+ @per.head << metadata
end
def xml_sc(md='')
sc=if @md.sc_info
@@ -244,7 +246,7 @@ WOK
WOK
else ''
end
- @@xml[:sc]=sc
+ @per.sc=sc
end
def xml_structure(dob,type='norm')
if dob.is==:heading
@@ -260,16 +262,16 @@ WOK
util=SiSU_TextUtils::Wrap.new(dob.obj,70)
wrapped=util.line_wrap
#end
- @@xml[:body] << if defined? dob.ocn; %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
+ @per.body << if defined? dob.ocn; %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
else "#{Ax[:tab]*0}<object>"
end
- @@xml[:body] << "#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>" if defined? dob.ocn
- @@xml[:body] << if lv; %{#{Ax[:tab]*1}<text class="h#{lv}">\n#{Ax[:tab]*2}#{wrapped}\n#{Ax[:tab]*1}</text>}
+ @per.body << "#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>" if defined? dob.ocn
+ @per.body << if lv; %{#{Ax[:tab]*1}<text class="h#{lv}">\n#{Ax[:tab]*2}#{wrapped}\n#{Ax[:tab]*1}</text>}
else %{#{Ax[:tab]*1}<text class="#{type}">\n#{Ax[:tab]*2}#{wrapped}\n#{Ax[:tab]*1}</text>} # main text, contents, body KEEP
end
- @@xml[:body] << @endnotes if @endnotes
- ##@@xml[:body] << "#{Ax[:tab]*1}<text>#{dob[@regx,2]}</text>" if dob[@regx,2] # old unwrapped main text, contents, body KEEP
- @@xml[:body] << "#{Ax[:tab]*0}</object>"
+ @per.body << @endnotes if @endnotes
+ ##@per.body << "#{Ax[:tab]*1}<text>#{dob[@regx,2]}</text>" if dob[@regx,2] # old unwrapped main text, contents, body KEEP
+ @per.body << "#{Ax[:tab]*0}</object>"
@endnotes=[]
end
def block_structure(dob='')
@@ -278,13 +280,13 @@ WOK
gsub(/#{Mx[:en_b_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_b_c]}/,'<en>\1</en>') #footnote/endnote clean
dob=@trans.markup_block(dob)
dob.obj=dob.obj.strip
- @@xml[:body] << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
- @@xml[:body] << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
- @@xml[:body] << %{#{Ax[:tab]*1}<text class="block">#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*1}</text>}
- @@xml[:body] << "#{Ax[:tab]*0}</object>"
- @@xml[:body] << @endnotes if @endnotes
+ @per.body << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
+ @per.body << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
+ @per.body << %{#{Ax[:tab]*1}<text class="block">#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*1}</text>}
+ @per.body << "#{Ax[:tab]*0}</object>"
+ @per.body << @endnotes if @endnotes
@endnotes=[]
end
def group_structure(dob='')
@@ -293,48 +295,48 @@ WOK
gsub(/#{Mx[:en_b_o]}([\d*+]+)\s+(?:.+?)#{Mx[:en_b_c]}/,'<en>\1</en>') #footnote/endnote clean
dob=@trans.markup_group(dob)
dob.obj=dob.obj.strip
- @@xml[:body] << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
- @@xml[:body] << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
- @@xml[:body] << %{#{Ax[:tab]*1}<text class="group">#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*1}</text>}
- @@xml[:body] << "#{Ax[:tab]*0}</object>"
- @@xml[:body] << @endnotes if @endnotes
+ @per.body << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
+ @per.body << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
+ @per.body << %{#{Ax[:tab]*1}<text class="group">#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*1}</text>}
+ @per.body << "#{Ax[:tab]*0}</object>"
+ @per.body << @endnotes if @endnotes
@endnotes=[]
end
def poem_structure(dob='')
dob=@trans.markup_group(dob)
#dob.obj.gsub(/\s\s/,'&#160;&#160;')
dob.obj=dob.obj.strip
- @@xml[:body] << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
- @@xml[:body] << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
- @@xml[:body] << %{#{Ax[:tab]*1}<text class="verse">#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*1}</text>}
- @@xml[:body] << %{#{Ax[:tab]*0}</object>}
+ @per.body << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
+ @per.body << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
+ @per.body << %{#{Ax[:tab]*1}<text class="verse">#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*1}</text>}
+ @per.body << %{#{Ax[:tab]*0}</object>}
end
def code_structure(dob='')
dob=@trans.markup_group(dob)
dob.obj=dob.obj.gsub(/\s\s/,'&#160;&#160;').strip
- @@xml[:body] << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
- @@xml[:body] << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
- @@xml[:body] << %{#{Ax[:tab]*1}<text class="code">#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*1}</text>}
- @@xml[:body] << "#{Ax[:tab]*0}</object>"
+ @per.body << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
+ @per.body << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
+ @per.body << %{#{Ax[:tab]*1}<text class="code">#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*2}#{dob.obj}#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*1}</text>}
+ @per.body << "#{Ax[:tab]*0}</object>"
end
def table_structure(dob)
table=SiSU_XHTML_Shared::TableXHTML.new(dob)
- @@xml[:body] << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
- @@xml[:body] << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
- @@xml[:body] << %{#{Ax[:tab]*1}<text class="table">#{Ax[:tab]*1}}
- @@xml[:body] << %{#{Ax[:tab]*2}#{table.table.obj}}
- @@xml[:body] << %{#{Ax[:tab]*1}</text>}
- #@@xml[:body] << %{#{tab*1}</text>}
- @@xml[:body] << "#{Ax[:tab]*0}</object>"
- #@@xml[:body] << %{#{Ax[:tab]*0}<object id="#{ocn}">}
- #@@xml[:body] << %{#{Ax[:tab]*1}#{table}\n#{Ax[:tab]*1}} # unless lv # main text, contents, body KEEP
- #@@xml[:body] << "#{Ax[:tab]*0}</object>"
+ @per.body << %{#{Ax[:tab]*0}<object id="#{dob.ocn}">}
+ @per.body << %{#{Ax[:tab]*1}<ocn>#{dob.ocn}</ocn>}
+ @per.body << %{#{Ax[:tab]*1}<text class="table">#{Ax[:tab]*1}}
+ @per.body << %{#{Ax[:tab]*2}#{table.table.obj}}
+ @per.body << %{#{Ax[:tab]*1}</text>}
+ #@per.body << %{#{tab*1}</text>}
+ @per.body << "#{Ax[:tab]*0}</object>"
+ #@per.body << %{#{Ax[:tab]*0}<object id="#{ocn}">}
+ #@per.body << %{#{Ax[:tab]*1}#{table}\n#{Ax[:tab]*1}} # unless lv # main text, contents, body KEEP
+ #@per.body << "#{Ax[:tab]*0}</object>"
#@endnotes=[]
end
def markup(data)
@@ -406,7 +408,7 @@ WOK
elsif dob.obj =~/(Owner Details)/
# txt_obj={ txt: '<br /><a name="owner.details">Owner Details</a>' }
# format_scroll=FormatScroll.new(@md,txt_obj)
-# @@xml[:owner_details]=format_scroll.bold_para
+# @per.owner_details=format_scroll.bold_para
dob.obj=''
end
if dob.obj =~/<a name="n\d+">/ \
@@ -427,41 +429,41 @@ WOK
end
7.downto(4) do |x|
y=x - 1; v=x - 3
- @@xml[:body] << "#{Ax[:tab]*5}</content>\n#{Ax[:tab]*y}</contents#{v}>" if @level[x]==true
+ @per.body << "#{Ax[:tab]*5}</content>\n#{Ax[:tab]*y}</contents#{v}>" if @level[x]==true
end
3.downto(1) do |x|
y=x - 1
- @@xml[:body] << "#{Ax[:tab]*y}</heading#{x}>" if @level[x]==true
+ @per.body << "#{Ax[:tab]*y}</heading#{x}>" if @level[x]==true
end
- #7.downto(1) { |x| y=x - 1; @@xml[:body] << "#{Ax[:tab]*y}</level #{x}>" if @level[x]==true }
+ #7.downto(1) { |x| y=x - 1; @per.body << "#{Ax[:tab]*y}</level #{x}>" if @level[x]==true }
end
def pre
rdf=SiSU_XML_Tags::RDF.new(@md)
- @@xml[:head],@@xml[:body]=[],[]
+ @per.head,@per.body=[],[]
stylesheet=SiSU_Style::CSS_HeadInfo.new(@md,'xml_sax').stylesheet
encoding=if @sys.locale =~/utf-?8/i then '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
else '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>'
end
- @@xml[:open] =<<WOK
+ @per.open =<<WOK
#{encoding}
#{stylesheet.css_head_xml}
#{rdf.comment_xml}
<document>
WOK
- @@xml[:head] << '<head>'
- @@xml[:body] << '<body>'
+ @per.head << '<head>'
+ @per.body << '<body>'
end
def post
- @@xml[:head] << @@xml[:sc]
- @@xml[:head] << '</head>'
- @@xml[:body] << '</body>'
- @@xml[:close] = '</document>'
+ @per.head << @per.sc
+ @per.head << '</head>'
+ @per.body << '</body>'
+ @per.close = '</document>'
end
def publish
content=[]
- content << @@xml[:open] << @@xml[:head] << @@xml[:body] << @@xml[:metadata]
- content << @@xml[:owner_details] if @md.stmp =~/\w\w/
- content << @@xml[:tail] << @@xml[:close]
+ content << @per.open << @per.head << @per.body #<< @per.metadata
+ #content << @per.owner_details if @md.stmp =~/\w\w/
+ content << @per.tail << @per.close
content=content.flatten.compact
Output.new(content,@md).xml
@@xml={}
@@ -499,11 +501,11 @@ WOK
'check document structure'
).colorize
tell=SiSU_Screen::Ansi.new(
- @md.opt.act[:color_state][:set],
- 'invert',
- '',
- ''
- )
+ @md.opt.act[:color_state][:set],
+ 'invert',
+ '',
+ ''
+ )
tell.grey_open
end
tidyfile='/dev/null' #don't want one or screen output, check for alternative flags
diff --git a/lib/sisu/v6/xml_scaffold_structure_collapsed.rb b/lib/sisu/develop/xml_scaffold_structure_collapsed.rb
index cb895f24..72708e45 100644
--- a/lib/sisu/v6/xml_scaffold_structure_collapsed.rb
+++ b/lib/sisu/develop/xml_scaffold_structure_collapsed.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** extract and print an XML rendition of document structure to screen
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xml_scaffold.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: extract and print an XML rendition of document structure to screen
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xml_scaffold.rb;hb=HEAD>
=end
module SiSU_XML_Scaffold_Structure_Collapse
diff --git a/lib/sisu/v6/xml_scaffold_structure_sisu.rb b/lib/sisu/develop/xml_scaffold_structure_sisu.rb
index 3bd413cf..39c71d80 100644
--- a/lib/sisu/v6/xml_scaffold_structure_sisu.rb
+++ b/lib/sisu/develop/xml_scaffold_structure_sisu.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** extract and print an XML rendition of document structure to screen
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xml_scaffold.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: extract and print an XML rendition of document structure to screen
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xml_scaffold.rb;hb=HEAD>
=end
module SiSU_XML_Scaffold_Structure_Sisu
diff --git a/lib/sisu/v5/xml_shared.rb b/lib/sisu/develop/xml_shared.rb
index a5f5e114..03e5a2a1 100644
--- a/lib/sisu/v5/xml_shared.rb
+++ b/lib/sisu/develop/xml_shared.rb
@@ -1,60 +1,60 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** common file for xml generation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xml_shared.rb;hb=HEAD>
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xml_shared.rb;hb=HEAD>
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
+** Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- ** Description: common file for xml generation
=end
module SiSU_XML_Munge
require_relative 'xml_parts' # xml_parts.rb
@@ -608,7 +608,7 @@ module SiSU_XML_Tags #Format
rdftoc
end
def comment_xml(extra='')
- generator="Generated by: #{@md.sisu_version[:project]} #{@md.sisu_version[:version]} of #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" if @md.sisu_version[:version]
+ generator="Generated by: #{@md.project_details.project} #{@md.project_details.version} of #{@md.project_details.date_stamp} (#{@md.project_details.date})" if @md.project_details.version
lastdone="Last Generated on: #{Time.now}"
rubyv="Ruby version: #{@md.ruby_version}"
sc=if @md.sc_info
diff --git a/lib/sisu/v6/xml_tables.rb b/lib/sisu/develop/xml_tables.rb
index 468963ff..998266c8 100644
--- a/lib/sisu/v6/xml_tables.rb
+++ b/lib/sisu/develop/xml_tables.rb
@@ -1,60 +1,57 @@
# encoding: utf-8
=begin
- * Name: SiSU
+* Name: SiSU
- * Description: a framework for document structuring, publishing and search
+** Description: documents, structuring, processing, publishing, search
+*** common file for xml table generation
- * Author: Ralph Amissah
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
- * License: GPL 3 or later:
+** License: GPL 3 or later:
- SiSU, a framework for document structuring, publishing and search
+ SiSU, a framework for document structuring, publishing and search
- Copyright (C) Ralph Amissah
+ Copyright (C) Ralph Amissah
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xml_tables.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: common file for xml table generation
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/xml_tables.rb;hb=HEAD>
=end
module SiSU_Tables
diff --git a/lib/sisu/develop/zap.rb b/lib/sisu/develop/zap.rb
new file mode 100644
index 00000000..50a6cd54
--- /dev/null
+++ b/lib/sisu/develop/zap.rb
@@ -0,0 +1,90 @@
+# encoding: utf-8
+=begin
+
+* Name: SiSU
+
+** Description: documents, structuring, processing, publishing, search
+*** zap wipe clean previous output of the type specified
+
+** Author: Ralph Amissah
+ <ralph@amissah.com>
+ <ralph.amissah@gmail.com>
+
+** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah,
+ All Rights Reserved.
+
+** License: GPL 3 or later:
+
+ SiSU, a framework for document structuring, publishing and search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
+
+ If you have Internet connection, the latest version of the GPL should be
+ available at these locations:
+ <http://www.fsf.org/licensing/licenses/gpl.html>
+ <http://www.gnu.org/licenses/gpl.html>
+
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+
+** SiSU uses:
+ * Standard SiSU markup syntax,
+ * Standard SiSU meta-markup syntax, and the
+ * Standard SiSU object citation numbering and system
+
+** Hompages:
+ <http://www.jus.uio.no/sisu>
+ <http://www.sisudoc.org>
+
+** Git
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
+ <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/zap.rb;hb=HEAD>
+
+=end
+module SiSU_Zap
+ require_relative 'se' # se.rb
+ include SiSU_Env
+ class Source
+ def initialize(opt)
+ @opt=opt
+ @env=SiSU_Env::InfoEnv.new(opt.fns)
+ end
+ def read
+ zap_path="#{@env.path.output}/#{@env.fnb}"
+ z=SiSU_Env::CleanOutput.new(@opt)
+ if SiSU_Env::InfoSettings.new.permission?('zap')
+ unless @opt.act[:quiet][:set]==:on
+ tell=SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ "Clean files related to processing #{@opt.selections.str} ->",
+ "#{@opt.fns} -> #{zap_path}"
+ )
+ tell.warn
+ end
+ z.zap.remove_output
+ else
+ unless @opt.act[:quiet][:set]==:on
+ tell=SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'use of -Z (zap) has not enabled in sisurc.yml'
+ )
+ tell.warn
+ end
+ end
+ end
+ end
+end
+__END__
diff --git a/lib/sisu/v5/air.rb b/lib/sisu/v5/air.rb
deleted file mode 100644
index f09f02c9..00000000
--- a/lib/sisu/v5/air.rb
+++ /dev/null
@@ -1,83 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/air.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_Air
- require_relative 'se_hub_particulars' # se_hub_particulars.rb
- class Source
- @@ao_array=[]
- @@fns=nil
- def initialize(opt)
- @opt=opt
- @@fns||@opt.fns
- @particulars=SiSU_Particulars::Combined.new(opt)
- #@env=@particulars.env
- #@md=@particulars.md
- #@ao_array=@particulars.ao_array
- end
- def read
- end
- protected
- def print
- puts @particulars.md.inspect
- puts @particulars.env.inspect
- puts @particulars.ao_array
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/ao_character_check.rb b/lib/sisu/v5/ao_character_check.rb
deleted file mode 100644
index 8602f5e9..00000000
--- a/lib/sisu/v5/ao_character_check.rb
+++ /dev/null
@@ -1,106 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/ao_character_check.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_AO_CharacterCheck
- class Check
- def initialize(data)
- @data=data
- @comment='%'
- @endnote_array=[]
- end
- def character_check_and_oldstyle_endnote_array
- data=@data
- @tuned_file,@endnote_array=[],[]
- endnote_no=1
- data.each do |dob|
- unless dob.is ==:table
- dob.obj=dob.obj.strip.
- gsub(/^[{~}]\s*$/,'').
- gsub(/~#\s*/,"#{Mx[:pa_non_object_no_heading]}").
- gsub(/-#\s*/,"#{Mx[:pa_non_object_dummy_heading]}").
- gsub(/(#{Mx[:en_a_o]})\s*\s+/,'\1 ').
- gsub(/(~\{\s*)\s+/,'\1 ').
- gsub(/ \/\//,"#{Mx[:br_line]}").
- gsub(/<br>/,"#{Mx[:br_line]}"). #needed by xml, xhtml etc.
- gsub(/\t/,' ').
- gsub(/\342\200\231/u,"'"). #if dob =~/’/ #Avoid #&lsquo; &rsquo; #&ldquo; &rdquo;
- gsub(/\\copy(?:right)?\b/,'&#169;').
- gsub(/\\trademark\b|\\tm\b/,'&#174;')
- dob.obj=dob.obj + "\n"
- unless dob.is ==:code
- case dob.obj
- when /\^~/ #% Note must do this first (earlier loop) and then enter gathered data into ~^\d+
- sub_dob=dob.obj.dup
- @endnote_array << sub_dob.gsub(/\n/,'').
- gsub(/\^~\s+(.+)\s*/,
- %{#{Mx[:en_a_o]}#{endnote_no} \\1 #{Mx[:en_a_c]}}).
- strip
- endnote_no+=1
- dob=nil if dob.obj =~/\^~ .+/ #watch, removes 'binary' endnote now in endnote array for later insertion
- end
- end
- end
- @tuned_file << dob if dob.is_a?(Object)
- end
- @tuned_file=@tuned_file.flatten.compact
- [@tuned_file,@endnote_array]
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/ao_metadata.rb b/lib/sisu/v5/ao_metadata.rb
deleted file mode 100644
index e1f8eb79..00000000
--- a/lib/sisu/v5/ao_metadata.rb
+++ /dev/null
@@ -1,89 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/ao_metadata.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_AO_Metadata
- class Metadata
- def initialize(md,metad)
- @md,@metadata=md,metad
- l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language
- language=l[:n]
- @tr=SiSU_Translate::Source.new(md,language)
- end
- def make_para(obj,ocn)
- h={
- obj: obj,
- ocn: 0
- }
- SiSU_AO_DocumentStructure::ObjectPara.new.paragraph(h)
- end
- def make_heading(obj,ocn,name,lv,ln)
- h={
- lv: lv,
- ln: ln,
- name: name,
- obj: obj,
- ocn: 0
- }
- SiSU_AO_DocumentStructure::ObjectHeading.new.heading(h)
- end
- def metadata
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/cgi.rb b/lib/sisu/v5/cgi.rb
deleted file mode 100644
index 5b0e5831..00000000
--- a/lib/sisu/v5/cgi.rb
+++ /dev/null
@@ -1,88 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/cgi.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: generates naive cgi search form for search of sisu database
- (pgsql sqlite)
-
-=end
-module SiSU_CGI #% database building documents
- require_relative 'se' # se.rb
- require_relative 'cgi_pgsql' # cgi_pgsql.rb
- require_relative 'cgi_sqlite' # cgi_sqlite.rb
- class SearchSQL
- def initialize(opt)
- @opt=opt
- @webserv=@opt.files[0].to_s.strip
- end
- def read
- if @opt.act[:sample_search_form][:db]==:pg # cgi_pgsql.rb
- SiSU_CGI_PgSQL::SearchPgSQL.new(@opt,@webserv).pgsql
- elsif @opt.act[:sample_search_form][:db]==:sqlite # cgi_sqlite.rb
- SiSU_CGI_SQLite::SearchSQLite.new(@opt,@webserv).sqlite
- else
- puts <<-WOK
- please select database type for which sample search form should be built (pgsql or sqlite)
- sisu --sample-search-form --db=sqlite
- sisu --sample-search-form --db=pg
- other options include
- --webserv-cgi='[cgi-server-name]'
- --webserv-output='[sisu-output-server-with-base-path]'
- WOK
- end
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/errors.rb b/lib/sisu/v5/errors.rb
deleted file mode 100644
index 007100bd..00000000
--- a/lib/sisu/v5/errors.rb
+++ /dev/null
@@ -1,87 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/errors.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, error screen reporting
-
-=end
-module SiSU_Errors
- require_relative 'se' # se.rb
- include SiSU_Env; include SiSU_Screen
- class Rescued <CreateFile
- def initialize(error,errorlist,cmd,fns='')
- @fns,@cmd,@error,@errorlist=fns,cmd,error,errorlist
- @cmd=(cmd \
- && (cmd =~/c/)) \
- ? 'Vc'
- : 'V'
- end
- def location
- file=@fns \
- ? (SiSU_Env::CreateFile.new(@fns).file_error)
- : (File.new('/tmp/errorlog.sisu','w+'))
- file << @fns << "\n" << @error << "\n" << @errorlist
- file.close
- if @cmd=~/[vVM]/
- SiSU_Screen::Ansi.new('',$!,$@).rescue do
- (block_given?) ? yield : __LINE__.to_s + ':' + __FILE__
- end
- else
- SiSU_Screen::Ansi.new('',"rescued, exception raised, silenced").puts_grey
- end
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/generic_parts.rb b/lib/sisu/v5/generic_parts.rb
deleted file mode 100644
index c7a702e9..00000000
--- a/lib/sisu/v5/generic_parts.rb
+++ /dev/null
@@ -1,134 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html_parts.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
-
-=end
-module SiSU_Parts_Generic
- def the_url
- def urify(uri)
- URI.parse(uri)
- end
- def sisu
- 'http://www.sisudoc.org/'
- end
- def sisudoc
- 'http://www.sisudoc.org'
- end
- def footer_signature
- 'http://www.sisudoc.org/'
- end
- def rl_root
- '/sisu' #watch
- end
- def root_http
- 'http://www.sisudoc.org/' #watch
- end
- def home
- 'http://www.sisudoc.org/' # used in pdf header
- end
- def site #used as stub... where there are subdirectories and is different from home
- home
- end
- def home_txt
- 'www.sisudoc.org'
- end
- def sisu_txt
- 'www.sisudoc.org'
- end
- self
- end
- def the_text
- def home
- 'SiSU'
- end
- def txt_hp
- '&nbsp;SiSU'
- end
- def txt_hp_alias
- 'SiSU'
- end
- def txt_home
- 'SiSU'
- end
- def txt_signature # used in latex/pdf footer
- 'SiSU'
- end
- def url_open
- '<'
- end
- def url_close
- '>'
- end
- self
- end
- def the_icon
- def i_ico
- 'rb7.ico'
- end
- def i_home_button
- 'sisu.png'
- end
- def i_choice
- 'b_choice.png'
- end
- def i_new
- 'b_new.png'
- end
- self
- end
-end
-__END__
diff --git a/lib/sisu/v5/html_harvest.rb b/lib/sisu/v5/html_harvest.rb
deleted file mode 100644
index c3a4030b..00000000
--- a/lib/sisu/v5/html_harvest.rb
+++ /dev/null
@@ -1,114 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
- harvest metadata from document corpus (suitable for medium sized sites)
- (concept example, [to remove size constraint: implement SQL equivalent])
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/harvest.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_Harvest
- @@the_idx_topics,@@the_idx_authors={},{}
- class Source
- require_relative 'hub_options' # hub_options.rb
- require_relative 'html_harvest_topics' # html_harvest_topics.rb
- require_relative 'html_harvest_authors' # html_harvest_authors.rb
- require_relative 'se' # se.rb
- include SiSU_Env
- def initialize(opt)
- @opt=opt
- @env=SiSU_Env::InfoEnv.new
- end
- def read
- begin
- harvest_pth=@env.path.webserv + '/' + @opt.base_stub
- FileUtils::mkdir_p(harvest_pth) unless FileTest.directory?(harvest_pth)
- cases(@opt,@env)
- rescue
- ensure
- SiSU_Env::CreateSite.new(@opt).cp_css
- end
- end
- def help
- puts <<WOK
- harvest --harvest extracts document index metadata
-
-WOK
- end
- def css(opt)
- require_relative 'css' # css.rb
- css=SiSU_Style::CSS.new
- fn_css=SiSU_Env::CSS_Default.new
- style=File.new("#{@env.path.pwd}/#{fn_css.harvest}",'w')
- style << css.harvest
- style.close
- end
- def cases(opt,env)
- case opt.selections.str.inspect
- when/--harvest/i
- css(opt) if @opt.act[:maintenance][:set]==:on
- SiSU_HarvestAuthors::Songsheet.new(opt,env).songsheet
- SiSU_HarvestTopics::Songsheet.new(opt,env).songsheet
- if @opt.act[:rsync][:set]==:on
- require_relative 'remote' # remote.rb
- SiSU_Remote::Put.new(opt).rsync_harvest
- end
- else
- help
- end
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/html_harvest_author_format.rb b/lib/sisu/v5/html_harvest_author_format.rb
deleted file mode 100644
index 92709673..00000000
--- a/lib/sisu/v5/html_harvest_author_format.rb
+++ /dev/null
@@ -1,114 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/harvest_author_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_FormatAuthor
- class Author
- def initialize(author_param)
- @author_param=author_param
- end
- def author_details
- @authors,@author_array=[],[]
- authors=@author_param.scan(/[^;]+/)
- authors.each do |a|
- a=a.strip
- if a =~/"(.+?)"/
- @authors << { the: $1 }
- @author_array << $1.upcase
- else #if a =~/,/
- x=a.scan(/[^,]+/)
- x[0]=x[0].strip
- x[1]=x[1].strip if x[1]
- if x.length==1
- @authors << { the: x[0] }
- @author_array << x[0].upcase
- elsif x.length==2
- @authors << { the: x[0], others: x[1] }
- @author_array << "#{x[0].upcase}, #{x[1]}"
- else #p x.length
- end
- end
- end
- l = @authors.length
- authors_string=''
- @authors.each_with_index do |a,i|
- authors_string += if a[:others]
- if (l - i) > 1
- "#{a[:others]} #{a[:the]}, "
- else
- "#{a[:others]} #{a[:the]}"
- end
- else
- if (l - i) > 2
- "#{a[:the]}, "
- else
- "#{a[:the]}"
- end
- end
- end
- {
- last_first_a: authors,
- last_first_format_a: @author_array,
- authors_h: @authors,
- authors_s: authors_string,
- authors_param: @author_param
- }
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/html_shared.rb b/lib/sisu/v5/html_shared.rb
deleted file mode 100644
index 04617e74..00000000
--- a/lib/sisu/v5/html_shared.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html_shared.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
-
-=end
-module SiSU_HTML_Shared
- require_relative 'html_table' # html_table.rb
- class TableHTML < SiSU_HTML_Table::TableHTML
- end
-end
-__END__
diff --git a/lib/sisu/v5/html_table.rb b/lib/sisu/v5/html_table.rb
deleted file mode 100644
index f29256a7..00000000
--- a/lib/sisu/v5/html_table.rb
+++ /dev/null
@@ -1,67 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/html_table.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
-
-=end
-module SiSU_HTML_Table
- require_relative 'xhtml_table' # xhtml_table.rb
- require_relative 'html_parts' # html_parts.rb
- class TableHTML < SiSU_XHTML_Table::TableXHTML
- include SiSU_Parts_HTML
- end
-end
-__END__
diff --git a/lib/sisu/v5/manpage_format.rb b/lib/sisu/v5/manpage_format.rb
deleted file mode 100644
index 98f37f67..00000000
--- a/lib/sisu/v5/manpage_format.rb
+++ /dev/null
@@ -1,88 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/manpage_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: manpage formatting template
-
-=end
-module SiSU_ManpageFormat
- require_relative 'dp' # dp.rb
- include SiSU_Param
- class ParagraphNumber
- def initialize(paranum)
- @paranum=/(\d+)/m.match(paranum)[1]
- end
- def display
- @paranum.gsub(/(\d+)/,'<font size="1" color="#777777">&nbsp;&nbsp;\1</font>')
- end
- def name
- @paranum.gsub(/(\d+)/,'<a name="\1"></a>')
- end
- def goto
- @paranum.gsub(/(\d+)/,'<a href="#\1">')
- end
- end
- class FormatTextObject
- def initialize(md,dob)
- @md,@dob=md,dob
- rgx=/#{Mx[:en_a_o]}[\d*+]+\s+(.+?)#{Mx[:en_a_c]}/
- @dob.obj.gsub!(rgx,'\1') if @dob.obj =~rgx
- end
- def scr_endnote_body
- "<endnote>#{@dob.obj}</endnote> "
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/po4a.rb b/lib/sisu/v5/po4a.rb
deleted file mode 100644
index 03cf14f7..00000000
--- a/lib/sisu/v5/po4a.rb
+++ /dev/null
@@ -1,984 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/po4a.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: pot file generation
- linefeed)
-
-=end
-module SiSU_Po4a
- require_relative 'ao' # ao.rb
- require_relative 'se' # se.rb
- include SiSU_Env
- require_relative 'ao_composite' # ao_composite.rb
- require_relative 'shared_metadata' # shared_metadata.rb
- require_relative 'po4a_set' # po4a_set.rb
- include SiSU_Param
- class Source
- @@opt_src,@@opt_trn,@@opt_src_,@@opt_trn_,@@md_src,@@md_trn=nil,nil,nil,nil,nil,nil
- def initialize(opt,fn=nil)
- @opt,@fn=opt,fn
- #unless @opt.fns =~/(.+?\.(?:-|ssm\.)?sst)$/
- # puts "#{@opt.fns} not a processed file type"
- #end
- r=Px[:lng_lst_rgx].gsub(/\|en\|/,'|')
- @lang_regx=%r{(?:#{r})}
- if opt.fns =~/\S+?~#{@lang_regx}\.ss[mti]/ \
- and opt.f_pth[:lng]!=@opt.lng_base
- @@opt_src_=false
- @@opt_trn=opt
- @@md_trn=SiSU_Param::Parameters.new(opt).get
- else
- @@opt_src_=true
- @@opt_src=opt
- @@md_src=SiSU_Param::Parameters.new(opt).get
- end
- end
- def read
- begin
- src={}
- src[:pth]=@opt.f_pth[:pth]
- src[:files]=if @opt.fns =~ /\.(?:(?:-|ssm\.)sst|ssm)$/
- @opt.fns=@opt.fns.gsub(/\.ssm\.sst$/,'.ssm')
- SiSU_Assemble::CompositeFileList.new(@opt).read
- else
- [@opt.fns]
- end
- md=SiSU_Param::Parameters.new(@opt).get
- src[:files].each do |fn|
- SiSU_AO::Source.new(@opt,fn).read # -m
- env=SiSU_Env::InfoEnv.new(@opt.fns)
- m=/((.+?)(?:\~\w\w(?:_\w\w)?)?)\.((?:-|ssm\.)?sst|ssm|ssi)$/ #watch added match for sss
- @fnn,@fnb,@fnt=fn[m,1],fn[m,2],fn[m,3]
- unless @opt.act[:quiet][:set]==:on
- path=env.path.output_tell
- tool=(@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? "#{env.program.text_editor} #{path}/#{md.fnb}/#{md.fn[:plain]}"
- : @opt.fns
- (@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Pot po4a',tool).green_hi_blue
- : SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Pot po4a',tool).green_title_hi
- if (@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on)
- SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- @opt.fns,
- "#{path}/#{md.fnb}/#{md.fn[:plain]}"
- ).flow
- end
- end
- if @opt.fns =~/\S+?~#{@lang_regx}\.ss[mti]/ \
- or @opt.f_pth[:lng] !=@opt.lng_base
- opt_lang_trn_fn=fn
- @ao_array_lang_translation=SiSU_AO::Source.new(@opt,opt_lang_trn_fn).get # ao file drawn here
- opt_lang_src_fn=if fn =~/\S+?~\S{2}(?:_\S{2})?\.ss[mti]/
- fn.gsub(/(\S+?)~\S{2}(?:_\S{2})?(\.ss[mti])/,'\1\2') #check i
- else fn
- end
- transdir,srcdir=Dir.pwd,Dir.pwd
- if Dir.pwd.to_s =~/\/#{@lang_regx}$/
- transdir=Dir.pwd
- srcdir=transdir.gsub(/\/#{@lang_regx}$/,"/#{@opt.lng_base}")
- if FileTest.directory?(srcdir)
- Dir.chdir(srcdir)
- end
- else nil
- end
- if FileTest.file?("#{srcdir}/#{opt_lang_src_fn}")
- @ao_array_lang_src=SiSU_AO::Source.new(@@opt_src,opt_lang_src_fn).get # ao file drawn here
- else
- puts "no identified source document"
- exit
- end
- Dir.chdir(transdir) if transdir
- else
- @ao_array_lang_src=SiSU_AO::Source.new(@opt,fn).get # ao file drawn here
- @ao_array_lang_translation=nil
- end
- wrap_width=if defined? md.make.plaintext_wrap \
- and md.make.plaintext_wrap
- md.make.plaintext_wrap
- elsif defined? env.plaintext_wrap \
- and env.plaintext_wrap
- env.plaintext_wrap
- else 78
- end
- SiSU_Po4a::Source::Scroll.new(fn,@ao_array_lang_src,@ao_array_lang_translation,@@md_src,@@md_trn,wrap_width).songsheet
- end
- rescue
- SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
- __LINE__.to_s + ':' + __FILE__
- end
- ensure
- end
- end
- private
- class Scroll <Source
- include SiSU_Po4aUtils
- @@endnotes={ para: [], end: [] }
- def initialize(fn,data_src,data_trn,md_src,md_trn,wrap_width)
- @fn,@data_src,@data_trn,@md_src,@md_trn,@wrap_width=fn,data_src,data_trn,md_src,md_trn,wrap_width
- @md=(md_trn.nil?) \
- ? md_src
- : md_trn
- @tab="\t"
- @@endnotes_=(@md.opt.selections.str =~/--endnote/) ? true : false # --footnote
- @br=(@md.opt.selections.str =~/--dos/) ? "\r\n" : "\n" # --unix
- @pot={ body: [], open: [], close: [], head: [], metadata: [], tail: [] }
- end
- def songsheet
-############## BUG @fn changes value
- fn=@fn
- pot=pot_markup(@data_src,@data_trn)
- publish(fn,pot)
- end
- def extract_endnotes(dob='') #% Used for extraction of endnotes from paragraphs
- notes_a=dob.obj.scan(/#{Mx[:en_a_o]}([\d]+\s+.+?)#{Mx[:en_a_c]}/)
- ##notes_a=dob.obj.scan(/#{Mx[:en_a_o]}([\d*+]+\s+.+?)#{Mx[:en_a_c]}/)
- #notes_b=dob.obj.scan(/#{Mx[:en_b_o]}([\d*+]+\s+.+?)#{Mx[:en_b_c]}/)
- @n=[]
- notes_a.flatten.each do |n| #high cost to deal with <br> appropriately within plaintext, consider
- n=n.dup.to_s
- n=n.gsub(/^([\d]+)\s+/,'^~\1 ').
- #gsub(/^([\d*+]+)\s+/,'^~\1 ').
- gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,'<br>')
- @n << n
- end
- notes_a=@n.flatten
- end
- def wrap_endnotes(orig_notes='',trn_notes='')
- nt=@@endnotes_ ? 'endnote' : 'footnote'
- @fn=0
- a_l=orig_notes.length
- 0.upto(a_l-1) do |i|
- @fn=if orig_notes[i].to_s =~/^\^~([\d*+]+)/ # provides endnote number within paragraph
- @fn += 1
- else @fn
- end
- d="#{nt} #{@fn}"
- mark="^~ "
- instruct=s_mark=''
- if @md.opt.act[:maintenance][:set]==:on
- instruct=%{\n# footnotes, the preferred sisu markup for a footnote is~{this is a footnote}~ however, for translation a footnote reference marker in the text~^ with a set of notes following the paragraph starting on a newline with "^~ this is a footnote", is easier to deal with, if possible these should be converted back to~{inline notes}~}
- s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
- end
- desc="#{d}#{s_mark}#{instruct}"
- orig=(orig_notes[i].to_s =~/^\^~[\d*+]+/) ? (orig_notes[i].to_s.gsub(/^\^~[\d*+]+/,'^~')) : orig_notes[i].to_s
- trans=if trn_notes.is_a?(Array) \
- and trn_notes.length==orig_notes.length
- (trn_notes[i].to_s =~/^\^~[\d*+]+/) ? (trn_notes[i].to_s.gsub(/^\^~[\d*+]+/,'^~')) : trn_notes[i].to_s
- else ''
- end
- util=pot_structure(desc,orig,trans)
- wrap=util.line_wrap
- wrap=if wrap =~ /^\s*\^~[\d*+]+\s+.+?\s*\Z/m
- wrap.gsub(/^\s*(\^~[\d*+]+)\s+(.+?)\s*\Z/m, <<GSUB
-\\1 \\2
-GSUB
- )
- else
- wrap.gsub(/^(.+)\Z/m, <<GSUB
-\\1
-GSUB
- )
- end
- @@endnotes[:para] << wrap
- @@endnotes[:end] << '' << wrap
- end
- @@endnotes[:para].each {|e| @pot[:body] << e << @br}
- @@endnotes[:para]=[]
- @@endnotes
- end
- def pot_metadata_src
- @po4a_identify_type='type: SiSU doc' #'type: Plain text'
- meta_src=SiSU_Metadata::Summary.new(@md_src)
- w=[]
- w << [
- "#. #{@po4a_identify_type} - metadata: title",
- "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
- 'msgid ""',
- meta_src.metadata_tags.title.main,
- meta_src.metadata_tags.title.sub,
- meta_src.metadata_tags.title.edition,
- meta_src.metadata_tags.title.note,
- meta_src.metadata_tags.title.short,
- meta_src.metadata_tags.title.language,
- meta_src.metadata_tags.title.language_char,
- 'msgstr ""',
- ]
- w << [
- "#. #{@po4a_identify_type} - metadata: creator",
- "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
- 'msgid ""',
- meta_src.metadata_tags.creator.head,
- meta_src.metadata_tags.creator.author,
- meta_src.metadata_tags.creator.contributor,
- meta_src.metadata_tags.creator.illustrator,
- meta_src.metadata_tags.creator.photographer,
- meta_src.metadata_tags.creator.translator,
- meta_src.metadata_tags.creator.audio,
- meta_src.metadata_tags.creator.digitized_by,
- meta_src.metadata_tags.creator.prepared_by,
- 'msgstr ""',
- ]
- w << [
- "#. #{@po4a_identify_type} - metadata: rights",
- "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
- 'msgid ""',
- meta_src.metadata_tags.rights.head,
- meta_src.metadata_tags.rights.copyright.text,
- meta_src.metadata_tags.rights.copyright.translation,
- meta_src.metadata_tags.rights.copyright.illustrations,
- meta_src.metadata_tags.rights.copyright.photographs,
- meta_src.metadata_tags.rights.copyright.digitization,
- meta_src.metadata_tags.rights.copyright.audio,
- meta_src.metadata_tags.rights.license,
- 'msgstr ""',
- ]
- w << [
- "#. #{@po4a_identify_type} - metadata: classify",
- "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
- 'msgid ""',
- meta_src.metadata_tags.classify.head,
- meta_src.metadata_tags.classify.subject,
- meta_src.metadata_tags.classify.topic_register,
- meta_src.metadata_tags.classify.loc,
- meta_src.metadata_tags.classify.dewey,
- meta_src.metadata_tags.notes.relation,
- meta_src.metadata_tags.notes.type,
- meta_src.metadata_tags.identifier.oclc,
- meta_src.metadata_tags.identifier.isbn,
- 'msgstr ""',
- ]
- w << [
- "#. #{@po4a_identify_type} - metadata: date",
- "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
- 'msgid ""',
- meta_src.metadata_tags.date.head,
- meta_src.metadata_tags.date.added_to_site,
- meta_src.metadata_tags.date.available,
- meta_src.metadata_tags.date.created,
- meta_src.metadata_tags.date.issued,
- meta_src.metadata_tags.date.modified,
- meta_src.metadata_tags.date.published,
- meta_src.metadata_tags.date.valid,
- 'msgstr ""',
- ]
- w << [
- "#. #{@po4a_identify_type} - processing, make instruction",
- "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
- 'msgid ""',
- meta_src.processing_tags.make.language,
- meta_src.processing_tags.make.headings,
- meta_src.processing_tags.make.num_top,
- meta_src.processing_tags.make.breaks,
- meta_src.processing_tags.make.emphasis,
- meta_src.processing_tags.make.bold,
- meta_src.processing_tags.make.italics,
- meta_src.processing_tags.make.texpdf_font,
- 'msgstr ""',
- ]
- w.each do |y|
- z=''
- y.each do |x|
- if x
- z += x + "\n" if x =~/^#|^msg(?:id|str)/
- z += %{"#{x}"\n} if x =~/^@\S+?:(?: |$)/
- z += %{"#{x}"\n} if x =~/^\s+:\S+?: /
- end
- end
- @pot[:metadata] << z << @br
- #puts z unless z.empty?
- end
- end
- def pot_metadata_src_trn
- @po4a_identify_type='type: SiSU doc'
- #@po4a_identify_type='type: Plain text'
- meta_src=SiSU_Metadata::Summary.new(@md_src)
- meta_trn=SiSU_Metadata::Summary.new(@md_trn)
- w=[]
- w << [
- "#. #{@po4a_identify_type} - metadata: title",
- "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
- 'msgid ""',
- meta_src.metadata_tags.title.main,
- meta_src.metadata_tags.title.sub,
- meta_src.metadata_tags.title.edition,
- meta_src.metadata_tags.title.note,
- meta_src.metadata_tags.title.short,
- meta_src.metadata_tags.title.language,
- meta_src.metadata_tags.title.language_char,
- 'msgstr ""',
- meta_trn.metadata_tags.title.main,
- meta_trn.metadata_tags.title.sub,
- meta_trn.metadata_tags.title.edition,
- meta_trn.metadata_tags.title.note,
- meta_trn.metadata_tags.title.short,
- meta_trn.metadata_tags.title.language,
- meta_trn.metadata_tags.title.language_char,
- ]
- w << [
- "#. #{@po4a_identify_type} - metadata: creator",
- "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
- 'msgid ""',
- meta_src.metadata_tags.creator.head,
- meta_src.metadata_tags.creator.author,
- meta_src.metadata_tags.creator.contributor,
- meta_src.metadata_tags.creator.illustrator,
- meta_src.metadata_tags.creator.photographer,
- meta_src.metadata_tags.creator.translator,
- meta_src.metadata_tags.creator.audio,
- meta_src.metadata_tags.creator.digitized_by,
- meta_src.metadata_tags.creator.prepared_by,
- 'msgstr ""',
- meta_trn.metadata_tags.creator.head,
- meta_trn.metadata_tags.creator.author,
- meta_trn.metadata_tags.creator.contributor,
- meta_trn.metadata_tags.creator.illustrator,
- meta_trn.metadata_tags.creator.photographer,
- meta_trn.metadata_tags.creator.translator,
- meta_trn.metadata_tags.creator.audio,
- meta_trn.metadata_tags.creator.digitized_by,
- meta_trn.metadata_tags.creator.prepared_by,
- ]
- w << [
- "#. #{@po4a_identify_type} - metadata: rights",
- "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
- 'msgid ""',
- meta_src.metadata_tags.rights.head,
- meta_src.metadata_tags.rights.copyright.text,
- meta_src.metadata_tags.rights.copyright.translation,
- meta_src.metadata_tags.rights.copyright.illustrations,
- meta_src.metadata_tags.rights.copyright.photographs,
- meta_src.metadata_tags.rights.copyright.digitization,
- meta_src.metadata_tags.rights.copyright.audio,
- meta_src.metadata_tags.rights.license,
- 'msgstr ""',
- meta_trn.metadata_tags.rights.head,
- meta_trn.metadata_tags.rights.copyright.text,
- meta_trn.metadata_tags.rights.copyright.translation,
- meta_trn.metadata_tags.rights.copyright.illustrations,
- meta_trn.metadata_tags.rights.copyright.photographs,
- meta_trn.metadata_tags.rights.copyright.digitization,
- meta_trn.metadata_tags.rights.copyright.audio,
- meta_trn.metadata_tags.rights.license,
- ]
- w << [
- "#. #{@po4a_identify_type} - metadata: classify",
- "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
- 'msgid ""',
- meta_src.metadata_tags.classify.head,
- meta_src.metadata_tags.classify.subject,
- meta_src.metadata_tags.classify.topic_register,
- meta_src.metadata_tags.classify.loc,
- meta_src.metadata_tags.classify.dewey,
- meta_src.metadata_tags.notes.relation,
- meta_src.metadata_tags.notes.type,
- meta_src.metadata_tags.identifier.oclc,
- meta_src.metadata_tags.identifier.isbn,
- 'msgstr ""',
- meta_trn.metadata_tags.classify.head,
- meta_trn.metadata_tags.classify.subject,
- meta_trn.metadata_tags.classify.topic_register,
- meta_trn.metadata_tags.classify.loc,
- meta_trn.metadata_tags.classify.dewey,
- meta_trn.metadata_tags.notes.relation,
- meta_trn.metadata_tags.notes.type,
- meta_trn.metadata_tags.identifier.oclc,
- meta_trn.metadata_tags.identifier.isbn,
- ]
- w << [
- "#. #{@po4a_identify_type} - metadata: date",
- "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
- 'msgid ""',
- meta_src.metadata_tags.date.head,
- meta_src.metadata_tags.date.added_to_site,
- meta_src.metadata_tags.date.available,
- meta_src.metadata_tags.date.created,
- meta_src.metadata_tags.date.issued,
- meta_src.metadata_tags.date.modified,
- meta_src.metadata_tags.date.published,
- meta_src.metadata_tags.date.valid,
- 'msgstr ""',
- meta_trn.metadata_tags.date.head,
- meta_trn.metadata_tags.date.added_to_site,
- meta_trn.metadata_tags.date.available,
- meta_trn.metadata_tags.date.created,
- meta_trn.metadata_tags.date.issued,
- meta_trn.metadata_tags.date.modified,
- meta_trn.metadata_tags.date.published,
- meta_trn.metadata_tags.date.valid,
- ]
- w << [
- "#. #{@po4a_identify_type} - processing, make instruction",
- "#: en/#{@md.fns}:#{SiSU_Po4aUtils::PotNumber.new.num}",
- 'msgid ""',
- meta_src.processing_tags.make.language,
- meta_src.processing_tags.make.headings,
- meta_src.processing_tags.make.num_top,
- meta_src.processing_tags.make.breaks,
- meta_src.processing_tags.make.emphasis,
- meta_src.processing_tags.make.bold,
- meta_src.processing_tags.make.italics,
- meta_src.processing_tags.make.texpdf_font,
- 'msgstr ""',
- meta_trn.processing_tags.make.language,
- meta_trn.processing_tags.make.headings,
- meta_trn.processing_tags.make.num_top,
- meta_trn.processing_tags.make.breaks,
- meta_trn.processing_tags.make.emphasis,
- meta_trn.processing_tags.make.bold,
- meta_trn.processing_tags.make.italics,
- meta_trn.processing_tags.make.texpdf_font,
- ]
- w.each do |y|
- z=''
- y.each do |x|
- if x
- z += x + "\n" if x =~/^#|^msg(?:id|str)/
- z += %{"#{x}"\n} if x =~/^@\S+?:(?: |$)/
- z += %{"#{x}"\n} if x =~/^\s+:\S+?: /
- end
- end
- @pot[:metadata] << z << @br
- #puts z unless z.empty?
- end
- end
- def pot_structure(desc,orig,trans,indent=0,hang=0)
- SiSU_Po4aUtils::Wrap.new(@md,orig,trans,desc,@wrap_width,indent,hang)
- end
- def pot_structure_heading(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document
- lv=n=n3=nil
- lv=dob_src.ln
- n=lv - 1
- n3=lv + 2
- util=nil
- fn=(dob_src.name=~/[a-z\d]/i) ? dob_src.name : ''
- mark="#{dob_src.lv}~#{fn} "
- d="#{dob_src.is.to_s} (level #{dob_src.lv})"
- instruct=s_mark=''
- if @md.opt.act[:maintenance][:set]==:on
- instruct=%{\n# markup for headings is marker at the start of the line/object, indicating the heading level, and if provided an associated name tag, this heading is "#{mark}"}
- s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
- end
- desc="#{d}#{s_mark}#{instruct}"
- orig="#{s_mark}#{dob_src.obj}"
- trans=(dob_trn=='') ? '' : "#{s_mark}#{dob_trn.obj}"
- util=pot_structure(desc,orig,trans)
- wrapped=util.line_wrap
- @pot[:body] << wrapped << @br # main text, contents, body KEEP
- if @@endnotes[:para] \
- and notes_s.length > 0 \
- and not @@endnotes_
- @pot[:body] << @br
- wrap_endnotes(notes_s,notes_t)
- elsif @@endnotes[:para] \
- and @@endnotes_
- @pot[:body] << @br*2
- end
- end
- def pot_structure_para(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document
- util=nil
- wrapped=if dob_src.indent =~/[1-9]/ \
- and dob_src.indent == dob_src.hang
- s_mark=desc=orig=trans=''
- if dob_src.bullet_
- mark="_#{dob_src.indent}* "
- d="#{dob_src.is.to_s}: indent #{dob_src.indent}, bullet"
- instruct=s_mark=''
- if @md.opt.act[:maintenance][:set]==:on
- instruct=%{\n# markup for indented bullet text is at the start of the line/object, an underscore followed by the indent level and an asterisk "#{mark}"}
- s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
- end
- desc="#{d}#{s_mark}#{instruct}"
- else
- mark="_#{dob_src.indent} "
- d="#{dob_src.is.to_s}: indent #{dob_src.indent}"
- instruct=s_mark=''
- if @md.opt.act[:maintenance][:set]==:on
- instruct=%{\n# markup for indented text is at the start of the line/object, an underscore followed by the indent level "#{mark}"}
- s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
- end
- desc="#{d}#{s_mark}#{instruct}"
- end
- orig="#{s_mark}#{dob_src.obj}"
- trans=(dob_trn=='') ? '' : "#{s_mark}#{dob_trn.obj}"
- util=pot_structure(desc,orig,trans)
- elsif dob_src.hang =~/[0-9]/ \
- and dob_src.indent != dob_src.hang
- s_mark=desc=orig=trans=''
- mark="_#{dob_src.hang}_#{dob_src.indent} "
- d="#{dob_src.is.to_s}: hang #{dob_src.hang} indent #{dob_src.indent}"
- instruct=s_mark=''
- if @md.opt.act[:maintenance][:set]==:on
- instruct=%{\n# markup for indented text with a first line indented to a different level from the rest of the paragraph, is at the start of the line/object, an underscore and the first indent level a second underscore and the indent level for the rest of the paragraph, "#{mark1}"}
- s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
- end
- desc="#{d}#{s_mark}#{instruct}"
- orig="#{s_mark}#{dob_src.obj}"
- trans=(dob_trn=='') ? '' : "#{s_mark}#{dob_trn.obj}"
- util=pot_structure(desc,orig,trans)
- else
- s_mark=desc=orig=trans=''
- if dob_src.bullet_
- mark='_* '
- d="#{dob_src.is.to_s}: bullet"
- instruct=s_mark=''
- if @md.opt.act[:maintenance][:set]==:on
- instruct=%{\n# markup for indented text is at the start of the line/object, an underscore followed by an asterisk "#{mark}"}
- s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
- end
- desc="#{d}#{s_mark}#{instruct}"
- orig="#{s_mark}#{dob_src.obj}"
- trans=(dob_trn=='') ? '' : "#{s_mark}#{dob_trn.obj}"
- else
- mark=''
- d=dob_src.is.to_s
- instruct=%{\n# regular paragraph, no special markup}
- if @md.opt.act[:maintenance][:set]==:on
- instruct="\n# "
- s_mark="\n# " + %{"\\n\\n#{mark}...\\n\\n"}
- end
- desc="#{d}#{s_mark}#{instruct}"
- orig=dob_src.obj
- trans=(dob_trn=='') ? '' : dob_trn.obj
- end
- util=pot_structure(desc,orig,trans)
- end
- wrapped=util.line_wrap
- @pot[:body] << wrapped << @br # main text, contents, body KEEP
- if @@endnotes[:para] \
- and notes_s.length > 0 \
- and not @@endnotes_
- @pot[:body] << @br
- wrap_endnotes(notes_s,notes_t)
- elsif @@endnotes[:para] \
- and @@endnotes_
- @pot[:body] << @br*2
- end
- end
- def pot_structure_block(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document
- mark="block{\\n\\n...\\n\\n}block"
- d=dob_src.is.to_s
- instruct=s_mark=''
- if @md.opt.act[:maintenance][:set]==:on
- instruct="\n# block text is a text block with an opening and closing marker, the content of which may be wrapped"
- s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
- end
- desc="#{d}#{s_mark}#{instruct}"
- orig=dob_src.obj
- trans=(dob_trn=='') ? '' : dob_trn.obj
- util=pot_structure(desc,orig,trans)
- unwrapped=util.no_line_wrap_block
- @pot[:body] << unwrapped << @br
- end
- def pot_structure_group(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document
- mark="group{\\n\\n...\\n\\n}group"
- d=dob_src.is.to_s
- instruct=s_mark=''
- if @md.opt.act[:maintenance][:set]==:on
- instruct="\n# group text is a text block with an opening and closing marker, the content of which may be wrapped"
- s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
- end
- desc="#{d}#{s_mark}#{instruct}"
- orig=dob_src.obj
- trans=(dob_trn=='') ? '' : dob_trn.obj
- util=pot_structure(desc,orig,trans)
- unwrapped=util.no_line_wrap_block
- @pot[:body] << unwrapped << @br
- end
- def pot_structure_verse(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document
- mark="poem{\n\nverse\n\nverse\n\n...\n\n}poem"
- d=dob_src.is.to_s
- instruct=s_mark=''
- if @md.opt.act[:maintenance][:set]==:on
- instruct="\n# verse are part of the text block described as a poem, the first verse is preceeded by an opening marker, and the last verse by a closing marker, the content of which should remain unwrapped"
- s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
- end
- desc="#{d}#{s_mark}#{instruct}"
- orig=dob_src.obj
- trans=(dob_trn=='') ? '' : dob_trn.obj
- util=pot_structure(desc,orig,trans)
- unwrapped=util.no_line_wrap_block
- @pot[:body] << unwrapped << @br
- end
- def pot_structure_code(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document
- mark="code{\\n\\n...\\n\\n}code"
- d=dob_src.is.to_s
- instruct=s_mark=''
- if @md.opt.act[:maintenance][:set]==:on
- instruct="\n# codeblocks are a text block with an opening and closing marker, the content of which should remain unwrapped"
- s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
- end
- desc="#{d}#{s_mark}#{instruct}"
- orig=dob_src.obj
- trans=(dob_trn=='') ? '' : dob_trn.obj
- util=pot_structure(desc,orig,trans)
- unwrapped=util.no_line_wrap_block
- @pot[:body] << unwrapped << @br
- end
- def pot_structure_table(dob_src='',notes_s='',dob_trn='',notes_t='') #% Used to extract the structure of a document
- mark="table{\\n\\n...\\n\\n}table"
- d=dob_src.is.to_s
- instruct=s_mark=''
- if @md.opt.act[:maintenance][:set]==:on
- instruct="\n# tables are a text block with an opening and closing marker, the content of which should remain unwrapped"
- s_mark="\n# " + %{"\\n\\n#{mark}\\n\\n"}
- end
- desc="#{d}#{s_mark}#{instruct}"
- orig=dob_src.obj
- orig=orig.gsub(/#{Mx[:tc_c]}/,"\n")
- trans=(dob_trn=='') ? '' : dob_trn.obj
- trans=trans.gsub(/#{Mx[:tc_c]}/,"\n")
- util=pot_structure(desc,orig,trans)
- unwrapped=util.no_line_wrap_block
- @pot[:body] << unwrapped << @br
- end
- def pot_structure_idx(dob_src='',dob_trn='') #% Used to extract the structure of a document
- mark="={ ... }"
- instruct=s_mark=''
- if @md.opt.act[:maintenance][:set]==:on
- instruct="\n# the book index should be attached unwrapped to the preceding text block (there should be a new line, but no empty line)"
- s_mark="\n# " + %{"\\n#{mark}\\n\\n"}
- end
- d='book-idx'
- desc="#{d}#{s_mark}#{instruct}"
- orig='={' + dob_src.idx + '}'
- trans=if defined? dob_trn.idx \
- and not dob_trn.idx.nil? \
- and not dob_trn.idx.empty?
- '={' + dob_trn.idx + '}'
- else ''
- end
- util=pot_structure(desc,orig,trans)
- unwrapped=util.no_line_wrap_block
- @pot[:body] << unwrapped << @br
- end
- def pot_markup(data_src,data_trn)
- #@endnotes,@copen,@pot_contents_close=Array.new(3){[]}
- a_l=if data_trn
- a_l=(data_src.length >= data_trn.length) \
- ? data_src.length
- : data_trn.length
- else
- data_src.length
- end
- s,t=0,0
- if @md.fns =~ /\.(?:(?:-|ssm\.)?sst|ssm)$/
- (data_trn.nil?) \
- ? pot_metadata_src
- : pot_metadata_src_trn
- end
- 0.upto(a_l-1) do |i|
- if data_trn
- unless data_src[s] \
- and data_trn[t]
- break
- end
- if data_src[s].of == :comment \
- and data_trn[t].of == :comment \
- and (data_src[s].is == data_trn[t].is)
- s+=1;t+=1
- next
- end
- if (data_src[s].is == :comment or data_trn[t].is == :comment) \
- and (data_src[s].is != data_trn[t].is)
- if data_src[s].is == :comment
- puts "src (comment):\n\t" + data_src[s].obj if @md.opt.act[:maintenance][:set]==:on
- s+=1
- #next if data_src[s].is == :comment
- elsif data_trn[t].is == :comment
- puts "trans (comment):\n\t" + data_trn[t].obj if @md.opt.act[:maintenance][:set]==:on
- t+=1
- #next if data_trn[t].is == :comment
- end
- end
- if (defined? data_src[s].ocn and data_src[s].ocn.is_a?(Fixnum)) \
- and (defined? data_trn[t].ocn and data_trn[t].ocn.is_a?(Fixnum)) \
- and (data_src[s].ocn == data_trn[t].ocn)
- @m_s,@m_t=s,t
- elsif (defined? data_src[s].ocn and data_src[s].ocn.is_a?(Fixnum)) \
- and (defined? data_trn[t].ocn and data_trn[t].ocn.is_a?(Fixnum)) \
- and (data_src[s].ocn != data_trn[t].ocn)
- p '--- OCN ---'
- p 'mis-match'
- p data_src[s].ocn
- p data_src[s].obj
- p data_trn[t].ocn
- p data_trn[t].obj
- p '---'
- p 'previous match'
- p data_src[@m_s].ocn
- p data_src[@m_s].obj
- p data_trn[@m_t].ocn
- p data_trn[@m_t].obj
- exit
- elsif (defined? data_src[s].ocn and defined? data_trn[t].ocn \
- and data_src[s].ocn.class != data_trn[t].ocn.class)
- p '--- OCN class ---'
- p 'mis-match'
- p data_src[s].ocn if defined? data_src[s].ocn
- p data_src[s].obj
- p data_trn[t].ocn if defined? data_trn[t].ocn
- p data_trn[t].obj
- #p '---'
- #p 'previous match'
- #p data_src[@m_s].ocn
- #p data_src[@m_s].obj
- #p data_trn[@m_t].ocn
- #p data_trn[@m_t].obj
- #elsif (defined? data_src[s].ocn != defined? data_trn[t].ocn) \
- #and (data_src[s].ocn.nil? != data_trn[t].ocn.nil?)
- # p '--- missing OCN? ---'
- # p 'mis-match'
- # p data_src[s].ocn if defined? data_src[s].ocn
- # p data_src[s].obj
- # p data_trn[t].ocn if defined? data_trn[t].ocn
- # p data_trn[t].obj
- else
- end
- end
- notes_s,notes_t='',''
- data_src[s],notes_s=markup(data_src[s])
- if data_trn
- data_trn[t],notes_t=markup(data_trn[t])
- #data_src[s],data_trn[t]=pot_data(data_src[s],notes_s,data_trn[t],notes_t)
- pot_data(data_src[s],notes_s,data_trn[t],notes_t)
- else
- #data_src[s],nul=pot_data(data_src[s],notes_s)
- pot_data(data_src[s],notes_s)
- end
- s+=1;t+=1
- end
- @pot #watch
- end
- def pot_data(dob_src='',notes_s='',dob_trn='',notes_t='')
- if dob_src.obj !~/(^#{Rx[:meta]}|#{Mx[:br_eof]}|#{Mx[:br_endnotes]})/
- if defined? dob_src.ocn \
- and dob_src.ocn.to_s =~/\d+/
- paranum=dob_src.ocn.to_s
- @p_num=SiSU_Po4aUtils::ParagraphNumber.new(paranum)
- end
- case dob_src.is
- when :heading then pot_structure_heading(dob_src,notes_s,dob_trn,notes_t)
- when :para then pot_structure_para(dob_src,notes_s,dob_trn,notes_t)
- when :group then pot_structure_group(dob_src,notes_s,dob_trn,notes_t)
- when :block then pot_structure_block(dob_src,notes_s,dob_trn,notes_t)
- when :verse then pot_structure_verse(dob_src,notes_s,dob_trn,notes_t)
- when :code then pot_structure_code(dob_src,notes_s,dob_trn,notes_t)
- when :table then pot_structure_table(dob_src,notes_s,dob_trn,notes_t)
- end
- if defined? dob_src.idx \
- and not dob_src.idx.nil? \
- and not dob_src.idx.empty?
- pot_structure_idx(dob_src,dob_trn)
- end
- dob_src='' if (dob_src.obj =~/<a name="n\d+">/ \
- and dob_src.obj =~/^(-\{{2}~\d+|<!e[:_]\d+!>)/) # -endnote
- if dob_src ## Clean Prepared Text
- dob_src.obj=dob_src.obj.gsub(/<!.+!>/,' ').
- gsub(/<:\S+>/,' ') if dob_src ## Clean Prepared Text
- end
- end
- #[dob_src,dob_trn]
- end
- def markup(dob) # Used for major markup instructions
- SiSU_Env::InfoEnv.new(@md.fns)
- dob.obj=dob.obj.gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,
- "#{Px[:po_bold_o]}\\1#{Px[:po_bold_c]}").
- gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,
- "#{Px[:po_italics_o]}\\1#{Px[:po_italics_c]}").
- gsub(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/,
- "#{Px[:po_underscore_o]}\\1#{Px[:po_underscore_c]}").
- gsub(/#{Mx[:fa_subscript_o]}(.+?)#{Mx[:fa_subscript_c]}/,
- "#{Px[:po_subscript_o]}\\1#{Px[:po_subscript_c]}").
- gsub(/#{Mx[:fa_superscript_o]}(.+?)#{Mx[:fa_superscript_c]}/,
- "#{Px[:po_superscript_o]}\\1#{Px[:po_superscript_c]}").
- gsub(/#{Mx[:fa_insert_o]}(.+?)#{Mx[:fa_insert_c]}/,
- "#{Px[:po_insert_o]}\\1#{Px[:po_insert_c]}").
- gsub(/#{Mx[:fa_cite_o]}(.+?)#{Mx[:fa_cite_c]}/,
- "#{Px[:po_cite_o]}\\1#{Px[:po_cite_c]}").
- gsub(/#{Mx[:fa_strike_o]}(.+?)#{Mx[:fa_strike_c]}/,
- "#{Px[:po_strike_o]}\\1#{Px[:po_strike_c]}").
- gsub(/#{Mx[:fa_monospace_o]}(.+?)#{Mx[:fa_monospace_c]}/,
- "#{Px[:po_monospace_o]}\\1#{Px[:po_monospace_c]}")
- notes=''
- unless dob.is==:code
- dob.obj=dob.obj.gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}/,'\1').
- gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'\1').
- gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,'\1 [link: <\2>]').
- gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}image/,'\1 [link: local image]').
- gsub(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,'\1')
- notes=extract_endnotes(dob)
- #% ### footnotes current state - extracted
- dob.obj=dob.obj.gsub(/#{Mx[:en_a_o]}([\d]+)\s+(?:.+?)#{Mx[:en_a_c]}/,'~^'). # endnote marker marked up
- #% ### footnotes current state - keep inline
- #dob.obj.gsub!(/#{Mx[:en_a_o]}[\d]+\s+(.+?)#{Mx[:en_a_c]}/,'~{ \1 }~') # inline endnote with marker marked up
- gsub(/#{Mx[:en_b_o]}[\d]+\s+(.+?)#{Mx[:en_b_c]}/,'~[ \1 ]~'). # inline endnote with marker marked up
- gsub(/#{Mx[:en_a_o]}([*+]+)\s+(.+?)#{Mx[:en_a_c]}/,'~{\1 \2 }~'). # inline endnote with marker marked up
- gsub(/#{Mx[:en_b_o]}([*+]+)\s+(.+?)#{Mx[:en_b_c]}/,'~[\1 \2 ]~'). # inline endnote with marker marked up
- gsub(/#{Mx[:gl_o]}(?:#lt|#060)#{Mx[:gl_c]}/,'<').
- gsub(/#{Mx[:gl_o]}(?:#gt|#062)#{Mx[:gl_c]}/,'>').
- gsub(/#{Mx[:gl_o]}#(?:038|amp)#{Mx[:gl_c]}/,'&').
- gsub(/#{Mx[:gl_o]}#033#{Mx[:gl_c]}/,'!').
- gsub(/#{Mx[:gl_o]}#035#{Mx[:gl_c]}/,'#').
- gsub(/#{Mx[:gl_o]}#042#{Mx[:gl_c]}/,'*').
- gsub(/#{Mx[:gl_o]}#045#{Mx[:gl_c]}/,'-').
- gsub(/#{Mx[:gl_o]}#047#{Mx[:gl_c]}/,'/').
- gsub(/#{Mx[:gl_o]}#095#{Mx[:gl_c]}/,'_').
- gsub(/#{Mx[:gl_o]}#123#{Mx[:gl_c]}/,'{').
- gsub(/#{Mx[:gl_o]}#125#{Mx[:gl_c]}/,'}').
- gsub(/#{Mx[:gl_o]}#126#{Mx[:gl_c]}/,'~').
- gsub(/#{Mx[:gl_o]}#169#{Mx[:gl_c]}/,'©')
- end
- dob.obj=if dob.of==:block # watch
- dob.obj.gsub(/#{Mx[:gl_o]}●#{Mx[:gl_c]}/,"* ").
- gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,"\n")
- else dob.obj.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,"\n\n")
- end
- if dob.is==:code
- dob.obj=dob.obj.gsub(/(^|[^}])_([<>])/m,'\1\2'). # _> _<
- gsub(/(^|[^}])_([<>])/m,'\1\2') # _<_<
- end
- dob.obj=dob.obj.gsub(/#{Mx[:br_page]}\s*|#{Mx[:br_page_new]}/,''). # remove page breaks
- gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'\1').
- gsub(/<a href=".+?">(.+?)<\/a>/m,'\1').
- gsub(/#{Mx[:mk_o]}:name#(\S+?)#{Mx[:mk_c]}/,''). # remove name links
- gsub(/&nbsp;|#{Mx[:nbsp]}/,' '). # decide on
- gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/,' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]")
- gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}image/,' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]")
- gsub(/(?:^|[^_\\])\{\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*\}\S+/,'[image: "\1"]')
- [dob,notes]
- end
- def publish(fn,pot)
- content=[]
- content << pot[:open]
- content << pot[:head]
- content << pot[:metadata]
- content << pot[:body]
- content << @@endnotes[:end] if @@endnotes_
- Output.new(fn,content,@md).po4a
- @@endnotes={ para: [], end: [] }
- end
- end
- class Output <Source
- include SiSU_Param
- include SiSU_Env
- def initialize(fn,content,md)
- @fn,@content,@md=fn,content,md
- @file=SiSU_Env::FileOp.new(md,fn)
- end
- def po4a #%pot output
- file_pot=(@md.opt.f_pth[:lng] ==@md.opt.lng_base) \
- ? @file.write_file.pot
- : @file.write_file.po
- @sisu=[]
- emptyline=0
- @content.each do |para| # this is a hack
- if para.is_a?(Array) \
- and para.length > 0
- para.each do |line|
- if line
- line=line.gsub(/\s+$/m,'').
- gsub(/^\A[ ]*\Z/m,'')
- if line=~/^\A[ ]*\Z/m
- emptyline+=1
- else emptyline=0
- end
- file_pot.puts line if emptyline < 2 #remove extra line spaces (fix upstream)
- end
- end
- else file_pot.puts para #unix plaintext # /^([*=-]|\.){5}/
- end
- end
- file_pot.close
- SiSU_Po4aUtils::PotNumber.new.reset
- po4a_git
- end
- def po4a_git
- unless @md.opt.act[:maintenance][:set]==:on
- require_relative 'git' # git.rb
- git=SiSU_Git::Source.new(@md.opt)
- git.create_file_structure_git unless FileTest.directory?(@file.output_path.pot_git.dir)
- if @md.opt.f_pth[:lng] ==@md.opt.lng_base
- FileUtils::cp(@file.place_file.pot.dir, @file.output_path.pot_git.dir)
- else # naive, work on -->
- FileUtils::cp(@file.place_file.po.dir, @file.output_path.po_git.dir) #unless FileTest.file?(@file.place_file.po_git.dir)
- end
- git.read
- end
- end
- end
- end
-end
-__END__
-&#033;\|&#035;\|&&#042;\|&#045;\|&#047;\|&#095;\|&#123;\|&#125;\|&#126;\|&#
-
-tables are problematic, difficult to reconstitute instruction, check
-
-metadata, move to top? and work on
-
-footnotes, different types, asterisk, also do you want to have separate
-paragraphs, or breaks within one block?
-
-where no ocn appropriately use ~# or -# or indeed 1~name-
-
-comments in document, what to do about them, not sure they are currently
-retained in dal, could be quite valuable to keep
diff --git a/lib/sisu/v5/se_clear.rb b/lib/sisu/v5/se_clear.rb
deleted file mode 100644
index 7deb44ec..00000000
--- a/lib/sisu/v5/se_clear.rb
+++ /dev/null
@@ -1,109 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_clear.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_Clear
- require_relative 'constants' # constants.rb
- require_relative 'utils' # utils.rb
- require_relative 'se_info_env' # se_info_env.rb
- begin
- require 'singleton'
- rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
- error('singleton NOT FOUND (LoadError)')
- end
- class Clear < SiSU_Info_Env::InfoEnv # se_info_env.rb
- #todo unify with FileOp
- def initialize(cmd,fns,operation='')
- @cmd=cmd
- begin
- super(fns)
- @env=SiSU_Env::InfoEnv.new(fns)
- SiSU_Env::InfoVersion.instance
- if operation.class.inspect =~/SiSU_Param/
- @md=operation
- end
- case operation #watch
- when /pdf/ then @env_out=''
- when /sql/
- when /xml|plaintext|ascii/ then @env_out=@env.path.output + @fnb #check change of name to plaintext from ascii
- else
- if defined? @md.sfx_src \
- and @md.sfx_src =~/ss[ftsumc]/
- @env_out_root=@env.path.output
- @env_out="#{@env.path.output}/#{@fnb}"
- @@publisher='SiSU http://www.jus.uio.no/sisu'
- @env_pdf="#{@env_out_root}/pdf"
- end
- end
- rescue
- SiSU_Screen::Ansi.new(@cmd,$!,$@).rescue do
- __LINE__.to_s + ':' + __FILE__
- end
- ensure
- end
- end
- def param_instantiate
- @cX||=SiSU_Screen::Ansi.new(@cmd)
- @@date=SiSU_Env::InfoDate.new
- @@proc=@@filename_txt=@@filename_texinfo=@@filename_lout_portrait=@@filename_lout_landscape=@@filename_html_scroll=@@filename_html_index=@@filename_html_segtoc=@@filename_semantic=@@filename_rss=@@newfile=@@drr=@@yaml=@@yamladdr=nil
- @@publisher='SiSU scribe'
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/se_date.rb b/lib/sisu/v5/se_date.rb
deleted file mode 100644
index 0e72d1d5..00000000
--- a/lib/sisu/v5/se_date.rb
+++ /dev/null
@@ -1,95 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_date.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_Info_Date
- require_relative 'constants' # constants.rb
- require_relative 'utils' # utils.rb
- class InfoDate
- begin
- require 'date'
- rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
- error('date NOT FOUND (LoadError)')
- end
- attr_accessor :dt,:t
- def initialize
- @dt,@t=Date.today.to_s,Time.now
- end
- def week
- w=@t.strftime('%W')
- "#{@t.year}w#{w}"
- end
- def month
- "#{@t.year}#{@t.month}"
- end
- def year
- @t.year
- end
- def weekonly
- @t.strftime('%W')
- end
- def monthonly
- @t.month
- end
- def year_static
- YEAR
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/se_info_port.rb b/lib/sisu/v5/se_info_port.rb
deleted file mode 100644
index 87c96861..00000000
--- a/lib/sisu/v5/se_info_port.rb
+++ /dev/null
@@ -1,73 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_info_port.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_Info_Port
- require_relative 'constants' # constants.rb
- require_relative 'utils' # utils.rb
- require_relative 'se_info_env' # se_info_env.rb
- class InfoPort < SiSU_Info_Env::InfoEnv # se_info_env.rb
- def initialize
- @env=SiSU_Env::InfoEnv.new
- end
- def webrick
- @env.port.webrick_port
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/se_load.rb b/lib/sisu/v5/se_load.rb
deleted file mode 100644
index c5fda092..00000000
--- a/lib/sisu/v5/se_load.rb
+++ /dev/null
@@ -1,111 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/se_load.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_Load
- require_relative 'constants' # constants.rb
- require_relative 'utils' # utils.rb
- class Load
- def initialize(prog,mandatory=false)
- @prog,@mandatory=prog,mandatory
- end
- def prog
- load_prog=false
- $:.each do |reqpath|
- if FileTest.exist?("#{reqpath}/#{@prog}.rb")
- load_prog=true
- #SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).ok("#{reqpath}/#{@prog}.rb loaded")
- break
- #else SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).warn("#{reqpath}/#{@prog}.rb not found")
- end
- end
- if load_prog \
- and @prog=~/dbi/
- begin
- require 'dbi'
- rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
- error('dbi NOT FOUND (LoadError)')
- end
- end
- if load_prog
- begin
- require @prog
- rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
- error("#{@prog} NOT FOUND (LoadError)")
- end
- else
- @mandatory \
- ? (SiSU_Screen::Ansi.new(@prog,"*WARN* module required: #{@prog}").warn)
- : '' #(SiSU_Screen::Ansi.new(@prog,"*WARN* #{@prog} load requested").warn)
- end
- load_prog
- end
- def prog?
- load_prog=false
- $:.each do |reqpath|
- if FileTest.exist?("#{reqpath}/#{@prog}.rb"); load_prog=true
- break
- end
- end
- load_prog
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/src_kdissert_share.rb b/lib/sisu/v5/src_kdissert_share.rb
deleted file mode 100644
index 54e1cc4e..00000000
--- a/lib/sisu/v5/src_kdissert_share.rb
+++ /dev/null
@@ -1,105 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/src_share_kdissert.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: share sisu source markup file, copy it to output directory!
-
-=end
-module SiSU_KdiSource
- require_relative 'se' # se.rb
- include SiSU_Env
- class Source
- begin
- require 'fileutils'
- include FileUtils
- rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
- error('fileutils NOT FOUND (LoadError)')
- end
- def initialize(opt)
- @opt=opt
- @env=SiSU_Env::InfoEnv.new(@opt.fns)
- @output_path="#{@env.path.output}/#{@opt.fnb}"
- end
- def read
- SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'Share Kdissert Source Document!',
- @opt.fnb
- ).green_hi_blue unless @opt.act[:quiet][:set]==:on
- SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- "Copy kdissert file to output directory",
- "#{@opt.fnb} -> #{@output_path}"
- ).warn unless @opt.act[:quiet][:set]==:on
- FileUtils::mkdir_p(@env.path.output) unless FileTest.directory?(@env.path.output)
- FileUtils::mkdir_p(@output_path) unless FileTest.directory?(@output_path)
- if FileTest.directory?(@output_path)
- if @opt.fns =~/\.kdi\._sst$/ \
- and FileTest.file?(@opt.fnb)
- FileUtils::cp(@opt.fnb,@output_path)
- end
- else
- SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- "Output directory does not exist",
- "#{@opt.fnb} -> #{@output_path}"
- ).warn unless @opt.act[:quiet][:set]==:on
- exit
- end
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/src_share.rb b/lib/sisu/v5/src_share.rb
deleted file mode 100644
index 1ecd1107..00000000
--- a/lib/sisu/v5/src_share.rb
+++ /dev/null
@@ -1,112 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/src_share.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: share sisu source markup file, copy it to output directory!
-
-=end
-module SiSU_Markup
- require_relative 'src_shared' # src_shared.rb
- include SiSU_Source
- require_relative 'se' # se.rb
- include SiSU_Env
- class Source < SiSU_Source::SiSUpodSource
- def initialize(opt,build=nil,place=nil)
- super(opt,build,place)
- @opt=opt
- end
- def read
- unless @opt.act[:quiet][:set]==:on
- (@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'Share document markup text source',
- @opt.fns
- ).cyan_hi_blue
- : SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'Share document markup text source',
- @opt.fns
- ).cyan_title_hi
- end
- if FileTest.directory?(@path_pod[:fnb])
- FileUtils::mkdir_p(@file.output_path.src.dir) \
- unless FileTest.directory?(@file.output_path.src.dir)
- v=(@opt.act[:maintenance][:set]==:on) \
- ? 'v' : ''
- system(%{
- rsync -a#{v} #{@path_pod[:fnb]} #{@file.output_path.sisupod.dir}
- chbk=`pwd`
- cd #{@file.output_path.sisupod.dir}
- for I in `find -type d` ; do chmod 755 $I ; done
- for I in `find -type f` ; do chmod 644 $I ; done
- cd ${chbk}
- })
- else
- if (@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on)
- SiSU_Screen::Ansi.new(
- '',
- "#{@opt.fno} not available"
- ).blue_tab
- end
- end
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/utils_response.rb b/lib/sisu/v5/utils_response.rb
deleted file mode 100644
index 4979048e..00000000
--- a/lib/sisu/v5/utils_response.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/utils_response.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: Request response
-
-=end
-module SiSU_Response
- class Response
- def response?(ask) #move to more appropriate directory later
- response='redo'
- print ask + " ['yes', 'no' or 'quit']: "
- response=File.new('/dev/tty').gets.strip
- ans=if response=='yes' then true
- elsif response=='no' then false
- elsif response =~/^quit|exit$/ then exit
- else puts "[please type: 'yes', 'no' or 'quit']"
- response?(ask)
- end
- ans
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/utils_spell.rb b/lib/sisu/v5/utils_spell.rb
deleted file mode 100644
index 7c453262..00000000
--- a/lib/sisu/v5/utils_spell.rb
+++ /dev/null
@@ -1,102 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/utils_spell.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: spellchecking
-
-=end
-module SiSU_SpellUtility
- class Spell
- def initialize(input,filesrc,flg)
- @flg=flg
- @filename, @filetype = /(.+?)(\.\w\w\w0$)/.match(filesrc)[1,2] #.gsub(/\.\w\w\w0$/, "")
- @input=input
- @allwords=[]
- puts @filename
- @speller='aspell' # 'ispell'
- @dictionary='british'
- @lang='en_GB'
- end
- def check
- @input.each do |data|
- data=data.gsub(/(https?|www|ftp|gopher|png|jpg|gif|html|htm)\S+/i,' ').
- gsub(/(&nbsp;|#{Mx[:nbsp]})/i,' ').
- gsub(/<\/?(table|tr|td|b|p|href).*?>/i,' ').
- gsub(/(<==.+|<:\S+>|<!.+?!>|^@\S+?:.+|\{\{\{|~)/,' ').
- gsub(/(["|<>)(\n'`.;&_-]|\=)/,' ').
- gsub(/\b(altExternal|
- target|externalimg|
- srcimagebext|
- img|src|toc|pdf|
- cd|org|
- helvetica|roman
- )\b/i,' ').
- gsub(/EOF/,'')
- @words=data.scan(/\S+/)
- @words.each { |y| @allwords << y }
- end
- @allwords=@allwords.uniq
- if @flg =~ /S/
- File.open('/home/ralph/spell_error','a+') do |file| #fix
- file.puts %{\n\n<<#{@filename}>>}
- end
- @allwords.each { |y| puts y.inspect; system(%{cat #{y} | /usr/bin/#{@speller} -l -d #{@dictionary} >> ~/spell_error })}
- else
- @allwords.each { |y| sp=%x{echo #{y}|#{@speller} -l }; puts sp unless sp.empty?}
- end
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/xhtml_shared.rb b/lib/sisu/v5/xhtml_shared.rb
deleted file mode 100644
index 0e7fcf3c..00000000
--- a/lib/sisu/v5/xhtml_shared.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xhtml_shared.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
-
-=end
-module SiSU_XHTML_Shared
- require_relative 'xhtml_table' # xhtml_table.rb
- class TableXHTML < SiSU_XHTML_Table::TableXHTML
- end
-end
-__END__
diff --git a/lib/sisu/v5/xhtml_table.rb b/lib/sisu/v5/xhtml_table.rb
deleted file mode 100644
index 5e6b2c57..00000000
--- a/lib/sisu/v5/xhtml_table.rb
+++ /dev/null
@@ -1,101 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/xhtml_table.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
-
-=end
-module SiSU_XHTML_Table
- require_relative 'xhtml_parts' # xhtml_parts.rb
- class TableXHTML
- include SiSU_Parts_XHTML
- @@tablehead=0
- @@tablefoot=[] #watch
- def initialize(table)
- @table_obj=table
- end
- def table
- table_obj=@table_obj
- if table_obj.obj !~/^<table\s/m
- table_obj=table_rows_and_columns_array(table_obj)
- else p __LINE__; p caller
- end
- table_obj
- end
- def table_rows_and_columns_array(table_obj) # provides basic (x)html table
- table_rows,nr=[],0
- table_obj.obj.split(Mx[:tc_c]).each do |table_row|
- table_row_with_columns=table_row.split(Mx[:tc_p])
- trc,nc=[],0
- table_row_with_columns.each do |c|
- c=c.gsub(/^~$/,''). # tilde / empty cell
- gsub(/<:br>/,the_line_break)
- trc <<= if table_obj.head_ and nr==0; %{<th width="#{table_obj.widths[nc]}%">#{c}</th>}
- else %{<td width="#{table_obj.widths[nc]}%">#{c}</td>}
- end
- nc+=1
- end
- trc=(trc.is_a?(Array)) ? trc.flatten.join : trc
- trc=" <tr>#{trc}</tr>\n"
- nr+=1
- table_rows << trc
- end
- table_rows=table_rows.flatten.join
- table_obj.obj=%{<table summary="normal text css" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">\n#{table_rows} </table>}
- table_obj
- end
- end
-end
-__END__
diff --git a/lib/sisu/v5/zap.rb b/lib/sisu/v5/zap.rb
deleted file mode 100644
index b309b793..00000000
--- a/lib/sisu/v5/zap.rb
+++ /dev/null
@@ -1,93 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v5/zap.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: zap wipe clean previous output of the type specified
-
-=end
-module SiSU_Zap
- require_relative 'se' # se.rb
- include SiSU_Env
- class Source
- def initialize(opt)
- @opt=opt
- @env=SiSU_Env::InfoEnv.new(opt.fns)
- end
- def read
- zap_path="#{@env.path.output}/#{@env.fnb}"
- z=SiSU_Env::CleanOutput.new(@opt)
- if SiSU_Env::InfoSettings.new.permission?('zap')
- unless @opt.act[:quiet][:set]==:on
- tell=SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- "Clean files related to processing #{@opt.selections.str} ->",
- "#{@opt.fns} -> #{zap_path}"
- )
- tell.warn
- end
- z.zap.remove_output
- else
- unless @opt.act[:quiet][:set]==:on
- tell=SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'use of -Z (zap) has not enabled in sisurc.yml'
- )
- tell.warn
- end
- end
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/air.rb b/lib/sisu/v6/air.rb
deleted file mode 100644
index 85cbc1e4..00000000
--- a/lib/sisu/v6/air.rb
+++ /dev/null
@@ -1,83 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/air.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_Air
- require_relative 'se_hub_particulars' # se_hub_particulars.rb
- class Source
- @@ao_array=[]
- @@fns=nil
- def initialize(opt)
- @opt=opt
- @@fns||@opt.fns
- @particulars=SiSU_Particulars::Combined.new(opt)
- #@env=@particulars.env
- #@md=@particulars.md
- #@ao_array=@particulars.ao_array
- end
- def read
- end
- protected
- def print
- puts @particulars.md.inspect
- puts @particulars.env.inspect
- puts @particulars.ao_array
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/ao_metadata.rb b/lib/sisu/v6/ao_metadata.rb
deleted file mode 100644
index 33db841c..00000000
--- a/lib/sisu/v6/ao_metadata.rb
+++ /dev/null
@@ -1,89 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/ao_metadata.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_AO_Metadata
- class Metadata
- def initialize(md,metad)
- @md,@metadata=md,metad
- l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language
- language=l[:n]
- @tr=SiSU_Translate::Source.new(md,language)
- end
- def make_para(obj,ocn)
- h={
- obj: obj,
- ocn: 0
- }
- SiSU_AO_DocumentStructure::ObjectPara.new.paragraph(h)
- end
- def make_heading(obj,ocn,name,lv,ln)
- h={
- lv: lv,
- ln: ln,
- name: name,
- obj: obj,
- ocn: 0
- }
- SiSU_AO_DocumentStructure::ObjectHeading.new.heading(h)
- end
- def metadata
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/cgi.rb b/lib/sisu/v6/cgi.rb
deleted file mode 100644
index 8ce8596f..00000000
--- a/lib/sisu/v6/cgi.rb
+++ /dev/null
@@ -1,88 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/cgi.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: generates naive cgi search form for search of sisu database
- (pgsql sqlite)
-
-=end
-module SiSU_CGI #% database building documents
- require_relative 'se' # se.rb
- require_relative 'cgi_pgsql' # cgi_pgsql.rb
- require_relative 'cgi_sqlite' # cgi_sqlite.rb
- class SearchSQL
- def initialize(opt)
- @opt=opt
- @webserv=@opt.files[0].to_s.strip
- end
- def read
- if @opt.act[:sample_search_form][:db]==:pg # cgi_pgsql.rb
- SiSU_CGI_PgSQL::SearchPgSQL.new(@opt,@webserv).pgsql
- elsif @opt.act[:sample_search_form][:db]==:sqlite # cgi_sqlite.rb
- SiSU_CGI_SQLite::SearchSQLite.new(@opt,@webserv).sqlite
- else
- puts <<-WOK
- please select database type for which sample search form should be built (pgsql or sqlite)
- sisu --sample-search-form --db=sqlite
- sisu --sample-search-form --db=pg
- other options include
- --webserv-cgi='[cgi-server-name]'
- --webserv-output='[sisu-output-server-with-base-path]'
- WOK
- end
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/errors.rb b/lib/sisu/v6/errors.rb
deleted file mode 100644
index b56f80a3..00000000
--- a/lib/sisu/v6/errors.rb
+++ /dev/null
@@ -1,87 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/errors.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, error screen reporting
-
-=end
-module SiSU_Errors
- require_relative 'se' # se.rb
- include SiSU_Env; include SiSU_Screen
- class Rescued <CreateFile
- def initialize(error,errorlist,cmd,fns='')
- @fns,@cmd,@error,@errorlist=fns,cmd,error,errorlist
- @cmd=(cmd \
- && (cmd =~/c/)) \
- ? 'Vc'
- : 'V'
- end
- def location
- file=@fns \
- ? (SiSU_Env::CreateFile.new(@fns).file_error)
- : (File.new('/tmp/errorlog.sisu','w+'))
- file << @fns << "\n" << @error << "\n" << @errorlist
- file.close
- if @cmd=~/[vVM]/
- SiSU_Screen::Ansi.new('',$!,$@).rescue do
- (block_given?) ? yield : __LINE__.to_s + ':' + __FILE__
- end
- else
- SiSU_Screen::Ansi.new('',"rescued, exception raised, silenced").puts_grey
- end
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/generic_parts.rb b/lib/sisu/v6/generic_parts.rb
deleted file mode 100644
index bb3b3371..00000000
--- a/lib/sisu/v6/generic_parts.rb
+++ /dev/null
@@ -1,134 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html_parts.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
-
-=end
-module SiSU_Parts_Generic
- def the_url
- def urify(uri)
- URI.parse(uri)
- end
- def sisu
- 'http://www.sisudoc.org/'
- end
- def sisudoc
- 'http://www.sisudoc.org'
- end
- def footer_signature
- 'http://www.sisudoc.org/'
- end
- def rl_root
- '/sisu' #watch
- end
- def root_http
- 'http://www.sisudoc.org/' #watch
- end
- def home
- 'http://www.sisudoc.org/' # used in pdf header
- end
- def site #used as stub... where there are subdirectories and is different from home
- home
- end
- def home_txt
- 'www.sisudoc.org'
- end
- def sisu_txt
- 'www.sisudoc.org'
- end
- self
- end
- def the_text
- def home
- 'SiSU'
- end
- def txt_hp
- '&nbsp;SiSU'
- end
- def txt_hp_alias
- 'SiSU'
- end
- def txt_home
- 'SiSU'
- end
- def txt_signature # used in latex/pdf footer
- 'SiSU'
- end
- def url_open
- '<'
- end
- def url_close
- '>'
- end
- self
- end
- def the_icon
- def i_ico
- 'rb7.ico'
- end
- def i_home_button
- 'sisu.png'
- end
- def i_choice
- 'b_choice.png'
- end
- def i_new
- 'b_new.png'
- end
- self
- end
-end
-__END__
diff --git a/lib/sisu/v6/html_harvest.rb b/lib/sisu/v6/html_harvest.rb
deleted file mode 100644
index b1bd7ca5..00000000
--- a/lib/sisu/v6/html_harvest.rb
+++ /dev/null
@@ -1,114 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
- harvest metadata from document corpus (suitable for medium sized sites)
- (concept example, [to remove size constraint: implement SQL equivalent])
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/harvest.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_Harvest
- @@the_idx_topics,@@the_idx_authors={},{}
- class Source
- require_relative 'hub_options' # hub_options.rb
- require_relative 'html_harvest_topics' # html_harvest_topics.rb
- require_relative 'html_harvest_authors' # html_harvest_authors.rb
- require_relative 'se' # se.rb
- include SiSU_Env
- def initialize(opt)
- @opt=opt
- @env=SiSU_Env::InfoEnv.new
- end
- def read
- begin
- harvest_pth=@env.path.webserv + '/' + @opt.base_stub
- FileUtils::mkdir_p(harvest_pth) unless FileTest.directory?(harvest_pth)
- cases(@opt,@env)
- rescue
- ensure
- SiSU_Env::CreateSite.new(@opt).cp_css
- end
- end
- def help
- puts <<WOK
- harvest --harvest extracts document index metadata
-
-WOK
- end
- def css(opt)
- require_relative 'css' # css.rb
- css=SiSU_Style::CSS.new
- fn_css=SiSU_Env::CSS_Default.new
- style=File.new("#{@env.path.pwd}/#{fn_css.harvest}",'w')
- style << css.harvest
- style.close
- end
- def cases(opt,env)
- case opt.selections.str.inspect
- when/--harvest/i
- css(opt) if @opt.act[:maintenance][:set]==:on
- SiSU_HarvestAuthors::Songsheet.new(opt,env).songsheet
- SiSU_HarvestTopics::Songsheet.new(opt,env).songsheet
- if @opt.act[:rsync][:set]==:on
- require_relative 'remote' # remote.rb
- SiSU_Remote::Put.new(opt).rsync_harvest
- end
- else
- help
- end
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/html_harvest_author_format.rb b/lib/sisu/v6/html_harvest_author_format.rb
deleted file mode 100644
index c5081193..00000000
--- a/lib/sisu/v6/html_harvest_author_format.rb
+++ /dev/null
@@ -1,114 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/harvest_author_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_FormatAuthor
- class Author
- def initialize(author_param)
- @author_param=author_param
- end
- def author_details
- @authors,@author_array=[],[]
- authors=@author_param.scan(/[^;]+/)
- authors.each do |a|
- a=a.strip
- if a =~/"(.+?)"/
- @authors << { the: $1 }
- @author_array << $1.upcase
- else #if a =~/,/
- x=a.scan(/[^,]+/)
- x[0]=x[0].strip
- x[1]=x[1].strip if x[1]
- if x.length==1
- @authors << { the: x[0] }
- @author_array << x[0].upcase
- elsif x.length==2
- @authors << { the: x[0], others: x[1] }
- @author_array << "#{x[0].upcase}, #{x[1]}"
- else #p x.length
- end
- end
- end
- l = @authors.length
- authors_string=''
- @authors.each_with_index do |a,i|
- authors_string += if a[:others]
- if (l - i) > 1
- "#{a[:others]} #{a[:the]}, "
- else
- "#{a[:others]} #{a[:the]}"
- end
- else
- if (l - i) > 2
- "#{a[:the]}, "
- else
- "#{a[:the]}"
- end
- end
- end
- {
- last_first_a: authors,
- last_first_format_a: @author_array,
- authors_h: @authors,
- authors_s: authors_string,
- authors_param: @author_param
- }
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/html_shared.rb b/lib/sisu/v6/html_shared.rb
deleted file mode 100644
index fe1d83d0..00000000
--- a/lib/sisu/v6/html_shared.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html_shared.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
-
-=end
-module SiSU_HTML_Shared
- require_relative 'html_table' # html_table.rb
- class TableHTML < SiSU_HTML_Table::TableHTML
- end
-end
-__END__
diff --git a/lib/sisu/v6/html_table.rb b/lib/sisu/v6/html_table.rb
deleted file mode 100644
index c789dc71..00000000
--- a/lib/sisu/v6/html_table.rb
+++ /dev/null
@@ -1,67 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/html_table.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
-
-=end
-module SiSU_HTML_Table
- require_relative 'xhtml_table' # xhtml_table.rb
- require_relative 'html_parts' # html_parts.rb
- class TableHTML < SiSU_XHTML_Table::TableXHTML
- include SiSU_Parts_HTML
- end
-end
-__END__
diff --git a/lib/sisu/v6/manpage_format.rb b/lib/sisu/v6/manpage_format.rb
deleted file mode 100644
index 13b70980..00000000
--- a/lib/sisu/v6/manpage_format.rb
+++ /dev/null
@@ -1,88 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/manpage_format.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: manpage formatting template
-
-=end
-module SiSU_ManpageFormat
- require_relative 'dp' # dp.rb
- include SiSU_Param
- class ParagraphNumber
- def initialize(paranum)
- @paranum=/(\d+)/m.match(paranum)[1]
- end
- def display
- @paranum.gsub(/(\d+)/,'<font size="1" color="#777777">&nbsp;&nbsp;\1</font>')
- end
- def name
- @paranum.gsub(/(\d+)/,'<a name="\1"></a>')
- end
- def goto
- @paranum.gsub(/(\d+)/,'<a href="#\1">')
- end
- end
- class FormatTextObject
- def initialize(md,dob)
- @md,@dob=md,dob
- rgx=/#{Mx[:en_a_o]}[\d*+]+\s+(.+?)#{Mx[:en_a_c]}/
- @dob.obj.gsub!(rgx,'\1') if @dob.obj =~rgx
- end
- def scr_endnote_body
- "<endnote>#{@dob.obj}</endnote> "
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/se_clear.rb b/lib/sisu/v6/se_clear.rb
deleted file mode 100644
index 7eab9765..00000000
--- a/lib/sisu/v6/se_clear.rb
+++ /dev/null
@@ -1,109 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_clear.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_Clear
- require_relative 'constants' # constants.rb
- require_relative 'utils' # utils.rb
- require_relative 'se_info_env' # se_info_env.rb
- begin
- require 'singleton'
- rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
- error('singleton NOT FOUND (LoadError)')
- end
- class Clear < SiSU_Info_Env::InfoEnv # se_info_env.rb
- #todo unify with FileOp
- def initialize(cmd,fns,operation='')
- @cmd=cmd
- begin
- super(fns)
- @env=SiSU_Env::InfoEnv.new(fns)
- SiSU_Env::InfoVersion.instance
- if operation.class.inspect =~/SiSU_Param/
- @md=operation
- end
- case operation #watch
- when /pdf/ then @env_out=''
- when /sql/
- when /xml|plaintext|ascii/ then @env_out=@env.path.output + @fnb #check change of name to plaintext from ascii
- else
- if defined? @md.sfx_src \
- and @md.sfx_src =~/ss[ftsumc]/
- @env_out_root=@env.path.output
- @env_out="#{@env.path.output}/#{@fnb}"
- @@publisher='SiSU http://www.jus.uio.no/sisu'
- @env_pdf="#{@env_out_root}/pdf"
- end
- end
- rescue
- SiSU_Screen::Ansi.new(@cmd,$!,$@).rescue do
- __LINE__.to_s + ':' + __FILE__
- end
- ensure
- end
- end
- def param_instantiate
- @cX||=SiSU_Screen::Ansi.new(@cmd)
- @@date=SiSU_Env::InfoDate.new
- @@proc=@@filename_txt=@@filename_texinfo=@@filename_lout_portrait=@@filename_lout_landscape=@@filename_html_scroll=@@filename_html_index=@@filename_html_segtoc=@@filename_semantic=@@filename_rss=@@newfile=@@drr=@@yaml=@@yamladdr=nil
- @@publisher='SiSU scribe'
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/se_date.rb b/lib/sisu/v6/se_date.rb
deleted file mode 100644
index 31446a60..00000000
--- a/lib/sisu/v6/se_date.rb
+++ /dev/null
@@ -1,95 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_date.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_Info_Date
- require_relative 'constants' # constants.rb
- require_relative 'utils' # utils.rb
- class InfoDate
- begin
- require 'date'
- rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
- error('date NOT FOUND (LoadError)')
- end
- attr_accessor :dt,:t
- def initialize
- @dt,@t=Date.today.to_s,Time.now
- end
- def week
- w=@t.strftime('%W')
- "#{@t.year}w#{w}"
- end
- def month
- "#{@t.year}#{@t.month}"
- end
- def year
- @t.year
- end
- def weekonly
- @t.strftime('%W')
- end
- def monthonly
- @t.month
- end
- def year_static
- YEAR
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/se_info_port.rb b/lib/sisu/v6/se_info_port.rb
deleted file mode 100644
index ccd75bd2..00000000
--- a/lib/sisu/v6/se_info_port.rb
+++ /dev/null
@@ -1,73 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_info_port.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_Info_Port
- require_relative 'constants' # constants.rb
- require_relative 'utils' # utils.rb
- require_relative 'se_info_env' # se_info_env.rb
- class InfoPort < SiSU_Info_Env::InfoEnv # se_info_env.rb
- def initialize
- @env=SiSU_Env::InfoEnv.new
- end
- def webrick
- @env.port.webrick_port
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/se_load.rb b/lib/sisu/v6/se_load.rb
deleted file mode 100644
index 238930dd..00000000
--- a/lib/sisu/v6/se_load.rb
+++ /dev/null
@@ -1,111 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_load.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_Load
- require_relative 'constants' # constants.rb
- require_relative 'utils' # utils.rb
- class Load
- def initialize(prog,mandatory=false)
- @prog,@mandatory=prog,mandatory
- end
- def prog
- load_prog=false
- $:.each do |reqpath|
- if FileTest.exist?("#{reqpath}/#{@prog}.rb")
- load_prog=true
- #SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).ok("#{reqpath}/#{@prog}.rb loaded")
- break
- #else SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).warn("#{reqpath}/#{@prog}.rb not found")
- end
- end
- if load_prog \
- and @prog=~/dbi/
- begin
- require 'dbi'
- rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
- error('dbi NOT FOUND (LoadError)')
- end
- end
- if load_prog
- begin
- require @prog
- rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
- error("#{@prog} NOT FOUND (LoadError)")
- end
- else
- @mandatory \
- ? (SiSU_Screen::Ansi.new(@prog,"*WARN* module required: #{@prog}").warn)
- : '' #(SiSU_Screen::Ansi.new(@prog,"*WARN* #{@prog} load requested").warn)
- end
- load_prog
- end
- def prog?
- load_prog=false
- $:.each do |reqpath|
- if FileTest.exist?("#{reqpath}/#{@prog}.rb"); load_prog=true
- break
- end
- end
- load_prog
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/se_version.rb b/lib/sisu/v6/se_version.rb
deleted file mode 100644
index b5998b26..00000000
--- a/lib/sisu/v6/se_version.rb
+++ /dev/null
@@ -1,155 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/se_version.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: system environment, resource control and configuration details
-
-=end
-module SiSU_Info_Version
- require_relative 'constants' # constants.rb
- require_relative 'utils' # utils.rb
- require_relative 'se_info_env' # se_info_env.rb
- begin
- require 'singleton'
- rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
- error('singleton NOT FOUND (LoadError)')
- end
- class InfoVersion < SiSU_Info_Env::InfoEnv # se_info_env.rb
- include Singleton
- begin
- require 'rbconfig'
- require 'yaml'
- rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
- error('rbconfig or yaml NOT FOUND (LoadError)')
- end
- @@lib_path=nil
- def get_version
- @version={}
- @pwd=ENV['PWD']
- lib_path=
- @@lib_path \
- ? @@lib_path
- : `echo $RUBYLIB`.split(':')
- @@lib_path ||=lib_path
- if File.exist?(SiSU_is[:version_info_path])
- @version=YAML::load(File::open(SiSU_is[:version_info_path]))
- end
- @version[:install_method]=if SiSU_is[:run_from]==:gem_install
- spec = Gem::Specification.find_by_name("sisu")
- gem_root = spec.gem_dir
- (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_is[:version_dir]}/,'')) == gem_root) \
- ? ' (ruby gem install)' : ''
- else ''
- end
- @version
- end
- def rbversion
- %x{ruby -v}.strip
- end
- end
-end
-module SiSU_Info_About
- require_relative 'constants' # constants.rb
- require_relative 'utils' # utils.rb
- begin
- require 'singleton'
- rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
- error('singleton NOT FOUND (LoadError)')
- end
- class InfoAbout
- def initialize(color='')
- @color=color
- end
- def sisu_version
- version=SiSU_Env::InfoVersion.instance.get_version
- rb_ver=SiSU_Env::InfoVersion.instance.rbversion
- if version[:version]
- opt_cmd=if defined? @color.cmd \
- and @color.cmd =~/[ck]/
- @color.cmd
- else '-v'
- end
- SiSU_Screen::Ansi.new(
- opt_cmd,
- version[:project],
- version[:version],
- version[:date_stamp],
- version[:date],
- version[:install_method],
- rb_ver
- ).version
- else puts 'SiSU (version information not available)'
- end
- end
- def sisu_about
- puts <<-WOK
- sisu: documents; markup, structuring, publishing in multiple standard formats, & search
- most (not all) useful commands (are made in a directory containing a sisu markup file &) take the form:
- sisu [action(s)] [filename(s)]
- where filename refers to a valid sisu marked up file, e.g.:
- cd /usr/share/doc/sisu/markup-samples/sisu_manual
- sisu --html --verbose sisu_commands.sst
- sisu --txt --html --epub --odt --pdf --sqlite --manpage --texinfo --concordance --qrcode --verbose sisu.ssm
- cd -
- See output produced, or see man pages: man sisu
- <http://www.sisudoc.org/> <http://www.jus.uio.no/sisu/>
- WOK
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/src_kdissert_share.rb b/lib/sisu/v6/src_kdissert_share.rb
deleted file mode 100644
index 7b70344f..00000000
--- a/lib/sisu/v6/src_kdissert_share.rb
+++ /dev/null
@@ -1,105 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/src_share_kdissert.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: share sisu source markup file, copy it to output directory!
-
-=end
-module SiSU_KdiSource
- require_relative 'se' # se.rb
- include SiSU_Env
- class Source
- begin
- require 'fileutils'
- include FileUtils
- rescue LoadError
- SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
- error('fileutils NOT FOUND (LoadError)')
- end
- def initialize(opt)
- @opt=opt
- @env=SiSU_Env::InfoEnv.new(@opt.fns)
- @output_path="#{@env.path.output}/#{@opt.fnb}"
- end
- def read
- SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'Share Kdissert Source Document!',
- @opt.fnb
- ).green_hi_blue unless @opt.act[:quiet][:set]==:on
- SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- "Copy kdissert file to output directory",
- "#{@opt.fnb} -> #{@output_path}"
- ).warn unless @opt.act[:quiet][:set]==:on
- FileUtils::mkdir_p(@env.path.output) unless FileTest.directory?(@env.path.output)
- FileUtils::mkdir_p(@output_path) unless FileTest.directory?(@output_path)
- if FileTest.directory?(@output_path)
- if @opt.fns =~/\.kdi\._sst$/ \
- and FileTest.file?(@opt.fnb)
- FileUtils::cp(@opt.fnb,@output_path)
- end
- else
- SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- "Output directory does not exist",
- "#{@opt.fnb} -> #{@output_path}"
- ).warn unless @opt.act[:quiet][:set]==:on
- exit
- end
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/src_share.rb b/lib/sisu/v6/src_share.rb
deleted file mode 100644
index 6bd76bb9..00000000
--- a/lib/sisu/v6/src_share.rb
+++ /dev/null
@@ -1,112 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/src_share.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: share sisu source markup file, copy it to output directory!
-
-=end
-module SiSU_Markup
- require_relative 'src_shared' # src_shared.rb
- include SiSU_Source
- require_relative 'se' # se.rb
- include SiSU_Env
- class Source < SiSU_Source::SiSUpodSource
- def initialize(opt,build=nil,place=nil)
- super(opt,build,place)
- @opt=opt
- end
- def read
- unless @opt.act[:quiet][:set]==:on
- (@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on) \
- ? SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'Share document markup text source',
- @opt.fns
- ).cyan_hi_blue
- : SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'Share document markup text source',
- @opt.fns
- ).cyan_title_hi
- end
- if FileTest.directory?(@path_pod[:fnb])
- FileUtils::mkdir_p(@file.output_path.src.dir) \
- unless FileTest.directory?(@file.output_path.src.dir)
- v=(@opt.act[:maintenance][:set]==:on) \
- ? 'v' : ''
- system(%{
- rsync -a#{v} #{@path_pod[:fnb]} #{@file.output_path.sisupod.dir}
- chbk=`pwd`
- cd #{@file.output_path.sisupod.dir}
- for I in `find -type d` ; do chmod 755 $I ; done
- for I in `find -type f` ; do chmod 644 $I ; done
- cd ${chbk}
- })
- else
- if (@opt.act[:verbose][:set]==:on \
- || @opt.act[:verbose_plus][:set]==:on \
- || @opt.act[:maintenance][:set]==:on)
- SiSU_Screen::Ansi.new(
- '',
- "#{@opt.fno} not available"
- ).blue_tab
- end
- end
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/utils_response.rb b/lib/sisu/v6/utils_response.rb
deleted file mode 100644
index 0e10f66c..00000000
--- a/lib/sisu/v6/utils_response.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/utils_response.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: Request response
-
-=end
-module SiSU_Response
- class Response
- def response?(ask) #move to more appropriate directory later
- response='redo'
- print ask + " ['yes', 'no' or 'quit']: "
- response=File.new('/dev/tty').gets.strip
- ans=if response=='yes' then true
- elsif response=='no' then false
- elsif response =~/^quit|exit$/ then exit
- else puts "[please type: 'yes', 'no' or 'quit']"
- response?(ask)
- end
- ans
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/utils_spell.rb b/lib/sisu/v6/utils_spell.rb
deleted file mode 100644
index 0e5d8158..00000000
--- a/lib/sisu/v6/utils_spell.rb
+++ /dev/null
@@ -1,102 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/utils_spell.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: spellchecking
-
-=end
-module SiSU_SpellUtility
- class Spell
- def initialize(input,filesrc,flg)
- @flg=flg
- @filename, @filetype = /(.+?)(\.\w\w\w0$)/.match(filesrc)[1,2] #.gsub(/\.\w\w\w0$/, "")
- @input=input
- @allwords=[]
- puts @filename
- @speller='aspell' # 'ispell'
- @dictionary='british'
- @lang='en_GB'
- end
- def check
- @input.each do |data|
- data=data.gsub(/(https?|www|ftp|gopher|png|jpg|gif|html|htm)\S+/i,' ').
- gsub(/(&nbsp;|#{Mx[:nbsp]})/i,' ').
- gsub(/<\/?(table|tr|td|b|p|href).*?>/i,' ').
- gsub(/(<==.+|<:\S+>|<!.+?!>|^@\S+?:.+|\{\{\{|~)/,' ').
- gsub(/(["|<>)(\n'`.;&_-]|\=)/,' ').
- gsub(/\b(altExternal|
- target|externalimg|
- srcimagebext|
- img|src|toc|pdf|
- cd|org|
- helvetica|roman
- )\b/i,' ').
- gsub(/EOF/,'')
- @words=data.scan(/\S+/)
- @words.each { |y| @allwords << y }
- end
- @allwords=@allwords.uniq
- if @flg =~ /S/
- File.open('/home/ralph/spell_error','a+') do |file| #fix
- file.puts %{\n\n<<#{@filename}>>}
- end
- @allwords.each { |y| puts y.inspect; system(%{cat #{y} | /usr/bin/#{@speller} -l -d #{@dictionary} >> ~/spell_error })}
- else
- @allwords.each { |y| sp=%x{echo #{y}|#{@speller} -l }; puts sp unless sp.empty?}
- end
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/xhtml_shared.rb b/lib/sisu/v6/xhtml_shared.rb
deleted file mode 100644
index c324474f..00000000
--- a/lib/sisu/v6/xhtml_shared.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xhtml_shared.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
-
-=end
-module SiSU_XHTML_Shared
- require_relative 'xhtml_table' # xhtml_table.rb
- class TableXHTML < SiSU_XHTML_Table::TableXHTML
- end
-end
-__END__
diff --git a/lib/sisu/v6/xhtml_table.rb b/lib/sisu/v6/xhtml_table.rb
deleted file mode 100644
index 8df539aa..00000000
--- a/lib/sisu/v6/xhtml_table.rb
+++ /dev/null
@@ -1,101 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/xhtml_table.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: shared html parts
-
-=end
-module SiSU_XHTML_Table
- require_relative 'xhtml_parts' # xhtml_parts.rb
- class TableXHTML
- include SiSU_Parts_XHTML
- @@tablehead=0
- @@tablefoot=[] #watch
- def initialize(table)
- @table_obj=table
- end
- def table
- table_obj=@table_obj
- if table_obj.obj !~/^<table\s/m
- table_obj=table_rows_and_columns_array(table_obj)
- else p __LINE__; p caller
- end
- table_obj
- end
- def table_rows_and_columns_array(table_obj) # provides basic (x)html table
- table_rows,nr=[],0
- table_obj.obj.split(Mx[:tc_c]).each do |table_row|
- table_row_with_columns=table_row.split(Mx[:tc_p])
- trc,nc=[],0
- table_row_with_columns.each do |c|
- c=c.gsub(/^~$/,''). # tilde / empty cell
- gsub(/<:br>/,the_line_break)
- trc <<= if table_obj.head_ and nr==0; %{<th width="#{table_obj.widths[nc]}%">#{c}</th>}
- else %{<td width="#{table_obj.widths[nc]}%">#{c}</td>}
- end
- nc+=1
- end
- trc=(trc.is_a?(Array)) ? trc.flatten.join : trc
- trc=" <tr>#{trc}</tr>\n"
- nr+=1
- table_rows << trc
- end
- table_rows=table_rows.flatten.join
- table_obj.obj=%{<table summary="normal text css" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">\n#{table_rows} </table>}
- table_obj
- end
- end
-end
-__END__
diff --git a/lib/sisu/v6/zap.rb b/lib/sisu/v6/zap.rb
deleted file mode 100644
index c99eab77..00000000
--- a/lib/sisu/v6/zap.rb
+++ /dev/null
@@ -1,93 +0,0 @@
-# encoding: utf-8
-=begin
-
- * Name: SiSU
-
- * Description: a framework for document structuring, publishing and search
-
- * Author: Ralph Amissah
-
- * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
- All Rights Reserved.
-
- * License: GPL 3 or later:
-
- SiSU, a framework for document structuring, publishing and search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation, either version 3 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
-
- If you have Internet connection, the latest version of the GPL should be
- available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
-
- * SiSU uses:
- * Standard SiSU markup syntax,
- * Standard SiSU meta-markup syntax, and the
- * Standard SiSU object citation numbering and system
-
- * Hompages:
- <http://www.jus.uio.no/sisu>
- <http://www.sisudoc.org>
-
- * Git
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary>
- <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/v6/zap.rb;hb=HEAD>
-
- * Ralph Amissah
- <ralph@amissah.com>
- <ralph.amissah@gmail.com>
-
- ** Description: zap wipe clean previous output of the type specified
-
-=end
-module SiSU_Zap
- require_relative 'se' # se.rb
- include SiSU_Env
- class Source
- def initialize(opt)
- @opt=opt
- @env=SiSU_Env::InfoEnv.new(opt.fns)
- end
- def read
- zap_path="#{@env.path.output}/#{@env.fnb}"
- z=SiSU_Env::CleanOutput.new(@opt)
- if SiSU_Env::InfoSettings.new.permission?('zap')
- unless @opt.act[:quiet][:set]==:on
- tell=SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- "Clean files related to processing #{@opt.selections.str} ->",
- "#{@opt.fns} -> #{zap_path}"
- )
- tell.warn
- end
- z.zap.remove_output
- else
- unless @opt.act[:quiet][:set]==:on
- tell=SiSU_Screen::Ansi.new(
- @opt.act[:color_state][:set],
- 'use of -Z (zap) has not enabled in sisurc.yml'
- )
- tell.warn
- end
- end
- end
- end
-end
-__END__