From 4e84f496adb538db3d3fc75134d6e05086332bf9 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 27 Jun 2021 15:27:05 -0400 Subject: org-mode code block headers --- org/compile_time_info.org | 4 +- org/default_misc.org | 7 +- org/default_paths.org | 7 +- org/default_regex.org | 7 +- org/default_shared.org | 4 +- org/imports.org | 7 +- org/in_source_files.org | 7 +- org/meta_conf_make_meta.org | 16 ++-- org/meta_debugs.org | 4 +- org/metaverse.org | 7 +- org/out_cgi_search_sqlite.org | 7 +- org/out_harvest_metadata.org | 10 ++- org/out_latex.org | 9 ++- org/out_metadata.org | 4 +- org/out_odt.org | 4 +- org/out_sqlite.org | 4 +- org/out_src_pod.org | 4 +- org/out_xmls.org | 10 ++- org/out_xmls_css.org | 4 +- org/out_zip.org | 4 +- org/output_hub.org | 4 +- org/output_show.org | 13 ++- org/spine.org | 11 ++- org/spine_build_scaffold.org | 108 +++++++++++++++++-------- org/spine_info.org | 25 ++++-- org/spine_markup_sample.org | 10 ++- org/util_cgi_d_sqlite_search.org | 10 ++- org/util_cgi_rb_fcgi_sqlite_search.org | 52 ++++++++---- org/util_spine_markup_conversion_from_sisu.org | 19 ++++- org/util_spine_syntax_highlighting_emacs.org | 10 ++- org/util_spine_syntax_highlighting_vim.org | 31 ++++--- 31 files changed, 300 insertions(+), 123 deletions(-) diff --git a/org/compile_time_info.org b/org/compile_time_info.org index 91cae79..7f75ece 100644 --- a/org/compile_time_info.org +++ b/org/compile_time_info.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes [[./spine.org][spine]] [[./][org/]] * compilation info @@ -25,7 +26,8 @@ version(Windows) {} else { ... } ** _module template_ :module:compile_time_info: -#+BEGIN_SRC d :tangle "../src/doc_reform/conf/compile_time_info.d" +#+HEADER: :tangle "../src/doc_reform/conf/compile_time_info.d" +#+BEGIN_SRC d <> /++ compile_time_info diff --git a/org/default_misc.org b/org/default_misc.org index afd4a02..50a932c 100644 --- a/org/default_misc.org +++ b/org/default_misc.org @@ -14,13 +14,15 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes [[./spine.org][spine]] [[./][org/]] * meta defaults :module:meta: ** _module template_ #+NAME: tangle_defaults -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/defaults.d" +#+HEADER: :tangle "../src/doc_reform/meta/defaults.d" +#+BEGIN_SRC d <> /++ default settings @@ -168,7 +170,8 @@ template spineBiblio() { ** _module template_ #+NAME: tangle_defaults -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/defaults.d" +#+HEADER: :tangle "../src/doc_reform/io_out/defaults.d" +#+BEGIN_SRC d <> /++ default settings diff --git a/org/default_paths.org b/org/default_paths.org index 25602d7..ae01fcd 100644 --- a/org/default_paths.org +++ b/org/default_paths.org @@ -14,12 +14,14 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes [[./spine.org][spine]] [[./][org/]] * source paths ** _module template_ :module:paths_source: -#+BEGIN_SRC d :tangle "../src/doc_reform/io_in/paths_source.d" +#+HEADER: :tangle "../src/doc_reform/io_in/paths_source.d" +#+BEGIN_SRC d <> /++ read configuration files
@@ -965,7 +967,8 @@ template spinePathsPods() { * output paths ** _module template_ :module:paths_output: -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/paths_output.d" +#+HEADER: :tangle "../src/doc_reform/io_out/paths_output.d" +#+BEGIN_SRC d <> /++ default settings diff --git a/org/default_regex.org b/org/default_regex.org index 8d220d7..fdd9e01 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes [[./spine.org][spine]] [[./][org/]] * meta ctRegex @@ -31,7 +32,8 @@ https://dlang.org/phobos/std_regex.html ** _module template_ :module: -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/rgx.d" +#+HEADER: :tangle "../src/doc_reform/meta/rgx.d" +#+BEGIN_SRC d <> /++ regex: regular expressions used in sisu document parser @@ -392,7 +394,8 @@ https://dlang.org/phobos/std_regex.html ** _module template_ :module:output: -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/rgx.d" +#+HEADER: :tangle "../src/doc_reform/io_out/rgx.d" +#+BEGIN_SRC d <> /++ regex: regular expressions used in sisu document parser diff --git a/org/default_shared.org b/org/default_shared.org index b321367..d39b7ee 100644 --- a/org/default_shared.org +++ b/org/default_shared.org @@ -14,12 +14,14 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes [[./spine.org][spine]] [[./][org/]] * shared ** _module template_ :module:shared: -#+BEGIN_SRC d :tangle "../src/doc_reform/share/defaults.d" +#+HEADER: :tangle "../src/doc_reform/share/defaults.d" +#+BEGIN_SRC d <> /++ shared default settings diff --git a/org/imports.org b/org/imports.org index bd5784b..63eb70c 100644 --- a/org/imports.org +++ b/org/imports.org @@ -14,11 +14,13 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes * imports for _meta_ :meta: ** package dir -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/package.d" +#+HEADER: :tangle "../src/doc_reform/meta/package.d" +#+BEGIN_SRC d <> module doc_reform.meta; <> @@ -48,7 +50,8 @@ public import * imports for _output_ :output: ** package dir -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/package.d" +#+HEADER: :tangle "../src/doc_reform/io_out/package.d" +#+BEGIN_SRC d <> module doc_reform.io_out; <> diff --git a/org/in_source_files.org b/org/in_source_files.org index 8c7de45..32ed288 100644 --- a/org/in_source_files.org +++ b/org/in_source_files.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes [[./spine.org][spine]] [[./][org/]] * imports @@ -36,7 +37,8 @@ doc_reform.io_in.paths_source * A. get _config file_ (read in) ** _module template_ :module:config_files: -#+BEGIN_SRC d :tangle "../src/doc_reform/io_in/read_config_files.d" +#+HEADER: :tangle "../src/doc_reform/io_in/read_config_files.d" +#+BEGIN_SRC d <> /++ read configuration files
@@ -258,7 +260,8 @@ static template configReadDocYAML() { * B. get _markup source_, read file :module:source_files: ** _module template_ (includes tuple) -#+BEGIN_SRC d :tangle "../src/doc_reform/io_in/read_source_files.d" +#+HEADER: :tangle "../src/doc_reform/io_in/read_source_files.d" +#+BEGIN_SRC d <> /++ module source_read_source_files;
diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org index 7d15135..7c0d9ac 100644 --- a/org/meta_conf_make_meta.org +++ b/org/meta_conf_make_meta.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes [[./spine.org][spine]] [[./][org/]] * generic @@ -83,7 +84,8 @@ import doc_reform.meta.conf_make_meta_structs; ** struct ConfComposite -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/conf_make_meta_structs.d" +#+HEADER: :tangle "../src/doc_reform/meta/conf_make_meta_structs.d" +#+BEGIN_SRC d <> module doc_reform.meta.conf_make_meta_structs; <> @@ -397,7 +399,8 @@ JSONValue config_jsonstr = `{ * YAML to spineStruct :module:conf_make_meta:yaml: ** _module template_ -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/conf_make_meta_yaml.d" +#+HEADER: :tangle "../src/doc_reform/meta/conf_make_meta_yaml.d" +#+BEGIN_SRC d <> /++ yaml headers
@@ -1419,7 +1422,8 @@ if ("rights" in _yaml * JSON to spineStruct :module:conf_make_meta:json: ** _module template_ -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/conf_make_meta_json.d" +#+HEADER: :tangle "../src/doc_reform/meta/conf_make_meta_json.d" +#+BEGIN_SRC d <> /++ json headers
@@ -2087,7 +2091,8 @@ if ("rights" in _json.object) { ** 1. parse Yaml config return spineStruct -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/conf_make_meta_yaml.d" +#+HEADER: :tangle "../src/doc_reform/meta/conf_make_meta_yaml.d" +#+BEGIN_SRC d <> template configParseYAMLreturnSpineStruct() { import dyaml; @@ -2125,7 +2130,8 @@ template configParseYAMLreturnSpineStruct() { ** 2. parse YAML header to +(JSON then)+ Struct -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/conf_make_meta_yaml.d" +#+HEADER: :tangle "../src/doc_reform/meta/conf_make_meta_yaml.d" +#+BEGIN_SRC d <> template docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct() { import diff --git a/org/meta_debugs.org b/org/meta_debugs.org index f6cdbfa..c8971f2 100644 --- a/org/meta_debugs.org +++ b/org/meta_debugs.org @@ -14,12 +14,14 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes [[./spine.org][spine]] [[./][org/]] * abstraction debugs :module:spine:meta_doc_debugs: ** _module template_ -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/doc_debugs.d" +#+HEADER: :tangle "../src/doc_reform/meta/doc_debugs.d" +#+BEGIN_SRC d <> /++ output debugs diff --git a/org/metaverse.org b/org/metaverse.org index a6f7778..0e1dff0 100644 --- a/org/metaverse.org +++ b/org/metaverse.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes - [[./spine.org][spine]] [[./][org/]] @@ -22,7 +23,8 @@ Process markup document, create document abstraction. ** _module template_ :module:metadoc_from_src: -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_from_src.d" +#+HEADER: :tangle "../src/doc_reform/meta/metadoc_from_src.d" +#+BEGIN_SRC d <> /++ document abstraction: @@ -7835,7 +7837,8 @@ set abstracted objects for downstream processing ** _module template_ -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_object_setter.d" +#+HEADER: :tangle "../src/doc_reform/meta/metadoc_object_setter.d" +#+BEGIN_SRC d <> /++ object setter: diff --git a/org/out_cgi_search_sqlite.org b/org/out_cgi_search_sqlite.org index 9527731..3a5595d 100644 --- a/org/out_cgi_search_sqlite.org +++ b/org/out_cgi_search_sqlite.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes [[./spine.org][spine.org]] [[../org/][org/]] [[./spine_build_scaffold.org][make/build]] @@ -68,7 +69,8 @@ dub --force --compiler=ldc2 && sudo cp -v cgi-bin/spine-search /usr/lib/cgi-bin/ --output=/var/www/html \ ~grotto/repo/git.repo/code/project-spine/doc-reform-markup/markup_samples/markup/pod/* -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/cgi_sqlite_search_form.d" +#+HEADER: :tangle "../src/doc_reform/io_out/cgi_sqlite_search_form.d" +#+BEGIN_SRC d <> module doc_reform.io_out.cgi_sqlite_search_form; template CGIsearchSQLite() { @@ -2270,7 +2272,8 @@ configuration "default" { * cgi-search README -#+BEGIN_SRC text :NO-tangle "../misc/util/d/cgi/search/README" +#+HEADER: :NO-tangle "../misc/util/d/cgi/search/README" +#+BEGIN_SRC text change db name to match name of db you create cv.db_selected = "spine.search.sql.db"; diff --git a/org/out_harvest_metadata.org b/org/out_harvest_metadata.org index abafa87..4cf23cf 100644 --- a/org/out_harvest_metadata.org +++ b/org/out_harvest_metadata.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes * document harvest _summary_ :module:spine:metadoc_show_summary: @@ -24,7 +25,8 @@ ** _module template_ metadoc harvest -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_harvest.d" +#+HEADER: :tangle "../src/doc_reform/meta/metadoc_harvest.d" +#+BEGIN_SRC d <> module doc_reform.meta.metadoc_harvest; template spineMetaDocHarvest() { @@ -116,7 +118,8 @@ return hvst.harvest; ** _module template_ metadoc harvest topics *** _module template_ metadoc harvest topics template -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_harvests_topics.d" +#+HEADER: :tangle "../src/doc_reform/meta/metadoc_harvests_topics.d" +#+BEGIN_SRC d <> module doc_reform.meta.metadoc_harvests_topics; import @@ -458,7 +461,8 @@ try { ** _module template_ metadoc harvests authors *** _module template_ metadoc harvest authors -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_harvests_authors.d" +#+HEADER: :tangle "../src/doc_reform/meta/metadoc_harvests_authors.d" +#+BEGIN_SRC d <> module doc_reform.meta.metadoc_harvests_authors; import diff --git a/org/out_latex.org b/org/out_latex.org index ab3df75..b278cda 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes - [[./spine.org][spine]] [[./][org/]] - [[./output_hub.org][output_hub]] @@ -21,7 +22,8 @@ * latex ** _module template_ :latex:pdf:module: -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/latex.d" :noweb yes +#+HEADER: :tangle "../src/doc_reform/io_out/latex.d" :noweb yes +#+BEGIN_SRC d <> module doc_reform.io_out.latex; template outputLaTeX() { @@ -1937,7 +1939,10 @@ string latex_tail(M)( * latex system command helper script ** latex command, ruby script -#+BEGIN_SRC ruby :tangle "../misc/util/rb/tex/dr_tex.rb" :tangle-mode (identity #o755) :shebang #!/usr/bin/env ruby +#+HEADER: :tangle "../misc/util/rb/tex/dr_tex.rb" +#+HEADER: :tangle-mode (identity #o755) +#+HEADER: :shebang #!/usr/bin/env ruby +#+BEGIN_SRC ruby # <> require 'fileutils' pwd = Dir.pwd diff --git a/org/out_metadata.org b/org/out_metadata.org index abb1cf4..94d71b7 100644 --- a/org/out_metadata.org +++ b/org/out_metadata.org @@ -14,12 +14,14 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes * document harvest _summary_ :module:spine:metadoc_show_summary: ** _module template_ metadoc document metadata -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/metadata.d" +#+HEADER: :tangle "../src/doc_reform/io_out/metadata.d" +#+BEGIN_SRC d <> module doc_reform.io_out.metadata; template outputMetadata() { diff --git a/org/out_odt.org b/org/out_odt.org index e864ef5..eefd3be 100644 --- a/org/out_odt.org +++ b/org/out_odt.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes - [[./spine.org][spine]] [[./][org/]] - [[./output_hub.org][output_hub]] @@ -46,7 +47,8 @@ ** _module template_ :odf:odt:module: -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/odt.d" :noweb yes +#+HEADER: :tangle "../src/doc_reform/io_out/odt.d" :noweb yes +#+BEGIN_SRC d <> module doc_reform.io_out.odt; template formatODT() { diff --git a/org/out_sqlite.org b/org/out_sqlite.org index b8bbdaf..58de0cf 100644 --- a/org/out_sqlite.org +++ b/org/out_sqlite.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes - [[./spine.org][spine]] [[./][org/]] - [[./output_hub.org][output_hub]] @@ -41,7 +42,8 @@ sudo chown ralph:ralph /var/www ** _module, templates_ :module: *** template -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/sqlite.d" +#+HEADER: :tangle "../src/doc_reform/io_out/sqlite.d" +#+BEGIN_SRC d <> module doc_reform.io_out.sqlite; <> diff --git a/org/out_src_pod.org b/org/out_src_pod.org index d738f17..f96cda9 100644 --- a/org/out_src_pod.org +++ b/org/out_src_pod.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes - [[./spine.org][spine]] [[./][org/]] - [[./output_hub.org][output_hub]] @@ -21,7 +22,8 @@ * pod ** _module template_ :module: -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/source_pod.d" +#+HEADER: :tangle "../src/doc_reform/io_out/source_pod.d" +#+BEGIN_SRC d <> module doc_reform.io_out.source_pod; template spinePod() { diff --git a/org/out_xmls.org b/org/out_xmls.org index fea2300..0538964 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes - [[./spine.org][spine]] [[./][org/]] - [[./output_hub.org][output_hub]] @@ -22,7 +23,8 @@ ** format xhtml objects :format: *** _module template_ :module: -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/xmls.d" +#+HEADER: :tangle "../src/doc_reform/io_out/xmls.d" +#+BEGIN_SRC d <> module doc_reform.io_out.xmls; template outputXHTMLs() { @@ -1566,7 +1568,8 @@ align="left|right|center" * _html_ [#A] :html: ** _module template_ :module: -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/html.d" +#+HEADER: :tangle "../src/doc_reform/io_out/html.d" +#+BEGIN_SRC d <> module doc_reform.io_out.html; template outputHTML() { @@ -2243,7 +2246,8 @@ template outputHTML() { ** _module template_ :module: -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/epub3.d" +#+HEADER: :tangle "../src/doc_reform/io_out/epub3.d" +#+BEGIN_SRC d <> module doc_reform.io_out.epub3; template outputEPub3() { diff --git a/org/out_xmls_css.org b/org/out_xmls_css.org index 19a1691..c5e39f0 100644 --- a/org/out_xmls_css.org +++ b/org/out_xmls_css.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes - [[./spine.org][spine]] [[./][org/]] - [[./output_hub.org][output_hub]] @@ -21,7 +22,8 @@ * output css defaults :module:spine:output_xmls_css: ** _module template_ -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/xmls_css.d" +#+HEADER: :tangle "../src/doc_reform/io_out/xmls_css.d" +#+BEGIN_SRC d <> /++ default css settings diff --git a/org/out_zip.org b/org/out_zip.org index c3a0189..36c217e 100644 --- a/org/out_zip.org +++ b/org/out_zip.org @@ -13,6 +13,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes - [[./spine.org][spine]] [[./][org/]] - [[./output_hub.org][output_hub]] @@ -20,7 +21,8 @@ * _zip_ :module:spine:create_zip_file: ** module template -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/create_zip_file.d" +#+HEADER: :tangle "../src/doc_reform/io_out/create_zip_file.d" +#+BEGIN_SRC d <> module doc_reform.io_out.create_zip_file; template createZipFile() { diff --git a/org/output_hub.org b/org/output_hub.org index 8735dd9..67718e1 100644 --- a/org/output_hub.org +++ b/org/output_hub.org @@ -14,13 +14,15 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes - [[./spine.org][spine]] [[./][org/]] * output hub [#A] ** _module template_ :module: -#+BEGIN_SRC d :tangle "../src/doc_reform/io_out/hub.d" +#+HEADER: :tangle "../src/doc_reform/io_out/hub.d" +#+BEGIN_SRC d <> /++ output hub
diff --git a/org/output_show.org b/org/output_show.org index e77adf2..80529e4 100644 --- a/org/output_show.org +++ b/org/output_show.org @@ -14,12 +14,14 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes * document abstraction _summary_ :module:spine:metadoc_show_summary: ** _module template_ metadoc summary - document summary from abstraction -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_show_summary.d" +#+HEADER: :tangle "../src/doc_reform/meta/metadoc_show_summary.d" +#+BEGIN_SRC d <> module doc_reform.meta.metadoc_show_summary; template spineMetaDocSummary() { @@ -136,7 +138,8 @@ writefln( ** _module template_ show config *** _show config tangle -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_show_config.d" +#+HEADER: :tangle "../src/doc_reform/meta/metadoc_show_config.d" +#+BEGIN_SRC d <> <> <> @@ -327,7 +330,8 @@ writefln( ** _module template_ show make --show-make (show document make) -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_show_make.d" +#+HEADER: :tangle "../src/doc_reform/meta/metadoc_show_make.d" +#+BEGIN_SRC d <> module doc_reform.meta.metadoc_show_make; template spineShowMake() { @@ -398,7 +402,8 @@ writefln( ** _module template_ show metadata --show-metadata (show document metadata) -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_show_metadata.d" +#+HEADER: :tangle "../src/doc_reform/meta/metadoc_show_metadata.d" +#+BEGIN_SRC d <> module doc_reform.meta.metadoc_show_metadata; template spineShowMetaData() { diff --git a/org/spine.org b/org/spine.org index 1ede22e..aa928b0 100644 --- a/org/spine.org +++ b/org/spine.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes [[./spine_info.org][spine_info.org]] [[./][org/]] [[./spine_build_scaffold.org][make/build]] VERSION @@ -21,7 +22,8 @@ * 0. version.txt (set version) :version: ** 0. set program tangle -#+BEGIN_SRC txt :tangle "../views/version.txt" +#+HEADER: :tangle "../views/version.txt" +#+BEGIN_SRC txt <> <> <> @@ -83,7 +85,9 @@ version (Posix) { - by sourcefiles contents identifier - by zip filename -#+BEGIN_SRC d :tangle "../src/doc_reform/spine.d" :shebang "#!/usr/bin/env rdmd" +#+HEADER: :tangle "../src/doc_reform/spine.d" +#+HEADER: :shebang "#!/usr/bin/env rdmd" +#+BEGIN_SRC d <> module doc_reform.sisu_document_parser; /++ @@ -1304,7 +1308,8 @@ break; // terminate, stop *** 0 module template - abstraction template -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc.d" +#+HEADER: :tangle "../src/doc_reform/meta/metadoc.d" +#+BEGIN_SRC d module doc_reform.meta.metadoc; template spineAbstraction() { <> diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org index 0b8f763..f4d950e 100644 --- a/org/spine_build_scaffold.org +++ b/org/spine_build_scaffold.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes [[./spine.org][spine.org]] VERSION [[./spine_info.org][spine_info.org]] [[../org/][org/]] @@ -72,13 +73,15 @@ - soversion #+NAME: version_soversion +#+BEGIN_SRC sh 0 #+END_SRC * makefile :makefile: ** tangle -#+BEGIN_SRC makefile :tangle ../makefile +#+HEADER: :tangle ../makefile +#+BEGIN_SRC makefile <> <> <> @@ -1134,7 +1137,8 @@ gitsnapshot: distclean tangle * dub.settings.json :dub:config:json: -#+BEGIN_SRC json :NO-tangle ../dub.settings.json +#+HEADER: :NO-tangle ../dub.settings.json +#+BEGIN_SRC json { "defaultArchitecture": "x86_64", "defaultCompiler": "ldc" @@ -1150,7 +1154,8 @@ gitsnapshot: distclean tangle - tinyendian - imageformats -#+BEGIN_SRC json :tangle ../dub.json +#+HEADER: :tangle ../dub.json +#+BEGIN_SRC json { "authors": [ "Ralph Amissah" @@ -1428,7 +1433,8 @@ gitsnapshot: distclean tangle ** +check dub.json+ -#+BEGIN_SRC sh :NO-tangle ../dub.json +#+HEADER: :NO-tangle ../dub.json +#+BEGIN_SRC sh { "authors": [ "Ralph Amissah" @@ -1489,7 +1495,10 @@ not configured here using dub.json for the moment ** header (including dependencies) :header: -#+BEGIN_SRC sh :NO-tangle ../dub.sdl :tangle-mode (identity #o755) :shebang #!/usr/bin/env dub +#+HEADER: :NO-tangle ../dub.sdl +#+HEADER: :tangle-mode (identity #o755) +#+HEADER: :shebang #!/usr/bin/env dub +#+BEGIN_SRC sh name "spine" description "sisu document parser" homepage "https://sisudoc.org" @@ -1515,7 +1524,8 @@ time (dub --compiler=dmd --build=release) time (dub --compiler=ldc2 --build=release) time (dub --compiler=gdc --build=release) -#+BEGIN_SRC sh :NO-tangle ../dub.sdl +#+HEADER: :NO-tangle ../dub.sdl +#+BEGIN_SRC sh configuration "default" { targetName "spine" postGenerateCommands "notify-send -t 0 'D executable ready' 'spine'" @@ -1527,7 +1537,8 @@ configuration "default" { time (dub --compiler=dmd -color --config=dmd --build=dmd) time (dub --compiler=dmd -color --config=dmd --build=dmd-release) -#+BEGIN_SRC sh :NO-tangle ../dub.sdl +#+HEADER: :NO-tangle ../dub.sdl +#+BEGIN_SRC sh configuration "dmd" { targetName "spine-dmd" postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-dmd'" @@ -1558,7 +1569,8 @@ configuration "dmd-version" { time (dub --compiler=ldc2 -color --config=ldc --build=ldc) time (dub --compiler=ldc2 -color --config=ldc --build=ldc-release) -#+BEGIN_SRC sh :NO-tangle ../dub.sdl +#+HEADER: :NO-tangle ../dub.sdl +#+BEGIN_SRC sh configuration "ldc" { targetName "spine-ldc" postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-ldc'" @@ -1590,7 +1602,8 @@ configuration "ldc-version" { time (dub --compiler=gdc --config=gdc --build=gdc) time (dub --compiler=gdc --config=gdc --build=gdc-release) -#+BEGIN_SRC sh :NO-tangle ../dub.sdl +#+HEADER: :NO-tangle ../dub.sdl +#+BEGIN_SRC sh configuration "gdc" { targetName "spine-gdc" postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-gdc'" @@ -1666,7 +1679,8 @@ cat spine_sources.txt **** project meson.build :filelist: -#+BEGIN_SRC sh :tangle ../meson.build +#+HEADER: :tangle ../meson.build +#+BEGIN_SRC sh project('spine', 'd', license: 'AGPL-3', version: '<>', @@ -1741,7 +1755,8 @@ spine_exe = executable('spine', ** meson subprojects [taken care of using dub] :subprojects: *** README -#+BEGIN_SRC txt :tangle ../subprojects/README +#+HEADER: :tangle ../subprojects/README +#+BEGIN_SRC txt - d2sqlite3 - dub - https://code.dlang.org/packages/d2sqlite3 @@ -1769,7 +1784,8 @@ spine_exe = executable('spine', *** d2sqlite3 :d2sqlite3: **** wrap -#+BEGIN_SRC sh :tangle ../subprojects/d2sqlite3.wrap +#+HEADER: :tangle ../subprojects/d2sqlite3.wrap +#+BEGIN_SRC sh [wrap-git] directory = d2sqlite3 url = https://github.com/dlang-community/d2sqlite3.git @@ -1778,7 +1794,8 @@ revision = head **** meson.build -#+BEGIN_SRC sh :NO-tangle ../subprojects/d2sqlite3.meson.build +#+HEADER: :NO-tangle ../subprojects/d2sqlite3.meson.build +#+BEGIN_SRC sh project('d2sqlite3', 'd', meson_version: '>=<>', license: 'BSL-1.0', @@ -1832,7 +1849,8 @@ d2sqlite3_dep = declare_dependency( *** dyaml :dyaml: **** wrap -#+BEGIN_SRC sh :tangle ../subprojects/dyaml.wrap +#+HEADER: :tangle ../subprojects/dyaml.wrap +#+BEGIN_SRC sh [wrap-git] directory = dyaml url = https://github.com/dlang-community/D-YAML.git @@ -1843,7 +1861,8 @@ revision = head Upstream provides meson.build -#+BEGIN_SRC sh :NO-tangle ../subprojects/D-YAML/meson.build +#+HEADER: :NO-tangle ../subprojects/D-YAML/meson.build +#+BEGIN_SRC sh project('D-YAML', 'd', meson_version: '>=<>', subproject_dir: 'contrib', @@ -1919,7 +1938,8 @@ dyaml_dep = declare_dependency( *** imageformats :imageformats: **** wrap -#+BEGIN_SRC sh :tangle ../subprojects/imageformats.wrap +#+HEADER: :tangle ../subprojects/imageformats.wrap +#+BEGIN_SRC sh [wrap-git] directory = imageformats url = https://github.com/lgvz/imageformats.git @@ -1928,7 +1948,8 @@ revision = head **** meson.build -#+BEGIN_SRC sh :NO-tangle ../subprojects/imageformats.meson.build +#+HEADER: :NO-tangle ../subprojects/imageformats.meson.build +#+BEGIN_SRC sh project('imageformats', 'd', meson_version: '>=<>', license: 'BSL-1.0', @@ -1974,7 +1995,8 @@ imageformats_dep = declare_dependency( *** tinyendian (dyaml dependency) :tinyendian: **** wrap -#+BEGIN_SRC sh :tangle ../subprojects/tinyendian.wrap +#+HEADER: :tangle ../subprojects/tinyendian.wrap +#+BEGIN_SRC sh [wrap-git] directory = tinyendian url = https://github.com/dlang-community/tinyendian.git @@ -1985,7 +2007,8 @@ revision = head Upstream provides meson.build -#+BEGIN_SRC sh :NO-tangle ../subprojects/tinyendian/meson.build +#+HEADER: :NO-tangle ../subprojects/tinyendian/meson.build +#+BEGIN_SRC sh # -*- mode: python; -*- project( @@ -2037,7 +2060,8 @@ tinyendian_dep = declare_dependency( ** envrc :envrc: *** .envrc -#+BEGIN_SRC nix :tangle ../.envrc +#+HEADER: :tangle ../.envrc +#+BEGIN_SRC sh NIX_ENFORCE_PURITY=0 if [ -e .envrc-local ]; then # source an additional user-specific .envrc in ./.envrc-local source .envrc-local @@ -2046,7 +2070,8 @@ fi - lorri? -#+BEGIN_SRC nix :NO-tangle ../.envrc +#+HEADER: :NO-tangle ../.envrc +#+BEGIN_SRC sh if type lorri &>/dev/null; then echo "direnv: using lorri from PATH ($(type -p lorri))" eval "$(lorri direnv)" @@ -2061,7 +2086,8 @@ fi - enable flakes -#+BEGIN_SRC nix :NO-tangle ../.envrc +#+HEADER: :NO-tangle ../.envrc +#+BEGIN_SRC sh if [ -f flake.lock ] && [ -f flake.nix ]; then # reload when these files change watch_file flake.nix @@ -2095,7 +2121,8 @@ fi - bespoke modify appropriately and generate if needed -#+BEGIN_SRC nix :tangle ../.envrc-local_ +#+HEADER: :tangle ../.envrc-local_ +#+BEGIN_SRC sh export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos #export NIX_PATH=nixpkgs=<> ## reload when these files change @@ -2288,7 +2315,8 @@ nix develop nix flake update -#+BEGIN_SRC nix :tangle ../flake.nix +#+HEADER: :tangle ../flake.nix +#+BEGIN_SRC nix { description = "a sisu like document parser"; inputs = { @@ -2354,7 +2382,8 @@ nix flake update } #+END_SRC -#+BEGIN_SRC nix :NO-tangle ../flake.nix +#+HEADER: :NO-tangle ../flake.nix +#+BEGIN_SRC nix { description = "a sisu like document parser"; inputs = { @@ -2419,7 +2448,10 @@ nix flake update nix build -f default.nix ./result/bin/spine -#+BEGIN_SRC nix :tangle ../shell.nix :tangle-mode (identity #o755) :-shebang "#!/usr/bin/env -S nix-shell" +#+HEADER: :tangle ../shell.nix +#+HEADER: :tangle-mode (identity #o755) +#+HEADER: :shebang "#!/usr/bin/env -S nix-shell --pure" +#+BEGIN_SRC nix { pkgs ? import {} }: pkgs.mkShell { buildInputs = with pkgs; [ @@ -2445,7 +2477,10 @@ pkgs.mkShell { } #+END_SRC -#+BEGIN_SRC nix :NO-tangle ../shell.nix :tangle-mode (identity #o755) :-shebang "#!/usr/bin/env -S nix-shell" +#+HEADER: :NO-tangle ../shell.nix +#+HEADER: :tangle-mode (identity #o755) +#+HEADER: :shebang "#!/usr/bin/env -S nix-shell" +#+BEGIN_SRC nix { pkgs ? import {} }: pkgs.mkShell { buildInputs = with pkgs; [ @@ -2481,7 +2516,10 @@ pkgs.mkShell { nix build -f project.nix nix build -f spine.nix -#+BEGIN_SRC nix :tangle ../default.nix :tangle-mode (identity #o755) :shebang "#!/usr/bin/env -S nix-build" +#+HEADER: :tangle ../default.nix +#+HEADER: :tangle-mode (identity #o755) +#+HEADER: :shebang "#!/usr/bin/env -S nix-build" +#+BEGIN_SRC nix { pkgs ? import {}, stdenv ? pkgs.stdenv, lib ? pkgs.lib, @@ -2613,7 +2651,8 @@ meta = with pkgs.lib; { ** dub.selections.json -#+BEGIN_SRC nix :NO-tangle ../dub.selections.json +#+HEADER: :NO-tangle ../dub.selections.json +#+BEGIN_SRC nix { "fileVersion": 1, "versions": { @@ -2627,7 +2666,8 @@ meta = with pkgs.lib; { ** dub.selections.nix -#+BEGIN_SRC nix :NO-tangle ../nix/dub.selections.nix +#+HEADER: :NO-tangle ../nix/dub.selections.nix +#+BEGIN_SRC nix # This file was generated by https://github.com/lionello/dub2nix v0.2.3 [ { fetch = { @@ -2790,7 +2830,10 @@ babel tangle) org files in ./org/ to create .d source files in ./src/doc_reform/ (similar functionality is contained within the "makefile" created by this "dr_build_scaffold.org" file make tangle) -#+BEGIN_SRC sh :tangle ../tangle :tangle-mode (identity #o755) :shebang "#!/bin/sh" +#+HEADER: :tangle ../tangle +#+HEADER: :tangle-mode (identity #o755) +#+HEADER: :shebang "#!/bin/sh" +#+BEGIN_SRC sh # -*- mode: shell-script -*- # tangle files with org-mode DIR=`pwd` @@ -3158,7 +3201,8 @@ toc *** dub (using ldc rather than dmd) overlay REFERENCE :overlay: -#+BEGIN_SRC nix :NO-tangle ~/nixpkgs/pkgs/development/tools/build-managers/dub/default.nix +#+HEADER: :NO-tangle ~/nixpkgs/pkgs/development/tools/build-managers/dub/default.nix +#+BEGIN_SRC nix { lib, stdenv, fetchFromGitHub, curl, libevent, rsync, ldc, dcompiler ? ldc }: assert dcompiler != null; diff --git a/org/spine_info.org b/org/spine_info.org index 9f6956a..0729e60 100644 --- a/org/spine_info.org +++ b/org/spine_info.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes [[./spine.org][spine.org]] [[../org/][org/]] [[./spine_build_scaffold.org][spine_build_scaffold.org]] @@ -21,7 +22,8 @@ * README :readme: ** tangle -#+BEGIN_SRC text :tangle "../README.md" +#+HEADER: :tangle "../README.md" +#+BEGIN_SRC text <> <> <> @@ -394,7 +396,8 @@ cgi-bin directory * +README+ -#+BEGIN_SRC txt :NO-tangle "../README" +#+HEADER: :NO-tangle "../README" +#+BEGIN_SRC txt project_name: Spine, Doc Reform description: [ "documents, structuring, processing, publishing", @@ -421,7 +424,8 @@ project_name: Spine, Doc Reform * manpage :manpage: ** tangle -#+BEGIN_SRC man :tangle "../doc/man/man1/spine.1" +#+HEADER: :tangle "../doc/man/man1/spine.1" +#+BEGIN_SRC man <> <> <> @@ -4544,7 +4548,8 @@ matches are found. ** notices *** project (project root) ./ -#+BEGIN_SRC txt :tangle "../COPYRIGHT" +#+HEADER: :tangle "../COPYRIGHT" +#+BEGIN_SRC txt <> <> <> @@ -4554,7 +4559,8 @@ matches are found. *** code source ./src -#+BEGIN_SRC txt :tangle "../src/COPYRIGHT" +#+HEADER: :tangle "../src/COPYRIGHT" +#+BEGIN_SRC txt <> <> <> @@ -4564,7 +4570,8 @@ matches are found. *** code source ./src/doc_reform -#+BEGIN_SRC txt :tangle "../src/doc_reform/COPYRIGHT" +#+HEADER: :tangle "../src/doc_reform/COPYRIGHT" +#+BEGIN_SRC txt <> <> <> @@ -4580,7 +4587,8 @@ matches are found. - license - dependency information -#+BEGIN_SRC txt :tangle "./COPYRIGHT" +#+HEADER: :tangle "./COPYRIGHT" +#+BEGIN_SRC txt <> <> <> @@ -4588,7 +4596,8 @@ matches are found. *** doc (markup samples) ./doc -#+BEGIN_SRC txt :NO-tangle "../doc/COPYRIGHT" +#+HEADER: :NO-tangle "../doc/COPYRIGHT" +#+BEGIN_SRC txt <> #+END_SRC diff --git a/org/spine_markup_sample.org b/org/spine_markup_sample.org index 81a510a..92b057f 100644 --- a/org/spine_markup_sample.org +++ b/org/spine_markup_sample.org @@ -14,13 +14,15 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes This is not how I would recommend preparing a markup document for spine. It is after all a text file with its own markup. However, as an experiment in developing on org-mode I prepare the document here. Its output is to be found in ../data/pod/sisu-spine-markup * spine markup sample ** pod.manifest -#+BEGIN_SRC text :tangle ../data/pod/sisu-spine-markup/pod.manifest +#+HEADER: :tangle ../data/pod/sisu-spine-markup/pod.manifest +#+BEGIN_SRC text doc: filename: sisu-spine-markup.sst language: en @@ -28,13 +30,15 @@ doc: ** conf/sisu_document_make -#+BEGIN_SRC text :tangle ../data/pod/sisu-spine-markup/conf/sisu_document_make +#+HEADER: :tangle ../data/pod/sisu-spine-markup/conf/sisu_document_make +#+BEGIN_SRC text #+END_SRC ** substantive document *** tangle -#+BEGIN_SRC text :tangle ../data/pod/sisu-spine-markup/media/text/en/sisu-spine-markup.sst +#+HEADER: :tangle ../data/pod/sisu-spine-markup/media/text/en/sisu-spine-markup.sst +#+BEGIN_SRC text <> <> <> diff --git a/org/util_cgi_d_sqlite_search.org b/org/util_cgi_d_sqlite_search.org index 4b667dd..9ce40e3 100644 --- a/org/util_cgi_d_sqlite_search.org +++ b/org/util_cgi_d_sqlite_search.org @@ -14,6 +14,7 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes [[./spine.org][spine.org]] [[../org/][org/]] [[./spine_build_scaffold.org][make/build]] @@ -25,7 +26,8 @@ dub --force --compiler=ldc2 && sudo cp -v cgi-bin/spine-search /usr/lib/cgi-bin/ ** set program tangle -#+BEGIN_SRC d :tangle "../misc/util/d/cgi/search/src/spine_cgi_sqlite_search.d" +#+HEADER: :tangle "../misc/util/d/cgi/search/src/spine_cgi_sqlite_search.d" +#+BEGIN_SRC d <> <> void cgi_function_intro(Cgi cgi) { @@ -1210,7 +1212,8 @@ LIMIT %s OFFSET %s * cgi-search dub.sdl -#+BEGIN_SRC d :tangle "../misc/util/d/cgi/search/dub.sdl" +#+HEADER: :tangle "../misc/util/d/cgi/search/dub.sdl" +#+BEGIN_SRC d name "spine_search" description "A minimal D application." authors "ralph" @@ -1242,7 +1245,8 @@ configuration "default" { * cgi-search README -#+BEGIN_SRC text :tangle "../misc/util/d/cgi/search/README" +#+HEADER: :tangle "../misc/util/d/cgi/search/README" +#+BEGIN_SRC text change db name to match name of db you create cv.db_selected = "spine.search.sql.db"; diff --git a/org/util_cgi_rb_fcgi_sqlite_search.org b/org/util_cgi_rb_fcgi_sqlite_search.org index 60baaa0..4bfdf5f 100644 --- a/org/util_cgi_rb_fcgi_sqlite_search.org +++ b/org/util_cgi_rb_fcgi_sqlite_search.org @@ -14,6 +14,8 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes + - [[./spine.org][spine]] [[./][org/]] - [[./output_hub.org][output_hub]] @@ -32,7 +34,10 @@ document home currently at /var/www/html (better placed at /var/www or srv/proje *** sqlite cgi search TODO **** head -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" :tangle-mode (identity #o755) :shebang #!/usr/bin/env ruby +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle-mode (identity #o755) +#+HEADER: :shebang #!/usr/bin/env ruby +#+BEGIN_SRC ruby =begin * Name: SiSU information Structuring Universe * Author: Ralph Amissah @@ -90,7 +95,8 @@ document home currently at /var/www/html (better placed at /var/www or srv/proje **** initialize -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby begin require 'cgi' require 'fcgi' @@ -116,7 +122,8 @@ end **** form ***** initialize form -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby class Form def initialize(base,search_field,selected_db,result_type,checked_sql_limit,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can='') search_note = '' if checked_searched !~ /\S/ @@ -132,7 +139,8 @@ class Form ***** submission form -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby def submission_form search_form =<<-WOK @@ -217,7 +225,8 @@ end **** search request ***** initialize request -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby class SearchRequest #% search_for attr_accessor :text1,:fulltext,:keywords,:title,:author,:topic_register,:subject,:description,:publisher,:editor,:contributor,:date,:type,:format,:identifier,:source,:language,:relation,:coverage,:rights,:comment,:abstract,:owner,:date_created,:date_issued,:date_modified,:date_available,:date_valid,:src_filename_base def initialize(search_field='',q='') @@ -292,7 +301,8 @@ class SearchRequest #% sea ***** text to match -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby def text_to_match(identifier='') m={ string: /#{identifier}\s*(.+?)/, @@ -317,7 +327,8 @@ end **** search string -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby class DBI_SearchString def initialize(l,t,q,cse=false) @l,@t,@q=l,t,q @@ -345,7 +356,8 @@ end **** search statement ***** init -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby class DBI_SearchStatement attr_reader :text_search_flag,:sql_select_body_format,:sql_offset,:sql_limit def initialize(conn,search_for,q,c) @@ -452,7 +464,8 @@ class DBI_SearchStatement ***** misc -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby def sql_offset @@offset end @@ -539,7 +552,8 @@ class DBI_SearchStatement ***** select statement -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby def sql_select_body limit ||= @@limit offset ||= @@offset @@ -564,7 +578,8 @@ end **** tail -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby def tail <<-'WOK'


@@ -668,7 +683,8 @@ end **** fcgi each ***** init & start loop -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby @tail=tail @counter_txt_doc,@counter_txt_ocn,@counter_endn_doc,@counter_endn_ocn=0,0,0,0 @counters_txt,@counters_endn,@sql_select_body='','','' @@ -743,7 +759,8 @@ FCGI.each_cgi do |cgi| ***** canned search -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby #Canned_search.new(@base,@search_for.text1,cgi) if @search_for.text1=~/\S+/ or @search_for.fulltext=~/\S+/ or @search_for.author=~/\S+/ or @search_for.topic_register=~/\S+/ #and search_field =~/\S/ s1 = 's1=' + CGI.escape(@search_for.text1) if @search_for.text1 =~ /\S/ @@ -844,7 +861,8 @@ FCGI.each_cgi do |cgi| ***** submission form -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby @header = Form.new(@base,search_field,selected_db,result_type,checked_sql_limit,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can).submission_form #% form unless q['s1'] =~/\S/ or q['au'] =~/\S/ or @search[:text][1] =~/\S/ print "Content-type: text/html\n\n" @@ -939,7 +957,8 @@ FCGI.each_cgi do |cgi| ***** contents each, text body -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby #% text_objects_body s_contents.each do |c| #% text body location=c['src_filename_base'][/(.+?)\.(?:ssm\.sst|sst)$/,1] @@ -1035,7 +1054,8 @@ FCGI.each_cgi do |cgi| ***** after -#+BEGIN_SRC ruby :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+HEADER: :tangle "../misc/util/rb/cgi/spine.search.cgi" +#+BEGIN_SRC ruby olduid = "" offset=dbi_statement.sql_offset.to_s limit=dbi_statement.sql_match_limit.to_s diff --git a/org/util_spine_markup_conversion_from_sisu.org b/org/util_spine_markup_conversion_from_sisu.org index d4a0600..d6f51c6 100644 --- a/org/util_spine_markup_conversion_from_sisu.org +++ b/org/util_spine_markup_conversion_from_sisu.org @@ -14,18 +14,23 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes * Markup conversion tools ** README -#+BEGIN_SRC text :tangle "../misc/util/d/tools/markup_conversion/README" +#+HEADER: :tangle "../misc/util/d/tools/markup_conversion/README" +#+BEGIN_SRC text #+END_SRC ** endnotes, inline from binary *** tangle -#+BEGIN_SRC d :tangle "../misc/util/d/tools/markup_conversion/endnotes_inline_from_binary.d" :tangle-mode (identity #o755) :shebang #!/usr/bin/env rdmd +#+HEADER: :tangle "../misc/util/d/tools/markup_conversion/endnotes_inline_from_binary.d" +#+HEADER: :tangle-mode (identity #o755) +#+HEADER: :shebang #!/usr/bin/env rdmd +#+BEGIN_SRC d <> <> void main(string[] args) { @@ -202,7 +207,10 @@ if (endnotes.length == endnote_ref_count) { ** conversion from sisu (sisu bespoke headers) any binary to inline notes TODO *** tangle -#+BEGIN_SRC d :tangle "../misc/util/d/tools/markup_conversion/markup_conversion_from_sisu_ruby_to_sisu_spine.d" :tangle-mode (identity #o755) :shebang #!/usr/bin/env rdmd +#+HEADER: :tangle "../misc/util/d/tools/markup_conversion/markup_conversion_from_sisu_ruby_to_sisu_spine.d" +#+HEADER: :tangle-mode (identity #o755) +#+HEADER: :shebang #!/usr/bin/env rdmd +#+BEGIN_SRC d <> <> void main(string[] args) { @@ -660,7 +668,10 @@ foreach (paragraph; paragraphs) { ** conversion from sisu and multiple headers (sisu bespoke, sdlang, toml) incomplete *** tangle -#+BEGIN_SRC d :tangle "../misc/util/d/tools/markup_conversion/markup_changes_header_and_content.d" :tangle-mode (identity #o755) :shebang #!/usr/bin/env rdmd +#+HEADER: :tangle "../misc/util/d/tools/markup_conversion/markup_changes_header_and_content.d" +#+HEADER: :tangle-mode (identity #o755) +#+HEADER: :shebang #!/usr/bin/env rdmd +#+BEGIN_SRC d <> <> void main(string[] args) { diff --git a/org/util_spine_syntax_highlighting_emacs.org b/org/util_spine_syntax_highlighting_emacs.org index 05adeaa..11741b3 100644 --- a/org/util_spine_syntax_highlighting_emacs.org +++ b/org/util_spine_syntax_highlighting_emacs.org @@ -14,12 +14,14 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes * Emacs Syntax highlighting ** README -#+BEGIN_SRC elisp :tangle "../misc/editor-syntax-etc/emacs/README" +#+HEADER: :tangle "../misc/editor-syntax-etc/emacs/README" +#+BEGIN_SRC elisp ; put this into your .emacs file, then use the mode file: (load-file "~/emacs/el/sisu-spine-mode.el") @@ -28,7 +30,8 @@ ** autoload sisuspine-mode-autoloads.el -#+BEGIN_SRC elisp :tangle "../misc/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el" +#+HEADER: :tangle "../misc/editor-syntax-etc/emacs/sisu-spine-mode-autoloads.el" +#+BEGIN_SRC elisp (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) (autoload 'sisu-spine-mode "sisu-spine-mode" "\ Major mode for editing SiSU (spine) markup files. @@ -43,7 +46,8 @@ and search. ** mode sisu-spine-mode.el -#+BEGIN_SRC elisp :tangle "../misc/editor-syntax-etc/emacs/sisu-spine-mode.el" +#+HEADER: :tangle "../misc/editor-syntax-etc/emacs/sisu-spine-mode.el" +#+BEGIN_SRC elisp ;;; sisu-spine-mode.el --- Major mode for SiSU (spine parser) markup text ;; Copyright (C) 2011, 2021 Free Software Foundation, Inc. diff --git a/org/util_spine_syntax_highlighting_vim.org b/org/util_spine_syntax_highlighting_vim.org index 2888ee3..1925f73 100644 --- a/org/util_spine_syntax_highlighting_vim.org +++ b/org/util_spine_syntax_highlighting_vim.org @@ -14,11 +14,13 @@ #+PROPERTY: header-args+ :results no #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no +#+PROPERTY: header-args+ :mkdirp yes * Vim Syntax highlighting ** filetype -#+BEGIN_SRC text :tangle "../misc/editor-syntax-etc/vim/filetype.vim" +#+HEADER: :tangle "../misc/editor-syntax-etc/vim/filetype.vim" +#+BEGIN_SRC text " SiSU filetype file if exists("did_load_filetypes") finish @@ -31,7 +33,8 @@ augroup END ** debian vim addon manager -#+BEGIN_SRC text :tangle "../misc/editor-syntax-etc/vim/vim-sisu.yaml" +#+HEADER: :tangle "../misc/editor-syntax-etc/vim/vim-sisu.yaml" +#+BEGIN_SRC text #vim-addons: debian vim-addon-manager addon: sisu description: SiSU documents - structuring, publishing in multiple formats and search @@ -44,7 +47,8 @@ files: ** color files *** def.vim -#+BEGIN_SRC text :tangle "../misc/editor-syntax-etc/vim/colors/def.vim" +#+HEADER: :tangle "../misc/editor-syntax-etc/vim/colors/def.vim" +#+BEGIN_SRC text " Vim color file " Name: def " Maintainer: Ralph Amissah @@ -272,7 +276,8 @@ endif *** slate.vim -#+BEGIN_SRC text :tangle "../misc/editor-syntax-etc/vim/colors/slate.vim" +#+HEADER: :tangle "../misc/editor-syntax-etc/vim/colors/slate.vim" +#+BEGIN_SRC text "%% SiSU Vim color file " Name: Slate " Maintainer: Ralph Amissah @@ -352,7 +357,8 @@ endif *** def-sisu.vim -#+BEGIN_SRC text :tangle "../misc/editor-syntax-etc/vim/colors/def-sisu.vim" +#+HEADER: :tangle "../misc/editor-syntax-etc/vim/colors/def-sisu.vim" +#+BEGIN_SRC text " Vim color file " Name: def-sisu " Maintainer: Ralph Amissah @@ -580,7 +586,8 @@ endif *** frugal-cterm.vim -#+BEGIN_SRC text :tangle "../misc/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim" +#+HEADER: :tangle "../misc/editor-syntax-etc/vim/colors/frugal-cterm-sisu.vim" +#+BEGIN_SRC text " Vim color file " Name: frugal-cterm-sisu " Maintainer: Ralph Amissah @@ -651,7 +658,8 @@ endif ** ftplugin sisu.vim -#+BEGIN_SRC text :tangle "../misc/editor-syntax-etc/vim/ftplugin/sisu.vim" +#+HEADER: :tangle "../misc/editor-syntax-etc/vim/ftplugin/sisu.vim" +#+BEGIN_SRC text "%% SiSU Vim ftplugin " SiSU Maintainer: Ralph Amissah " SiSU Markup: SiSU (sisu-3.3) 2012-08-18 @@ -881,7 +889,8 @@ endif ** templates *** sst.tpl -#+BEGIN_SRC text :tangle "../misc/editor-syntax-etc/vim/templates/sst.tpl" +#+HEADER: :tangle "../misc/editor-syntax-etc/vim/templates/sst.tpl" +#+BEGIN_SRC text # SiSU 8.0 title: @@ -916,7 +925,8 @@ make: *** ssm.tpl -#+BEGIN_SRC text :tangle "../misc/editor-syntax-etc/vim/templates/ssm.tpl" +#+HEADER: :tangle "../misc/editor-syntax-etc/vim/templates/ssm.tpl" +#+BEGIN_SRC text # SiSU 8.0 master title: @@ -951,7 +961,8 @@ make: *** ssm.tpl -#+BEGIN_SRC text :tangle "../misc/editor-syntax-etc/vim/templates/ssi.tpl" +#+HEADER: :tangle "../misc/editor-syntax-etc/vim/templates/ssi.tpl" +#+BEGIN_SRC text # SiSU 8.0 insert title: -- cgit v1.2.3