From 22cea68385b57a1593f5751e49cfdd41d8067997 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 13 Jul 2017 07:44:03 -0400 Subject: 0.18.0 rename meta from ao (considered adr) --- org/sdp.org | 290 ++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 252 insertions(+), 38 deletions(-) (limited to 'org/sdp.org') diff --git a/org/sdp.org b/org/sdp.org index d4e40b4..63557ed 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -25,7 +25,7 @@ struct Version { int minor; int patch; } -enum ver = Version(0, 17, 0); +enum ver = Version(0, 18, 0); #+END_SRC * 1. sdp (sisu document parser) :sdp: @@ -50,7 +50,7 @@ enum ver = Version(0, 17, 0); module sdp.sisu_document_parser; import sdp.conf.compile_time_info, - sdp.ao.abstraction; + sdp.meta.metadoc; <> <> <> @@ -92,22 +92,22 @@ unittest { #+NAME: imports_sdp #+BEGIN_SRC d /+ sdp: sisu document parser, see http://sisudoc.org +/ -import sdp.ao; +import sdp.meta; import std.getopt, std.process; import - sdp.ao.abstraction_summary, - sdp.ao.abstract_doc_source, - sdp.ao.composite_make, - sdp.ao.conf_make_meta, - // sdp.ao.conf_make_meta_native, - sdp.ao.conf_make_meta_sdlang, - sdp.ao.defaults, - sdp.ao.doc_debugs, - sdp.ao.read_config_files, - sdp.ao.read_source_files, - sdp.ao.rgx, + sdp.meta.metadoc_summary, + sdp.meta.metadoc_from_src, + sdp.meta.composite_make, + sdp.meta.conf_make_meta, + // sdp.meta.conf_make_meta_native, + sdp.meta.conf_make_meta_sdlang, + sdp.meta.defaults, + sdp.meta.doc_debugs, + sdp.meta.read_config_files, + sdp.meta.read_source_files, + sdp.meta.rgx, sdp.output.hub, sdp.output.paths_source; #+END_SRC @@ -116,17 +116,17 @@ import ├── src │   ├── sdp.d │   └── sdp -│    ├── ao_abstract_doc_source.d +│    ├── meta_metadoc_from_src.d │    ├── ... │    └── compile_time_info.d └── views    └── version.txt -[[./ao_abstract_doc_source.org][ao_abstract_doc_source]] -[[./ao_conf_make_meta.org][ao_conf_make_meta]] -[[./ao_defaults.org][ao_defaults]] -[[./ao_output_debugs.org][ao_output_debugs]] -[[./ao_read_source_files.org][ao_read_source_files]] +[[./meta_metadoc_from_src.org][meta_metadoc_from_src]] +[[./meta_conf_make_meta.org][meta_conf_make_meta]] +[[./meta_defaults.org][meta_defaults]] +[[./meta_output_debugs.org][meta_output_debugs]] +[[./meta_read_source_files.org][meta_read_source_files]] [[./compile_time_info.org][compile time info]] [[./output.org][output]] [[./sdp.org][sdp]] @@ -386,7 +386,7 @@ if (doc_matters.opt_action["verbose"]) { } #+END_SRC **** 1. _debug_ (document parts, checkdoc) :debug:checkdoc: -- [[./ao_output_debugs.org][ao_output_debugs]] +- [[./meta_output_debugs.org][meta_output_debugs]] #+NAME: sdp_each_file_do_debugs_checkdoc #+BEGIN_SRC d @@ -435,8 +435,8 @@ break; // terminate, stop * 2. _document abstraction functions_ :module:sdp:abstraction: ** 0. module template -#+BEGIN_SRC d :tangle ../src/sdp/ao/abstraction.d -module sdp.ao.abstraction; +#+BEGIN_SRC d :tangle ../src/sdp/meta/metadoc.d +module sdp.meta.metadoc; template SiSUabstraction() { <> <> @@ -458,7 +458,7 @@ template SiSUabstraction() { #+END_SRC ** 1. (a) _read in raw file_ (b) split content into: _doc header & doc content_ -- [[./ao_read_source_files.org][ao_read_source_files]] +- [[./meta_read_source_files.org][meta_read_source_files]] - read in the source marked up document and - split the document into: @@ -486,7 +486,7 @@ debug(header_and_body) { #+END_SRC ** 2. _document metadata_ & _make instructions_ :doc:header:metadata:make: -- [[./ao_conf_make_meta.org][ao_conf_make_meta]] +- [[./meta_conf_make_meta.org][meta_conf_make_meta]] - read document header, split into: - metadata @@ -531,7 +531,7 @@ auto _make_and_conf_composite_static_plus_docheader_aa = compositeMkCnfAA!()( #+END_SRC ** 4. _document abstraction, tuple_ (pre-output-processing) :processing: -- [[./ao_doc_abstraction.org][ao_doc_abstraction]] +- [[./meta_abstraction.org][meta_abstraction]] - prepare the document abstraction used in downstream processing @@ -629,21 +629,21 @@ struct DocumentMatters { auto doc_matters = DocumentMatters(); #+END_SRC -* 3. document abstraction _summary_ :module:sdp:abstraction_summary: +* 3. document abstraction _summary_ :module:sdp:metadoc_summary: ** 0. module template -#+BEGIN_SRC d :tangle ../src/sdp/ao/abstraction_summary.d -module sdp.ao.abstraction_summary; +#+BEGIN_SRC d :tangle ../src/sdp/meta/metadoc_summary.d +module sdp.meta.metadoc_summary; template SiSUabstractionSummary() { auto SiSUabstractionSummary(S,T)( auto return ref const S doc_abstraction, auto return ref T doc_matters, ) { - <> + <> mixin InternalMarkup; - <> + <> if (doc_matters.opt_action["verbose"]) { - <> + <> } } } @@ -652,11 +652,11 @@ template SiSUabstractionSummary() { ** init *** imports -#+name: abstraction_summary_imports +#+name: metadoc_summary_imports #+BEGIN_SRC d import - sdp.ao.defaults, - sdp.ao.rgx; + sdp.meta.defaults, + sdp.meta.rgx; import std.array, std.exception, @@ -672,14 +672,14 @@ import *** initialize :report: -#+name: abstraction_summary_initialize +#+name: metadoc_summary_initialize #+BEGIN_SRC d auto markup = InlineMarkup(); #+END_SRC ** (last ocn) -#+name: ao_abstraction_summary +#+name: meta_metadoc_summary #+BEGIN_SRC d string[string] check = [ "last_obj_cite_number" : "NA [debug \"checkdoc\" not run]", @@ -697,7 +697,7 @@ foreach (k; doc_matters.keys_seq.seg) { ** summary -#+name: ao_abstraction_summary +#+name: meta_metadoc_summary #+BEGIN_SRC d auto min_repeat_number = 66; auto char_repeat_number = (doc_matters.dochead_meta["title"]["full"].length @@ -743,3 +743,217 @@ writefln( markup.repeat_character_by_number_provided("-", min_repeat_number), ); #+END_SRC + +* __END__ +dev notes + +** sdp glossary / terms + +|------+-------------------------------------| +| sdp | 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 | +|-------+----------------------------------------------| + +** the document notes +*** document sections +**** summary + +|--------------+--------------+------+---+--------------------------------------------------+--------------------------------+---+---| +| 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 | | | | +|--------------+--------------+------+---+--------------------------------------------------+--------------------------------+---+---| + +**** 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 + +*** objects +**** summary + +|-------+--------------+----------------------------+--------------------------+----------------+-----------------+----------------+------------| +| | | 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 | | | | +|-------+--------------+----------------------------+--------------------------+----------------+-----------------+----------------+------------| + +**** ocn + +|-------------+----------------------+-----------------------+--------------+---| +| *objects | section / part | ocn described | how used* | | +|-------------+----------------------+-----------------------+--------------+---| +| regular ocn | | | | | +|-------------+----------------------+-----------------------+--------------+---| +| | body objects | seq. digit | anchor | | +| | | | visible | | +|-------------+----------------------+-----------------------+--------------+---| +| | glossary objects | seq. digit | anchor | | +| | | | not-visible | | +| | | | (for search) | | +|-------------+----------------------+-----------------------+--------------+---| +| | bibliography objects | seq. digit | anchor | | +| | | | not-visible | | +| | | | (for search) | | +|-------------+----------------------+-----------------------+--------------+---| +| special ocn | | | | | +|-------------+----------------------+-----------------------+--------------+---| +| | non-substantive text | x char + seq. digit | anchor | | +| | | | not-visible | | +| | | | (for search) | | +|-------------+----------------------+-----------------------+--------------+---| +| | book index | i char + seq. digit | anchor | | +| | | | not-visible | | +| | | | (for search) | | +|-------------+----------------------+-----------------------+--------------+---| +| exceptions | | | | | +|-------------+----------------------+-----------------------+--------------+---| +| | endnotes | ocn of parent object | anchor | | +| | | + footnote seq. digit | visible | | +|-------------+----------------------+-----------------------+--------------+---| + +** 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 + +|----+---------------------------------+----------------------------------------+----------------+---+---| +| | 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 + overridden by document or command line instruction) +- 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) -- cgit v1.2.3