diff options
Diffstat (limited to 'org/in_source_files.org')
-rw-r--r-- | org/in_source_files.org | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/org/in_source_files.org b/org/in_source_files.org index a498688..b958c22 100644 --- a/org/in_source_files.org +++ b/org/in_source_files.org @@ -4,21 +4,20 @@ #+FILETAGS: :spine:sourcefile:read: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2020 Ralph Amissah #+LANGUAGE: en -#+STARTUP: indent content hideblocks hidestars -#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t -#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc -#+OPTIONS: author:nil email:nil creator:nil timestamp:nil -#+PROPERTY: header-args :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) spine(s) tangle(T) template(t) WEB(W) noexport(n) +#+STARTUP: content hideblocks hidestars noindent entitiespretty +#+PROPERTY: header-args :exports code +#+PROPERTY: header-args+ :noweb yes +#+PROPERTY: header-args+ :eval no +#+PROPERTY: header-args+ :results no +#+PROPERTY: header-args+ :cache no +#+PROPERTY: header-args+ :padline no [[./spine.org][spine]] [[./][org/]] * imports -#+name: imports_std +#+NAME: imports_std #+BEGIN_SRC d import doc_reform.meta, @@ -44,7 +43,7 @@ module doc_reform.io_in.read_config_files; *** 0. read config files (config_local_site & dr_document_make) (yaml) **** 1. site configuration -#+name: meta_config_file_hub +#+NAME: meta_config_file_hub #+BEGIN_SRC d static template readConfigSite() { import @@ -151,7 +150,7 @@ webserv: **** 2. document make/config -#+name: meta_config_file_hub +#+NAME: meta_config_file_hub #+BEGIN_SRC d static template readConfigDoc() { import @@ -206,7 +205,7 @@ static template readConfigDoc() { *** YAML config (config_local_site & dr_document_make) :file:config:hub: -#+name: meta_config_file_hub +#+NAME: meta_config_file_hub #+BEGIN_SRC d static template configReadSiteYAML() { <<imports_std>> @@ -360,7 +359,7 @@ static template spineRawMarkupContent() { ** get markup source, read file :source:markup: *** read file, source string [#A] :string: -#+name: meta_markup_source_raw_read_file_source_string +#+NAME: meta_markup_source_raw_read_file_source_string #+BEGIN_SRC d @safe final private string readInMarkupSource(in char[] fn_src) { enforce( @@ -392,7 +391,7 @@ static template spineRawMarkupContent() { here you split document header and body, an array.length == 2 split is on first match of level A~ (which is required) -#+name: meta_markup_source_raw_doc_header_and_content_split +#+NAME: meta_markup_source_raw_doc_header_and_content_split #+BEGIN_SRC d @trusted final private char[][] header0Content1(in string src_text) { // cast(char[]) /+ split string on _first_ match of "^:?A~\s" into [header, content] array/tuple +/ @@ -411,7 +410,7 @@ split is on first match of level A~ (which is required) *** source line array :array: -#+name: meta_markup_source_raw_source_line_array +#+NAME: meta_markup_source_raw_source_line_array #+BEGIN_SRC d @trusted final private char[][] markupSourceLineArray(in char[] src_text) { // cast(char[]) char[][] source_line_arr @@ -426,7 +425,7 @@ split is on first match of level A~ (which is required) **** read in file -#+name: meta_markup_source_raw_read_in_file +#+NAME: meta_markup_source_raw_read_in_file #+BEGIN_SRC d @safe string markupSourceReadIn(in string fn_src) { static auto rgx = Rgx(); @@ -447,7 +446,7 @@ split is on first match of level A~ (which is required) - file insert list - [image list?] -#+name: meta_markup_source_raw_tuple_of_header_and_body +#+NAME: meta_markup_source_raw_tuple_of_header_and_body #+BEGIN_SRC d @safe HeaderContentInsertsImages markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) { string[] file_insert_list = []; @@ -468,7 +467,7 @@ split is on first match of level A~ (which is required) **** get insert source line array -#+name: meta_markup_source_raw_get_insert_source_line_array +#+NAME: meta_markup_source_raw_get_insert_source_line_array #+BEGIN_SRC d @safe final char[][] getInsertMarkupSourceContentRawLineArray( in char[] fn_src_insert, @@ -491,7 +490,7 @@ split is on first match of level A~ (which is required) *** scan inserts (sub-document) source :scan_insert_src: **** scan subdoc source -#+name: meta_inserts_scan +#+NAME: meta_inserts_scan #+BEGIN_SRC d char[][] contents_insert; int[string] type1 = flags_type_init; @@ -501,7 +500,7 @@ auto markup_src_file_path = fn_pth_full.captures[1]; **** loop insert (sub-document) -#+name: meta_inserts_scan_loop +#+NAME: meta_inserts_scan_loop #+BEGIN_SRC d if (type1["curly_code"] == 1) { type1["header_make"] = 0; @@ -574,7 +573,7 @@ if (type1["curly_code"] == 1) { **** post loop -#+name: meta_inserts_scan_post +#+NAME: meta_inserts_scan_post #+BEGIN_SRC d ContentsAndImages t = tuple( contents_insert, @@ -586,7 +585,7 @@ return t; *** scan document source :scan_src: **** scan doc source -#+name: meta_master_doc_scan_for_insert_filenames +#+NAME: meta_master_doc_scan_for_insert_filenames #+BEGIN_SRC d char[][] contents; int[string] type = flags_type_init; @@ -599,7 +598,7 @@ string[] insert_file_list =[]; **** include inserts: _loop master_ scan for inserts (insert documents) -#+name: meta_master_doc_scan_for_insert_filenames_loop +#+NAME: meta_master_doc_scan_for_insert_filenames_loop #+BEGIN_SRC d if (type["curly_code"] == 1) { if (line.matchFirst(rgx.block_curly_code_close)) { @@ -671,7 +670,7 @@ if (type["curly_code"] == 1) { **** post loop -#+name: meta_master_doc_scan_for_insert_filenames_post +#+NAME: meta_master_doc_scan_for_insert_filenames_post #+BEGIN_SRC d string[] images = []; foreach(i; uniq(_images.sort())) { |