aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-08-20 08:57:12 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-04 14:53:38 -0400
commitc7c6c121884feb55ae3964e6055ac8ca983458cd (patch)
treeb354f012dd41202081bdd5cbc8b3e18fc8f945f9
parentminor move (diff)
step 0.6.3 includes fixes
-rw-r--r--dub.sdl64
-rw-r--r--makefile5
-rw-r--r--maker.org152
-rw-r--r--org/ao_abstract_doc_source.org50
-rw-r--r--org/ao_conf_make_meta.org321
-rw-r--r--org/ao_defaults.org14
-rw-r--r--org/ao_output_debugs.org39
-rw-r--r--org/output.org69
-rw-r--r--org/sdp.org144
-rwxr-xr-xsrc/sdp.d55
-rw-r--r--src/sdp/ao_abstract_doc_source.d28
-rw-r--r--src/sdp/ao_conf_make_meta_sdlang.d321
-rw-r--r--src/sdp/ao_output_debugs.d31
-rw-r--r--src/sdp/ao_rgx.d10
-rw-r--r--src/sdp/output_hub.d48
-rw-r--r--views/version.txt2
16 files changed, 1079 insertions, 274 deletions
diff --git a/dub.sdl b/dub.sdl
index 7aa4621..88d23aa 100644
--- a/dub.sdl
+++ b/dub.sdl
@@ -1,13 +1,13 @@
name "sdp"
-description "sisu document parser."
+description "sisu document parser"
homepage "http://sisudoc.org"
authors "Ralph Amissah"
-copyright "©2016 Ralph Amissah"
+copyright "Copyright © 2016 Ralph Amissah"
license "AGPL-3+"
targetPath "./bin"
sourcePath "./src"
stringImportPaths "./views"
-buildRequirements "disallowDeprecations" "allowWarnings"
+buildRequirements "allowWarnings"
configuration "sdp-release" {
name "release"
targetType "executable"
@@ -16,24 +16,6 @@ configuration "sdp-release" {
buildOptions "releaseMode" "optimize" "inline"
postGenerateCommands "/usr/bin/notify-send -t 0 'D release executable ready' 'sdp'"
}
-configuration "sdp-dmd" {
- name "dmd"
- targetType "executable"
- platforms "posix"
- #compiler "dmd"
- targetName "sdp-dmd"
- buildOptions "releaseMode" "optimize" "inline"
- postGenerateCommands "/usr/bin/notify-send -t 0 'D dmd compiled test release executable ready' 'sdp-dmd'"
-}
-configuration "sdp-ldc" {
- name "ldc"
- targetType "executable"
- platforms "posix"
- #compiler "ldc2"
- targetName "sdp-ldc"
- buildOptions "releaseMode" "optimize" "inline"
- postGenerateCommands "/usr/bin/notify-send -t 0 'D ldc2 compiled test release executable ready' 'sdp-ldc'"
-}
configuration "sdp-debug" {
name "debuging"
targetType "executable"
@@ -65,3 +47,43 @@ configuration "sdp-debug-clean" {
buildOptions "debugMode" "debugInfo" "optimize"
postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-debug-clean'"
}
+configuration "sdp-dmd" {
+ name "dmd"
+ targetType "executable"
+ platforms "posix"
+ #compiler "dmd"
+ targetName "sdp-dmd"
+ buildOptions "releaseMode" "optimize" "inline"
+ postGenerateCommands "/usr/bin/notify-send -t 0 'D dmd compiled test release executable ready' 'sdp-dmd'"
+}
+configuration "sdp-debug-dmd" {
+ name "debuging"
+ targetType "executable"
+ platforms "posix"
+ targetName "sdp-debug-dmd"
+ debugVersions "checkdoc"
+ debugVersions "summary"
+ debugVersions "dumpdoc"
+ buildOptions "debugMode" "debugInfo" "optimize"
+ postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-debug-dmd'"
+}
+configuration "sdp-ldc" {
+ name "ldc"
+ targetType "executable"
+ platforms "posix"
+ #compiler "ldc2"
+ targetName "sdp-ldc"
+ buildOptions "releaseMode" "optimize" "inline"
+ postGenerateCommands "/usr/bin/notify-send -t 0 'D ldc2 compiled test release executable ready' 'sdp-ldc'"
+}
+configuration "sdp-debug-ldc" {
+ name "debuging"
+ targetType "executable"
+ platforms "posix"
+ targetName "sdp-debug-ldc"
+ debugVersions "checkdoc"
+ debugVersions "summary"
+ debugVersions "dumpdoc"
+ buildOptions "debugMode" "debugInfo" "optimize"
+ postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-debug-ldc'"
+}
diff --git a/makefile b/makefile
index 1e804cf..d4fbe92 100644
--- a/makefile
+++ b/makefile
@@ -7,7 +7,6 @@ LDC_FLAGS=-w -J=views -I=src/sdp -linker=ld.gold
LDC_FLAGS_RELEASE=-O4 -release
LDC_FLAG_BINOF=-of=
GDC=gdc
-#GDC=gdc-5
GDC_FLAGS=
GDC_FLAGS_RELEASE=-march=native -O3 -pipe -frelease
GDC_FLAG_BINOF=-o
@@ -71,7 +70,7 @@ dub_dmd_stamp: tangle
dub_dmd_release_test: tangle
$(DUB) $(DUB_FLAGS)dmd --config=sdp-dmd
dub_dmd_debug: tangle
- $(DUB) $(DUB_FLAGS)dmd --config=sdp-debug
+ $(DUB) $(DUB_FLAGS)dmd --config=sdp-debug-dmd
dub_dmd_debug_clean: tangle
$(DUB) $(DUB_FLAGS)dmd --config=sdp-debug-clean
dub_dmd_tmp: tangle
@@ -86,7 +85,7 @@ dub_ldc_stamp: tangle
dub_ldc_release_test: tangle
$(DUB) $(DUB_FLAGS)ldc2 --config=sdp-ldc
dub_ldc_debug: tangle
- $(DUB) $(DUB_FLAGS)ldc2 --config=sdp-debug
+ $(DUB) $(DUB_FLAGS)ldc2 --config=sdp-debug-ldc
dub_ldc_debug_clean: tangle
$(DUB) $(DUB_FLAGS)ldc2 --config=sdp-debug-clean
dub_ldc_tmp: tangle
diff --git a/maker.org b/maker.org
index a37fbb6..5c585d3 100644
--- a/maker.org
+++ b/maker.org
@@ -47,7 +47,6 @@ LDC_FLAG_BINOF=-of=
#+BEGIN_SRC makefile :tangle makefile
GDC=gdc
-#GDC=gdc-5
GDC_FLAGS=
GDC_FLAGS_RELEASE=-march=native -O3 -pipe -frelease
GDC_FLAG_BINOF=-o
@@ -82,7 +81,7 @@ Set D_COMPILER one of DMD, LDC or GDC e.g.: SET_D_COMPILER=DMD
SET_D_COMPILER=LDC
#+END_SRC
-**** TODO SET debug flags: "SET_DC_FLAGS_DEBUG_EXTRA=-debug=": :compiler:flags:debug:
+**** TODO SET _debug_ flags: "SET_DC_FLAGS_DEBUG_EXTRA=-debug=": :compiler:flags:debug:
Set debug flags using DMD standard flag -debug= e.g.:
SET_DC_FLAGS_DEBUG_EXTRA=-debug=headings -debug=bookindex
SET_DC_FLAGS_DEBUG_EXTRA=-debug=headings -debug=footnotes -debug=endnotes
@@ -234,7 +233,7 @@ makefile_new:
make -k tangle_maker
#+END_SRC
-***** TODO dub build rebuild [#A] :dub:
+***** TODO _dub_ build rebuild [#A] :dub:
#+BEGIN_SRC makefile :tangle makefile
dub: $(PRG_SRCDIR)/$(PRG_SRC)
@@ -249,7 +248,7 @@ dub_dmd_stamp: tangle
dub_dmd_release_test: tangle
$(DUB) $(DUB_FLAGS)dmd --config=sdp-dmd
dub_dmd_debug: tangle
- $(DUB) $(DUB_FLAGS)dmd --config=sdp-debug
+ $(DUB) $(DUB_FLAGS)dmd --config=sdp-debug-dmd
dub_dmd_debug_clean: tangle
$(DUB) $(DUB_FLAGS)dmd --config=sdp-debug-clean
dub_dmd_tmp: tangle
@@ -264,7 +263,7 @@ dub_ldc_stamp: tangle
dub_ldc_release_test: tangle
$(DUB) $(DUB_FLAGS)ldc2 --config=sdp-ldc
dub_ldc_debug: tangle
- $(DUB) $(DUB_FLAGS)ldc2 --config=sdp-debug
+ $(DUB) $(DUB_FLAGS)ldc2 --config=sdp-debug-ldc
dub_ldc_debug_clean: tangle
$(DUB) $(DUB_FLAGS)ldc2 --config=sdp-debug-clean
dub_ldc_tmp: tangle
@@ -443,19 +442,25 @@ gitsnapshot: distclean tangle
** dub :dub:description:
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]])
-*** dub.sdl [#A] :sdl:
+*** TODO dub.sdl [#A] :sdl:
+
+**** header :header:
#+BEGIN_SRC sh :tangle dub.sdl
name "sdp"
-description "sisu document parser."
+description "sisu document parser"
homepage "http://sisudoc.org"
authors "Ralph Amissah"
-copyright "©2016 Ralph Amissah"
+copyright "Copyright © 2016 Ralph Amissah"
license "AGPL-3+"
targetPath "./bin"
sourcePath "./src"
stringImportPaths "./views"
-buildRequirements "disallowDeprecations" "allowWarnings"
+buildRequirements "allowWarnings"
+#+END_SRC
+
+**** configuration generic :generic:
+#+BEGIN_SRC sh :tangle dub.sdl
configuration "sdp-release" {
name "release"
targetType "executable"
@@ -464,24 +469,6 @@ configuration "sdp-release" {
buildOptions "releaseMode" "optimize" "inline"
postGenerateCommands "/usr/bin/notify-send -t 0 'D release executable ready' 'sdp'"
}
-configuration "sdp-dmd" {
- name "dmd"
- targetType "executable"
- platforms "posix"
- #compiler "dmd"
- targetName "sdp-dmd"
- buildOptions "releaseMode" "optimize" "inline"
- postGenerateCommands "/usr/bin/notify-send -t 0 'D dmd compiled test release executable ready' 'sdp-dmd'"
-}
-configuration "sdp-ldc" {
- name "ldc"
- targetType "executable"
- platforms "posix"
- #compiler "ldc2"
- targetName "sdp-ldc"
- buildOptions "releaseMode" "optimize" "inline"
- postGenerateCommands "/usr/bin/notify-send -t 0 'D ldc2 compiled test release executable ready' 'sdp-ldc'"
-}
configuration "sdp-debug" {
name "debuging"
targetType "executable"
@@ -515,6 +502,117 @@ configuration "sdp-debug-clean" {
}
#+END_SRC
+**** configuration dmd :dmd:
+***** sdp-dmd
+#+BEGIN_SRC sh :tangle dub.sdl
+configuration "sdp-dmd" {
+ name "dmd"
+ targetType "executable"
+ platforms "posix"
+ #compiler "dmd"
+ targetName "sdp-dmd"
+ buildOptions "releaseMode" "optimize" "inline"
+ postGenerateCommands "/usr/bin/notify-send -t 0 'D dmd compiled test release executable ready' 'sdp-dmd'"
+}
+#+END_SRC
+
+***** sdp-debug-dmd :debug:
+#+BEGIN_SRC sh :tangle dub.sdl
+configuration "sdp-debug-dmd" {
+ name "debuging"
+ targetType "executable"
+ platforms "posix"
+ targetName "sdp-debug-dmd"
+ debugVersions "checkdoc"
+ debugVersions "summary"
+ debugVersions "dumpdoc"
+ buildOptions "debugMode" "debugInfo" "optimize"
+ postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-debug-dmd'"
+}
+#+END_SRC
+
+**** configuration ldc :ldc:
+***** sdp-ldc
+#+BEGIN_SRC sh :tangle dub.sdl
+configuration "sdp-ldc" {
+ name "ldc"
+ targetType "executable"
+ platforms "posix"
+ #compiler "ldc2"
+ targetName "sdp-ldc"
+ buildOptions "releaseMode" "optimize" "inline"
+ postGenerateCommands "/usr/bin/notify-send -t 0 'D ldc2 compiled test release executable ready' 'sdp-ldc'"
+}
+#+END_SRC
+
+***** sdp-debug-ldc :debug:
+#+BEGIN_SRC sh :tangle dub.sdl
+configuration "sdp-debug-ldc" {
+ name "debuging"
+ targetType "executable"
+ platforms "posix"
+ targetName "sdp-debug-ldc"
+ debugVersions "checkdoc"
+ debugVersions "summary"
+ debugVersions "dumpdoc"
+ buildOptions "debugMode" "debugInfo" "optimize"
+ postGenerateCommands "/usr/bin/notify-send -t 0 'D (debug) executable ready' 'sdp-debug-ldc'"
+}
+#+END_SRC
+
+**** configuration debug list :debug:
+
+#+BEGIN_SRC sh :tangle no
+ debugVersions "biblio"
+ debugVersions "biblio_sorted"
+ debugVersions "bibliosorted"
+ debugVersions "block"
+ debugVersions "bookindex"
+ debugVersions "bookindexmatch"
+ debugVersions "bookindexraw"
+ debugVersions "check"
+ debugVersions "checkdoc"
+ debugVersions "code"
+ debugVersions "comment"
+ debugVersions "dumpdoc"
+ debugVersions "endnotes"
+ debugVersions "endnotes_build"
+ debugVersions "footnotes"
+ debugVersions "footnotesdone"
+ debugVersions "group"
+ debugVersions "header"
+ debugVersions "header_and_content"
+ debugVersions "header1"
+ debugVersions "headerjson"
+ debugVersions "headermakejson"
+ debugVersions "headermetadatajson"
+ debugVersions "heading"
+ debugVersions "headings"
+ debugVersions "headingsfound"
+ debugVersions "insert"
+ debugVersions "munge"
+ debugVersions "node"
+ debugVersions "objectrelated1"
+ debugVersions "objectrelated2"
+ debugVersions "objects"
+ debugVersions "ocnoff"
+ debugVersions "para"
+ debugVersions "parabullet"
+ debugVersions "parabulletindent"
+ debugVersions "paraindent"
+ debugVersions "paraindenthang"
+ debugVersions "parent"
+ debugVersions "poem"
+ debugVersions "quote"
+ debugVersions "raw"
+ debugVersions "sdlang"
+ debugVersions "source"
+ debugVersions "srclines"
+ debugVersions "structattrib"
+ debugVersions "summary"
+ debugVersions "table"
+#+END_SRC
+
dflags platform="dmd" "-v --force -de -w -J./views -I./src/sdp -of./bin/sdp"
dflags platform="dmd" "-O -release"
#buildOptions "-O -release"
diff --git a/org/ao_abstract_doc_source.org b/org/ao_abstract_doc_source.org
index 75c581d..2fe674b 100644
--- a/org/ao_abstract_doc_source.org
+++ b/org/ao_abstract_doc_source.org
@@ -752,7 +752,7 @@ auto bookindex_section = bi_tuple[0];
obj_cite_number = bi_tuple[1];
debug(bookindex) { // bookindex
foreach (bi_entry; bookindex_section) {
- writeln(bi_entry["obj"]);
+ writeln(bi_entry);
}
}
#+END_SRC
@@ -2971,39 +2971,7 @@ struct BookIndexNuggetHash {
}
#+END_SRC
-**** book index report :report:
-
-#+name: ao_emitters
-#+BEGIN_SRC d
-struct BookIndexReport {
-// class BookIndexReport : AssertBookIndexReport {
- int mkn, skn;
- auto bookindex_report_sorted(
- string[][string][string] bookindex_unordered_hashes
- ) {
- auto mainkeys=bookindex_unordered_hashes.byKey.array.
- sort!("toLower(a) < toLower(b)", SwapStrategy.stable).release;
- foreach (mainkey; mainkeys) {
- auto subkeys=bookindex_unordered_hashes[mainkey].byKey.array.
- sort!("toLower(a) < toLower(b)", SwapStrategy.stable).release;
- foreach (subkey; subkeys) {
- debug(bookindex) {
- writeln(
- mainkey, ": ",
- subkey, ": ",
- to!string(bookindex_unordered_hashes[mainkey][subkey])
- );
- }
- ++skn;
- }
- ++mkn;
- }
- // return bookindex_the;
- }
-}
-#+END_SRC
-
-**** book index report indented :report:indented:
+**** book index (sort &) report indented :report:indented:
#+name: ao_emitters
#+BEGIN_SRC d
@@ -3036,7 +3004,7 @@ struct BookIndexReportIndent {
}
#+END_SRC
-**** book index report section :report:section:
+**** book index (sort &) report section :report:section:
#+name: ao_emitters
#+BEGIN_SRC d
@@ -3069,6 +3037,12 @@ struct BookIndexReportSection {
++mkn;
}
}
+#+END_SRC
+
+**** book index (sort &) build section :report:section:
+
+#+name: ao_emitters
+#+BEGIN_SRC d
auto bookindex_build_section(
string[][string][string] bookindex_unordered_hashes,
int obj_cite_number
@@ -3161,6 +3135,12 @@ struct BookIndexReportSection {
auto t = tuple(bookindex_section, obj_cite_number);
return t;
}
+#+END_SRC
+
+**** book index (sort &) build section :report:section:
+
+#+name: ao_emitters
+#+BEGIN_SRC d
auto bookindex_build_section_(
string[][string][string] bookindex_unordered_hashes
) {
diff --git a/org/ao_conf_make_meta.org b/org/ao_conf_make_meta.org
index f660147..38510c6 100644
--- a/org/ao_conf_make_meta.org
+++ b/org/ao_conf_make_meta.org
@@ -51,6 +51,107 @@ private auto configSettingsSDLangToAAmake(Tag conf_sdlang) {
private auto documentMakeSDLangToAAmake(Tag document_make_sdlang) {
auto dochead_make = sdlangToAAmake(make_aa, document_make_sdlang);
/+
+ /+ dochead +/
+ string hm;
+ string hs;
+ /+ make +/
+ auto dochead_make = make_aa;
+ if (!(document_make_sdlang.maybe.tags["make"].empty)) {
+ hm = "make";
+ hs = "bold";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "breaks";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "cover_image";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "css";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "emphasis";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "footer";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "headings";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "home_button_image";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "home_button_text";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "italics";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "num_top";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "substitute";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "texpdf_font";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ }
+ +/
+ /+
hm = "links";
if (!(document_make_sdlang.maybe.tags[hm].empty)) {
/+ TODO
@@ -520,6 +621,20 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch
dochead_meta[hm][hs] =
to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
}
+ hs = "edition";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "note";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
}
hm = "creator";
if (!(header_sdlang.maybe.tags[hm].empty)) {
@@ -536,6 +651,141 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch
dochead_meta[hm][hs] =
to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
}
+ hs = "author_email";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "illustrator";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "translator";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ }
+ hm = "classify";
+ if (!(header_sdlang.maybe.tags[hm].empty)) {
+ hs = "dewey";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "keywords";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "loc";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "subject";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "topic_register";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ }
+ hm = "date";
+ if (!(header_sdlang.maybe.tags[hm].empty)) {
+ hs = "added_to_site";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "available";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "created";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "issued";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "modified";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "published";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "valid";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ }
+ hm = "identifier";
+ if (!(header_sdlang.maybe.tags[hm].empty)) {
+ hs = "isbn";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "oclc";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "pg";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
}
hm = "links";
if (!(header_sdlang.maybe.tags[hm].empty)) {
@@ -550,6 +800,47 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch
// to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
// }
}
+ hm = "notes";
+ if (!(header_sdlang.maybe.tags[hm].empty)) {
+ hs = "abstract";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "description";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ }
+ hm = "original";
+ if (!(header_sdlang.maybe.tags[hm].empty)) {
+ hs = "language";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "source";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "title";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ }
hm = "publisher";
if (!(header_sdlang.maybe.tags[hm].empty)) {
hs = "name";
@@ -560,6 +851,36 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch
to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
}
}
+ hm = "rights";
+ if (!(header_sdlang.maybe.tags[hm].empty)) {
+ hs = "copyright";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "cover";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "illustrations";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "license";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
}
+/
auto t = tuple(dochead_make, dochead_meta);
diff --git a/org/ao_defaults.org b/org/ao_defaults.org
index a6baeb4..78b1de8 100644
--- a/org/ao_defaults.org
+++ b/org/ao_defaults.org
@@ -507,6 +507,10 @@ template InternalMarkup() {
* regex ctRegex :regex:
[[./sdp.org][sdp]] [[./][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.
** misc :misc:
@@ -620,7 +624,7 @@ static para_attribs = ctRegex!(`^_(([0-9])(_([0-9]))?|_([1-9])?[*]) `);
#+name: ao_rgx
#+BEGIN_SRC d
/+ blocked markup +/
-static block_open = ctRegex!("^((code|poem|group|block|quote|table)[{].*?$)|^`{3} (code|poem|group|block|quote|table)");
+static block_open = ctRegex!("^((code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)[{].*?$)|^`{3} (code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)");
// static block_open_less_code = ctRegex!("^(((poem|group|block|quote|table)[{].*?$)|`{3} (poem|group|block|quote|table))");
static block_poem_open = ctRegex!("^((poem[{].*?$)|`{3} poem)");
#+END_SRC
@@ -630,9 +634,9 @@ static block_poem_open = ctRegex!("^((poem[{].*?$)|`{3} poem)");
#+name: ao_rgx
#+BEGIN_SRC d
/+ blocked markup tics +/
-static block_tic_open = ctRegex!("^`{3} (code|poem|group|block|quote|table)");
+static block_tic_open = ctRegex!("^`{3} (code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)");
// static block_tic_open_less_code = ctRegex!("^`{3} (poem|group|block|quote|table)");
-static block_tic_code_open = ctRegex!("^`{3} (code)");
+static block_tic_code_open = ctRegex!("^`{3} (code)([.][a-z][0-9a-z_]+)?");
static block_tic_poem_open = ctRegex!("^`{3} (poem)");
static block_tic_group_open = ctRegex!("^`{3} (group)");
static block_tic_block_open = ctRegex!("^`{3} (block)");
@@ -646,9 +650,9 @@ static block_tic_close = ctRegex!("^(`{3})$","m");
#+name: ao_rgx
#+BEGIN_SRC d
/+ blocked markup curly +/
-static block_curly_open = ctRegex!(`^((code|poem|group|block|quote|table)[{].*?$)`);
+static block_curly_open = ctRegex!(`^((code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)[{].*?$)`);
// static block_curly_open_less_code = ctRegex!(`^((poem|group|block|quote|table)[{].*?$)`);
-static block_curly_code_open = ctRegex!(`^(code[{].*?$)`);
+static block_curly_code_open = ctRegex!(`^(code([.][a-z][0-9a-z_]+)?[{].*?$)`);
static block_curly_code_close = ctRegex!(`^([}]code)`);
static block_curly_poem_open = ctRegex!(`^(poem[{].*?$)`);
static block_curly_poem_close = ctRegex!(`^([}]poem)`);
diff --git a/org/ao_output_debugs.org b/org/ao_output_debugs.org
index 0f001e1..d5d8177 100644
--- a/org/ao_output_debugs.org
+++ b/org/ao_output_debugs.org
@@ -14,6 +14,40 @@
* output debugs :debug:output:
[[./sdp.org][sdp]] [[./][org/]]
+
+** book index (sort &) report :report:
+
+#+name: book_index_sorted_report
+#+BEGIN_SRC d
+struct BookIndexReport {
+// class BookIndexReport : AssertBookIndexReport {
+ int mkn, skn;
+ auto bookindex_report_sorted(
+ string[][string][string] bookindex_unordered_hashes
+ ) {
+ auto mainkeys=bookindex_unordered_hashes.byKey.array.
+ sort!("toLower(a) < toLower(b)", SwapStrategy.stable).release;
+ foreach (mainkey; mainkeys) {
+ auto subkeys=bookindex_unordered_hashes[mainkey].byKey.array.
+ sort!("toLower(a) < toLower(b)", SwapStrategy.stable).release;
+ foreach (subkey; subkeys) {
+ debug(bookindex) {
+ writeln(
+ mainkey, ": ",
+ subkey, ": ",
+ to!string(bookindex_unordered_hashes[mainkey][subkey])
+ );
+ }
+ // bookindex_the[mkn][mainkey][skn][subkey] ~= (bookindex_unordered_hashes[mainkey][subkey]);
+ ++skn;
+ }
+ ++mkn;
+ }
+ // return bookindex_the;
+ }
+}
+#+END_SRC
+
** (parent) :parent:
#+name: ao_output_debugs
@@ -477,13 +511,14 @@ debug(checkdoc) {
ao_output_debugs.d
+/
template SiSUoutputDebugs() {
+ <<book_index_sorted_report>>
struct SDPoutputDebugs {
auto abstract_doc_source_debugs(S)(
auto ref const S contents,
string[][string][string] bookindex_unordered_hashes,
JSONValue[] biblio,
- JSONValue[string] dochead_make,
- JSONValue[string] dochead_meta,
+ string[string][string] dochead_make,
+ string[string][string] dochead_meta,
string fn_src,
bool[string] opt_action_bool
) {
diff --git a/org/output.org b/org/output.org
index 69779f2..773aeef 100644
--- a/org/output.org
+++ b/org/output.org
@@ -15,7 +15,8 @@
[[./sdp.org][sdp]] [[./][org/]]
* output :output:
** text :text:
-** html :html:
+** html [#A] :html:
+*** open
#+name: output_html
#+BEGIN_SRC d
@@ -1456,8 +1457,6 @@ struct SDPoutputHTML {
string fn_src,
bool[string] opt_action_bool
) {
- mixin ScreenTxtColors;
- mixin RgxInit;
auto rgx = Rgx();
string[] toc;
string[] body_;
@@ -1521,14 +1520,72 @@ struct SDPoutputHTML {
// Handle error
}
}
+#+END_SRC
+
+*** close
+
+#+name: output_html
+#+BEGIN_SRC d
}
#+END_SRC
-** epub :epub:
+** epub [#B] :epub:
** pdf :pdf:
** odt :odt:
-** sqlite :sqlite:
+** sqlite [#B] :sqlite:
** pgsql :pgsql:
+** TODO check selection :output:
+
+#+NAME: output_selection
+#+BEGIN_SRC d
+struct SDPoutput {
+ void hub(S)(
+ auto ref const S contents,
+ string[][string][string] bookindex_unordered_hashes,
+ JSONValue[] biblio,
+ string[string][string] dochead_make_json,
+ string[string][string] dochead_meta_json,
+ string fn_src,
+ bool[string] opt_action_bool
+ ) {
+ auto rgx = Rgx();
+ if (opt_action_bool["source"]) {
+ writeln("sisupod source");
+ }
+ if (opt_action_bool["sisupod"]) {
+ writeln("sisupod source");
+ }
+ if (opt_action_bool["text"]) {
+ writeln("text processing");
+ // auto text=SDPoutput_text();
+ // text.scroll(contents, bookindex_unordered_hashes, biblio, fn_src, opt_action_bool);
+ // // text.scroll(contents, bookindex_unordered_hashes, biblio, dochead_make, dochead_meta, fn_src, opt_action_bool);
+ }
+ if (opt_action_bool["html"]) {
+ auto html=SDPoutputHTML();
+ html.css_write;
+ html.scroll(contents, bookindex_unordered_hashes, biblio, fn_src, opt_action_bool);
+ // html.scroll(contents, bookindex_unordered_hashes, biblio, dochead_make_aa, dochead_meta_aa, fn_src, opt_action_bool);
+ }
+ if (opt_action_bool["epub"]) {
+ writeln("epub processing");
+ }
+ if (opt_action_bool["pdf"]) {
+ writeln("pdf processing");
+ }
+ if (opt_action_bool["odt"]) {
+ writeln("odt processing");
+ }
+ if (opt_action_bool["sqlite"]) {
+ writeln("sqlite processing");
+ }
+ if (opt_action_bool["postgresql"]) {
+ writeln("pgsql processing");
+ }
+ }
+}
+#+END_SRC
+
* tangles :tangle:
** code structure: :output.d:
@@ -1538,10 +1595,12 @@ struct SDPoutputHTML {
output_hub.d
+/
template SiSUoutputHub() {
+ <<output_selection>>
<<output_html>>
}
#+END_SRC
+* +other+
** example head
<!DOCTYPE html>
diff --git a/org/sdp.org b/org/sdp.org
index 4eec38d..b06c7ef 100644
--- a/org/sdp.org
+++ b/org/sdp.org
@@ -24,7 +24,7 @@ struct Version {
int minor;
int patch;
}
-enum ver = Version(0, 6, 2);
+enum ver = Version(0, 6, 3);
#+END_SRC
* sdp.d sisu document parser :sdp.d:
@@ -84,7 +84,11 @@ import
[[./ao_rgx.org][ao_rgx]]
[[./output_hub.org][output hub]]
-**** sdlang :import:sdlang:
+**** TODO sdlang :import:sdlang:
+keep up to date, configuration in ../maker.org
+check:
+- http://github.com/Abscissa/SDLang-D
+- https://github.com/abscissa/libInputVisitor
#+NAME: imports_sdlang
#+BEGIN_SRC d
@@ -151,64 +155,6 @@ mixin SiSUoutputHub;
mixin ScreenTxtColors;
#+END_SRC
-*** sdp output check selection :output:
-
-#+NAME: sdp_output_selection
-#+BEGIN_SRC d
-struct SDPoutput {
- auto hub(S)(
- auto ref const S contents,
- string[][string][string] bookindex_unordered_hashes,
- JSONValue[] biblio,
- string[string][string] dochead_make_json,
- string[string][string] dochead_meta_json,
- string fn_src,
- bool[string] opt_action_bool
- ) {
- mixin ScreenTxtColors;
- mixin RgxInit;
- mixin SiSUoutputHub;
- auto rgx = Rgx();
- uint return_ = 0;
- if (opt_action_bool["source"]) {
- writeln("sisupod source");
- }
- if (opt_action_bool["sisupod"]) {
- writeln("sisupod source");
- }
- if (opt_action_bool["text"]) {
- writeln("text processing");
- // auto text=SDPoutput_text();
- // text.scroll(contents, bookindex_unordered_hashes, biblio, fn_src, opt_action_bool);
- // // text.scroll(contents, bookindex_unordered_hashes, biblio, dochead_make, dochead_meta, fn_src, opt_action_bool);
- }
- if (opt_action_bool["html"]) {
- auto html=SDPoutputHTML();
- html.css_write;
- html.scroll(contents, bookindex_unordered_hashes, biblio, fn_src, opt_action_bool);
- // html.scroll(contents, bookindex_unordered_hashes, biblio, dochead_make_aa, dochead_meta_aa, fn_src, opt_action_bool);
- }
- if (opt_action_bool["epub"]) {
- writeln("epub processing");
- }
- if (opt_action_bool["pdf"]) {
- writeln("pdf processing");
- }
- if (opt_action_bool["odt"]) {
- writeln("odt processing");
- }
- if (opt_action_bool["sqlite"]) {
- writeln("sqlite processing");
- }
- if (opt_action_bool["postgresql"]) {
- writeln("pgsql processing");
- }
- return return_;
- }
-}
-#+END_SRC
-
-
*** init :init:
#+NAME: sdp_args
@@ -233,7 +179,7 @@ string arg_unrecognized;
auto rgx = Rgx();
#+END_SRC
-*** scope :scope:
+*** scope (run complete) :scope:
#+NAME: sdp_args
#+BEGIN_SRC d
@@ -251,8 +197,7 @@ scope(success) {
scope(failure) {
debug(checkdoc) {
stderr.writefln(
- "%s~ run failure ~%s",
- scr_txt_color["fuchsia"], scr_txt_color["off"],
+ "run failure",
);
}
}
@@ -342,7 +287,7 @@ auto conf_doc_make_aa = confsdl.documentMakeSDLangToAAmake(sdl_root_doc_make);
** each file (loop) [+2] :loop:files:
*** filename provided [+1] :file:process:
-**** loop scope :scope:
+**** scope (loop) :scope:
#+NAME: sdp_each_file_do
#+BEGIN_SRC d
@@ -445,7 +390,7 @@ output.hub(
);
#+END_SRC
-**** on exit :scope:exit:
+**** scope (on loop exit) :scope:exit:
#+NAME: sdp_each_file_do
#+BEGIN_SRC d
@@ -529,7 +474,7 @@ void main(string[] args) {
** program dir structure
figure out best program dir structure for dub and compilers, issue with rdmd
-** sisu file structure
+** sisu document structure
|---------------------+------------------------------------------+------------------------+--------|
| header | sisu /header markup/ | markup | |
@@ -561,6 +506,7 @@ figure out best program dir structure for dub and compilers, issue with rdmd
** config :config:
using sdlang in sdp
+
*** sdp config and header? file format? sdl ? yml ? json ? :sdl:sdlang:
[[https://sdlang.org/][SDL: Simple Declarative Language]] [[http://sdl4r.rubyforge.org/syntaxhighlighter_brush.html][highlighter]]
@@ -610,27 +556,31 @@ http://forum.dlang.org/thread/gnfctbuhiemidetngrzi@forum.dlang.org?page=23#post-
*** other links
http://semitwist.com/sdlang-d-docs/v0.9.3/sdlang.html http://semitwist.com/sdlang-d-docs/
-** read markup files
-**** regular .sst
-relatively straight forward
-**** master .ssm
-master files have been able to read in inser files .ssi and regular files .sst
-***** reading in .ssi files is straightforward
-***** reading in .sst files is more problematic
-.sst files have their own root (structure)
-either
-- the root needs to be disabled - not used
-or
-- the root tree needs to be demoted, which is only possible if markup from
- heading D is not reached then A - C could be demoted to B - D
-- the other issue there is that it is common not to write out heading level A
- text but to rely on the metadata for title and author, the issue there is that
- at present the header for .sst files that are imported is just lopped off and
- thrown away. At least the title and author information for each imported .sst
- file would have to read and available for use in its header A that is demoted
- to B
+** markup
+*** code
+
+#+BEGIN_SRC txt :tangle no
+code.ruby{
+
+}code
+
+code.python{
+
+}code
+
+code.sh{
+
+}code
+
+code.txt{
+
+}code
+
+code.d{
+
+}code
+#+END_SRC
-** processing files, currently using utf8
** src dir structure & files
#+BEGIN_SRC txt :tangle no
tree /home/ralph/sisu_www/current/src/democratizing_innovation.eric_von_hippel.sst
@@ -653,7 +603,29 @@ democratizing_innovation.eric_von_hippel.sst
#+END_SRC
+** read markup files
+**** regular .sst
+relatively straight forward
+**** master .ssm
+master files have been able to read in inser files .ssi and regular files .sst
+***** reading in .ssi files is straightforward
+***** reading in .sst files is more problematic
+.sst files have their own root (structure)
+either
+- the root needs to be disabled - not used
+or
+- the root tree needs to be demoted, which is only possible if markup from
+ heading D is not reached then A - C could be demoted to B - D
+- the other issue there is that it is common not to write out heading level A
+ text but to rely on the metadata for title and author, the issue there is that
+ at present the header for .sst files that are imported is just lopped off and
+ thrown away. At least the title and author information for each imported .sst
+ file would have to read and available for use in its header A that is demoted
+ to B
+
+** processing files, currently using utf8
** check
+
#+BEGIN_SRC text
./.sisu ./_sisu ~/.sisu /etc/.sisu
#+END_SRC
diff --git a/src/sdp.d b/src/sdp.d
index f03b7de..afc87a0 100755
--- a/src/sdp.d
+++ b/src/sdp.d
@@ -37,57 +37,7 @@ private import
std.typecons,
std.utf,
std.conv : to;
-struct SDPoutput {
- auto hub(S)(
- auto ref const S contents,
- string[][string][string] bookindex_unordered_hashes,
- JSONValue[] biblio,
- string[string][string] dochead_make_json,
- string[string][string] dochead_meta_json,
- string fn_src,
- bool[string] opt_action_bool
- ) {
- mixin ScreenTxtColors;
- mixin RgxInit;
- mixin SiSUoutputHub;
- auto rgx = Rgx();
- uint return_ = 0;
- if (opt_action_bool["source"]) {
- writeln("sisupod source");
- }
- if (opt_action_bool["sisupod"]) {
- writeln("sisupod source");
- }
- if (opt_action_bool["text"]) {
- writeln("text processing");
- // auto text=SDPoutput_text();
- // text.scroll(contents, bookindex_unordered_hashes, biblio, fn_src, opt_action_bool);
- // // text.scroll(contents, bookindex_unordered_hashes, biblio, dochead_make, dochead_meta, fn_src, opt_action_bool);
- }
- if (opt_action_bool["html"]) {
- auto html=SDPoutputHTML();
- html.css_write;
- html.scroll(contents, bookindex_unordered_hashes, biblio, fn_src, opt_action_bool);
- // html.scroll(contents, bookindex_unordered_hashes, biblio, dochead_make_aa, dochead_meta_aa, fn_src, opt_action_bool);
- }
- if (opt_action_bool["epub"]) {
- writeln("epub processing");
- }
- if (opt_action_bool["pdf"]) {
- writeln("pdf processing");
- }
- if (opt_action_bool["odt"]) {
- writeln("odt processing");
- }
- if (opt_action_bool["sqlite"]) {
- writeln("sqlite processing");
- }
- if (opt_action_bool["postgresql"]) {
- writeln("pgsql processing");
- }
- return return_;
- }
-}
+
mixin(import("version.txt"));
mixin CompileTimeInfo;
mixin RgxInit;
@@ -135,8 +85,7 @@ void main(string[] args) {
scope(failure) {
debug(checkdoc) {
stderr.writefln(
- "%s~ run failure ~%s",
- scr_txt_color["fuchsia"], scr_txt_color["off"],
+ "run failure",
);
}
}
diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d
index 067e920..5095dab 100644
--- a/src/sdp/ao_abstract_doc_source.d
+++ b/src/sdp/ao_abstract_doc_source.d
@@ -538,7 +538,7 @@ template SiSUdocAbstraction() {
obj_cite_number = bi_tuple[1];
debug(bookindex) { // bookindex
foreach (bi_entry; bookindex_section) {
- writeln(bi_entry["obj"]);
+ writeln(bi_entry);
}
}
auto document_the =
@@ -2509,32 +2509,6 @@ template SiSUdocAbstraction() {
invariant() {
}
}
- struct BookIndexReport {
- // class BookIndexReport : AssertBookIndexReport {
- int mkn, skn;
- auto bookindex_report_sorted(
- string[][string][string] bookindex_unordered_hashes
- ) {
- auto mainkeys=bookindex_unordered_hashes.byKey.array.
- sort!("toLower(a) < toLower(b)", SwapStrategy.stable).release;
- foreach (mainkey; mainkeys) {
- auto subkeys=bookindex_unordered_hashes[mainkey].byKey.array.
- sort!("toLower(a) < toLower(b)", SwapStrategy.stable).release;
- foreach (subkey; subkeys) {
- debug(bookindex) {
- writeln(
- mainkey, ": ",
- subkey, ": ",
- to!string(bookindex_unordered_hashes[mainkey][subkey])
- );
- }
- ++skn;
- }
- ++mkn;
- }
- // return bookindex_the;
- }
- }
struct BookIndexReportIndent {
int mkn, skn;
auto bookindex_report_indented(
diff --git a/src/sdp/ao_conf_make_meta_sdlang.d b/src/sdp/ao_conf_make_meta_sdlang.d
index 16a36e9..612c88a 100644
--- a/src/sdp/ao_conf_make_meta_sdlang.d
+++ b/src/sdp/ao_conf_make_meta_sdlang.d
@@ -32,6 +32,107 @@ template SiSUheaderExtractSDLang() {
private auto documentMakeSDLangToAAmake(Tag document_make_sdlang) {
auto dochead_make = sdlangToAAmake(make_aa, document_make_sdlang);
/+
+ /+ dochead +/
+ string hm;
+ string hs;
+ /+ make +/
+ auto dochead_make = make_aa;
+ if (!(document_make_sdlang.maybe.tags["make"].empty)) {
+ hm = "make";
+ hs = "bold";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "breaks";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "cover_image";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "css";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "emphasis";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "footer";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "headings";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "home_button_image";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "home_button_text";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "italics";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "num_top";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "substitute";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "texpdf_font";
+ if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_make[hm][hs] =
+ to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ }
+ +/
+ /+
hm = "links";
if (!(document_make_sdlang.maybe.tags[hm].empty)) {
/+ TODO
@@ -153,6 +254,20 @@ template SiSUheaderExtractSDLang() {
dochead_meta[hm][hs] =
to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
}
+ hs = "edition";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "note";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
}
hm = "creator";
if (!(header_sdlang.maybe.tags[hm].empty)) {
@@ -169,6 +284,141 @@ template SiSUheaderExtractSDLang() {
dochead_meta[hm][hs] =
to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
}
+ hs = "author_email";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "illustrator";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "translator";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ }
+ hm = "classify";
+ if (!(header_sdlang.maybe.tags[hm].empty)) {
+ hs = "dewey";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "keywords";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "loc";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "subject";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "topic_register";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ }
+ hm = "date";
+ if (!(header_sdlang.maybe.tags[hm].empty)) {
+ hs = "added_to_site";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "available";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "created";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "issued";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "modified";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "published";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "valid";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ }
+ hm = "identifier";
+ if (!(header_sdlang.maybe.tags[hm].empty)) {
+ hs = "isbn";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "oclc";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "pg";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
}
hm = "links";
if (!(header_sdlang.maybe.tags[hm].empty)) {
@@ -183,6 +433,47 @@ template SiSUheaderExtractSDLang() {
// to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
// }
}
+ hm = "notes";
+ if (!(header_sdlang.maybe.tags[hm].empty)) {
+ hs = "abstract";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "description";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ }
+ hm = "original";
+ if (!(header_sdlang.maybe.tags[hm].empty)) {
+ hs = "language";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "source";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "title";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ }
hm = "publisher";
if (!(header_sdlang.maybe.tags[hm].empty)) {
hs = "name";
@@ -193,6 +484,36 @@ template SiSUheaderExtractSDLang() {
to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
}
}
+ hm = "rights";
+ if (!(header_sdlang.maybe.tags[hm].empty)) {
+ hs = "copyright";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "cover";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "illustrations";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
+ hs = "license";
+ if (!(header_sdlang.tags[hm][0].maybe.attributes[hs].empty)
+ && (header_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) {
+ writeln(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ dochead_meta[hm][hs] =
+ to!string(header_sdlang.tags[hm][0].attributes[hs][0].value);
+ }
}
+/
auto t = tuple(dochead_make, dochead_meta);
diff --git a/src/sdp/ao_output_debugs.d b/src/sdp/ao_output_debugs.d
index 68a2d40..be08ebe 100644
--- a/src/sdp/ao_output_debugs.d
+++ b/src/sdp/ao_output_debugs.d
@@ -3,13 +3,40 @@
ao_output_debugs.d
+/
template SiSUoutputDebugs() {
+ struct BookIndexReport {
+ // class BookIndexReport : AssertBookIndexReport {
+ int mkn, skn;
+ auto bookindex_report_sorted(
+ string[][string][string] bookindex_unordered_hashes
+ ) {
+ auto mainkeys=bookindex_unordered_hashes.byKey.array.
+ sort!("toLower(a) < toLower(b)", SwapStrategy.stable).release;
+ foreach (mainkey; mainkeys) {
+ auto subkeys=bookindex_unordered_hashes[mainkey].byKey.array.
+ sort!("toLower(a) < toLower(b)", SwapStrategy.stable).release;
+ foreach (subkey; subkeys) {
+ debug(bookindex) {
+ writeln(
+ mainkey, ": ",
+ subkey, ": ",
+ to!string(bookindex_unordered_hashes[mainkey][subkey])
+ );
+ }
+ // bookindex_the[mkn][mainkey][skn][subkey] ~= (bookindex_unordered_hashes[mainkey][subkey]);
+ ++skn;
+ }
+ ++mkn;
+ }
+ // return bookindex_the;
+ }
+ }
struct SDPoutputDebugs {
auto abstract_doc_source_debugs(S)(
auto ref const S contents,
string[][string][string] bookindex_unordered_hashes,
JSONValue[] biblio,
- JSONValue[string] dochead_make,
- JSONValue[string] dochead_meta,
+ string[string][string] dochead_make,
+ string[string][string] dochead_meta,
string fn_src,
bool[string] opt_action_bool
) {
diff --git a/src/sdp/ao_rgx.d b/src/sdp/ao_rgx.d
index bb032ea..15f9ed9 100644
--- a/src/sdp/ao_rgx.d
+++ b/src/sdp/ao_rgx.d
@@ -76,13 +76,13 @@ template RgxInit() {
static para_indent_hang = ctRegex!(`^_([0-9])_([0-9]) `);
static para_attribs = ctRegex!(`^_(([0-9])(_([0-9]))?|_([1-9])?[*]) `);
/+ blocked markup +/
- static block_open = ctRegex!("^((code|poem|group|block|quote|table)[{].*?$)|^`{3} (code|poem|group|block|quote|table)");
+ static block_open = ctRegex!("^((code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)[{].*?$)|^`{3} (code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)");
// static block_open_less_code = ctRegex!("^(((poem|group|block|quote|table)[{].*?$)|`{3} (poem|group|block|quote|table))");
static block_poem_open = ctRegex!("^((poem[{].*?$)|`{3} poem)");
/+ blocked markup tics +/
- static block_tic_open = ctRegex!("^`{3} (code|poem|group|block|quote|table)");
+ static block_tic_open = ctRegex!("^`{3} (code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)");
// static block_tic_open_less_code = ctRegex!("^`{3} (poem|group|block|quote|table)");
- static block_tic_code_open = ctRegex!("^`{3} (code)");
+ static block_tic_code_open = ctRegex!("^`{3} (code)([.][a-z][0-9a-z_]+)?");
static block_tic_poem_open = ctRegex!("^`{3} (poem)");
static block_tic_group_open = ctRegex!("^`{3} (group)");
static block_tic_block_open = ctRegex!("^`{3} (block)");
@@ -90,9 +90,9 @@ template RgxInit() {
static block_tic_table_open = ctRegex!("^`{3} (table)");
static block_tic_close = ctRegex!("^(`{3})$","m");
/+ blocked markup curly +/
- static block_curly_open = ctRegex!(`^((code|poem|group|block|quote|table)[{].*?$)`);
+ static block_curly_open = ctRegex!(`^((code([.][a-z][0-9a-z_]+)?|poem|group|block|quote|table)[{].*?$)`);
// static block_curly_open_less_code = ctRegex!(`^((poem|group|block|quote|table)[{].*?$)`);
- static block_curly_code_open = ctRegex!(`^(code[{].*?$)`);
+ static block_curly_code_open = ctRegex!(`^(code([.][a-z][0-9a-z_]+)?[{].*?$)`);
static block_curly_code_close = ctRegex!(`^([}]code)`);
static block_curly_poem_open = ctRegex!(`^(poem[{].*?$)`);
static block_curly_poem_close = ctRegex!(`^([}]poem)`);
diff --git a/src/sdp/output_hub.d b/src/sdp/output_hub.d
index f81c118..28784a3 100644
--- a/src/sdp/output_hub.d
+++ b/src/sdp/output_hub.d
@@ -3,6 +3,52 @@
output_hub.d
+/
template SiSUoutputHub() {
+ struct SDPoutput {
+ void hub(S)(
+ auto ref const S contents,
+ string[][string][string] bookindex_unordered_hashes,
+ JSONValue[] biblio,
+ string[string][string] dochead_make_json,
+ string[string][string] dochead_meta_json,
+ string fn_src,
+ bool[string] opt_action_bool
+ ) {
+ auto rgx = Rgx();
+ if (opt_action_bool["source"]) {
+ writeln("sisupod source");
+ }
+ if (opt_action_bool["sisupod"]) {
+ writeln("sisupod source");
+ }
+ if (opt_action_bool["text"]) {
+ writeln("text processing");
+ // auto text=SDPoutput_text();
+ // text.scroll(contents, bookindex_unordered_hashes, biblio, fn_src, opt_action_bool);
+ // // text.scroll(contents, bookindex_unordered_hashes, biblio, dochead_make, dochead_meta, fn_src, opt_action_bool);
+ }
+ if (opt_action_bool["html"]) {
+ auto html=SDPoutputHTML();
+ html.css_write;
+ html.scroll(contents, bookindex_unordered_hashes, biblio, fn_src, opt_action_bool);
+ // html.scroll(contents, bookindex_unordered_hashes, biblio, dochead_make_aa, dochead_meta_aa, fn_src, opt_action_bool);
+ }
+ if (opt_action_bool["epub"]) {
+ writeln("epub processing");
+ }
+ if (opt_action_bool["pdf"]) {
+ writeln("pdf processing");
+ }
+ if (opt_action_bool["odt"]) {
+ writeln("odt processing");
+ }
+ if (opt_action_bool["sqlite"]) {
+ writeln("sqlite processing");
+ }
+ if (opt_action_bool["postgresql"]) {
+ writeln("pgsql processing");
+ }
+ }
+ }
struct SDPoutputHTML {
auto html_css() {
string css;
@@ -1415,8 +1461,6 @@ template SiSUoutputHub() {
string fn_src,
bool[string] opt_action_bool
) {
- mixin ScreenTxtColors;
- mixin RgxInit;
auto rgx = Rgx();
string[] toc;
string[] body_;
diff --git a/views/version.txt b/views/version.txt
index cbd04bd..61c060a 100644
--- a/views/version.txt
+++ b/views/version.txt
@@ -4,4 +4,4 @@ struct Version {
int minor;
int patch;
}
-enum ver = Version(0, 6, 2);
+enum ver = Version(0, 6, 3);