From 6825a6865c9aa7f235a3825b0e08f3834745ed86 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 14 Nov 2019 21:23:31 -0500 Subject: 0.9.0 spine (doc-reform renamed) --- COPYRIGHT | 8 +- README | 2 +- dub.sdl | 30 +- makefile | 164 +- meson.build | 10 +- org/COPYRIGHT | 6 +- org/compile_time_info.org | 18 +- org/default_misc.org | 16 +- org/default_paths.org | 12 +- org/default_regex.org | 18 +- org/default_shared.org | 12 +- org/doc_reform.org | 2012 ------------------------ org/dr_build_scaffold.org | 1397 ---------------- org/dr_info.org | 159 -- org/imports.org | 6 +- org/meta_abstraction.org | 14 +- org/meta_conf_make_meta.org | 20 +- org/meta_debugs.org | 12 +- org/output_harvest_metadata.org | 20 +- org/output_hub.org | 22 +- org/output_latex.org | 10 +- org/output_odt.org | 7 +- org/output_show.org | 16 +- org/output_sqlite.org | 11 +- org/output_src_pod.org | 10 +- org/output_xmls.org | 16 +- org/output_xmls_css.org | 12 +- org/output_zip.org | 10 +- org/source_files_read.org | 18 +- org/spine.org | 2012 ++++++++++++++++++++++++ org/spine_build_scaffold.org | 1397 ++++++++++++++++ org/spine_info.org | 159 ++ src/COPYRIGHT | 8 +- src/doc_reform/COPYRIGHT | 8 +- src/doc_reform/doc_reform.d | 955 ----------- src/doc_reform/meta/conf_make_meta_structs.d | 8 +- src/doc_reform/meta/metadoc_harvests_authors.d | 2 +- src/doc_reform/meta/metadoc_harvests_topics.d | 2 +- src/doc_reform/output/hub.d | 8 +- src/doc_reform/output/xmls.d | 2 +- src/doc_reform/spine.d | 955 +++++++++++ views/version.txt | 2 +- 42 files changed, 4792 insertions(+), 4794 deletions(-) delete mode 100644 org/doc_reform.org delete mode 100644 org/dr_build_scaffold.org delete mode 100644 org/dr_info.org create mode 100644 org/spine.org create mode 100644 org/spine_build_scaffold.org create mode 100644 org/spine_info.org delete mode 100755 src/doc_reform/doc_reform.d create mode 100755 src/doc_reform/spine.d diff --git a/COPYRIGHT b/COPYRIGHT index 0a50313..7003a8b 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,4 +1,4 @@ -- Name: Doc Reform +- Name: Spine, Doc Reform - Description: documents, structuring, processing, publishing, search - static content generator @@ -10,7 +10,7 @@ - code under src/ - License: AGPL 3 or later: - Doc Reform (SiSU), a framework for document structuring, publishing and + Spine, Doc Reform (SiSU), a framework for document structuring, publishing and search Copyright (C) Ralph Amissah @@ -33,7 +33,7 @@ [http://www.fsf.org/licensing/licenses/agpl.html] [http://www.gnu.org/licenses/agpl.html] - - Doc Reform (related to SiSU) uses standard: + - Spine, Doc Reform (related to SiSU) uses standard: - docReform markup syntax - standard SiSU markup syntax with modified headers and minor modifications @@ -48,6 +48,6 @@ [http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary] [http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/html.rb;hb=HEAD] -- Doc Reform markup samples +- Spine, Doc Reform (SiSU) markup samples Individual document content Copyright (Author) [as stated in document header] Individual document content License (Author) [as stated in document header] diff --git a/README b/README index 5a059d8..7ad4024 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -project_name: Doc Reform +project_name: Spine, Doc Reform description: [ "documents, structuring, processing, publishing", search, diff --git a/dub.sdl b/dub.sdl index b6da885..92a2730 100644 --- a/dub.sdl +++ b/dub.sdl @@ -1,4 +1,4 @@ -name "doc-reform" +name "spine" description "sisu document parser" homepage "http://sisudoc.org" authors "Ralph Amissah" @@ -16,12 +16,12 @@ dependency "imageformats" version="~>7.0.1" # https://code.dlan dependency "dyaml" version="~>0.8.0" dependency "tinyendian" version="~>0.2.0" // for dyaml configuration "default" { - targetName "doc-reform" - postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'doc-reform'" + targetName "spine" + postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'spine'" } configuration "dmd" { - targetName "doc-reform-dmd" - postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'doc-reform-dmd'" + targetName "spine-dmd" + postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'spine-dmd'" } buildType "dmd" { dflags "-J=views" "-I=src/doc_reform" @@ -35,12 +35,12 @@ buildType "dmd-release" { configuration "dmd-version" { dflags "-J=views" "-I=src/doc_reform" buildOptions "verbose" "releaseMode" "optimize" "inline" - targetName "doc-reform-dmd-ver" - postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'doc-reform-dmd-ver'" + targetName "spine-dmd-ver" + postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'spine-dmd-ver'" } configuration "ldc" { - targetName "doc-reform-ldc" - postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'doc-reform-ldc'" + targetName "spine-ldc" + postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'spine-ldc'" } buildType "ldc" { dflags "-O2" "-J=views" "-I=src/doc_reform" @@ -54,12 +54,12 @@ buildType "ldc-release" { configuration "ldc-version" { dflags "-O2" "-J=views" "-I=src/doc_reform" buildOptions "verbose" "optimize" "inline" "releaseMode" - targetName "doc-reform-ldc-ver" - postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'doc-reform-ldc-ver'" + targetName "spine-ldc-ver" + postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'spine-ldc-ver'" } configuration "gdc" { - targetName "doc-reform-gdc" - postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'doc-reform-gdc'" + targetName "spine-gdc" + postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'spine-gdc'" } buildType "gdc" { dflags "-O2" "-J=views" "-I=src/doc_reform" @@ -76,6 +76,6 @@ configuration "gdc-version" { dflags "-O2" "-J=views" "-I=src/doc_reform" lflags "-lz" buildOptions "verbose" "optimize" "inline" "releaseMode" - targetName "doc-reform-gdc-ver" - postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'doc-reform-gdc-ver'" + targetName "spine-gdc-ver" + postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'spine-gdc-ver'" } diff --git a/makefile b/makefile index 8070643..0afd26d 100644 --- a/makefile +++ b/makefile @@ -2,7 +2,7 @@ PROG_VER_GIT :=$(shell echo `git describe --long --tags | sed -e "s/^[ a-z_-]\+\ PROG_VER_DECLARED :=$(shell echo `cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`) DUB=dub DUB_FLAGS=-v --force --compiler= -PRG_NAME=doc-reform +PRG_NAME=spine PRG_NICKAME=rad PRG_NAME_DIR=$(shell echo `echo $(PRG_NAME) | sed -e "s/-/_/g"`) PRG_SRC=$(PRG_NAME).d @@ -110,48 +110,48 @@ dmd_debug: $(DUB) --compiler=dmd --config=dmd -b debug dmd_ver: $(DUB) --compiler=dmd --config=dmd-version - mv bin/doc-reform-dmd-ver bin-archive/doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd - notify-send -t 0 'D dmd compiled test release executable ready' 'doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd' + mv bin/spine-dmd-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd + notify-send -t 0 'D dmd compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd' dmd_clean_ver: clean tangle dmd_ver dmd_rel: expunge skel tangle - $(DUB) --compiler=dmd --config=doc-reform-release + $(DUB) --compiler=dmd --config=spine-release dmd_rel_tangle: tangle - $(DUB) --compiler=dmd --config=doc-reform-dmd + $(DUB) --compiler=dmd --config=spine-dmd dmd_rel_expunge_tangle: expunge skel tangle dmd_rel_tangle dmd_debug_tangle: tangle - $(DUB) --compiler=dmd --config=doc-reform-dmd-debug + $(DUB) --compiler=dmd --config=spine-dmd-debug gdc: $(DUB) --compiler=gdc --config=gdc -b release gdc_debug: $(DUB) --compiler=gdc --config=gdc -b debug gdc_ver: $(DUB) --compiler=gdc --config=gdc-version - mv bin/doc-reform-gdc-ver bin-archive/doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc - notify-send -t 0 'D gdc compiled test release executable ready' 'doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc' + mv bin/spine-gdc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc + notify-send -t 0 'D gdc compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc' gdc_clean_ver: clean tangle gdc_ver gdc_rel: expunge skel tangle - $(DUB) --compiler=gdc --config=doc-reform-release + $(DUB) --compiler=gdc --config=spine-release gdc_rel_tangle: tangle - $(DUB) --compiler=gdc --config=doc-reform-gdc + $(DUB) --compiler=gdc --config=spine-gdc gdc_rel_expunge_tangle: expunge skel tangle gdc_rel_tangle gdc_debug_tangle: tangle - $(DUB) --compiler=gdc --config=doc-reform-gdc-debug + $(DUB) --compiler=gdc --config=spine-gdc-debug ldc: $(DUB) --compiler=ldc2 --config=ldc -b release ldc_debug: $(DUB) --compiler=ldc2 --config=ldc -b debug ldc_ver: $(DUB) --compiler=ldc2 --config=ldc-version - mv bin/doc-reform-ldc-ver bin-archive/doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc - notify-send -t 0 'D ldc2 compiled test release executable ready' 'doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc' + mv bin/spine-ldc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc + notify-send -t 0 'D ldc2 compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc' ldc_clean_ver: clean tangle ldc_ver ldc_rel: expunge skel tangle - $(DUB) --compiler=ldc2 --config=doc-reform-release + $(DUB) --compiler=ldc2 --config=spine-release ldc_rel_tangle: tangle - $(DUB) --compiler=ldc2 --config=doc-reform-ldc + $(DUB) --compiler=ldc2 --config=spine-ldc ldc_rel_expunge_tangle: expunge skel tangle ldc_rel_tangle ldc_debug_tangle: tangle - $(DUB) --compiler=ldc2 --config=doc-reform-ldc-debug + $(DUB) --compiler=ldc2 --config=spine-ldc-debug reinit: clean skel tangle skel: mkdir -p $(PRG_BINDIR); \ @@ -194,7 +194,7 @@ distclean_and_init: expunge mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR); \ mkdir -p $(PRG_BINDIR); ver: - echo doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT) + echo spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT) clean_tangle_build: clean tangle build tangle_build: tangle build build: $(PRG_SRCDIR)/$(PRG_SRC) @@ -208,279 +208,279 @@ restart: clean tangle find_pods: $(SiSU_MARKUP_SAMPLES_FIND_PODS) dmd_testrun_find: - ./bin/doc-reform-dmd -v --source --html --epub --sqlite-discrete \ + ./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod \ data/pod/sisu-manual dmd_testrun_find_pod_source: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-ldc -v --source --html --epub \ +./bin/spine-ldc -v --source --html --epub \ --output-dir=tmp/program_output_pod dmd_testrun_find_pod_pod: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-dmd -v --pod \ +./bin/spine-dmd -v --pod \ --output-dir=tmp/program_output_pod dmd_testrun_find_pod_html: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-dmd -v --html \ +./bin/spine-dmd -v --html \ --output-dir=tmp/program_output_pod dmd_testrun_find_pod_epub: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-dmd -v --epub \ +./bin/spine-dmd -v --epub \ --output-dir=tmp/program_output_pod dmd_testrun_find_pod_all: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-dmd -v --source --html --epub --sqlite-discrete \ +./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod dmd_testrun_paths_pod_source: - ./bin/doc-reform-dmd -v --source \ + ./bin/spine-dmd -v --source \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) dmd_testrun_paths_pod_pod: - ./bin/doc-reform-dmd -v --pod \ + ./bin/spine-dmd -v --pod \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) dmd_testrun_paths_pod_html: - ./bin/doc-reform-dmd -v --html \ + ./bin/spine-dmd -v --html \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) dmd_testrun_paths_pod_epub: - ./bin/doc-reform-dmd -v --epub \ + ./bin/spine-dmd -v --epub \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) dmd_testrun_paths_pod_all: - ./bin/doc-reform-dmd -v --source --html --epub --sqlite-discrete \ + ./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) gdc_testrun_find: - ./bin/doc-reform-gdc -v --source --html --epub --sqlite-discrete \ + ./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod \ data/pod/sisu-manual gdc_testrun_find_pod_source: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-gdc -v --source \ +./bin/spine-gdc -v --source \ --output-dir=tmp/program_output_pod gdc_testrun_find_pod_pod: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-gdc -v --pod \ +./bin/spine-gdc -v --pod \ --output-dir=tmp/program_output_pod gdc_testrun_find_pod_html: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-gdc -v --html \ +./bin/spine-gdc -v --html \ --output-dir=tmp/program_output_pod gdc_testrun_find_pod_epub: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-gdc -v --epub \ +./bin/spine-gdc -v --epub \ --output-dir=tmp/program_output_pod gdc_testrun_find_pod_all: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-gdc -v --source --html --epub --sqlite-discrete \ +./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod gdc_testrun_paths: - ./bin/doc-reform-gdc -v --source --html --epub --sqlite-discrete \ + ./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod \ data/pod/sisu-manual gdc_testrun_paths_pod_source: - ./bin/doc-reform-gdc -v --source \ + ./bin/spine-gdc -v --source \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) gdc_testrun_paths_pod_pod: - ./bin/doc-reform-gdc -v --pod \ + ./bin/spine-gdc -v --pod \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) gdc_testrun_paths_pod_html: - ./bin/doc-reform-gdc -v --html \ + ./bin/spine-gdc -v --html \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) gdc_testrun_paths_pod_epub: - ./bin/doc-reform-gdc -v --epub \ + ./bin/spine-gdc -v --epub \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) gdc_testrun_paths_pod_all: - ./bin/doc-reform-gdc -v --source --html --epub --sqlite-discrete \ + ./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) ldc_testrun_find: - ./bin/doc-reform-ldc -v --source --html --epub --sqlite-discrete \ + ./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod \ data/pod/sisu-manual ldc_testrun_find_pod_source: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/doc-reform-ldc -v --source \ + ./bin/spine-ldc -v --source \ --output-dir=tmp/program_output_pod ldc_testrun_find_pod_pod: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/doc-reform-ldc -v --pod \ + ./bin/spine-ldc -v --pod \ --output-dir=tmp/program_output_pod ldc_testrun_find_pod_html: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/doc-reform-ldc -v --html \ + ./bin/spine-ldc -v --html \ --output-dir=tmp/program_output_pod ldc_testrun_find_pod_epub: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/doc-reform-ldc -v --epub \ + ./bin/spine-ldc -v --epub \ --output-dir=tmp/program_output_pod ldc_testrun_find_pod_all: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/doc-reform-ldc -v --source --html --epub --sqlite-discrete \ + ./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod ldc_testrun_paths: - ./bin/doc-reform-ldc -v --source --html --epub --sqlite-discrete \ + ./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod \ data/pod/sisu-manual ldc_testrun_paths_pod_source: - ./bin/doc-reform-ldc -v --source \ + ./bin/spine-ldc -v --source \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) ldc_testrun_paths_pod_pod: - ./bin/doc-reform-ldc -v --pod \ + ./bin/spine-ldc -v --pod \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) ldc_testrun_paths_pod_html: - ./bin/doc-reform-ldc -v --html \ + ./bin/spine-ldc -v --html \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) ldc_testrun_paths_pod_epub: - ./bin/doc-reform-ldc -v --epub \ + ./bin/spine-ldc -v --epub \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) ldc_testrun_paths_pod_all: - ./bin/doc-reform-ldc -v --source --html --epub --sqlite-discrete \ + ./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod \ $(SiSU_MARKUP_SAMPLES_POD) dmd_testrun_find_dir_source: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-dmd -v --source \ +./bin/spine-dmd -v --source \ --output-dir=tmp/program_output_dir dmd_testrun_find_dir_pod: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-dmd -v --pod \ +./bin/spine-dmd -v --pod \ --output-dir=tmp/program_output_dir dmd_testrun_find_dir_html: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-dmd -v --html \ +./bin/spine-dmd -v --html \ --output-dir=tmp/program_output_dir dmd_testrun_find_dir_epub: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-dmd -v --epub \ +./bin/spine-dmd -v --epub \ --output-dir=tmp/program_output_dir dmd_testrun_find_dir_all: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-dmd -v --source --html --epub --sqlite-discrete \ +./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_dir dmd_testrun_filelist_dir_source: - ./bin/doc-reform-dmd -v --source \ + ./bin/spine-dmd -v --source \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) dmd_testrun_filelist_dir_pod: - ./bin/doc-reform-dmd -v --pod \ + ./bin/spine-dmd -v --pod \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) dmd_testrun_filelist_dir_html: - ./bin/doc-reform-dmd -v --html \ + ./bin/spine-dmd -v --html \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) dmd_testrun_filelist_dir_epub: - ./bin/doc-reform-dmd -v --epub \ + ./bin/spine-dmd -v --epub \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) dmd_testrun_filelist_dir_all: - ./bin/doc-reform-dmd -v --source --html --epub --sqlite-discrete \ + ./bin/spine-dmd -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) gdc_testrun_find_dir_source: - ./bin/doc-reform-gdc -v --source \ + ./bin/spine-gdc -v --source \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) gdc_testrun_find_dir_pod: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-gdc -v --pod \ +./bin/spine-gdc -v --pod \ --output-dir=tmp/program_output_dir gdc_testrun_find_dir_html: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-gdc -v --html \ +./bin/spine-gdc -v --html \ --output-dir=tmp/program_output_dir gdc_testrun_find_dir_epub: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-gdc -v --epub \ +./bin/spine-gdc -v --epub \ --output-dir=tmp/program_output_dir gdc_testrun_find_dir_all: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-gdc -v --source --html --epub --sqlite-discrete \ +./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_dir gdc_testrun_filelist_dir_source: - ./bin/doc-reform-gdc -v --source \ + ./bin/spine-gdc -v --source \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) gdc_testrun_filelist_dir_pod: - ./bin/doc-reform-gdc -v --pod \ + ./bin/spine-gdc -v --pod \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) gdc_testrun_filelist_dir_html: - ./bin/doc-reform-gdc -v --html \ + ./bin/spine-gdc -v --html \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) gdc_testrun_filelist_dir_epub: - ./bin/doc-reform-gdc -v --epub \ + ./bin/spine-gdc -v --epub \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) gdc_testrun_filelist_dir_all: - ./bin/doc-reform-gdc -v --source --html --epub --sqlite-discrete \ + ./bin/spine-gdc -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) ldc_testrun_find_dir_source: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-ldc -v --source \ +./bin/spine-ldc -v --source \ --output-dir=tmp/program_output_dir ldc_testrun_find_dir_pod: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-ldc -v --pod \ +./bin/spine-ldc -v --pod \ --output-dir=tmp/program_output_dir ldc_testrun_find_dir_html: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-ldc -v --html \ +./bin/spine-ldc -v --html \ --output-dir=tmp/program_output_dir ldc_testrun_find_dir_epub: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-ldc -v --epub \ +./bin/spine-ldc -v --epub \ --output-dir=tmp/program_output_dir ldc_testrun_find_dir_all: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-ldc -v --source --html --epub --sqlite-discrete \ +./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_dir ldc_testrun_filelist_dir_source: - ./bin/doc-reform-ldc -v --source \ + ./bin/spine-ldc -v --source \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) ldc_testrun_filelist_dir_pod: - ./bin/doc-reform-ldc -v --pod \ + ./bin/spine-ldc -v --pod \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) ldc_testrun_filelist_dir_html: - ./bin/doc-reform-ldc -v --html \ + ./bin/spine-ldc -v --html \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) ldc_testrun_filelist_dir_epub: - ./bin/doc-reform-ldc -v --epub \ + ./bin/spine-ldc -v --epub \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) ldc_testrun_filelist_dir_all: - ./bin/doc-reform-ldc -v --source --html --epub --sqlite-discrete \ + ./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) diff --git a/meson.build b/meson.build index c2a3859..97ad4cb 100644 --- a/meson.build +++ b/meson.build @@ -1,10 +1,10 @@ -project('doc-reform', 'd', +project('spine', 'd', license: 'AGPL3', version: '0.26.5', meson_version: '>=0.46' ) -doc_reform_sources = [ - 'src/doc_reform/doc_reform.d', +spine_sources = [ + 'src/doc_reform/spine.d', 'src/doc_reform/conf/compile_time_info.d', 'src/doc_reform/meta/conf_make_meta_json.d', 'src/doc_reform/meta/conf_make_meta_structs.d', @@ -46,8 +46,8 @@ sources_dir = include_directories('src/') dep_d2sqlite3 = dependency('d2sqlite3', version: '>= 0.16.2', fallback: ['d2sqlite3', 'd2sqlite3_dep']) dep_imageformats = dependency('imageformats-d', version: '>= 7.0.0', fallback: ['imageformats-d', 'imageformats_dep']) # executable -doc_reform_exe = executable('rad', - [doc_reform_sources], +spine_exe = executable('rad', + [spine_sources], include_directories : [sources_dir], d_import_dirs: [include_directories('views')], dependencies : [ diff --git a/org/COPYRIGHT b/org/COPYRIGHT index 3bd2d7c..2010396 100644 --- a/org/COPYRIGHT +++ b/org/COPYRIGHT @@ -1,4 +1,4 @@ -- Name: Doc Reform +- Name: Spine, Doc Reform - Description: documents, structuring, processing, publishing, search - static content generator @@ -7,7 +7,7 @@ - Copyright: (C) 2015 - 2019 Ralph Amissah - - Doc Reform (related to SiSU) uses standard: + - Spine, Doc Reform (related to SiSU) uses standard: - docReform markup syntax - standard SiSU markup syntax with modified headers and minor modifications @@ -22,6 +22,6 @@ [http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary] [http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/html.rb;hb=HEAD] -- Doc Reform markup samples +- Spine, Doc Reform (SiSU) markup samples Individual document content Copyright (Author) [as stated in document header] Individual document content License (Author) [as stated in document header] diff --git a/org/compile_time_info.org b/org/compile_time_info.org index 5567f43..8590b39 100644 --- a/org/compile_time_info.org +++ b/org/compile_time_info.org @@ -1,7 +1,7 @@ -*- mode: org -*- -#+TITLE: doc_reform compile time info +#+TITLE: spine (doc_reform) compile time info #+DESCRIPTION: documents - structuring, publishing in multiple formats & search -#+FILETAGS: :doc_reform:compile: +#+FILETAGS: :spine:compile: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] #+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah @@ -13,17 +13,17 @@ #+PROPERTY: header-args :padline no :exports code :cache no :noweb yes #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport -#+TAGS: assert(a) class(c) debug(d) mixin(m) doc_reform(s) tangle(T) template(t) WEB(W) noexport(n) +#+TAGS: assert(a) class(c) debug(d) mixin(m) spine(s) tangle(T) template(t) WEB(W) noexport(n) -[[./doc_reform.org][doc_reform]] [[./][org/]] +[[./spine.org][spine]] [[./][org/]] * compilation info [[../maker.org][maker.org makefile]] -[[./doc_reform.org][doc_reform hub]] [[./][org/]] +[[./spine.org][spine hub]] [[./][org/]] e.g. do on linux bsd osx not windows: version(Windows) {} else { ... } -** 0. module template :module:compile_time_info: +** _module template_ :module:compile_time_info: #+begin_src d :tangle "../src/doc_reform/conf/compile_time_info.d" /++ @@ -31,7 +31,7 @@ version(Windows) {} else { ... } +/ module doc_reform.conf.compile_time_info; template CompileTimeInfo() { - <> + <> } #+end_src @@ -40,7 +40,7 @@ OS type shows during compilation *** set os flags -#+name: doc_reform_compile_time_info +#+name: spine_compile_time_info #+BEGIN_SRC d version(Windows) { pragma(msg, "[ Windows compilation ]"); @@ -98,7 +98,7 @@ static if(sysWindows) { ** 64 bit compilation? -#+name: doc_reform_compile_time_info +#+name: spine_compile_time_info #+BEGIN_SRC d version(D_LP64) { enum bits = "64 bit"; diff --git a/org/default_misc.org b/org/default_misc.org index 1c68a8d..3e09d16 100644 --- a/org/default_misc.org +++ b/org/default_misc.org @@ -1,7 +1,7 @@ -*- mode: org -*- -#+TITLE: doc_reform defaults misc +#+TITLE: spine (doc_reform) defaults misc #+DESCRIPTION: documents - structuring, publishing in multiple formats & search -#+FILETAGS: :doc_reform:default:misc: +#+FILETAGS: :spine:default:misc: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] #+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah @@ -13,11 +13,11 @@ #+PROPERTY: header-args :padline no :exports code :cache no :noweb yes #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport -#+TAGS: assert(a) class(c) debug(d) mixin(m) doc_reform(s) tangle(T) template(t) WEB(W) noexport(n) +#+TAGS: assert(a) class(c) debug(d) mixin(m) spine(s) tangle(T) template(t) WEB(W) noexport(n) -[[./doc_reform.org][doc_reform]] [[./][org/]] -* 0. meta defaults :module:meta: -** 0. module template +[[./spine.org][spine]] [[./][org/]] +* meta defaults :module:meta: +** _module template_ #+name: tangle_defaults #+BEGIN_SRC d :tangle "../src/doc_reform/meta/defaults.d" @@ -212,7 +212,7 @@ template DocReformBiblio() { #+END_SRC * 1. output defaults :module:output: -** 0. module template +** _module template_ #+name: tangle_defaults #+BEGIN_SRC d :tangle "../src/doc_reform/output/defaults.d" @@ -307,7 +307,7 @@ template InternalMarkup() { } #+END_SRC -*** template language codes +*** template: language codes #+name: defaults_template_language_codes #+BEGIN_SRC d diff --git a/org/default_paths.org b/org/default_paths.org index ed47cac..08adb45 100644 --- a/org/default_paths.org +++ b/org/default_paths.org @@ -1,7 +1,7 @@ -*- mode: org -*- -#+TITLE: doc_reform default paths +#+TITLE: spine (doc_reform) default paths #+DESCRIPTION: documents - structuring, publishing in multiple formats & search -#+FILETAGS: :doc_reform:paths: +#+FILETAGS: :spine:paths: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] #+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah @@ -13,11 +13,11 @@ #+PROPERTY: header-args :padline no :exports code :cache no :noweb yes #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport -#+TAGS: assert(a) class(c) debug(d) mixin(m) doc_reform(s) tangle(T) template(t) WEB(W) noexport(n) +#+TAGS: assert(a) class(c) debug(d) mixin(m) spine(s) tangle(T) template(t) WEB(W) noexport(n) -[[./doc_reform.org][doc_reform]] [[./][org/]] +[[./spine.org][spine]] [[./][org/]] * 0. source paths -** 0. module template :module:paths_source: +** _module template_ :module:paths_source: #+BEGIN_SRC d :tangle "../src/doc_reform/source/paths_source.d" /++ @@ -959,7 +959,7 @@ template DocReformPathsPods() { #+END_SRC * 1. output paths -** 0. module template :module:paths_output: +** _module template_ :module:paths_output: #+BEGIN_SRC d :tangle "../src/doc_reform/output/paths_output.d" /++ diff --git a/org/default_regex.org b/org/default_regex.org index e14748f..2a13dbb 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -1,7 +1,7 @@ -*- mode: org -*- -#+TITLE: doc_reform regex defaults +#+TITLE: spine (doc_reform) regex defaults #+DESCRIPTION: documents - structuring, publishing in multiple formats & search -#+FILETAGS: :doc_reform:regex: +#+FILETAGS: :spine:regex: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] #+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah @@ -13,11 +13,11 @@ #+PROPERTY: header-args :padline no :exports code :cache no :noweb yes #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport -#+TAGS: assert(a) class(c) debug(d) mixin(m) doc_reform(s) tangle(T) template(t) WEB(W) noexport(n) +#+TAGS: assert(a) class(c) debug(d) mixin(m) spine(s) tangle(T) template(t) WEB(W) noexport(n) -[[./doc_reform.org][doc_reform]] [[./][org/]] -* 0. meta ctRegex -[[./doc_reform.org][doc_reform]] [[./][org/]] +[[./spine.org][spine]] [[./][org/]] +* meta ctRegex +[[./spine.org][spine]] [[./][org/]] http://dlang.org/phobos/std_regex.html - Plain string, in which case it's compiled to bytecode before matching. - Regex!char (wchar/dchar) that contains a pattern in the form of compiled bytecode. @@ -29,7 +29,7 @@ http://dlang.org/phobos/std_regex.html 【】〖〗┥┝┤├¤░┘┙┚┼┿╂┊┏┚┆■☼ #+END_SRC -** 0. module template :module: +** _module template_ :module: #+name: tangle_meta_rgx #+BEGIN_SRC d :tangle "../src/doc_reform/meta/rgx.d" @@ -356,13 +356,13 @@ auto language_code_and_filename = #+END_SRC * 1. output ctRegex -[[./doc_reform.org][doc_reform]] [[./][org/]] +[[./spine.org][spine]] [[./][org/]] http://dlang.org/phobos/std_regex.html - Plain string, in which case it's compiled to bytecode before matching. - Regex!char (wchar/dchar) that contains a pattern in the form of compiled bytecode. - StaticRegex!char (wchar/dchar) that contains a pattern in the form of compiled native machine code. -** 0. module template :module:output: +** _module template_ :module:output: #+name: tangle_meta_rgx #+BEGIN_SRC d :tangle "../src/doc_reform/output/rgx.d" diff --git a/org/default_shared.org b/org/default_shared.org index b181fac..067b7b5 100644 --- a/org/default_shared.org +++ b/org/default_shared.org @@ -1,7 +1,7 @@ -*- mode: org -*- -#+TITLE: doc_reform shared +#+TITLE: spine (doc_reform) shared #+DESCRIPTION: documents - structuring, publishing in multiple formats & search -#+FILETAGS: :doc_reform:default:shared: +#+FILETAGS: :spine:default:shared: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] #+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah @@ -13,11 +13,11 @@ #+PROPERTY: header-args :padline no :exports code :cache no :noweb yes #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport -#+TAGS: assert(a) class(c) debug(d) mixin(m) doc_reform(s) tangle(T) template(t) WEB(W) noexport(n) +#+TAGS: assert(a) class(c) debug(d) mixin(m) spine(s) tangle(T) template(t) WEB(W) noexport(n) -[[./doc_reform.org][doc_reform]] [[./][org/]] -* 0. shared -** 0. module template :module:shared: +[[./spine.org][spine]] [[./][org/]] +* shared +** _module template_ :module:shared: #+BEGIN_SRC d :tangle "../src/doc_reform/share/defaults.d" /++ diff --git a/org/doc_reform.org b/org/doc_reform.org deleted file mode 100644 index 0b98147..0000000 --- a/org/doc_reform.org +++ /dev/null @@ -1,2012 +0,0 @@ --*- mode: org -*- -#+TITLE: doc_reform hub -#+DESCRIPTION: documents - structuring, various output representations & search -#+FILETAGS: :doc_reform:hub: -#+AUTHOR: Ralph Amissah -#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah -#+LANGUAGE: en -#+STARTUP: indent content hideblocks hidestars -#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t -#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc -#+OPTIONS: author:nil email:nil creator:nil timestamp:nil -#+PROPERTY: header-args :results silent :padline no :exports code :cache no :noweb yes -#+EXPORT_SELECT_TAGS: export -#+EXPORT_EXCLUDE_TAGS: noexport -#+TAGS: assert(a) class(c) debug(d) mixin(m) doc_reform(s) tangle(T) template(t) WEB(W) noexport(n) - -[[../maker.org][maker.org makefile]] [[./][org/]] - -* 0. version.txt (set version) :version: -** set program version -- set program version - -#+BEGIN_SRC d :tangle "../views/version.txt" -/+ obt - org generated file +/ -struct Version { - int major; - int minor; - int patch; -} -enum _ver = Version(0, 8, 3); -#+END_SRC - -** compilation restrictions (supported compilers) -- set compilation restrictions - -http://dlang.org/spec/version.html#predefined-versions - -#+BEGIN_SRC d :tangle "../views/version.txt" -version (Posix) { - version (DigitalMars) { - } else version (LDC) { - } else version (GNU) { - } else { - static assert (0, "Unsupported D compiler"); - } -} else { - static assert (0, "Unsupported D compiler"); -} -#+END_SRC - -* 1. doc_reform (sisu document parser) :doc_reform: -** notes -- deal with imports -- get options - - get command line instructions - - read config instructions -- process files as instructed by options - - read in file - - process file - - output - -** 0. doc_reform src/doc_reform :template: - -- process files (act according to requirements of each type) - - by sourcefilename - - by sourcefiles contents identifier - - by zip filename - -#+BEGIN_SRC d :tangle "../src/doc_reform/doc_reform.d" :shebang #!/usr/bin/env rdmd -<> -module doc_reform.sisu_document_parser; -import - doc_reform.conf.compile_time_info, - doc_reform.meta.metadoc; -<> -import std.algorithm; -import std.parallelism; -<> -<> -string project_name = "DocReform"; -string program_name = "doc-reform"; -/++ -name "doc_reform" -description "A SiSU inspired document parser writen in D." -homepage "http://sisudoc.org" -+/ -void main(string[] args) { - <> - <> - <> - <> - if (_manifests.length > 1 // _manifests[0] initialized dummy element - && _opt_action.abstraction) { - if (_opt_action.parallelise) { // see else - foreach(manifest; parallel(_manifests[1..$])) { - if (!empty(manifest.src.filename)) { - <> - <> - <> - <> - <> - } else { - <> - } - } - } else { // note cannot parallelise sqlite shared db - foreach(manifest; _manifests[1..$]) { - writeln("parallelisation off: actions include sqlite shared db"); - if (!empty(manifest.src.filename)) { - <> - <> - <> - <> - <> - } else { - <> - } - } - } - } - if (hvst.harvests.length > 0) { - if (_opt_action.harvest_topics) { - DocReformMetaDocHarvestsTopics!()(hvst, _make_and_meta_struct, _opt_action); - } - if (_opt_action.harvest_authors) { - DocReformMetaDocHarvestsAuthors!()(hvst.harvests, _make_and_meta_struct, _opt_action); - } - if (!(_opt_action.quiet)) { - import doc_reform.output.paths_output; - auto out_pth = DocReformPathsHTML!()(_make_and_meta_struct.conf.output_path, ""); - if (_opt_action.harvest_authors) { - writeln("- ", out_pth.harvest("authors.html")); - } - if (_opt_action.harvest_topics) { - writeln("- ", out_pth.harvest("topics.html")); - } - } - } -} -#+END_SRC - -*** document header including copyright & license - -#+NAME: doc_header_including_copyright_and_license -#+BEGIN_SRC text -/+ -- Name: Doc Reform - - Description: documents, structuring, processing, publishing, search - - static content generator - - - Author: Ralph Amissah - [ralph.amissah@gmail.com] - - - Copyright: (C) 2015 - 2019 Ralph Amissah, All Rights - Reserved. - - - License: AGPL 3 or later: - - Doc Reform (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 AFERO General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along with - this program. If not, see [http://www.gnu.org/licenses/]. - - If you have Internet connection, the latest version of the AGPL should be - available at these locations: - [http://www.fsf.org/licensing/licenses/agpl.html] - [http://www.gnu.org/licenses/agpl.html] - - - Doc Reform (related to SiSU) uses standard: - - docReform markup syntax - - standard SiSU markup syntax with modified headers and minor modifications - - docReform object numbering - - standard SiSU object citation numbering & system - - - Hompages: - [http://www.doc_reform.org] - [http://www.sisudoc.org] - - - Git - [http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary] - [http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/html.rb;hb=HEAD] - -+/ -#+END_SRC - -** 1. pre-loop init :init: -*** init -**** imports :import: -***** doc_reform :doc_reform: - -#+NAME: imports_doc_reform -#+BEGIN_SRC d -import - std.datetime, - std.getopt, - std.file, - std.path, - std.process; -import - doc_reform.meta, - doc_reform.meta.metadoc_harvest, - doc_reform.meta.metadoc_harvests_authors, - doc_reform.meta.metadoc_harvests_topics, - doc_reform.meta.metadoc_from_src, - doc_reform.meta.conf_make_meta_structs, - doc_reform.meta.conf_make_meta_json, - doc_reform.meta.defaults, - doc_reform.meta.doc_debugs, - doc_reform.meta.rgx, - doc_reform.source.paths_source, - doc_reform.source.read_config_files, - doc_reform.source.read_source_files, - doc_reform.output.hub; -#+END_SRC - -****** notes -├── src -│   ├── doc_reform.d -│   └── doc_reform -│ ├── conf -│ ├── meta -│ └── output -└── views -   └── version.txt - -[[./meta_abstraction.org][meta_abstraction]] -[[./meta_conf_make_meta.org][meta_conf_make_meta]] -[[./meta_defaults.org][meta_defaults]] -[[./meta_output_debugs.org][meta_output_debugs]] -[[./source_read_files.org][source_read_files]] -[[./compile_time_info.org][compile time info]] -[[./output.org][output]] -[[./doc_reform.org][doc_reform]] - -keep up to date, configuration in ../maker.org - -**** mixins :mixin: -***** version.txt :version: - -#+NAME: mixin_doc_reform_version -#+BEGIN_SRC d -mixin(import("version.txt")); -#+END_SRC - -***** pre main mixins - -#+NAME: mixin_pre_main -#+BEGIN_SRC d -mixin CompileTimeInfo; -#+END_SRC - -***** doc_reform "main" mixins :doc_reform: - -#+NAME: doc_reform_mixin -#+BEGIN_SRC d -mixin DocReformRgxInit; -mixin contentJSONtoDocReformStruct; -mixin DocReformBiblio; -mixin DocReformRgxInitFlags; -mixin outputHub; -#+END_SRC - -**** init :init: - -#+NAME: doc_reform_init -#+BEGIN_SRC d -auto hvst = DocReformHarvest!(); -#+END_SRC - -**** args :args: - -#+NAME: doc_reform_init -#+BEGIN_SRC d -string flag_action; -string arg_unrecognized; -enum dAM { abstraction, matters } -static auto rgx = Rgx(); -#+END_SRC - -*** scope (run complete) :scope: - -#+NAME: doc_reform_init -#+BEGIN_SRC d -scope(success) { - writefln( - "~ run complete, ok ~ (%s-%s.%s.%s, %s D:%s, %s %s)", - program_name, - _ver.major, _ver.minor, _ver.patch, - __VENDOR__, __VERSION__, - bits, os, - ); -} -scope(failure) { - debug(checkdoc) { - stderr.writefln( - "run failure", - ); - } -} -#+END_SRC - -*** getopt args for loop :args:getopt: - -**** set getopt options -- set getopt options - -#+NAME: doc_reform_args -#+BEGIN_SRC d -bool[string] opts = [ - "abstraction" : false, - "assertions" : false, - "concordance" : false, - "dark" : false, - "debug" : false, - "digest" : false, - "epub" : false, - "harvest" : false, - "harvest-authors" : false, - "harvest-topics" : false, - "html" : false, - "html-seg" : false, - "html-scroll" : false, - "latex" : false, - "light" : false, - "manifest" : false, - "hide-ocn" : false, - "ocn-off" : false, - "odf" : false, - "odt" : false, - "parallel" : false, - "parallel-subprocesses" : false, - "pdf" : false, - "quiet" : false, - "pod" : false, - "serial" : false, - "show-summary" : false, - "show-metadata" : false, - "show-make" : false, - "show-config" : false, - "source" : false, - "sqlite-discrete" : false, - "sqlite-db-create" : false, - "sqlite-db-drop" : false, - "sqlite-db-recreate" : false, - "sqlite-delete" : false, - "sqlite-insert" : false, - "sqlite-update" : false, - "text" : false, - "verbose" : false, - "very-verbose" : false, - "xhtml" : false, - "section_toc" : true, - "section_body" : true, - "section_endnotes" : true, - "section_glossary" : true, - "section_biblio" : true, - "section_bookindex" : true, - "section_blurb" : true, - "backmatter" : true, - "skip-output" : false, - "theme-dark" : false, - "theme-light" : false, - "workon" : false, -]; -string[string] settings = [ - "config" : "", - "output" : "", - "lang" : "all", - "sqlite-filename" : "documents", -]; -auto helpInfo = getopt(args, - std.getopt.config.passThrough, - "abstraction", "--abstraction document abstraction ", &opts["abstraction"], - "assert", "--assert set optional assertions on", &opts["assertions"], - "concordance", "--concordance file for document", &opts["concordance"], - "dark", "--dark alternative dark theme", &opts["dark"], - "debug", "--debug", &opts["debug"], - "digest", "--digest hash digest for each object", &opts["digest"], - "epub", "--epub process epub output", &opts["epub"], - "harvest", "--harvest extract info on authors & topics from document header metadata", &opts["harvest"], - "harvest-authors", "--harvest-authors extract info on authors from document header metadata", &opts["harvest-authors"], - "harvest-topics", "--harvest-topics extract info on topics from document header metadata", &opts["harvest-topics"], - "html", "--html process html output", &opts["html"], - "html-seg", "--html-seg process html output", &opts["html-seg"], - "html-scroll", "--html-seg process html output", &opts["html-scroll"], - "latex", "--latex output for pdfs", &opts["latex"], - "light", "--light default light theme", &opts["light"], - "manifest", "--manifest process manifest output", &opts["manifest"], - "hide-ocn", "--hide-ocn object cite numbers", &opts["hide-ocn"], - "ocn-off", "--ocn-off object cite numbers", &opts["ocn-off"], - "odf", "--odf open document format text (--odt)", &opts["odf"], - "odt", "--odt open document format text", &opts["odt"], - "parallel", "--parallel parallelisation", &opts["parallel"], - "parallel-subprocesses", "--parallel-subprocesses nested parallelisation", &opts["parallel-subprocesses"], - "quiet|q", "--quiet output to terminal", &opts["quiet"], - "pdf", "--pdf latex output for pdfs", &opts["pdf"], - "pod", "--pod doc reform pod source content bundled", &opts["pod"], - "serial", "--serial serial processing", &opts["serial"], - "show-summary", "--show-summary", &opts["show-summary"], - "show-make", "--show-make", &opts["show-make"], - "show-metadata", "--show-metadata", &opts["show-metadata"], - "show-config", "--show-config", &opts["show-config"], - "source", "--source markup source text content", &opts["source"], - "sqlite-discrete", "--sqlite process discrete sqlite output", &opts["sqlite-discrete"], - "sqlite-db-create", "--sqlite-db-create create db, create tables", &opts["sqlite-db-create"], - "sqlite-db-drop", "--sqlite-db-drop drop tables & db", &opts["sqlite-db-drop"], - "sqlite-db-recreate", "--sqlite-db-recreate create db, create tables", &opts["sqlite-db-recreate"], - "sqlite-delete", "--sqlite-delete process sqlite output", &opts["sqlite-delete"], - "sqlite-insert", "--sqlite-insert process sqlite output", &opts["sqlite-insert"], - "sqlite-update", "--sqlite-update process sqlite output", &opts["sqlite-update"], - "text", "--text process text output", &opts["text"], - "txt", "--txt process text output", &opts["text"], - "verbose|v", "--verbose output to terminal", &opts["verbose"], - "very-verbose", "--very-verbose output to terminal", &opts["very-verbose"], - "xhtml", "--xhtml process xhtml output", &opts["xhtml"], - "section-toc", "--section-toc process table of contents (default)", &opts["section_toc"], - "section-body", "--section-body process document body (default)", &opts["section_body"], - "section-endnotes", "--section-endnotes process document endnotes (default)", &opts["section_endnotes"], - "section-glossary", "--section-glossary process document glossary (default)", &opts["section_glossary"], - "section-biblio", "--section-biblio process document biblio (default)", &opts["section_biblio"], - "section-bookindex", "--section-bookindex process document bookindex (default)", &opts["section_bookindex"], - "section-blurb", "--section-blurb process document blurb (default)", &opts["section_blurb"], - "backmatter", "--section-backmatter process document backmatter (default)", &opts["backmatter"], - "skip-output", "--skip-output", &opts["skip-output"], - "theme-dark", "--theme-dark alternative dark theme", &opts["theme-dark"], - "theme-light", "--theme-light default light theme", &opts["theme-light"], - "workon", "--workon (reserved for some matters under development & testing)", &opts["workon"], - "config", "--config=/path/to/config/file/including/filename", &settings["config"], - "output", "--output=/path/to/output/dir specify where to place output", &settings["output"], - "sqlite-filename", "--sqlite-filename=[filename].sqlite", &settings["sqlite-filename"], - "lang", "--lang=[lang code e.g. =en or =en,es]", &settings["lang"], -); -if (helpInfo.helpWanted) { - defaultGetoptPrinter("Some information about the program.", helpInfo.options); -} -#+END_SRC - -**** getopt hash to struct -- move getopt options to struct - -#+NAME: doc_reform_args -#+BEGIN_SRC d -enum outTask { source_or_pod, sqlite, sqlite_multi, latex, odt, epub, html_scroll, html_seg, html_stuff } -struct OptActions { - bool assertions() { - return opts["assertions"]; - } - bool concordance() { - return opts["concordance"]; - } - auto config_path_set() { - return settings["config"]; - } - bool css_theme_default() { - bool _is_light; - if (opts["light"] || opts["theme-light"]) { - _is_light = true; - } else if (opts["dark"] || opts["theme-dark"]) { - _is_light = false; - } else { - _is_light = true; - } - return _is_light; - } - bool debug_do() { - return opts["debug"]; - } - bool digest() { - return opts["digest"]; - } - bool epub() { - return opts["epub"]; - } - bool harvest() { - return (opts["harvest"] || opts["harvest-authors"] || opts["harvest-topics"]) ? true : false; - } - bool harvest_authors() { - return (opts["harvest"] || opts["harvest-authors"]) ? true : false; - } - bool harvest_topics() { - return (opts["harvest"] || opts["harvest-topics"]) ? true : false; - } - bool html() { - return (opts["html"] || opts["html-seg"] || opts["html-scroll"]) ? true : false; - } - bool html_seg() { - return (opts["html"] || opts["html-seg"]) ? true : false; - } - bool html_scroll() { - return (opts["html"] || opts["html-scroll"]) ? true : false; - } - bool html_stuff() { - return (opts["html"] || opts["html-scroll"] || opts["html-seg"]) ? true : false; - } - bool latex() { - return (opts["latex"] || opts["pdf"]) ? true : false; - } - bool odt() { - return (opts["odf"] || opts["odt"]) ? true : false; - } - bool manifest() { - return opts["manifest"]; - } - bool ocn_hidden() { - return opts["hide-ocn"]; - } - bool ocn_off() { - return opts["ocn-off"]; - } - bool quiet() { - return opts["quiet"]; - } - bool pod() { - return opts["pod"]; - } - bool show_summary() { - return opts["show-summary"]; - } - bool show_make() { - return opts["show-make"]; - } - bool show_metadata() { - return opts["show-metadata"]; - } - bool show_config() { - return opts["show-config"]; - } - bool source() { - return opts["source"]; - } - bool source_or_pod() { - return (opts["pod"] || opts["source"]) ? true : false; - } - bool sqlite_discrete() { - return opts["sqlite-discrete"]; - } - bool sqlite_db_drop() { - return (opts["sqlite-db-recreate"] || opts["sqlite-db-drop"]) ? true : false; - } - bool sqlite_db_create() { - return (opts["sqlite-db-recreate"] || opts["sqlite-db-create"]) ? true : false; - } - bool sqlite_delete() { - return opts["sqlite-delete"]; - } - bool sqlite_update() { - return (opts["sqlite-update"] || opts["sqlite-insert"]) ? true : false; - } - bool sqlite_shared_db_action() { - return ( - opts["sqlite-db-recreate"] - || opts["sqlite-db-create"] - || opts["sqlite-delete"] - || opts["sqlite-insert"] - || opts["sqlite-update"] - ) ? true : false; - } - bool text() { - return opts["text"]; - } - bool verbose() { - return (opts["verbose"] || opts["very-verbose"]) ? true : false; - } - bool very_verbose() { - return opts["very-verbose"]; - } - bool xhtml() { - return opts["xhtml"]; - } - bool section_toc() { - return opts["section_toc"]; - } - bool section_body() { - return opts["section_body"]; - } - bool section_endnotes() { - return opts["section_endnotes"]; - } - bool section_glossary() { - return opts["section_glossary"]; - } - bool section_biblio() { - return opts["section_biblio"]; - } - bool section_bookindex() { - return opts["section_bookindex"]; - } - bool section_blurb() { - return opts["section_blurb"]; - } - bool backmatter() { - return opts["backmatter"]; - } - bool skip_output() { - return opts["skip-output"]; - } - bool workon() { - return opts["workon"]; - } - auto languages_set() { - return settings["lang"].split(","); - } - auto output_dir_set() { - return settings["output"]; - } - auto sqlite_filename() { - return settings["sqlite-filename"]; - } - bool parallelise() { - bool _is; - if (opts["parallel"] == true) { - _is = true; - if (sqlite_shared_db_action) { _is = false; } - } else if (opts["parallel"] == false - && opts["serial"] == true) { - _is = false; - } else if ( - opts["abstraction"] - || concordance - || harvest - || html - || epub - || odt - || latex - || manifest - || source_or_pod - || sqlite_discrete - ) { - _is = true; - } else { _is = false; } - return _is; - } - bool parallelise_subprocesses() { - return opts["parallel-subprocesses"]; - } - auto output_task_scheduler() { - int[] schedule; - if (source_or_pod) { - schedule ~= outTask.source_or_pod; - } - if (sqlite_discrete) { - schedule ~= outTask.sqlite; - } - if (epub) { - schedule ~= outTask.epub; - } - if (html_scroll) { - schedule ~= outTask.html_scroll; - } - if (html_seg) { - schedule ~= outTask.html_seg; - } - if (html_stuff) { - schedule ~= outTask.html_stuff; - } - if (odt) { - schedule ~= outTask.odt; - } - if (latex) { - schedule ~= outTask.latex; - } - return schedule.sort().uniq; - } - bool abstraction() { - return ( - opts["abstraction"] - || concordance - || source_or_pod - || harvest - || html - || epub - || odt - || latex - || manifest - || sqlite_discrete - || sqlite_delete - || sqlite_update - ) ? true : false; - } - bool meta_processing_general() { - return ( - opts["abstraction"] - || html - || epub - || odt - || latex - || sqlite_discrete - || sqlite_update - ) ? true :false; - } - bool meta_processing_xml_dom() { - return ( - opts["abstraction"] - || html - || epub - || odt - || sqlite_discrete - || sqlite_update - ) ? true : false; - } -} -auto _opt_action = OptActions(); -#+END_SRC - -**** env -- environmental info - -#+NAME: doc_reform_args -#+BEGIN_SRC d -auto program_info() { - struct ProgramInfo { - string project() { - return project_name; - } - string name() { - return program_name; - } - string ver() { - string ver_ = format( - "%s.%s.%s", - _ver.major, _ver.minor, _ver.patch, - ); - return ver_; - } - string compiler() { - string ver_ = format( - "%s D:%s, %s %s", - __VENDOR__, __VERSION__, - bits, os, - ); - return ver_; - } - } - return ProgramInfo(); -} -auto _env = [ - "pwd" : environment["PWD"], - "home" : environment["HOME"], -]; -#+END_SRC - -*** opt actions on processing files & file paths (pods, src etc.) - -#+NAME: doc_reform_args -#+BEGIN_SRC d -auto _manifested = PathMatters!()(_opt_action, _env, ""); -auto _manifests = [ _manifested ]; -ConfComposite _make_and_meta_struct; -if (_opt_action.config_path_set.empty) { - foreach(arg; args[1..$]) { - if (!(arg.match(rgx.flag_action))) { /+ cli markup source path +/ // get first input markup source file names for processing - _manifested = PathMatters!()(_opt_action, _env, arg); - { /+ local site config +/ - auto _config_local_site_struct = readConfigSite!()(_manifested, _env); - if (_config_local_site_struct.filetype == "yaml") { - import doc_reform.meta.conf_make_meta_yaml; - _make_and_meta_struct = _config_local_site_struct.configParseYAMLreturnDocReformStruct!()(_make_and_meta_struct, _manifested); // - get local site config - break; - } - } - } - } -} else { - { /+ local site config +/ - auto _config_local_site_struct = readConfigSite!()(_manifested, _env, _opt_action.config_path_set); - if (_config_local_site_struct.filetype == "yaml") { - import doc_reform.meta.conf_make_meta_yaml; - _make_and_meta_struct = _config_local_site_struct.configParseYAMLreturnDocReformStruct!()(_make_and_meta_struct, _manifested); // - get local site config - } - } -} -foreach(arg; args[1..$]) { // refigure how args relate to _opt_action, need path from _opt_action or args early _manifested too late, work on (search for PathMatters and .harvest, - auto _manifest_start = PodManifest!()(arg); - if (arg.match(rgx.flag_action)) { /+ cli instruction, flag do +/ - flag_action ~= " " ~ arg; // flags not taken by getopt - } else { /+ cli, assumed to be path to source files +/ - if ( /+ pod files +/ - !(arg.match(rgx.src_pth_sst_or_ssm)) - && _manifest_start.pod_manifest_file_with_path - && _opt_action.abstraction - ) { - string pod_manifest_root_content_paths_to_markup_location_raw_; - string markup_contents_location_; - string sisudoc_txt_ = _manifest_start.pod_manifest_file_with_path; - enforce( - exists(sisudoc_txt_)!=0, - "file not found: «" ~ - sisudoc_txt_ ~ "»" - ); - if (exists(sisudoc_txt_)) { - try { - if (exists(sisudoc_txt_)) { - import dyaml; - try { - Node pod_manifest_yaml = Loader.fromFile(sisudoc_txt_).load(); - if ("doc" in pod_manifest_yaml) { - if (pod_manifest_yaml["doc"].type.mapping - && pod_manifest_yaml["doc"].tag.match(rgx.yaml_tag_is_map) - ) { - if ("path" in pod_manifest_yaml["doc"]) { - if (pod_manifest_yaml["doc"]["path"].tag.match(rgx.yaml_tag_is_seq)) { - foreach (string _path; pod_manifest_yaml["doc"]["path"]) { - markup_contents_location_ ~= _path ~ "\n"; - pod_manifest_root_content_paths_to_markup_location_raw_ ~= - _path ~ "\n"; - } - } else if ( - pod_manifest_yaml["doc"]["path"].type.string - && pod_manifest_yaml["doc"]["path"].tag.match(rgx.yaml_tag_is_str) - ) { - markup_contents_location_ = pod_manifest_yaml["doc"]["path"].get!string; - pod_manifest_root_content_paths_to_markup_location_raw_ = - pod_manifest_yaml["doc"]["path"].get!string; - } - } - if ("filename" in pod_manifest_yaml["doc"]) { - if (pod_manifest_yaml["doc"]["filename"].tag.match(rgx.yaml_tag_is_seq)) { - foreach (string _filename; pod_manifest_yaml["doc"]["filename"]) { - if ("language" in pod_manifest_yaml["doc"]) { - if (pod_manifest_yaml["doc"]["language"].tag.match(rgx.yaml_tag_is_seq)) { - foreach (string _lang; pod_manifest_yaml["doc"]["language"]) { - markup_contents_location_ ~= - "media/text/" - ~ _lang ~ "/" - ~ _filename ~ "\n"; - } - } else if (pod_manifest_yaml["doc"]["language"].tag.match(rgx.yaml_tag_is_str) - ) { - markup_contents_location_ = - "media/text/" - ~ pod_manifest_yaml["doc"]["language"].get!string - ~ "/" ~ _filename ~ "\n"; - } else { - string _lang_default = "en"; - markup_contents_location_ ~= - "media/text/" - ~ _lang_default ~ "/" - ~ pod_manifest_yaml["doc"]["filename"].get!string ~ "\n"; - } - } else { - string _lang_default = "en"; - markup_contents_location_ ~= - "media/text/" - ~ _lang_default ~ "/" - ~ pod_manifest_yaml["doc"]["filename"].get!string ~ "\n"; - } - } - } else if ( - pod_manifest_yaml["doc"]["filename"].type.string - && pod_manifest_yaml["doc"]["filename"].tag.match(rgx.yaml_tag_is_str) - ) { - if ("language" in pod_manifest_yaml["doc"]) { - if (pod_manifest_yaml["doc"]["language"].tag.match(rgx.yaml_tag_is_seq)) { - foreach (string _lang; pod_manifest_yaml["doc"]["language"]) { - markup_contents_location_ ~= - "media/text/" - ~ _lang ~ "/" - ~ pod_manifest_yaml["doc"]["filename"].get!string ~ "\n"; - } - } else if (pod_manifest_yaml["doc"]["language"].tag.match(rgx.yaml_tag_is_str)) { - markup_contents_location_ = - "media/text/" - ~ pod_manifest_yaml["doc"]["language"].get!string - ~ "/" ~ pod_manifest_yaml["doc"]["filename"].get!string ~ "\n"; - } else { - string _lang_default = "en"; - markup_contents_location_ ~= - "media/text/" - ~ _lang_default ~ "/" - ~ pod_manifest_yaml["doc"]["filename"].get!string ~ "\n"; - } - } else { - string _lang_default = "en"; - markup_contents_location_ ~= - "media/text/" - ~ _lang_default ~ "/" - ~ pod_manifest_yaml["doc"]["filename"].get!string ~ "\n"; - } - } - } - } - } - - } catch (ErrnoException ex) { - } - } - } catch (ErrnoException ex) { - } catch (FileException ex) { - // Handle errors - } - } else { - writeln("manifest not found: ", sisudoc_txt_); - } - auto markup_contents_locations_arr - = (cast(char[]) markup_contents_location_).split; - auto tmp_dir_ = (sisudoc_txt_).dirName.array; - foreach (markup_contents_location; markup_contents_locations_arr) { - assert(markup_contents_location.match(rgx.src_pth_sst_or_ssm), - "not a recognised file: «" ~ - markup_contents_location ~ "»" - ); - auto markup_contents_location_pth_ = (markup_contents_location).to!string; - Regex!(char) lang_rgx_ = regex(r"/(" ~ _opt_action.languages_set.join("|") ~ ")/"); - if (_opt_action.languages_set[0] == "all" - || (markup_contents_location_pth_).match(lang_rgx_) - ) { - auto _fns = (((tmp_dir_).chainPath(markup_contents_location_pth_)).array).to!string; - _manifested = PathMatters!()(_opt_action, _env, arg, _fns, markup_contents_locations_arr); - _manifests ~= _manifested; - } - } - } else if (arg.match(rgx.src_pth_sst_or_ssm)) { /+ markup txt files +/ - if (exists(arg)==0) { - writeln("ERROR >> Processing Skipped! File not found: ", arg); - } else { - _manifested = PathMatters!()(_opt_action, _env, arg, arg); - _manifests ~= _manifested; - } - } else if (arg.match(rgx.src_pth_zip)) { - // fns_src ~= arg; // gather input markup source file names for processing - } else { // anything remaining, unused - arg_unrecognized ~= " " ~ arg; - } - } -} -#+END_SRC - -*** config files load & read - -#+NAME: doc_reform_conf_files_in_yaml -#+BEGIN_SRC d -{ /+ document config/make file +/ - auto _config_document_struct = readConfigDoc!()(_manifest, _env); - if (_config_document_struct.filetype == "yaml") { - import doc_reform.meta.conf_make_meta_yaml; - _make_and_meta_struct = _config_document_struct.configParseYAMLreturnDocReformStruct!()(_make_and_meta_struct, _manifest); - } -} -#+END_SRC - -*** opt actions independent of processing files (no files no processing loop) - -#+NAME: doc_reform_do_selected -#+BEGIN_SRC d -if (!(_opt_action.skip_output)) { - if ((_opt_action.debug_do) - || (_opt_action.very_verbose) - ) { - writeln("step0 commence → (without processing files)"); - } - outputHubOp!()(_env, _opt_action); - if ((_opt_action.debug_do) - || (_opt_action.very_verbose) - ) { - writeln("- step0 complete"); - } -} -#+END_SRC - -** _2. processing: (loop each file)_ [+2] :loop:files: -*** scope (loop) :scope: - -#+NAME: doc_reform_each_file_do_scope -#+BEGIN_SRC d -scope(success) { - if (!(_opt_action.quiet)) { - writefln( - "%s", - "-- ~ document complete, ok ~ ------------------------------------", - ); - } -} -scope(failure) { - debug(checkdoc) { - stderr.writefln( - "~ document run failure ~ (%s v%s)\n\t%s\n%s", - __VENDOR__, __VERSION__, - manifest.src.filename, - "------------------------------------------------------------------", - ); - } -} -enforce( - manifest.src.filename.match(rgx.src_pth_types), - "not a sisu markup filename: «" ~ - manifest.src.filename ~ "»" -); -#+END_SRC - -*** 1. _document abstraction_ [#A] - -- return tuple of: - - doc_abstraction (the document) - - doc_matters - -#+NAME: doc_reform_each_file_do_abstraction -#+BEGIN_SRC d -if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) -) { - writeln("--->\nstepX commence → (document abstraction)"); -} -auto t = DocReformAbstraction!()(_env, program_info, _opt_action, manifest, _make_and_meta_struct); -static assert(!isTypeTuple!(t)); -static assert(t.length==2); -auto doc_abstraction = t[dAM.abstraction]; -auto doc_matters = t[dAM.matters]; -if ((doc_matters.opt.action.debug_do) -|| (doc_matters.opt.action.very_verbose) -) { - writeln("- stepX complete"); -} -#+END_SRC - -*** 2. _output processing_ (post abstraction processing) -**** 0. abstraction -***** show document summary - abstraction _print summary_ (to screen) :abstraction:summary: ---show-summary (abstraction summary) - -#+NAME: doc_reform_each_file_do_debugs_checkdoc -#+BEGIN_SRC d -/+ ↓ debugs +/ -if (doc_matters.opt.action.verbose - || doc_matters.opt.action.show_summary -) { - import doc_reform.meta.metadoc_show_summary; - DocReformMetaDocSummary!()(doc_abstraction, doc_matters); -} -#+END_SRC - -***** show metadata (doc headers metadata) ---show-metadata - -#+NAME: doc_reform_each_file_do_debugs_checkdoc -#+BEGIN_SRC d -/+ ↓ debugs +/ -if (doc_matters.opt.action.show_metadata -) { - import doc_reform.meta.metadoc_show_metadata; - DocReformShowMetaData!()(doc_matters); -} -#+END_SRC - -***** show make (make files & doc headers) ---show-make - -#+NAME: doc_reform_each_file_do_debugs_checkdoc -#+BEGIN_SRC d -/+ ↓ debugs +/ -if (doc_matters.opt.action.show_make -) { - import doc_reform.meta.metadoc_show_make; - DocReformShowMake!()(doc_matters); -} -#+END_SRC - -***** show config (config files & doc headers) ---show-config - -#+NAME: doc_reform_each_file_do_debugs_checkdoc -#+BEGIN_SRC d -/+ ↓ debugs +/ -if (doc_matters.opt.action.show_config -) { - import doc_reform.meta.metadoc_show_config; - DocReformShowConfig!()(doc_matters); -} -#+END_SRC - -***** abstraction harvest :abstraction:harvest: -- abstraction harvest - -#+NAME: doc_reform_each_file_do_debugs_checkdoc -#+BEGIN_SRC d -if (doc_matters.opt.action.harvest) { - hvst.harvests ~= DocReformMetaDocHarvest!()(doc_matters, hvst); -} -#+END_SRC - -**** 1. _debug_ (document parts, checkdoc) :debug:checkdoc: -- [[./meta_output_debugs.org][meta_output_debugs]] - -#+NAME: doc_reform_each_file_do_debugs_checkdoc -#+BEGIN_SRC d -/+ ↓ debugs +/ -if (doc_matters.opt.action.debug_do) { - DocReformDebugs!()(doc_abstraction, doc_matters); -} -#+END_SRC - -**** 2. _process outputs_ :outputs: -- [[./output_hub.org][output_hub]] - -#+NAME: doc_reform_each_file_do_selected_output -#+BEGIN_SRC d -/+ ↓ output hub +/ -if (!(doc_matters.opt.action.skip_output)) { - if ((_opt_action.debug_do) - || (_opt_action.very_verbose) - ) { - writeln("step5 commence → (process outputs)"); - } - doc_abstraction.outputHub!()(doc_matters); - if ((_opt_action.debug_do) - || (_opt_action.very_verbose) - ) { - writeln("- step5 complete"); - } -} -#+END_SRC - -*** scope (on loop exit) :scope:exit: - -#+NAME: doc_reform_each_file_do_scope_exit -#+BEGIN_SRC d -scope(exit) { - if (!(_opt_action.quiet)) { - writefln( - "processed file: %s [%s]", - manifest.src.filename, - manifest.src.language - ); - } - destroy(manifest); -} -#+END_SRC - -** +2c. no valid filename provided+ -#+NAME: doc_reform_no_filename_provided -#+BEGIN_SRC d -/+ no recognized filename provided +/ -writeln("no recognized filename"); -break; // terminate, stop -#+END_SRC - -* 2. pre-processing -** Output _document abstraction functions_ :module:doc_reform:abstraction: -*** 0 module template -- abstraction template - -#+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc.d" -module doc_reform.meta.metadoc; -template DocReformAbstraction() { - <> - <> - enum headBody { header, body_content, header_type, insert_file_list, image_list } - enum makeMeta { make, meta } - enum docAbst { doc_abstract_obj, doc_has } - static auto rgx = Rgx(); - auto DocReformAbstraction(E,P,O,M,S)( - E _env, - P program_info, - O _opt_action, - M _manifest, - S _make_and_meta_struct - ){ - <> - <> - <> - <> - <> - auto t = tuple(doc_abstraction, doc_matters); - static assert(t.length==2); - return t; - } -} -#+END_SRC - -** Output & Harvest pre-processing -*** 1. raw file content split, doc: _header_, _content_ +(lists: subdocs? images?) -- [[./source_read_files.org][source_read_files]] return tuple: header; body; insert file list; image list - -- read in the _marked up source document_ and - - split the document into: - - document header - - document body - - from markup source - - if master document from sub documents content - - if a master document - - make a list of insert files - - if build source pod requested - - scan for list of images - (action avoided if not needed at this stage) - -- _return a tuple of_: - - header - - body - - insert file list - - image list (if build source pod requested) - -if build source pod requested all information needed to build it available at this point - - manifest related information _manifest - - insert file list _header_body_insertfilelist_imagelist[headBody.insert_file_list] - - image list _header_body_insertfilelist_imagelist[headBody.image_list] - -#+NAME: doc_reform_each_file_do_read_and_split_dr_markup_file_content_into_header_and_body -#+BEGIN_SRC d -/+ ↓ read file (filename with path) +/ -/+ ↓ file tuple of header and content +/ -if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) -) { - writeln("step1 commence → (get document header & body & insert file list & if needed image list)" - ); -} -auto _header_body_insertfilelist_imagelist - = DocReformRawMarkupContent!()(_opt_action, _manifest.src.path_and_fn); -static assert(!isTypeTuple!(_header_body_insertfilelist_imagelist)); -static assert(_header_body_insertfilelist_imagelist.length==5); -if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) -) { - writeln("- step1 complete"); -} -debug(header_and_body) { - writeln(header); - writeln(_header_body_insertfilelist_imagelist.length); - writeln(_header_body_insertfilelist_imagelist.length[headBody.body_content][0]); -} -#+END_SRC - -*** 2. _document metadata_ & _make instructions_ (struct from yaml) -- [[./meta_conf_make_meta.org][meta_conf_make_meta]] return tuple: document metadata; make instructions - -- read _document header_, split into: - - metadata - - make instructions -- read config files - - consolidate make instructions -- _return tuple of_: - - document metadata - - make instructions (from configuration files & document header make - instructions) - -#+NAME: doc_reform_each_file_do_split_dr_markup_file_header_into_make_and_meta_structs -#+BEGIN_SRC d -/+ ↓ split header into make and meta +/ -if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) -) { - writeln("step2 commence → (read document header (yaml) return struct)"); -} -if (_header_body_insertfilelist_imagelist[headBody.header_type] == "yaml") { - import doc_reform.meta.conf_make_meta_yaml; - _make_and_meta_struct = - docHeaderMakeAndMetaTupYamlExtractAndConvertToStruct!()( - _header_body_insertfilelist_imagelist[headBody.header], - _make_and_meta_struct, - _manifest, - ); -} -if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) -) { - writeln("- step2 complete"); -} -#+END_SRC - -*** 3. _document abstraction, tuple_ (output-pre-processing) [#A] -- [[./meta_abstraction.org][meta_abstraction]] return tuple: document abstraction; abstraction keys; segnames; image list - -- prepare the document abstraction used in downstream processing - -- _return tuple of_: - - document abstraction (_the_document_ or doc_abstraction) - - document abstraction keys - - (head, toc, body, endnotes, glossary, bibliography, bookindex, blurb, tail) - - (transfer to _doc_matters_) - - segnames for html epub (transfer to _doc_matters_) - - image list (transfer to _doc_matters_) - -#+NAME: doc_reform_each_file_do_document_abstraction -#+BEGIN_SRC d -/+ ↓ document abstraction: process document, return abstraction as tuple +/ -if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) -) { - writeln("step3 commence → (document abstraction (da); da keys; segnames; doc_matters)"); -} -auto da = DocReformDocAbstraction!()( - _header_body_insertfilelist_imagelist[headBody.body_content], - _make_and_meta_struct, - _opt_action, - _manifest, - true, -); -static assert(!isTypeTuple!(da)); -static assert(da.length==2); -auto doc_abstraction = da[docAbst.doc_abstract_obj]; /+ head ~ toc ~ body ~ endnotes_seg ~ glossary ~ bibliography ~ bookindex ~ blurb; +/ -auto _doc_has_struct = da[docAbst.doc_has]; -if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) -) { - writeln("- step3 complete"); -} -#+END_SRC - -*** 4. _document matters_ (doc info gathered, various sources) [#A] -- gather doc matters - - prepare document_matters, miscellany about processing and the document of - use in downstream processing - -**** verbose message - -#+NAME: doc_reform_each_file_do_document_matters -#+BEGIN_SRC d -if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) -) { - writeln("step4 commence → (doc_matters)"); -} -#+END_SRC - -**** DocumentMatters struct { - -#+NAME: doc_reform_each_file_do_document_matters -#+BEGIN_SRC d -struct DocumentMatters { -#+END_SRC - -**** generator related - -#+NAME: doc_reform_each_file_do_document_matters -#+BEGIN_SRC d - auto generator_program() { - struct Prog_ { - string project_name() { - return "DocReform"; - } - string name() { - return program_info.name; - } - string ver() { - return program_info.ver; - } - string name_and_version() { - return format( - "%s-%s", - name, - ver, - ); - } - string url_home() { - return "http://sisudoc.org"; - } - string url_git() { - return "https://git.sisudoc.org/software/sisu"; - } - auto compiler() { - return program_info.compiler; - } - auto stime() { - return Clock.currTime(UTC()).toSimpleString(); - } - } - return Prog_(); - } - auto generated_time() { - auto _st = Clock.currTime(UTC()); - auto _time = _st.year.to!string - ~ "-" ~ _st.month.to!int.to!string // prefer as month number - ~ "-" ~ _st.day.to!string - ~ " [" ~ _st.isoWeek.to!string ~ "/" ~ _st.dayOfWeek.to!int.to!string ~ "]" - ~ " " ~ _st.hour.to!string - ~ ":" ~ _st.minute.to!string - ~ ":" ~ _st.second.to!string; - return _time; - } -#+END_SRC - -**** config make & meta - -#+NAME: doc_reform_each_file_do_document_matters -#+BEGIN_SRC d - auto conf_make_meta() { - return _make_and_meta_struct; - } - auto has() { - return _doc_has_struct; - } -#+END_SRC - -**** env related - -#+NAME: doc_reform_each_file_do_document_matters -#+BEGIN_SRC d - auto env() { - struct Env_ { - auto pwd() { - return _manifest.env.pwd; - } - auto home() { - return _manifest.env.home; - } - } - return Env_(); - } -#+END_SRC - -**** opt - -#+NAME: doc_reform_each_file_do_document_matters -#+BEGIN_SRC d - auto opt() { - struct Opt_ { - auto action() { - /+ getopt options, commandline instructions, raw - - processing instructions --epub --html etc. - - command line config instructions --output-path - +/ - return _opt_action; - } - } - return Opt_(); - } -#+END_SRC - -**** output related - -#+NAME: doc_reform_each_file_do_document_matters -#+BEGIN_SRC d - auto src() { - return _manifest.src; - } - auto src_path_info() { - return DocReformPathsSRC!()(_manifest.env.pwd, _manifest.src.file_with_absolute_path); // would like (to have and use) relative path - } - auto pod() { - return _manifest.pod; - } - auto sqlite() { - struct SQLite_ { - string filename() { - return _opt_action.sqlite_filename; - } - } - return SQLite_(); - } - auto output_path() { - return _make_and_meta_struct.conf.output_path; - } - auto srcs() { - struct SRC_ { - auto file_insert_list() { - return _header_body_insertfilelist_imagelist[headBody.insert_file_list]; - } - auto image_list() { - return _doc_has_struct.imagelist; - } - } - return SRC_(); - } -#+END_SRC - -**** } close - -#+NAME: doc_reform_each_file_do_document_matters -#+BEGIN_SRC d -} -auto doc_matters = DocumentMatters(); -#+END_SRC - -**** step complete message - -#+NAME: doc_reform_each_file_do_document_matters -#+BEGIN_SRC d -if ((_opt_action.debug_do) -|| (_opt_action.very_verbose) -) { - writeln("- step4 complete"); -} -#+END_SRC - -**** H. abridged doc matters, for harvest (from doc head only, doc abstraction not performed) -- harvest abridged doc matters gathered -***** doc matters shared - -#+NAME: doc_reform_each_file_do_document_matters_abridged -#+BEGIN_SRC d -if ((_opt_action.debug_do) -|| (_opt_action.verbose) -) { - writeln("step4 commence → (doc_matters)"); -} -struct DocumentMattersShared { - auto env() { - struct Env_ { - auto pwd() { - return _manifest.env.pwd; - } - auto home() { - return _manifest.env.home; - } - } - return Env_(); - } - auto opt() { - struct Opt_ { - auto action() { - return _opt_action; - } - } - return Opt_(); - } -} -DocumentMattersShared doc_matters_shared = DocumentMattersShared(); -#+END_SRC - -***** abridged doc matters, for harvest (from doc head only, doc abstraction not performed) TODO - -#+NAME: doc_reform_each_file_do_document_matters_abridged -#+BEGIN_SRC d -struct DocumentMattersAbridged { - auto conf_make_meta() { - return _make_and_meta_struct; - } - auto src() { - return _manifest.src; - } - auto src_path_info() { - return DocReformPathsSRC!()(_manifest.env.pwd, _manifest.src.file_with_absolute_path); - } - auto pod() { - return _manifest.pod; - } - auto sqlite() { - struct SQLite_ { - string filename() { - return _opt_action.sqlite_filename; - } - } - return SQLite_(); - } - auto output_path() { - return _make_and_meta_struct.conf.output_path; - } -} -#+END_SRC - -* __END__ -dev notes - -** the document notes -*** document sections (table) - -|--------------+--------------+------+---+--------------------------------------------------+--------------------------------+---+---| -| section | part | opt. | | objects | ocn | | | -|--------------+--------------+------+---+--------------------------------------------------+--------------------------------+---+---| -| front matter | head | * | | | no | | | -|--------------+--------------+------+---+--------------------------------------------------+--------------------------------+---+---| -| toc | toc | | | generated from headings | no | | | -|--------------+--------------+------+---+--------------------------------------------------+--------------------------------+---+---| -| body | body | * | | default section | yes | | | -| | | | | - headings | | | | -| | | | | - paras | | | | -| | | | | - code | | | | -| | | | | - poem | | | | -| | | | | - group | | | | -| | | | | - block | | | | -| | | | | - quote | | | | -| | | | | - table | | | | -|--------------+--------------+------+---+--------------------------------------------------+--------------------------------+---+---| -| back matter | endnote | | | generated from inline note markup | no (each endnote belongs to | | | -| | | | | | a (body) object) | | | -|--------------+--------------+------+---+--------------------------------------------------+--------------------------------+---+---| -| | glossary | | | identified section, limited markup | possibly, to make searchable | | | -| | | | | - heading | hidden | | | -| | | | | - paras | | | | -|--------------+--------------+------+---+--------------------------------------------------+--------------------------------+---+---| -| | bibliography | | | generated from inline special markup | possibly, to make searchable | | | -| | | | | appended to paragraphs contained in body section | hidden | | | -| | | | | - heading | | | | -| | | | | - paras | | | | -|--------------+--------------+------+---+--------------------------------------------------+--------------------------------+---+---| -| | book index | | | generated from inline special markup | possibly, special numbering or | | | -| | | | | - heading | could use term as anchor? | | | -| | | | | - paras | to make searchable | | | -| | | | | | hidden | | | -|--------------+--------------+------+---+--------------------------------------------------+--------------------------------+---+---| -| | blurb | | | identified section, limited markup | no (unless non-substantive | | | -| | | | | - heading | given special numbering) | | | -| | | | | - paras | | | | -|--------------+--------------+------+---+--------------------------------------------------+--------------------------------+---+---| - -*** document objects (table) -- check, keep up to date - -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| doc object | doc object | attributes | inline | appended | structure | delimiters | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| is_a | is_of_type | | | | | | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| heading | para | - level | - font face | - object number off | - level | - two newlines | -| | | - object number | - endnotes | - book index meta | (document structure) | | -| | | - object number off | | | | | -| | | - dummy (toc & seg) | | | | | -| | | - tags (internal links) | | | | | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| toc | para | - level | - font face | | | - auto generated from headings | -| | | (auto-indent) | - links (auto) | | | | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| para | para | - bullet | - font face | - object number off | | - two newlines | -| | | - indent | - links/urls * | - book index meta | | | -| | | - object number | - images* | | | | -| | | - object number off | - endnotes | | | | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| bookindex | para | - auto indent | - font face | | | - two newlines | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| blurb | para | - bullet | - font face | - object number off | | - two newlines | -| | | - indent | - links/urls * | - book index meta | | | -| | | - object number | - images* | | | | -| | | - object number off | - endnotes | | | | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| group | block | - object number | - font face | - book index meta | - para break | - block tags | -| | | - object number off | - links/urls * | | | (group) | -| | | | - images* | | | | -| | | | - endnotes | | | | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| block | block | - object number | - font face | - book index meta | - new line | - block tags | -| | | - object number off | - links/urls * | | | (block) | -| | | | - images* | | | | -| | | | - endnotes | | | | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| quote | block | - object number | - font face | - book index meta | | - block tags | -| | | | - endnotes | | | (quote) | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| poem (see verse) | block | | | - book index meta | | - block tags | -| | | | | | | (poem) | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| verse (of poem) | | - object number | - font face | | - new line | - (see poem delimiter) | -| | | | - endnotes | | - preceeding spaces | | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| code | block | - syntax | | | - new line | - block tags | -| | | - numbered | | | - preceeding spaces | (code) | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| table | block | - object number | | | | - block tags (table) | -| | | | | | | (table) | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| -| endnote | | | - font face | | | (generated from | -| | | | | | | inline markup tags) | -| | | | | | | - two newlines | -|------------------+------------+-------------------------+----------------+---------------------+----------------------+--------------------------------| - -- consider special treatment for links/urls (& for images?) take them out of - document munge (for various outputs), by storing in own array (within each - object struct), and providing info on where in array to extract them from, - debating whether necessary or even worthwhile as is extra work - -**** check - -|-------+--------------+----------------------------+--------------------------+----------------+-----------------+----------------+------------| -| | | identified by | object notes | attributes | inline | embedded | special | -| | | | | | | appended | characters | -|-------+--------------+----------------------------+--------------------------+----------------+-----------------+----------------+------------| -| para | heading | level markers | | | - italics | - endnotes | | -| | | at start of line | | | | - bibliography | | -|-------+--------------+----------------------------+--------------------------+----------------+-----------------+----------------+------------| -| | paragraph | delimited by two new lines | default object | - indent | - bold | - endnotes | | -| | | | [discard leading & | - bullet | - italics | - bibliography | | -| | | | newline whitespace] | | - underscore | | | -| | | | | | - strikethrough | | | -| | | | | | - superscript | | | -| | | | | | - subscript | | | -|-------+--------------+----------------------------+--------------------------+----------------+-----------------+----------------+------------| -| block | | open and close tags | | | | | | -|-------+--------------+----------------------------+--------------------------+----------------+-----------------+----------------+------------| -| TODO | quote | | | - language? | | | | -|-------+--------------+----------------------------+--------------------------+----------------+-----------------+----------------+------------| -| TODO | group | | - inline markup applied | - language? | as paragraph | - endnotes | | -| | | | - [discard leading & | | | - bibliography | | -| | | | newline whitespace] | | | | | -|-------+--------------+----------------------------+--------------------------+----------------+-----------------+----------------+------------| -| TODO | block | | - inline markup applied | | as paragraph | - endnotes | | -| | | | - whitespace indentation | | | - bibliography | | -| | | | & newlines | | | | | -|-------+--------------+----------------------------+--------------------------+----------------+-----------------+----------------+------------| -| | poem / verse | open and close tags | verse is the object | | | - endnotes | | -| | | | - inline markup applied | | | - bibliography | | -| | | (for poem) | - whitespace indentation | | | | | -| | | | & newlines | | | | | -|-------+--------------+----------------------------+--------------------------+----------------+-----------------+----------------+------------| -| | code | | - contents untouched | - syntax | | | | -| | | | - whitespace indentation | - numbered | | | | -| | | | & newlines | | | | | -|-------+--------------+----------------------------+--------------------------+----------------+-----------------+----------------+------------| -| | table | | | - column width | | | | -| | | | | - heading row | | | | -|-------+--------------+----------------------------+--------------------------+----------------+-----------------+----------------+------------| - -*** on abstraction - -- abstract for downstream processing - - identify document structure and objects - - identify document structure (headings/levels/sections) - - identify objects (headings, paragraphs, tables, code blocks, verse ...) - - set document, generate common abstraction for downstream parsing - - set different _document sections_: - - _head_, toc, _body_, endnotes, glossary, bibliography, book index, blurb - - _object numbers_, heading/ chapter numbering etc, endnote numbers - - _regular ocn_ - - body objects - - glossary objects - - bibliography objects - - _special ocn_ - - non substantive text (provide special numbers) - - blurb objects - - book index - - special (_exceptions_) - - endnotes - - unify object representations - - multiple markups for same object type given single representation - - extract object attributes - - unify inline markup on objects - - inline markup made easier to identify - -- simplify downstream parsing - -*** ocn - -|-------------+-----------------------+-----------------------+----------------+------| -| objects | section / part | ocn described | how used | type | -|-------------+-----------------------+-----------------------+----------------+------| -| regular ocn | | | | | -|-------------+-----------------------+-----------------------+----------------+------| -| | body objects | seq. digit | anchor | ocn | -| | | [0-9]+ | visible | | -|-------------+-----------------------+-----------------------+----------------+------| -| | glossary objects | seq. digit | anchor | ocn | -| | | [0-9]+ | not-visible | | -| | | | (for search) | | -|-------------+-----------------------+-----------------------+----------------+------| -| | bibliography objects | seq. digit | anchor | ocn | -| | | [0-9]+ | not-visible | | -| | | | (for search) | | -|-------------+-----------------------+-----------------------+----------------+------| -| special ocn | | | | | -|-------------+-----------------------+-----------------------+----------------+------| -| | non-substantive text | x char + seq. digit | anchor | non | -| | (within body & blurb) | x[0-9]+ | not-visible | | -| | | | (for search) | | -|-------------+-----------------------+-----------------------+----------------+------| -| | book index | i char + seq. digit | anchor | idx | -| | | i[0-9]+ | not-visible | | -| | | | (for search) | | -|-------------+-----------------------+-----------------------+----------------+------| -| without ocn | | | | | -|-------------+-----------------------+-----------------------+----------------+------| -| | endnotes | ocn of parent object | no ocn | fn | -| | | + footnote seq. digit | anchor visible | | -|-------------+-----------------------+-----------------------+----------------+------| - -** doc_reform glossary / terms - -|------------+-------------------------------------| -| doc_reform | sisu document parser | -|------------+-------------------------------------| -| dmso | document markup, structure, objects | -|------------+-------------------------------------| -| meta | meta document, document abstraction | -| mda | meta, meta document abstraction | -| adr | abstract document representation | -| dar | document abstract representation | -| (da) | (document abstraction) | -| | (code representation of document) | -|------------+-------------------------------------| -| ao | abstract objects | -| | (code representation of objects) | -|------------+-------------------------------------| - -consider -|-------+----------------------------------------------| -| dao | document abstraction, objects | -|-------+----------------------------------------------| -| daso | document abstraction, structure, objects | -|-------+----------------------------------------------| -| drso | document representation, structure, objects | -|-------+----------------------------------------------| -| daows | document abstraction, objects with structure | -|-------+----------------------------------------------| - -** make config - _composite make_ - -work on composite make a unification of make instructions for each document run - -extract instructions from all config files, unify the make instructions and -provide the result as a single set of make instructions for each document parsed - -- 1. general, document_make config file (to be applied to all documents unless - overridden by document or command line instruction) -- 2. local, site specific (site local instructions such as the site's url, cgi - location etc.) -- 3. each document header, make (the document header contains metadata and may - include make instructions for that document) - - make - - meta -- 4. command line instruction, make (some make instructions may be passed - through the command line) - -*** instruction sources - -|----+---------------------------------+----------------------------------------+---------------------+---| -| | make instruction source | | varies (applies to) | | -|----+---------------------------------+----------------------------------------+---------------------+---| -| 0. | unify the following as a single | take into account all the instructions | | | -| | set of make instructions | provided below, provide interface | | | -|----+---------------------------------+----------------------------------------+---------------------+---| -| 1. | document_make file | to be applied to all documents | per directory | | -| | "config_document" | (unless subsequently overridden) | (all docs within) | | -|----+---------------------------------+----------------------------------------+---------------------+---| -| 2. | config file | local site specific | per directory | | -| | "config_local_site" | | (all docs within) | | -|----+---------------------------------+----------------------------------------+---------------------+---| -| 3. | document header make | make instructions contained | per document | | -| | | in document header | (single doc) | | -|----+---------------------------------+----------------------------------------+---------------------+---| -| 4. | command line instruction | make instruction passed | each command | | -| | | | (all docs within) | | -|----+---------------------------------+----------------------------------------+---------------------+---| - -*** config & metadata (from instruction sources) - -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | 1. document make file | 2. config file | 3. document header | 4. command line instruction | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| comment, fixed: | per dir (pod) | per dir | per document (pod) | per command instruction | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | config_document | config_local_site | | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| local site specific | | * | | *? | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | webserv | | | -| | | - url_root | | | -| | | - path | | | -| | | - images | | | -| | | - cgi | | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | webserv_cgi | | | -| | | - host | | | -| | | - base_path | | | -| | | - port | | | -| | | - user | | | -| | | - file_links | | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | processing | | | -| | | - path | | | -| | | - dir | | | -| | | - concord_max | | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | flag (configure) | | (call) | -| | | - act0 | | act0 | -| | | - act1 | | act1 | -| | | - act2 | | act2 | -| | | - act3 | | act3 | -| | | - act4 | | act4 | -| | | - act5 | | act5 | -| | | - act6 | | act6 | -| | | - act7 | | act7 | -| | | - act8 | | act8 | -| | | - act9 | | act9 | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | default | | | -| | | - papersize | | | -| | | - text_wrap | | | -| | | - emphasis | | | -| | | - language | | | -| | | - digest | | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | permission | | | -| | | - share_source | | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | program_select | | | -| | | - editor | | | -| | | - epub_viewer | | | -| | | - html_viewer | | | -| | | - odf_viewer | | | -| | | - pdf_viewer | | | -| | | - xml_viewer | | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | search | | | -| | | - flag | | | -| | | - action | | | -| | | - db | | | -| | | - title | | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| make instruction | ** | omit or override share? | ** | *? | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | make | make | make | | -| | - bold | - bold | - bold | | -| | - breaks | - breaks | - breaks | | -| | - cover_image | - cover_image | - cover_image | | -| | - css | - css | - css | | -| | - emphasis | - emphasis | - emphasis | | -| | - footer | - footer | - footer | | -| | - headings | - headings | - headings | | -| | - home_button_image | - home_button_image | - home_button_image | | -| | - home_button_text | - home_button_text | - home_button_text | | -| | - italics | - italics | - italics | | -| | - num_top | - num_top | - num_top | | -| | - auto_num_depth | - auto_num_depth | - auto_num_depth | | -| | - substitute | - substitute | - substitute | | -| | - texpdf_font | - texpdf_font | - texpdf_font | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| actions | | | | * | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | | | assertions | -| | | | | concordance | -| | | | | debug | -| | | | | digest | -| | | | | docbook | -| | | | | epub | -| | | | | html | -| | | | | html-seg | -| | | | | html-scroll | -| | | | | manifest | -| | | | | ocn | -| | | | | odt | -| | | | | pdf | -| | | | | postgresql | -| | | | | qrcode | -| | | | | pod | -| | | | | source | -| | | | | sqlite | -| | | | | sqlite-db-create | -| | | | | sqlite-db-drop | -| | | | | text | -| | | | | verbose | -| | | | | xhtml | -| | | | | xml-dom | -| | | | | xml-sax | -| | | | | section_toc | -| | | | | section_body | -| | | | | section_endnotes | -| | | | | section_glossary | -| | | | | section_biblio | -| | | | | section_bookindex | -| | | | | section_blurb | -| | | | | backmatter | -| | | | | skip-output | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| metadata | | | * | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | | classify | | -| | | | - dewey | | -| | | | - keywords | | -| | | | - loc | | -| | | | - subject | | -| | | | - topic_register | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | | creator | | -| | | | - author | | -| | | | - author_email | | -| | | | - illustrator | | -| | | | - translator | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | | date | | -| | | | - added_to_site | | -| | | | - available | | -| | | | - created | | -| | | | - issued | | -| | | | - modified | | -| | | | - published | | -| | | | - valid | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | | identifier | | -| | | | - isbn | | -| | | | - oclc | | -| | | | - pg | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | | links | | -| | | | - link | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | | notes | | -| | | | - abstract | | -| | | | - description | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | | original | | -| | | | - language | | -| | | | - source | | -| | | | - title | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | | publisher | | -| | | | - name | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | | rights | | -| | | | - copyright | | -| | | | - cover | | -| | | | - illustrations | | -| | | | - license | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| -| | | | title | | -| | | | - edition | | -| | | | - full | | -| | | | - language | | -| | | | - main | | -| | | | - note | | -| | | | - sub | | -| | | | - subtitle | | -|---------------------+--------------------------+----------------------------+---------------------+-----------------------------| diff --git a/org/dr_build_scaffold.org b/org/dr_build_scaffold.org deleted file mode 100644 index 0b6d901..0000000 --- a/org/dr_build_scaffold.org +++ /dev/null @@ -1,1397 +0,0 @@ --*- mode: org -*- -#+TITLE: doc_reform (project) makefile -#+DESCRIPTION: makefile for doc_reform -#+FILETAGS: :doc_reform:makefile: -#+AUTHOR: Ralph Amissah -#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah -#+LANGUAGE: en -#+STARTUP: indent content -#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t -#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc -#+OPTIONS: author:nil email:nil creator:nil timestamp:nil -#+PROPERTY: header-args :padline no :exports code :noweb yes -#+EXPORT_SELECT_TAGS: export -#+EXPORT_EXCLUDE_TAGS: noexport -#+TAGS: assert(a) class(c) debug(d) mixin(m) doc_reform(s) tangle(T) template(t) WEB(W) noexport(n) - -[[./org/doc_reform.org][doc_reform.org]] [[./org/][org/]] - -* makefile :makefile: -** settings [+2] :settings: -*** git version stamp :git:version: - -#+BEGIN_SRC makefile :tangle ../makefile -PROG_VER_GIT :=$(shell echo `git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`) -PROG_VER_DECLARED :=$(shell echo `cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`) -#+END_SRC - -*** dub (build tool) :dub: - -#+BEGIN_SRC makefile :tangle ../makefile -DUB=dub -DUB_FLAGS=-v --force --compiler= -#+END_SRC - -*** Project Details :project:sdp: - -#+BEGIN_SRC makefile :tangle ../makefile -PRG_NAME=doc-reform -PRG_NICKAME=rad -PRG_NAME_DIR=$(shell echo `echo $(PRG_NAME) | sed -e "s/-/_/g"`) -PRG_SRC=$(PRG_NAME).d -PRG_SRCDIR=./src -PRG_BIN=$(PRG_NAME) -PRG_BINDIR=./bin -PRG_DOCDIR=./docs -#+END_SRC - -*** Emacs Org settings :settings:emacs:org:tangle: - -#+BEGIN_SRC makefile :tangle ../makefile -EMACSLISP=/usr/share/emacs/site-lisp -ORG_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-???????? | cut -d '-' -f2`) -EMACSLISP_ORG=~/.emacs.d/elpa/org-$($(shell echo $(ORG_VER_AVAILABLE))) -ORG_CONTRIB_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-plus-???????? | cut -d '-' -f2`) -EMACSLISP_ORG_CONTRIB=~/.emacs.d/elpa/org-plus-contrib-$($(shell echo $(ORG_CONTRIB_VER_AVAILABLE))) -ORGFILELIST=$(shell echo `ls -1 org/*.org`) -ORGFILES="" -ORGDIR :=$(shell echo `pwd`) -#+END_SRC - -*** Markup Samples -**** pods - -#+BEGIN_SRC makefile :tangle ../makefile -SiSU_MARKUP_SAMPLES_FIND_PODS= \ -find data/pod -maxdepth 2 -name pod.manifest | cut -f 1-3 -d / | sort - -SiSU_MARKUP_SAMPLES_PODS_FOUND= \ -$(SiSU_MARKUP_SAMPLES_FIND_PODS) | xargs - -SiSU_MARKUP_SAMPLES_POD = \ -data/pod/accelerando.charles_stross \ -data/pod/alices_adventures_in_wonderland.lewis_carroll \ -data/pod/content.cory_doctorow \ -data/pod/democratizing_innovation.eric_von_hippel \ -data/pod/down_and_out_in_the_magic_kingdom.cory_doctorow \ -data/pod/for_the_win.cory_doctorow \ -data/pod/free_as_in_freedom_2.richard_stallman_and_the_free_software_revolution.sam_williams.richard_stallman \ -data/pod/free_culture.lawrence_lessig \ -data/pod/free_for_all.peter_wayner \ -data/pod/gpl2.fsf \ -data/pod/gpl3.fsf \ -data/pod/gullivers_travels.jonathan_swift \ -data/pod/little_brother.cory_doctorow \ -data/pod/live-manual \ -data/pod/sisu-manual \ -data/pod/the_autonomous_contract.ralph_amissah \ -data/pod/the_cathedral_and_the_bazaar.eric_s_raymond \ -data/pod/the_public_domain.james_boyle \ -data/pod/the_wealth_of_networks.yochai_benkler \ -data/pod/through_the_looking_glass.lewis_carroll \ -data/pod/two_bits.christopher_kelty \ -data/pod/un_contracts_international_sale_of_goods_convention_1980 \ -data/pod/viral_spiral.david_bollier -#+END_SRC - -**** dir - -#+BEGIN_SRC makefile :tangle ../makefile -SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND = \ -find data/sisudir/media/text -name *.ss[tm] | sort | xargs - -SiSU_MARKUP_SAMPLES_DIR = \ -data/sisudir/media/text/accelerando.charles_stross.sst \ -data/sisudir/media/text/alices_adventures_in_wonderland.lewis_carroll.sst \ -data/sisudir/media/text/content.cory_doctorow.sst \ -data/sisudir/media/text/democratizing_innovation.eric_von_hippel.sst \ -data/sisudir/media/text/down_and_out_in_the_magic_kingdom.cory_doctorow.sst \ -data/sisudir/media/text/ffa_tmp.sst \ -data/sisudir/media/text/for_the_win.cory_doctorow.sst \ -data/sisudir/media/text/free_as_in_freedom_2.richard_stallman_and_the_free_software_revolution.sam_williams.richard_stallman.sst \ -data/sisudir/media/text/free_culture.lawrence_lessig.sst \ -data/sisudir/media/text/free_for_all.peter_wayner.sst \ -data/sisudir/media/text/gpl2.fsf.sst \ -data/sisudir/media/text/gpl3.fsf.sst \ -data/sisudir/media/text/gullivers_travels.jonathan_swift.sst \ -data/sisudir/media/text/little_brother.cory_doctorow.sst \ -data/sisudir/media/text/sisu_markup.sst \ -data/sisudir/media/text/sisu_markup_stress_test.sst \ -data/sisudir/media/text/sisu_markup_test.sst \ -data/sisudir/media/text/table_special_markup.sst \ -data/sisudir/media/text/the_autonomous_contract.ralph_amissah.sst \ -data/sisudir/media/text/the_cathedral_and_the_bazaar.eric_s_raymond.sst \ -data/sisudir/media/text/the_public_domain.james_boyle.sst \ -data/sisudir/media/text/the_wealth_of_networks.yochai_benkler.sst \ -data/sisudir/media/text/through_the_looking_glass.lewis_carroll.sst \ -data/sisudir/media/text/two_bits.christopher_kelty.sst \ -data/sisudir/media/text/un_contracts_international_sale_of_goods_convention_1980.sst \ -data/sisudir/media/text/viral_spiral.david_bollier.sst -#+END_SRC - -** _make_ commands [+2] :make:commands: - -- build commands - - build - - debug - - release -- init, clean, distclean etc. - - init - - clean - - expunge - - distclean - - distclean_and_init -- org babel tangle - - tangle -- git snapshot - - gitsnapshot - -*** build commands [+1] :build:compile: -**** _dub_ build rebuild :dub: -***** all compiler builds :all:dmd:gdc:ldc: -****** all builds -******* default - -#+BEGIN_SRC makefile :tangle ../makefile -default: ldc -#+END_SRC - -******* sample markup file list - -#+BEGIN_SRC makefile :tangle ../makefile -markup_samples: - find data/pod -name pod.manifest | cut -f 1-3 -d / | sort; \ -find data/sisudir/media/text -name *.ss[tm] | sort -#+END_SRC - -#+BEGIN_SRC makefile :tangle ../makefile -markup_pod_samples: - find data/pod -name pod.manifest | cut -f 1-3 -d / | sort -#+END_SRC - -#+BEGIN_SRC makefile :tangle ../makefile -markup_dir_samples: - find data/sisudir/media/text -name *.ss[tm] | sort -#+END_SRC - -******* quick :quick: -******** default :default: - -#+BEGIN_SRC makefile :tangle ../makefile -all: dmd ldc gdc -#+END_SRC - -******** version :version: - -#+BEGIN_SRC makefile :tangle ../makefile -all_ver: dmd_ver ldc_ver gdc_ver -#+END_SRC - -******** debug :debug: - -#+BEGIN_SRC makefile :tangle ../makefile -all_debug: dmd_debug gdc_debug ldc_debug -#+END_SRC - -******** _meson_ build :meson: - -#+BEGIN_SRC makefile :tangle ../makefile -meson: - rm -r build && mkdir build - meson --buildtype=debugoptimized build - ninja -C build -mesonredo: - rm -r build && mkdir build - meson --buildtype=debugoptimized build - ninja -C build -mesonclean: clean skel tangle - meson --buildtype=debugoptimized build - ninja -C build -#+END_SRC - -******* clean & tangle :clean:tangle: -******** default :default: - -#+BEGIN_SRC makefile :tangle ../makefile -all_clean: clean tangle dmd ldc gdc -#+END_SRC - -******** version :version: - -#+BEGIN_SRC makefile :tangle ../makefile -all_ver_clean: clean tangle dmd_ver ldc_ver gdc_ver -#+END_SRC - -******** debug :debug: - -#+BEGIN_SRC makefile :tangle ../makefile -all_debug_ver: dmd_debug_ver gdc_debug_ver ldc_debug_ver -all_debug_clean_ver: clean tangle dmd_debug_ver gdc_debug_ver ldc_debug_ver -#+END_SRC - -***** individual compiler builds :each: -****** dmd :dmd: -******* quick :quick: -******** default :default: - -#+BEGIN_SRC makefile :tangle ../makefile -dmd: - $(DUB) --compiler=dmd --config=dmd -b release -#+END_SRC - -******** debug :debug: - -#+BEGIN_SRC makefile :tangle ../makefile -dmd_debug: - $(DUB) --compiler=dmd --config=dmd -b debug -#+END_SRC - -******** version :version: - -- assumes git tags with program version - -#+BEGIN_SRC makefile :tangle ../makefile -dmd_ver: - $(DUB) --compiler=dmd --config=dmd-version - mv bin/doc-reform-dmd-ver bin-archive/doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd - notify-send -t 0 'D dmd compiled test release executable ready' 'doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd' -dmd_clean_ver: clean tangle dmd_ver -#+END_SRC - -******* clean & tangle :clean:tangle: - -#+BEGIN_SRC makefile :tangle ../makefile -dmd_rel: expunge skel tangle - $(DUB) --compiler=dmd --config=doc-reform-release -dmd_rel_tangle: tangle - $(DUB) --compiler=dmd --config=doc-reform-dmd -dmd_rel_expunge_tangle: expunge skel tangle dmd_rel_tangle -dmd_debug_tangle: tangle - $(DUB) --compiler=dmd --config=doc-reform-dmd-debug -#+END_SRC - -****** gdc :gdc: -******* quick :quick: -******** default :default: - -#+BEGIN_SRC makefile :tangle ../makefile -gdc: - $(DUB) --compiler=gdc --config=gdc -b release -#+END_SRC - -******** debug :debug: - -#+BEGIN_SRC makefile :tangle ../makefile -gdc_debug: - $(DUB) --compiler=gdc --config=gdc -b debug -#+END_SRC - -******** version :version: - -- assumes git tags with program version - -#+BEGIN_SRC makefile :tangle ../makefile -gdc_ver: - $(DUB) --compiler=gdc --config=gdc-version - mv bin/doc-reform-gdc-ver bin-archive/doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc - notify-send -t 0 'D gdc compiled test release executable ready' 'doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc' -gdc_clean_ver: clean tangle gdc_ver -#+END_SRC - -******* clean & tangle :clean:tangle: - -#+BEGIN_SRC makefile :tangle ../makefile -gdc_rel: expunge skel tangle - $(DUB) --compiler=gdc --config=doc-reform-release -gdc_rel_tangle: tangle - $(DUB) --compiler=gdc --config=doc-reform-gdc -gdc_rel_expunge_tangle: expunge skel tangle gdc_rel_tangle -gdc_debug_tangle: tangle - $(DUB) --compiler=gdc --config=doc-reform-gdc-debug -#+END_SRC - -****** ldc :ldc: -******* quick :quick: -******** default :default: - -#+BEGIN_SRC makefile :tangle ../makefile -ldc: - $(DUB) --compiler=ldc2 --config=ldc -b release -#+END_SRC - -******** debug :debug: - -#+BEGIN_SRC makefile :tangle ../makefile -ldc_debug: - $(DUB) --compiler=ldc2 --config=ldc -b debug -#+END_SRC - -******** version :version: - -- assumes git tags with program version - -#+BEGIN_SRC makefile :tangle ../makefile -ldc_ver: - $(DUB) --compiler=ldc2 --config=ldc-version - mv bin/doc-reform-ldc-ver bin-archive/doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc - notify-send -t 0 'D ldc2 compiled test release executable ready' 'doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc' -ldc_clean_ver: clean tangle ldc_ver -#+END_SRC - -******* clean & tangle :clean:tangle: - -#+BEGIN_SRC makefile :tangle ../makefile -ldc_rel: expunge skel tangle - $(DUB) --compiler=ldc2 --config=doc-reform-release -ldc_rel_tangle: tangle - $(DUB) --compiler=ldc2 --config=doc-reform-ldc -ldc_rel_expunge_tangle: expunge skel tangle ldc_rel_tangle -ldc_debug_tangle: tangle - $(DUB) --compiler=ldc2 --config=doc-reform-ldc-debug -#+END_SRC - -***** generic -****** init clean distclean etc. :clean: - -#+BEGIN_SRC makefile :tangle ../makefile -reinit: clean skel tangle -skel: - mkdir -p $(PRG_BINDIR); \ - mkdir -p $(PRG_BINDIR)-archive; \ - mkdir -p build; \ - mkdir -p subprojects; \ - mkdir -p views; \ - mkdir -p data; \ - mkdir -p util; \ - mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR)/conf; \ - mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR)/meta; \ - mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR)/output; \ - mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR)/share; \ - mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR)/source; \ - mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR); \ - mkdir -p $(PRG_BINDIR); -init: skel -clean: - rm -rf build; \ - rm -rf subprojects; \ - rm -rf $(PRG_SRCDIR); \ - rm -rf $(PRG_DOCDIR); -clean_bin: - rm $(PRG_BINDIR)/* -clean_src: - rm -rf $(PRG_SRCDIR); -clean_docs: - rm -rf $(PRG_DOCDIR) -expunge: - rm -f dub.selections.json; \ - rm -rf build; \ - rm -rf subprojects; \ - rm -rf $(PRG_SRCDIR); \ - rm -rf $(PRG_BINDIR); \ - rm -rf $(PRG_DOCDIR); -distclean: expunge -distclean_and_init: expunge - mkdir -p views; \ - mkdir -p util; \ - mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR); \ - mkdir -p $(PRG_BINDIR); -#+END_SRC - -****** version :version: - -#+BEGIN_SRC makefile :tangle ../makefile -ver: - echo doc-reform-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT) -#+END_SRC - -****** tangle build rebuild :clean:tangle:build: - -#+BEGIN_SRC makefile :tangle ../makefile -clean_tangle_build: clean tangle build -tangle_build: tangle build -build: $(PRG_SRCDIR)/$(PRG_SRC) - $(DC) $(DC_FLAGS) \ - $(DC_FLAG_BINOF)$(PRG_BINDIR)/$(PRG_BIN) \ - $(PRG_SRCDIR)/$(PRG_SRC) -rebuild: $(PRG_SRCDIR)/$(PRG_SRC) $(PRG_BINDIR)/$(PRG_BIN).o clean build -makefile_new: - make -k tangle_maker -restart: clean tangle -#+END_SRC - -*** testrun (program against document markup) -**** pods -****** find files - -#+BEGIN_SRC makefile :tangle ../makefile -find_pods: - $(SiSU_MARKUP_SAMPLES_FIND_PODS) -#+END_SRC - -***** dmd -****** find files - -#+BEGIN_SRC makefile :tangle ../makefile -dmd_testrun_find: - ./bin/doc-reform-dmd -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -data/pod/sisu-manual -dmd_testrun_find_pod_source: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-ldc -v --source --html --epub \ ---output-dir=tmp/program_output_pod -dmd_testrun_find_pod_pod: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-dmd -v --pod \ ---output-dir=tmp/program_output_pod -dmd_testrun_find_pod_html: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-dmd -v --html \ ---output-dir=tmp/program_output_pod -dmd_testrun_find_pod_epub: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-dmd -v --epub \ ---output-dir=tmp/program_output_pod -dmd_testrun_find_pod_all: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-dmd -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod -#+END_SRC - -****** path list - -#+BEGIN_SRC makefile :tangle ../makefile -dmd_testrun_paths_pod_source: - ./bin/doc-reform-dmd -v --source \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -dmd_testrun_paths_pod_pod: - ./bin/doc-reform-dmd -v --pod \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -dmd_testrun_paths_pod_html: - ./bin/doc-reform-dmd -v --html \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -dmd_testrun_paths_pod_epub: - ./bin/doc-reform-dmd -v --epub \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -dmd_testrun_paths_pod_all: - ./bin/doc-reform-dmd -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -#+END_SRC - -***** gdc -****** find files - -#+BEGIN_SRC makefile :tangle ../makefile -gdc_testrun_find: - ./bin/doc-reform-gdc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -data/pod/sisu-manual -gdc_testrun_find_pod_source: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-gdc -v --source \ ---output-dir=tmp/program_output_pod -gdc_testrun_find_pod_pod: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-gdc -v --pod \ ---output-dir=tmp/program_output_pod -gdc_testrun_find_pod_html: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-gdc -v --html \ ---output-dir=tmp/program_output_pod -gdc_testrun_find_pod_epub: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-gdc -v --epub \ ---output-dir=tmp/program_output_pod -gdc_testrun_find_pod_all: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ -./bin/doc-reform-gdc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod -#+END_SRC - -****** path list - -#+BEGIN_SRC makefile :tangle ../makefile -gdc_testrun_paths: - ./bin/doc-reform-gdc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -data/pod/sisu-manual -gdc_testrun_paths_pod_source: - ./bin/doc-reform-gdc -v --source \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -gdc_testrun_paths_pod_pod: - ./bin/doc-reform-gdc -v --pod \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -gdc_testrun_paths_pod_html: - ./bin/doc-reform-gdc -v --html \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -gdc_testrun_paths_pod_epub: - ./bin/doc-reform-gdc -v --epub \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -gdc_testrun_paths_pod_all: - ./bin/doc-reform-gdc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -#+END_SRC - -***** ldc -****** find files - -#+BEGIN_SRC makefile :tangle ../makefile -ldc_testrun_find: - ./bin/doc-reform-ldc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -data/pod/sisu-manual -ldc_testrun_find_pod_source: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/doc-reform-ldc -v --source \ ---output-dir=tmp/program_output_pod -ldc_testrun_find_pod_pod: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/doc-reform-ldc -v --pod \ ---output-dir=tmp/program_output_pod -ldc_testrun_find_pod_html: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/doc-reform-ldc -v --html \ ---output-dir=tmp/program_output_pod -ldc_testrun_find_pod_epub: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/doc-reform-ldc -v --epub \ ---output-dir=tmp/program_output_pod -ldc_testrun_find_pod_all: - $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/doc-reform-ldc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod -#+END_SRC - -****** path list - -#+BEGIN_SRC makefile :tangle ../makefile -ldc_testrun_paths: - ./bin/doc-reform-ldc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -data/pod/sisu-manual -ldc_testrun_paths_pod_source: - ./bin/doc-reform-ldc -v --source \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -ldc_testrun_paths_pod_pod: - ./bin/doc-reform-ldc -v --pod \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -ldc_testrun_paths_pod_html: - ./bin/doc-reform-ldc -v --html \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -ldc_testrun_paths_pod_epub: - ./bin/doc-reform-ldc -v --epub \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -ldc_testrun_paths_pod_all: - ./bin/doc-reform-ldc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_pod \ -$(SiSU_MARKUP_SAMPLES_POD) -#+END_SRC - -**** dir -***** dmd -****** find files - -#+BEGIN_SRC makefile :tangle ../makefile -dmd_testrun_find_dir_source: - $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-dmd -v --source \ ---output-dir=tmp/program_output_dir -dmd_testrun_find_dir_pod: - $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-dmd -v --pod \ ---output-dir=tmp/program_output_dir -dmd_testrun_find_dir_html: - $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-dmd -v --html \ ---output-dir=tmp/program_output_dir -dmd_testrun_find_dir_epub: - $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-dmd -v --epub \ ---output-dir=tmp/program_output_dir -dmd_testrun_find_dir_all: - $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-dmd -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_dir -#+END_SRC - -****** file list - -#+BEGIN_SRC makefile :tangle ../makefile -dmd_testrun_filelist_dir_source: - ./bin/doc-reform-dmd -v --source \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -dmd_testrun_filelist_dir_pod: - ./bin/doc-reform-dmd -v --pod \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -dmd_testrun_filelist_dir_html: - ./bin/doc-reform-dmd -v --html \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -dmd_testrun_filelist_dir_epub: - ./bin/doc-reform-dmd -v --epub \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -dmd_testrun_filelist_dir_all: - ./bin/doc-reform-dmd -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -#+END_SRC - -***** gdc -****** find files - -#+BEGIN_SRC makefile :tangle ../makefile -gdc_testrun_find_dir_source: - ./bin/doc-reform-gdc -v --source \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -gdc_testrun_find_dir_pod: - $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-gdc -v --pod \ ---output-dir=tmp/program_output_dir -gdc_testrun_find_dir_html: - $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-gdc -v --html \ ---output-dir=tmp/program_output_dir -gdc_testrun_find_dir_epub: - $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-gdc -v --epub \ ---output-dir=tmp/program_output_dir -gdc_testrun_find_dir_all: - $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-gdc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_dir -#+END_SRC - -****** file list - -#+BEGIN_SRC makefile :tangle ../makefile -gdc_testrun_filelist_dir_source: - ./bin/doc-reform-gdc -v --source \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -gdc_testrun_filelist_dir_pod: - ./bin/doc-reform-gdc -v --pod \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -gdc_testrun_filelist_dir_html: - ./bin/doc-reform-gdc -v --html \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -gdc_testrun_filelist_dir_epub: - ./bin/doc-reform-gdc -v --epub \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -gdc_testrun_filelist_dir_all: - ./bin/doc-reform-gdc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -#+END_SRC - -***** ldc -****** find files - -#+BEGIN_SRC makefile :tangle ../makefile -ldc_testrun_find_dir_source: - $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-ldc -v --source \ ---output-dir=tmp/program_output_dir -ldc_testrun_find_dir_pod: - $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-ldc -v --pod \ ---output-dir=tmp/program_output_dir -ldc_testrun_find_dir_html: - $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-ldc -v --html \ ---output-dir=tmp/program_output_dir -ldc_testrun_find_dir_epub: - $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-ldc -v --epub \ ---output-dir=tmp/program_output_dir -ldc_testrun_find_dir_all: - $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ -./bin/doc-reform-ldc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_dir -#+END_SRC - -****** file list - -#+BEGIN_SRC makefile :tangle ../makefile -ldc_testrun_filelist_dir_source: - ./bin/doc-reform-ldc -v --source \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -ldc_testrun_filelist_dir_pod: - ./bin/doc-reform-ldc -v --pod \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -ldc_testrun_filelist_dir_html: - ./bin/doc-reform-ldc -v --html \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -ldc_testrun_filelist_dir_epub: - ./bin/doc-reform-ldc -v --epub \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -ldc_testrun_filelist_dir_all: - ./bin/doc-reform-ldc -v --source --html --epub --sqlite-discrete \ ---sqlite-create --sqlite-update \ ---output-dir=tmp/program_output_dir \ -$(SiSU_MARKUP_SAMPLES_DIR) -#+END_SRC - -*** org babel tangle batch process command :tangle: -**** tangle: org babel tangle *.org - -#+BEGIN_SRC makefile :tangle ../makefile -tangle: skel - for f in $(ORGFILELIST); do \ - ORGFILES="$$ORGFILES \"$$f\""; \ - done; \ - emacs --batch -Q -q \ - --eval "(progn \ - (add-to-list 'load-path \ - (expand-file-name \"$(EMACSLISP)\")) \ - (add-to-list 'load-path \ - (expand-file-name \"$(EMACSLISP_ORG)\" t)) \ - (add-to-list 'load-path \ - (expand-file-name \"$(EMACSLISP_ORG_CONTRIB)\" t)) \ - (require 'org)(require 'ob)(require 'ob-tangle) \ - (mapc (lambda (file) \ - (find-file (expand-file-name file \"$(ORGDIR)\")) \ - (setq-local org-src-preserve-indentation t) \ - (org-babel-tangle) \ - (kill-buffer)) '($$ORGFILES)))" 2>&1 -#+END_SRC - -**** tangle maker: org babel tangle maker.org, makefile new - -#+BEGIN_SRC makefile :tangle ../makefile -tangle_maker: - for f in $(ORGFILELIST); do \ - ORGFILES="\"org/dr_build_scaffold.org\""; \ - done; \ - emacs --batch -Q -q \ - --eval "(progn \ - (add-to-list 'load-path \ - (expand-file-name \"$(EMACSLISP)\")) \ - (add-to-list 'load-path \ - (expand-file-name \"$(EMACSLISP_ORG)\" t)) \ - (add-to-list 'load-path \ - (expand-file-name \"$(EMACSLISP_ORG_CONTRIB)\" t)) \ - (require 'org)(require 'ob)(require 'ob-tangle) \ - (mapc (lambda (file) \ - (find-file (expand-file-name file \".\")) \ - (setq-local org-src-preserve-indentation t) \ - (org-babel-tangle) \ - (kill-buffer)) '($$ORGFILES)))" 2>&1 -#+END_SRC - -*** git snapshot - -#+BEGIN_SRC makefile :tangle ../makefile -gitsnapshot: distclean tangle - git commit -a -#+END_SRC - -** phony :phony: - -#+BEGIN_SRC makefile :tangle ../makefile -.PHONY : all build rebuild debug release \ - distclean init \ - tangle gitsnapshot -#+END_SRC - -* dub.sdl :dub:sdl:config: -Every DUB package should contain a [[http://code.dlang.org/package-format?lang=json][dub.json]] (or [[http://code.dlang.org/package-format?lang=sdl][dub.sdl]]) -** header (including dependencies) :header: - -#+BEGIN_SRC sh :tangle ../dub.sdl -name "doc-reform" -description "sisu document parser" -homepage "http://sisudoc.org" -authors "Ralph Amissah" -copyright "Copyright (C) 2016 - 2019 Ralph Amissah" -license "AGPL-3.0+" -targetPath "./bin" -#sourcePath "./src/doc_reform" -stringImportPaths "./views" -buildRequirements "allowWarnings" -targetType "executable" -platforms "posix" -dependency "d2sqlite3" version="~>0.18.3" # https://code.dlang.org/packages/d2sqlite3 http://biozic.github.io/d2sqlite3/d2sqlite3.html - subconfiguration "d2sqlite3" "all-included" -dependency "imageformats" version="~>7.0.1" # https://code.dlang.org/packages/imageformats https://github.com/lgvz/imageformats -dependency "dyaml" version="~>0.8.0" -dependency "tinyendian" version="~>0.2.0" // for dyaml -#+END_SRC - -** default - -time (dub --compiler=dmd -b release) -time (dub --compiler=ldc2 -b release) -time (dub --compiler=gdc -b release) - -#+BEGIN_SRC sh :tangle ../dub.sdl -configuration "default" { - targetName "doc-reform" - postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'doc-reform'" -} -#+END_SRC - -** dmd - -time (dub --compiler=dmd --config=dmd -b dmd) -time (dub --compiler=dmd --config=dmd -b dmd-release) - -#+BEGIN_SRC sh :tangle ../dub.sdl -configuration "dmd" { - targetName "doc-reform-dmd" - postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'doc-reform-dmd'" -} -buildType "dmd" { - dflags "-J=views" "-I=src/doc_reform" - buildOptions "verbose" "inline" - buildRequirements "allowWarnings" -} -buildType "dmd-release" { - dflags "-J=views" "-I=src/doc_reform" - buildOptions "verbose" "releaseMode" "optimize" "inline" -} -configuration "dmd-version" { - dflags "-J=views" "-I=src/doc_reform" - buildOptions "verbose" "releaseMode" "optimize" "inline" - targetName "doc-reform-dmd-ver" - postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'doc-reform-dmd-ver'" -} -#+END_SRC - -** ldc - -time (dub --compiler=ldc2 --config=ldc -b ldc) -time (dub --compiler=ldc2 --config=ldc -b ldc-release) - -#+BEGIN_SRC sh :tangle ../dub.sdl -configuration "ldc" { - targetName "doc-reform-ldc" - postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'doc-reform-ldc'" -} -buildType "ldc" { - dflags "-O2" "-J=views" "-I=src/doc_reform" - buildOptions "verbose" "optimize" "inline" - buildRequirements "allowWarnings" -} -buildType "ldc-release" { - dflags "-O2" "-J=views" "-I=src/doc_reform" - buildOptions "verbose" "optimize" "inline" "releaseMode" -} -configuration "ldc-version" { - dflags "-O2" "-J=views" "-I=src/doc_reform" - buildOptions "verbose" "optimize" "inline" "releaseMode" - targetName "doc-reform-ldc-ver" - postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'doc-reform-ldc-ver'" -} -#+END_SRC - -** gdc - -time (dub --compiler=gdc --config=gdc -b gdc) -time (dub --compiler=gdc --config=gdc -b gdc-release) - -#+BEGIN_SRC sh :tangle ../dub.sdl -configuration "gdc" { - targetName "doc-reform-gdc" - postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'doc-reform-gdc'" -} -buildType "gdc" { - dflags "-O2" "-J=views" "-I=src/doc_reform" - lflags "-lz" - buildOptions "optimize" "inline" - buildRequirements "allowWarnings" -} -buildType "gdc-release" { - dflags "-O2" "-J=views" "-I=src/doc_reform" - lflags "-lz" - buildOptions "verbose" "optimize" "inline" "releaseMode" -} -configuration "gdc-version" { - dflags "-O2" "-J=views" "-I=src/doc_reform" - lflags "-lz" - buildOptions "verbose" "optimize" "inline" "releaseMode" - targetName "doc-reform-gdc-ver" - postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'doc-reform-gdc-ver'" -} -#+END_SRC - -*** generic :generic: -**** build (sdp) :release: - -#+BEGIN_SRC sh -configuration "build" { - name "build" - targetType "executable" - platforms "posix" - targetName "bin/doc-reform" - dflags "-J=views" "-I=src/doc_reform" - buildOptions "verbose" "releaseMode" "optimize" "inline" - postGenerateCommands "/usr/bin/notify-send -t 0 'D release executable ready' 'doc-reform'" -} -#+END_SRC - -* meson -** notes - -http://mesonbuild.com/D.html -http://mesonbuild.com/Dependencies.html#Dub -- create and move to subdirectory - rm -r build; mkdir build && cd build - -- build - - - regular build (faster compile time): - meson && ninja - - - optimized build (faster program run time): - meson --buildtype=debugoptimized && ninja - - - time build - time ( meson --buildtype=debugoptimized && ninja ) - -- other - - flags - DFLAGS= DC=ldc2 meson .. - -*** projects - -tree -fi ./src |rg "\.d$" - -#+BEGIN_SRC sh :tangle ../meson.build -project('doc-reform', 'd', - license: 'AGPL3', - version: '0.26.5', - meson_version: '>=0.46' -) -doc_reform_sources = [ - 'src/doc_reform/doc_reform.d', - 'src/doc_reform/conf/compile_time_info.d', - 'src/doc_reform/meta/conf_make_meta_json.d', - 'src/doc_reform/meta/conf_make_meta_structs.d', - 'src/doc_reform/meta/conf_make_meta_yaml.d', - 'src/doc_reform/meta/defaults.d', - 'src/doc_reform/meta/doc_debugs.d', - 'src/doc_reform/meta/metadoc.d', - 'src/doc_reform/meta/metadoc_from_src.d', - 'src/doc_reform/meta/metadoc_harvest.d', - 'src/doc_reform/meta/metadoc_harvests_authors.d', - 'src/doc_reform/meta/metadoc_harvests_topics.d', - 'src/doc_reform/meta/metadochead.d', - 'src/doc_reform/meta/metadoc_show_summary.d', - 'src/doc_reform/meta/object_setter.d', - 'src/doc_reform/meta/package.d', - 'src/doc_reform/meta/rgx.d', - 'src/doc_reform/output/create_zip_file.d', - 'src/doc_reform/output/defaults.d', - 'src/doc_reform/output/epub3.d', - 'src/doc_reform/output/html.d', - 'src/doc_reform/output/hub.d', - 'src/doc_reform/output/latex.d', - 'src/doc_reform/output/odt.d', - 'src/doc_reform/output/package.d', - 'src/doc_reform/output/paths_output.d', - 'src/doc_reform/output/rgx.d', - 'src/doc_reform/output/source_pod.d', - 'src/doc_reform/output/sqlite.d', - 'src/doc_reform/output/xmls_css.d', - 'src/doc_reform/output/xmls.d', - 'src/doc_reform/share/defaults.d', - 'src/doc_reform/source/paths_source.d', - 'src/doc_reform/source/read_config_files.d', - 'src/doc_reform/source/read_source_files.d', -] -source_root = meson.source_root() -sources_dir = include_directories('src/') -# Dependencies -dep_d2sqlite3 = dependency('d2sqlite3', version: '>= 0.16.2', fallback: ['d2sqlite3', 'd2sqlite3_dep']) -dep_imageformats = dependency('imageformats-d', version: '>= 7.0.0', fallback: ['imageformats-d', 'imageformats_dep']) -# executable -doc_reform_exe = executable('rad', - [doc_reform_sources], - include_directories : [sources_dir], - d_import_dirs: [include_directories('views')], - dependencies : [ - dep_d2sqlite3, - dep_imageformats, - ], - install : true -) -#+END_SRC - -** subprojects - -#+BEGIN_SRC sh :tangle ../subprojects/README -d2sqlite3 -- dub - - https://code.dlang.org/packages/d2sqlite3 -- upstream - - https://github.com/biozic/d2sqlite3 -- mathias - - https://github.com/ximion/d2sqlite3.git - -imageformats -- dub - - https://code.dlang.org/packages/imageformats -- upstream - - https://github.com/lgvz/imageformats -- mathias - - https://github.com/ximion/imageformats.git -#+END_SRC - -*** d2sqlite3 - -#+BEGIN_SRC sh :tangle ../subprojects/d2sqlite3.wrap -[wrap-git] -directory = d2sqlite3 -url = https://github.com/ximion/d2sqlite3.git -revision = head -#+END_SRC - -*** imageformats-d - -#+BEGIN_SRC sh :tangle ../subprojects/imageformats-d.wrap -[wrap-git] -directory = imageformats-d -url = https://github.com/ximion/imageformats.git -revision = head -#+END_SRC - -* .gitignore :gitignore: - -#+BEGIN_SRC sh :tangle ../.gitignore -# git ls-files --others --exclude-from=.git/info/exclude -#./.dub/** -* -!.gitignore -!COPYRIGHT -!README -!makefile -!version.txt -!dub*.json -!dub.sdl -!meson.build -!tangle -!*.org -!*.d -!*.rb -!conf.sdl -!org -!util -!src -!src/doc_reform -!src/doc_reform/* -!src_yaml -!src_yaml/doc_reform -!src_yaml/doc_reform/* -!data -!data/* -!data/src/** -!data/src_yaml/** -!data/pod/** -!data/pod_yaml/** -!*.sst -!*.ssm -!**/*.sst -!**/*.ssm -!subprojects -!**/*.wrap -!subprojects/*.wrap -!pod.manifest -!sisu_document_make -!config_local_site -!sisudoc -!views -!docs/*.html -!notes -notes/** -!notes/*.org -!notes/sisu-description.sst -!notes/reminders -!notes/reminders/** -.dub/** -tmp/** -*_.org -*_.d -*_.txt -*_ -*~ -\#* -*.\#* -#!*/ -#*~ -#\#* -#*.\#* -#!debian -#!debian/* -#.reggae/** -#+END_SRC - -* sh script to batch process _emacs org babel tangle_ :shell_script:tangle: - [[http://orgmode.org/manual/Batch-execution.html]] -creates a shell batch script called "tangle", that will tangle (emacs org -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 -# -*- mode: shell-script -*- -# tangle files with org-mode -DIR=`pwd` -ORGFILES="" -EMACSLISP=/usr/share/emacs/site-lisp -ORG_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-???????? | cut -d '-' -f2`) -EMACSLISP_ORG=~/.emacs.d/elpa/org-$($(shell echo $(ORG_VER_AVAILABLE))) -ORG_CONTRIB_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-plus-???????? | cut -d '-' -f2`) -EMACSLISP_ORG_CONTRIB=~/.emacs.d/elpa/org-plus-contrib-$($(shell echo $(ORG_CONTRIB_VER_AVAILABLE))) -# wrap each argument in the code required to call tangle on it -for i in $@; do - ORGFILES="$ORGFILES \"$i\"" -done -emacs --batch -Q -q \ ---eval "(progn -(add-to-list 'load-path (expand-file-name \"$EMACSLISP\")) -(add-to-list 'load-path (expand-file-name \"$EMACSLISP_ORG\" t)) -(add-to-list 'load-path (expand-file-name \"$EMACSLISP_ORG_CONTRIB\" t)) -(require 'org)(require 'ob)(require 'ob-tangle) -(mapc (lambda (file) - (find-file (expand-file-name file \"$DIR\")) - (setq-local org-src-preserve-indentation t) - (org-babel-tangle) - (kill-buffer)) '($ORGFILES)))" 2>&1 #|grep tangled -#+END_SRC - -* __END__ -** build -*** dub - -#+BEGIN_SRC sh :tangle no -dub build -h -#+END_SRC - -#+BEGIN_SRC sh -time (dub --compiler=dmd --config=doc-reform-dmd --debug=steps) -time (dub --compiler=ldc2 --config=doc-reform-ldc --debug=steps) -time (dub --compiler=gdc --config=doc-reform-gdc --debug=steps) - -time (dub --compiler=ldc2 --config=doc-reform-ldc --debug=checkdoc --debug=summary --debug=dumpdoc) -time (dub --compiler=ldc2 --config=doc-reform-ldc --debug=io) -time (dub --compiler=ldc2 --config=doc-reform-ldc --debug=checkdoc --debug=summary --debug=dumpdoc --debug=io) -time (dub --compiler=ldc2 --config=doc-reform-ldc-debug --debug=io) -time (dub --compiler=gdc --config=doc-reform-gdc-debug --debug=io) -time (dub --compiler=dmd --config=doc-reform-dmd-debug --debug=io) -#+END_SRC - -*** make - -#+BEGIN_SRC sh -time make dmd -time make gdc -time make ldc -time make gdc ldc -time make all -time make all_ver -time make dmd_ver ldc_ver gdc_ver - -time make restart -time make restart ldc -time make tangle ldc - -time make ldc_testrun_find_pod_epub -#+END_SRC - -** dub zfunc :zfunc: -*** ,dubdmd :dmd: - -#+BEGIN_SRC sh :tangle no -time dub --compiler=dmd -v --force -#+END_SRC - -*** ,dubldc :ldc: - -#+BEGIN_SRC sh :tangle no -time dub --compiler=ldc2 -v --force -#+END_SRC - -*** ,dubgdc :gdc: - -#+BEGIN_SRC sh :tangle no -time dub --compiler=gdc -v --force -#+END_SRC - -** git -*** project version - -echo $(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g') - -*** what files changed -git whatchanged --since="1 day ago" --oneline --name-only --pretty=format: | sort -u -git log --since="1 day ago" --name-only --pretty=format: | sort -u - -** test run -*** e.g. -time (./bin/doc-reform-ldc --source --html -v --output-dir=tmp/program-output data/pod/sisu-manual/media/text/en/sisu_markup.sst ) - -time (./bin/doc-reform-ldc --source --html -v --output-dir=tmp/program-output data/pod/sisu-manual ) -time (./bin/doc-reform-ldc --source --html -v --output-dir=tmp/program-output data/pod/the_wealth_of_networks.yochai_benkler ) -time (./bin/doc-reform-ldc --source --html -v --output-dir=tmp/program-output data/pod/live-manual ) - -time (~sdp2/bin/doc-reform-ldc --pod --source --html --epub --sqlite-create --sqlite-update -v sisudoc/media/text/en/sisu_markup_stress_test.sst sisudoc/media/text/en/the_wealth_of_networks.yochai_benkler.sst ) - -can point to directory containing sisudoc.txt file (listing which files to process) - -time (~sdp2/bin/doc-reform-ldc --html -v sisudoc) -# will process source files listed in sisudoc.txt for appropriate files and dir structure - -e.g. live-manual a multilingual document (with source file inserts .ssi) - -time (~sdp2/bin/doc-reform-ldc --html --lang=en,es -v sisudoc) - -time ( find data/pod -name pod.manifest | sort | xargs ./bin/doc-reform-ldc --source --html --epub -v --output-dir=tmp/program-output ) - -time ( find data/pod -maxdepth 2 -name pod.manifest | sort | xargs ./bin/doc-reform-ldc --source --html --epub -v --output-dir=tmp/program-output ) -time ( find data/sisudir/media/text -name *.ss[tm] | sort | xargs ./bin/doc-reform-ldc --source --html --epub -v --output-dir=tmp/program-output ) - -find data/pod -maxdepth 2 -name pod.manifest | sort | xargs - -find data/sisudir/media/text -name *.ss[tm] | sort | xargs - -*** list markup files -find data/pod -name pod.manifest | sort -find data/sisudir/media/text -name *.ss[tm] | sort - -time make ldc_testrun_paths_pod_pod -time make ldc_testrun_paths_pod_pod | ag "^\".+\"|NOT found" -time make ldc_testrun_find_pod_pod -time make ldc_testrun_find_dir_pod -time make ldc_testrun_filelist_dir_pod -** misc -*** compilers - -- [X] Set D_COMPILER (one of DMD LDC or GDC) -- [X] Set debug flags (using DMD standard flag -deb - -[[http://wiki.dlang.org/Compilers][D Compilers wiki https://wiki.dlang.org/Compilers]] -[[http://dlang.org/download.html][D Compilers download http://dlang.org/download.html]] - -*** dub :dub: - -https://github.com/dlang/dub/ -http://code.dlang.org/getting_started -http://code.dlang.org/docs/commandline - -**** setup -***** dub json or sdlang - -Every DUB package should contain a [[http://code.dlang.org/package-format?lang=json][dub.json]] or [[http://code.dlang.org/package-format?lang=sdl][dub.sdl]] -https://code.dlang.org/package-format?lang=sdl -https://code.dlang.org/packages/sdlang-d -https://github.com/Abscissa/SDLang-D/blob/master/HOWTO.md - -https://code.dlang.org/docs/commandline - -***** dub dependencies - -dub list -dub upgrade -dub fetch taggedalgebraic -dub fetch libinputvisitor -dub fetch unit-threaded ? - -sdp ~master: /home/ralph/grotto/repo/git.repo/utils/doc-reform-x/ -/home/ralph/.dub/packages/* - -**** build -***** debug flags - -#+BEGIN_SRC sh -biblio -biblio_sorted -bibliosorted -block -bookindex -bookindexmatch -bookindexraw -check -checkdoc -code -comment -dumpdoc write out document contents, with object type and ocn -endnotes -endnotes_build -footnotes -footnotesdone -group -header -header_and_content -header1 -headerjson -headermakejson -headermetadatajson -heading -headings -headingsfound -insert -io -munge -node -objectrelated1 -objectrelated2 -objects -ocnoff -para -parabullet -parabulletindent -paraindent -paraindenthang -parent -poem -quote -raw -source -srclines -structattrib -summary -table -toc -#+END_SRC diff --git a/org/dr_info.org b/org/dr_info.org deleted file mode 100644 index dd5fa12..0000000 --- a/org/dr_info.org +++ /dev/null @@ -1,159 +0,0 @@ --*- mode: org -*- -#+TITLE: doc_reform information files -#+DESCRIPTION: documents - structuring, various output representations & search -#+FILETAGS: :doc_reform:info: -#+AUTHOR: Ralph Amissah -#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah -#+LANGUAGE: en -#+STARTUP: indent content hideblocks hidestars -#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t -#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc -#+OPTIONS: author:nil email:nil creator:nil timestamp:nil -#+PROPERTY: header-args :results silent :padline no :exports code :cache no :noweb yes -#+EXPORT_SELECT_TAGS: export -#+EXPORT_EXCLUDE_TAGS: noexport -#+TAGS: assert(a) class(c) debug(d) mixin(m) doc_reform(s) tangle(T) template(t) WEB(W) noexport(n) - -* README - -#+BEGIN_SRC text :tangle "../README" -project_name: Doc Reform - description: [ - "documents, structuring, processing, publishing", - search, - object numbering, - static content generator, - sisu markup - ] - - author: - name: Ralph Amissah - email: ralph.amissah@gmail.com - - copyright: "(C) 2015 - 2019 Ralph Amissah, All Rights Reserved." - - license: "AGPL 3 or later" - - hompage: [ - "http://www.doc_reform.org", - "http://www.sisudoc.org" - ] -#+END_SRC - -* COPYRIGHT & LICENSE -** notices -*** project (project root) ./ - -#+BEGIN_SRC text :tangle "../COPYRIGHT" -<> -<> -<> -#+END_SRC - -*** code source ./src - -#+BEGIN_SRC text :tangle "../src/COPYRIGHT" -<> -<> -<> -#+END_SRC - -*** code source ./src/doc_reform - -#+BEGIN_SRC text :tangle "../src/doc_reform/COPYRIGHT" -<> -<> -<> -#+END_SRC - -*** org files ./org - -#+BEGIN_SRC text :tangle "./COPYRIGHT" -<> -<> -#+END_SRC - -*** data (markup samples) ./data - -#+BEGIN_SRC text :tangle "../data/COPYRIGHT" -<> -#+END_SRC - -** incorporate -*** copyright - -#+NAME: doc_reform_copyright -#+BEGIN_SRC text -- Name: Doc Reform - - Description: documents, structuring, processing, publishing, search - - static content generator - - - Author: Ralph Amissah - [ralph.amissah@gmail.com] - - - Copyright: (C) 2015 - 2019 Ralph Amissah - -#+END_SRC - -*** license - -#+NAME: doc_reform_license_agpl3 -#+BEGIN_SRC text - - code under src/ - - License: AGPL 3 or later: - - Doc Reform (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 AFERO General Public License as published by - the Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program. If not, see [http://www.gnu.org/licenses/]. - - If you have Internet connection, the latest version of the AGPL should be - available at these locations: - [http://www.fsf.org/licensing/licenses/agpl.html] - [http://www.gnu.org/licenses/agpl.html] - -#+END_SRC - -*** tail - -#+NAME: doc_reform_extra -#+BEGIN_SRC text - - Doc Reform (related to SiSU) uses standard: - - docReform markup syntax - - standard SiSU markup syntax with modified headers and minor - modifications - - docReform object numbering - - standard SiSU object citation numbering & system - - - Hompages: - [http://www.doc_reform.org] - [http://www.sisudoc.org] - - - Git - [http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary] - [http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/html.rb;hb=HEAD] - -#+END_SRC -*** data - -#+NAME: doc_reform_extra -#+BEGIN_SRC text -- Doc Reform markup samples - Individual document content Copyright (Author) [as stated in document header] - Individual document content License (Author) [as stated in document header] - -#+END_SRC diff --git a/org/imports.org b/org/imports.org index 124b7f7..35decf7 100644 --- a/org/imports.org +++ b/org/imports.org @@ -1,7 +1,7 @@ -*- mode: org -*- -#+TITLE: doc_reform hub +#+TITLE: spine (doc_reform) hub #+DESCRIPTION: documents - structuring, publishing in multiple formats & search -#+FILETAGS: :doc_reform:imports: +#+FILETAGS: :spine:imports: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] #+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah @@ -13,7 +13,7 @@ #+PROPERTY: header-args :padline no :exports code :cache no :noweb yes #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport -#+TAGS: assert(a) class(c) debug(d) mixin(m) doc_reform(s) tangle(T) template(t) WEB(W) noexport(n) +#+TAGS: assert(a) class(c) debug(d) mixin(m) spine(s) tangle(T) template(t) WEB(W) noexport(n) * 1. imports for meta :meta: ** package dir diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org index 5da3795..e76e7b9 100644 --- a/org/meta_abstraction.org +++ b/org/meta_abstraction.org @@ -1,7 +1,7 @@ -*- mode: org -*- -#+TITLE: doc_reform document abstraction +#+TITLE: spine (doc_reform) document abstraction #+DESCRIPTION: documents - structuring, publishing in multiple formats & search -#+FILETAGS: :doc_reform:abstraction: +#+FILETAGS: :spine:abstraction: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] #+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah @@ -13,14 +13,14 @@ #+PROPERTY: header-args :padline no :exports code :cache no :noweb yes #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport -#+TAGS: assert(a) class(c) debug(d) mixin(m) doc_reform(s) tangle(T) template(t) WEB(W) noexport(n) +#+TAGS: assert(a) class(c) debug(d) mixin(m) spine(s) tangle(T) template(t) WEB(W) noexport(n) -- [[./doc_reform.org][doc_reform]] [[./][org/]] +- [[./spine.org][spine]] [[./][org/]] * 1. Document Abstraction Process markup document, create document abstraction. -** 0. module template :module:metadoc_from_src: +** _module template_ :module:metadoc_from_src: #+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_from_src.d" /++ @@ -7599,11 +7599,11 @@ template docSectKeysSeq() { } #+END_SRC -* 2. Object Setter (Set Abstract Object) :module:doc_reform:meta_object_setter: +* 2. Object Setter (Set Abstract Object) :module:spine:meta_object_setter: set abstracted objects for downstream processing -** 0. module template +** _module template_ #+BEGIN_SRC d :tangle "../src/doc_reform/meta/object_setter.d" /++ diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org index 208a028..f87701e 100644 --- a/org/meta_conf_make_meta.org +++ b/org/meta_conf_make_meta.org @@ -1,7 +1,7 @@ -*- mode: org -*- -#+TITLE: doc_reform config & header (make & meta) extract +#+TITLE: spine (doc_reform) config & header (make & meta) extract #+DESCRIPTION: documents - structuring, publishing in multiple formats & search -#+FILETAGS: :doc_reform:config: +#+FILETAGS: :spine:config: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] #+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah @@ -13,9 +13,9 @@ #+PROPERTY: header-args :padline no :exports code :cache no :noweb yes #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport -#+TAGS: assert(a) class(c) debug(d) mixin(m) doc_reform(s) tangle(T) template(t) WEB(W) noexport(n) +#+TAGS: assert(a) class(c) debug(d) mixin(m) spine(s) tangle(T) template(t) WEB(W) noexport(n) -[[./doc_reform.org][doc_reform]] [[./][org/]] +[[./spine.org][spine]] [[./][org/]] * 0. generic ** imports @@ -109,9 +109,9 @@ struct ConfCompositeMakeStr { string[] footer; string[] headings; string[] home_button_image; - string home_button_text = "{Doc Reform}http://www.doc-reform.org;" + string home_button_text = "{Spine, Doc Reform}http://www.doc-reform.org;" ~ " {www.doc-reform.org}http://www.doc-reform.org;" - ~ " {sources / git}https://git.doc-reform.org/software/doc-reform"; + ~ " {sources / git}https://git.doc-reform.org/software/spine"; string italics; string auto_num_top_at_level; int auto_num_top_lv = 9; @@ -199,9 +199,9 @@ struct ConfCompositeMakeInit { string[] footer; string[] headings; string[] home_button_image; - string home_button_text = "{Doc Reform}http://www.doc-reform.org;" + string home_button_text = "{Spine, Doc Reform}http://www.doc-reform.org;" ~ " {www.doc-reform.org}http://www.doc-reform.org;" - ~ " {sources / git}https://git.doc-reform.org/software/doc-reform"; + ~ " {sources / git}https://git.doc-reform.org/software/spine"; string[] italics; string auto_num_top_at_level; int auto_num_top_lv = 9; @@ -333,7 +333,7 @@ JSONValue config_jsonstr = `{ #+END_SRC * 1. YAML to DocReformStruct :module:conf_make_meta:yaml: -** 0. module template +** _module template_ #+BEGIN_SRC d :tangle "../src/doc_reform/meta/conf_make_meta_yaml.d" /++ @@ -1135,7 +1135,7 @@ if ("rights" in _yaml #+END_SRC * 1. JSON to DocReformStruct :module:conf_make_meta:json: -** 0. module template +** _module template_ #+BEGIN_SRC d :tangle "../src/doc_reform/meta/conf_make_meta_json.d" /++ diff --git a/org/meta_debugs.org b/org/meta_debugs.org index 69a2aa5..f3518a6 100644 --- a/org/meta_debugs.org +++ b/org/meta_debugs.org @@ -1,7 +1,7 @@ -*- mode: org -*- -#+TITLE: doc_reform abstraction summary and debugs +#+TITLE: spine (doc_reform) abstraction summary and debugs #+DESCRIPTION: documents - structuring, publishing in multiple formats & search -#+FILETAGS: :doc_reform:debugs: +#+FILETAGS: :spine:debugs: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] #+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah @@ -13,11 +13,11 @@ #+PROPERTY: header-args :padline no :exports code :cache no :noweb yes #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport -#+TAGS: assert(a) class(c) debug(d) mixin(m) doc_reform(s) tangle(T) template(t) WEB(W) noexport(n) +#+TAGS: assert(a) class(c) debug(d) mixin(m) spine(s) tangle(T) template(t) WEB(W) noexport(n) -[[./doc_reform.org][doc_reform]] [[./][org/]] -* 1. abstraction debugs :module:doc_reform:meta_doc_debugs: -** 0. module template +[[./spine.org][spine]] [[./][org/]] +* 1. abstraction debugs :module:spine:meta_doc_debugs: +** _module template_ #+BEGIN_SRC d :tangle "../src/doc_reform/meta/doc_debugs.d" /++ diff --git a/org/output_harvest_metadata.org b/org/output_harvest_metadata.org index 2fb3485..b2c7b1a 100644 --- a/org/output_harvest_metadata.org +++ b/org/output_harvest_metadata.org @@ -1,7 +1,7 @@ -*- mode: org -*- -#+TITLE: metadata (multidocument) harvests +#+TITLE: spine (doc_manifest) metadata (multidocument) harvests #+DESCRIPTION: documents - structuring, various output representations & search -#+FILETAGS: :doc_reform:hub: +#+FILETAGS: :spine:hub: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] #+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah @@ -13,11 +13,11 @@ #+PROPERTY: header-args :results silent :padline no :exports code :cache no :noweb yes #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport -#+TAGS: assert(a) class(c) debug(d) mixin(m) doc_reform(s) tangle(T) template(t) WEB(W) noexport(n) +#+TAGS: assert(a) class(c) debug(d) mixin(m) spine(s) tangle(T) template(t) WEB(W) noexport(n) -* document harvest _summary_ :module:doc_reform:metadoc_show_summary: +* document harvest _summary_ :module:spine:metadoc_show_summary: -** 0. module template metadoc harvest +** _module template_ metadoc harvest #+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_harvest.d" module doc_reform.meta.metadoc_harvest; @@ -107,8 +107,8 @@ hvst.harvest.path_abs_html_segtoc = pth_html_abs.fn_seg(doc_matters.src.filenam return hvst.harvest; #+END_SRC -** 0. module template metadoc harvest topics -*** 0. module template metadoc harvest topics template +** _module template_ metadoc harvest topics +*** _module template_ metadoc harvest topics template #+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_harvests_topics.d" module doc_reform.meta.metadoc_harvests_topics; @@ -430,8 +430,8 @@ try { } #+END_SRC -** 0. module template metadoc harvests authors -*** 0. module template metadoc harvest authors +** _module template_ metadoc harvests authors +*** _module template_ metadoc harvest authors #+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_harvests_authors.d" module doc_reform.meta.metadoc_harvests_authors; @@ -748,7 +748,7 @@ string theme_light_1 = format(q"┃ - +