aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2017-08-14 00:06:20 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commit83850bfcc9abfdbfa87b0894387d2e18761da404 (patch)
tree2b6028e6ec4e6872e3fd3b31ac2ef939dc2e2b73
parent0.18.1 ocn, looks promising (diff)
config (& metadata) instruction tables
-rw-r--r--org/sdp.org237
-rw-r--r--src/sdp/meta/metadoc.d4
-rwxr-xr-xsrc/sdp/sdp.d4
3 files changed, 215 insertions, 30 deletions
diff --git a/org/sdp.org b/org/sdp.org
index 032448e..5855ee2 100644
--- a/org/sdp.org
+++ b/org/sdp.org
@@ -337,8 +337,8 @@ auto env = [
#+NAME: sdp_conf_files
#+BEGIN_SRC d
-auto sdl_root_config_share = configRead!()("config_local", env);
-auto sdl_root_config_local = configRead!()("config_share", env);
+auto sdl_root_config_share = configRead!()("config_share", env);
+auto sdl_root_config_local = configRead!()("config_local", env);
auto conf_composite_static_aa = extractSDL().sdlangToAA(conf_aa_empty, sdl_root_config_share);
conf_composite_static_aa = extractSDL().sdlangToAA(conf_composite_static_aa, sdl_root_config_local);
#+END_SRC
@@ -539,7 +539,7 @@ auto _make_config = compositeMkCnf!()(
);
#+END_SRC
-** composite config & make (files & doc header) aa
+** ?. composite config & make (files & doc header) aa
#+NAME: sdp_each_file_do_document_abstraction
#+BEGIN_SRC d
@@ -967,30 +967,215 @@ 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
-|----+---------------------------------+----------------------------------------+----------------+---+---|
-| | make instruction source | | | | |
-|----+---------------------------------+----------------------------------------+----------------+---+---|
-| 0. | unify the following as a single | take into account all the instructions | | | |
-| | set of make instructions | provided below, provide interface | | | |
-|----+---------------------------------+----------------------------------------+----------------+---+---|
-| 1. | config | local site specific | every document | | |
-|----+---------------------------------+----------------------------------------+----------------+---+---|
-| 2. | document_make | to be applied to all documents | every document | | |
-| | | (unless subsequently overridden) | | | |
-|----+---------------------------------+----------------------------------------+----------------+---+---|
-| 3. | document header make | make instructions contained | per document | | |
-| | | in document header | | | |
-|----+---------------------------------+----------------------------------------+----------------+---+---|
-| 4. | command line instruction | make instruction passed | every document | | |
-|----+---------------------------------+----------------------------------------+----------------+---+---|
-
-- local, site specific (site local instructions such as the site's url, cgi
- location etc.)
-- general, document_make config file (to be applied to all documents unless
+- 1. general, document_make config file (to be applied to all documents unless
overridden by document or command line instruction)
-- each document header, make (the document header contains metadata and may
+- 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
-- command line instruction, make (some make instructions may be passed through
- the command line)
+- 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_share" | (unless subsequently overridden) | (all docs within) | |
+|----+---------------------------------+----------------------------------------+---------------------+---|
+| 2. | config file | local site specific | per directory | |
+| | "config_local" | | (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 (sisupod) | per dir | per document (sisupod) | per command instruction |
+|---------------------+-----------------------+-------------------------+------------------------+-----------------------------|
+| | sdl_root_config_share | sdl_root_config_local | | |
+|---------------------+-----------------------+-------------------------+------------------------+-----------------------------|
+| local site specific | | * | | *? |
+|---------------------+-----------------------+-------------------------+------------------------+-----------------------------|
+| | | webserv | | |
+| | | - url_root | | |
+| | | - path | | |
+| | | - images | | |
+| | | - cgi | | |
+|---------------------+-----------------------+-------------------------+------------------------+-----------------------------|
+| | | webserv_cgi | | |
+| | | - host | | |
+| | | - base_path | | |
+| | | - port | | |
+| | | - user | | |
+| | | - file_links | | |
+|---------------------+-----------------------+-------------------------+------------------------+-----------------------------|
+| | | processing | | |
+| | | - path | | |
+| | | - dir | | |
+| | | - concord_max | | |
+|---------------------+-----------------------+-------------------------+------------------------+-----------------------------|
+| | | flag | | |
+| | | - act0 | | |
+| | | - act1 | | |
+| | | - act2 | | |
+| | | - act3 | | |
+| | | - act4 | | |
+| | | - act5 | | |
+| | | - act6 | | |
+| | | - act7 | | |
+| | | - act8 | | |
+| | | - 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 | |
+| | - num_depth | - num_depth | - 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 |
+| | | | | sisupod |
+| | | | | source |
+| | | | | sqlite |
+| | | | | sqlite-create |
+| | | | | sqlite-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/src/sdp/meta/metadoc.d b/src/sdp/meta/metadoc.d
index 243da9d..d563dfc 100644
--- a/src/sdp/meta/metadoc.d
+++ b/src/sdp/meta/metadoc.d
@@ -31,8 +31,8 @@ template SiSUabstraction() {
enum docAbst { doc_abstraction, section_keys, segnames, segnames_0_4, images }
static auto rgx = Rgx();
auto SiSUabstraction(Fn,O,E)(Fn fn_src, O opts, E env){
- auto sdl_root_config_share = configRead!()("config_local", env);
- auto sdl_root_config_local = configRead!()("config_share", env);
+ auto sdl_root_config_share = configRead!()("config_share", env);
+ auto sdl_root_config_local = configRead!()("config_local", env);
auto conf_composite_static_aa = extractSDL().sdlangToAA(conf_aa_empty, sdl_root_config_share);
conf_composite_static_aa = extractSDL().sdlangToAA(conf_composite_static_aa, sdl_root_config_local);
/+ ↓ read file (filename with path) +/
diff --git a/src/sdp/sdp.d b/src/sdp/sdp.d
index 78effa5..429b6bd 100755
--- a/src/sdp/sdp.d
+++ b/src/sdp/sdp.d
@@ -152,8 +152,8 @@ void main(string[] args) {
"pwd" : environment["PWD"],
"home" : environment["HOME"],
];
- auto sdl_root_config_share = configRead!()("config_local", env);
- auto sdl_root_config_local = configRead!()("config_share", env);
+ auto sdl_root_config_share = configRead!()("config_share", env);
+ auto sdl_root_config_local = configRead!()("config_local", env);
auto conf_composite_static_aa = extractSDL().sdlangToAA(conf_aa_empty, sdl_root_config_share);
conf_composite_static_aa = extractSDL().sdlangToAA(conf_composite_static_aa, sdl_root_config_local);
if (!(opts["skip-output"])) {