From d0ec46764b6aa5fecf55760dc177c53411fcc735 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 1 Dec 2018 19:26:04 -0500 Subject: 0.3.3 org mode behavior --- org/doc_reform.org | 59 +++++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 27 deletions(-) (limited to 'org/doc_reform.org') diff --git a/org/doc_reform.org b/org/doc_reform.org index be82dc2..acc21e9 100644 --- a/org/doc_reform.org +++ b/org/doc_reform.org @@ -4,34 +4,37 @@ #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] #+LANGUAGE: en -#+STARTUP: indent content +#+STARTUP: indent content hideblocks hidestars #+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc #+OPTIONS: author:nil email:nil creator:nil timestamp:nil -#+PROPERTY: header-args :padline no :exports code :noweb yes +#+PROPERTY: header-args :padline no :exports code :cache no :noweb yes #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+TAGS: assert(a) class(c) debug(d) mixin(m) doc_reform(s) tangle(T) template(t) WEB(W) noexport(n) [[../maker.org][maker.org makefile]] [[./][org/]] + * 0. version.txt (set version) :version: ** set program version +- set program version -#+BEGIN_SRC d :tangle ../views/version.txt +#+BEGIN_SRC d :tangle "../views/version.txt" /+ obt - org generated file +/ struct Version { int major; int minor; int patch; } -enum ver = Version(0, 3, 2); +enum ver = Version(0, 3, 3); #+END_SRC ** compilation restrictions (supported compilers) +- set compilation restrictions http://dlang.org/spec/version.html#predefined-versions -#+BEGIN_SRC d :tangle ../views/version.txt +#+BEGIN_SRC d :tangle "../views/version.txt" version (Posix) { version (DigitalMars) { } else version (LDC) { @@ -62,7 +65,7 @@ version (Posix) { - by sourcefiles contents identifier - by zip filename -#+BEGIN_SRC d :tangle ../src/doc_reform/doc_reform.d :shebang #!/usr/bin/env rdmd +#+BEGIN_SRC d :tangle "../src/doc_reform/doc_reform.d" :shebang #!/usr/bin/env rdmd module doc_reform.sisu_document_parser; import doc_reform.conf.compile_time_info, @@ -182,6 +185,7 @@ mixin(import("version.txt")); #+END_SRC ***** pre main mixins + #+NAME: mixin_pre_main #+BEGIN_SRC d mixin CompileTimeInfo; @@ -233,11 +237,8 @@ scope(failure) { *** getopt args for loop :args:getopt: -look into using getopt -[[http://dlang.org/phobos/std_getopt.html][getopt]] -[[http://dlang.org/library/std/getopt.html][getopt]] - -**** getopt +**** set getopt options +- set getopt options #+NAME: doc_reform_args #+BEGIN_SRC d @@ -314,10 +315,9 @@ auto helpInfo = getopt(args, "sqlite-db-create", "--sqlite-db-create create db, create tables", &opts["sqlite-db-create"], "sqlite-db-drop", "--sqlite-db-drop drop tables & db", &opts["sqlite-db-drop"], "sqlite-db-recreate", "--sqlite-db-recreate create db, create tables", &opts["sqlite-db-recreate"], - // "sqlite-db-populate", "--sqlite-db-populate create db & tables, insert specified", &opts["sqlite-db-populate"], - "sqlite-delete", "--sqlite process sqlite output", &opts["sqlite-delete"], - "sqlite-insert", "--sqlite process sqlite output", &opts["sqlite-insert"], - "sqlite-update", "--sqlite process sqlite output", &opts["sqlite-update"], + "sqlite-delete", "--sqlite-delete process sqlite output", &opts["sqlite-delete"], + "sqlite-insert", "--sqlite-insert process sqlite output", &opts["sqlite-insert"], + "sqlite-update", "--sqlite-update process sqlite output", &opts["sqlite-update"], "text", "--text process text output", &opts["text"], "txt", "--txt process text output", &opts["text"], "verbose|v", "--verbose output to terminal", &opts["verbose"], @@ -346,6 +346,7 @@ if (helpInfo.helpWanted) { #+END_SRC **** getopt hash to struct +- move getopt options to struct #+NAME: doc_reform_args #+BEGIN_SRC d @@ -587,6 +588,7 @@ auto _opt_action = OptActions(); #+END_SRC **** env +- environmental info #+NAME: doc_reform_args #+BEGIN_SRC d @@ -761,6 +763,7 @@ if ((doc_matters.opt.action.debug_do) *** 2. _output processing_ (post abstraction processing) **** 0. abstraction _print summary_ :abstraction:summary: +- abstraction summary #+NAME: doc_reform_each_file_do_debugs_checkdoc #+BEGIN_SRC d @@ -829,7 +832,7 @@ break; // terminate, stop * 2. _document abstraction functions_ :module:doc_reform:abstraction: ** 0. module template -#+BEGIN_SRC d :tangle ../src/doc_reform/meta/metadoc.d +#+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc.d" module doc_reform.meta.metadoc; template DocReformAbstraction() { <> @@ -855,8 +858,9 @@ template DocReformAbstraction() { } #+END_SRC -** 1. raw file content split, doc: _header_, _content_ +(lists: subdocs? images?) -- [[./source_read_files.org][source_read_files]] +** Output & Harvest pre-processing +*** 1. raw file content split, doc: _header_, _content_ +(lists: subdocs? images?) +- [[./source_read_files.org][source_read_files]] return tuple: header; body; insert file list; image list - read in the _marked up source document_ and - split the document into: @@ -907,8 +911,8 @@ debug(header_and_body) { } #+END_SRC -** 2. _document metadata_ & _make instructions_ (struct from toml) -- [[./meta_conf_make_meta.org][meta_conf_make_meta]] +*** 2. _document metadata_ & _make instructions_ (struct from toml) +- [[./meta_conf_make_meta.org][meta_conf_make_meta]] return tuple: document metadata; make instructions - read _document header_, split into: - metadata @@ -940,8 +944,8 @@ if ((_opt_action.debug_do) } #+END_SRC -** 3. _document abstraction, tuple_ (output-pre-processing) [#A] -- [[./meta_abstraction.org][meta_abstraction]] +*** 3. _document abstraction, tuple_ (output-pre-processing) [#A] +- [[./meta_abstraction.org][meta_abstraction]] return tuple: document abstraction; abstraction keys; segnames; image list - prepare the document abstraction used in downstream processing @@ -988,10 +992,10 @@ if ((_opt_action.debug_do) } #+END_SRC -** 4. _document matters_ (doc info gathered, various sources) [#A] - -- prepare document_matters, miscellany about processing and the document of use - in downstream processing +*** 4. _document matters_ (doc info gathered, various sources) [#A] +- gather doc matters + - prepare document_matters, miscellany about processing and the document of + use in downstream processing #+NAME: doc_reform_each_file_do_document_matters #+BEGIN_SRC d @@ -1087,8 +1091,9 @@ if ((_opt_action.debug_do) * 3. document abstraction _summary_ :module:doc_reform:metadoc_summary: ** 0. module template +- document summary from abstraction -#+BEGIN_SRC d :tangle ../src/doc_reform/meta/metadoc_summary.d +#+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_summary.d" module doc_reform.meta.metadoc_summary; template DocReformAbstractionSummary() { auto DocReformAbstractionSummary(S,T)( -- cgit v1.2.3