aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/ao_defaults.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-06-23 00:55:33 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-04 14:48:18 -0400
commita87a80c4528ce1bfd0090b425f4194eddf33699c (patch)
treedeac30591c1617e66a7543015e42a802a80ab61a /org/ao_defaults.org
parentstep5 sdlang used for config files and doc headers (diff)
step5.1 headers sdlang (like native headers) converted to json for common internal formatdoc-reform_v0.0.5
Diffstat (limited to 'org/ao_defaults.org')
-rw-r--r--org/ao_defaults.org328
1 files changed, 211 insertions, 117 deletions
diff --git a/org/ao_defaults.org b/org/ao_defaults.org
index dabc47f..cf473e0 100644
--- a/org/ao_defaults.org
+++ b/org/ao_defaults.org
@@ -22,148 +22,125 @@
template SiSUheaderSkel() {
auto header_make_jsonstr = `{
"make": {
+ "bold" : "",
+ "breaks" : "",
"cover_image" : "",
- "home_button_image" : "",
- "home_button_text" : "",
+ "css" : "",
+ "emphasis" : "",
"footer" : "",
"headings" : "",
+ "home_button_image" : "",
+ "home_button_text" : "",
+ "italics" : "",
"num_top" : "",
- "breaks" : "",
"substitute" : "",
- "bold" : "",
- "italics" : "",
- "emphasis" : "",
- "texpdf_font" : "",
- "css" : ""
+ "texpdf_font" : ""
}
}`;
auto header_meta_jsonstr = `{
+ "classify": {
+ "dewey" : "",
+ "keywords" : "",
+ "loc" : "",
+ "subject" : "",
+ "topic_register" : ""
+ },
"creator": {
"author" : "",
- "translator" : "",
- "illustrator" : ""
- },
- "title": {
- "main" : "",
- "sub" : "",
- "full" : "",
- "language" : "",
- "edition" : "",
- "note" : ""
- },
- "rights": {
- "copyright" : "",
- "illustrations" : "",
- "license" : "",
- "cover" : ""
+ "author_email" : "",
+ "illustrator" : "",
+ "translator" : ""
},
"date": {
- "published" : "",
+ "added_to_site" : "",
+ "available" : "",
"created" : "",
"issued" : "",
- "available" : "",
- "valid" : "",
"modified" : "",
- "added_to_site" : ""
- },
- "original": {
- "title" : "",
- "language" : "",
- "source" : ""
- },
- "classify": {
- "topic_register" : "",
- "subject" : "",
- "keywords" : "",
- "loc" : "",
- "dewey" : ""
+ "published" : "",
+ "valid" : ""
},
"identifier": {
+ "isbn" : "",
"oclc" : "",
- "pg" : "",
- "isbn" : ""
+ "pg" : ""
+ },
+ "links": {
+ "link" : ""
},
"notes": {
"abstract" : "",
"description" : ""
},
+ "original": {
+ "language" : "",
+ "source" : "",
+ "title" : ""
+ },
"publisher": {
"name" : ""
},
- "links": {
+ "rights": {
+ "copyright" : "",
+ "cover" : "",
+ "illustrations" : "",
+ "license" : ""
+ },
+ "title": {
+ "edition" : "",
+ "full" : "",
+ "language" : "",
+ "main" : "",
+ "note" : "",
+ "sub" : ""
}
}`; // links
+ auto pointer_head_sub_classify =
+ [
+ "dewey",
+ "keywords", //
+ "loc",
+ "subject",
+ "topic_register"
+ ];
auto pointer_head_main =
[
+ "classify",
"creator",
- "title",
- "rights",
"date",
- "original",
- "classify",
"identifier",
+ "links",
+ "make", /+ make +/
+ "original",
"notes",
- "make",
- "links"
+ "rights",
+ "title"
];
auto pointer_head_sub_creator =
[
"author",
- "translator",
+ "author_email",
+ "cover",
"illustrator",
- "cover"
- ];
- auto pointer_head_sub_title =
- [
- "main",
- "sub",
- "full",
- "language",
- "edition",
- "note"
- ];
- auto pointer_head_sub_rights =
- [
- "copyright",
- "illustrations",
- "license"
+ "translator"
];
auto pointer_head_sub_date =
[
- "published",
+ "added_to_site",
+ "available",
"created",
"issued",
- "valid",
"modified",
- "added_to_site"
- ];
- auto pointer_head_sub_original =
- [
- "title",
- "language",
- "source"
- ];
- auto pointer_head_sub_classify =
- [
- "topic_register",
- "subject",
- "keywords",
- "loc",
- "dewey"
+ "published",
+ "valid"
];
auto pointer_head_sub_identifier =
[
+ "isbn",
"oclc",
- "pg",
- "isbn"
+ "pg"
];
- auto pointer_head_sub_notes =
- [
- "abstract",
- "description"
- ];
- auto pointer_head_sub_publisher =
- [ "name" ];
+ /+ make +/
auto pointer_head_sub_make =
[
"cover_image",
@@ -179,10 +156,120 @@ template SiSUheaderSkel() {
"texpdf_font",
"css"
];
+ auto pointer_head_sub_notes =
+ [
+ "abstract",
+ "description"
+ ];
+ auto pointer_head_sub_original =
+ [
+ "language",
+ "source",
+ "title"
+ ];
+ auto pointer_head_sub_publisher =
+ [ "name" ];
+ auto pointer_head_sub_rights =
+ [
+ "copyright",
+ "cover",
+ "illustrations",
+ "license"
+ ];
+ auto pointer_head_sub_title =
+ [
+ "edition",
+ "full",
+ "language",
+ "main",
+ "note",
+ "sub"
+ ];
auto config_jsonstr = `{
}`;
}
#+END_SRC
+
+*** notes headers
+
+#+name: ao_defaults_templates
+#+BEGIN_SRC d
+/+
+/+
+ unify internal representation of header info for native & sdlang document headers
+ represent either using struct, hashes or possibly json
+ sdp internal representation should be identical for native & sdlang variants
++/
+header.
+ ├── make // make instructions
+ │   ├── bold
+ │   ├── breaks
+ │   ├── cover_image
+ │   ├── css
+ │   ├── emphasis
+ │   ├── footer
+ │   ├── headings
+ │   ├── home_button_image
+ │   ├── home_button_text
+ │   ├── italics
+ │   ├── num_top
+ │   ├── substitute
+ │   └── texpdf_font
+ └── meta // metadata
+    ├── author // move author to creator:author
+    ├── classify
+    │   ├── dewey
+    │   ├── keyword
+    │   ├── loc
+    │   ├── subject
+    │   └── topic_register
+    ├── creator
+    │   ├── author
+ │ │ ├── [ [first_name: x0, last_name: y0], [first_name: x1, last_name: y1] ]
+ │ │ └── [ full_name0, full_name1 ]
+    │   ├── author_email
+    │   ├── illustrator
+    │   └── translator
+    ├── date
+    │   ├── added_to_site
+    │   ├── available
+    │   ├── created
+    │   ├── issued
+    │   ├── modified
+    │   ├── published
+    │   └── valid
+    ├── identifier
+    │   ├── isbn
+    │   ├── oclc
+    │   └── pg
+    ├── links
+    ├── notes
+    │   ├── abstract
+    │   └── description
+    ├── original
+    │   ├── language
+    │   ├── source
+    │   └── title
+    ├── publisher
+    │   └── name
+    ├── rights
+    │   ├── copyright
+    │   ├── cover
+    │   ├── illustrations
+    │   └── license
+    └── title // move title: to title:main
+    ├── edition
+    ├── [ full (main + sub) ]
+    ├── language
+    ├── main
+    ├── note
+    ├── sub
+    └── subtitle // move title:subtitle to title:sub
+
+61 leaves
++/
+#+END_SRC
+
** template: flags regex initialize :regex_flags:
#+name: ao_defaults_templates
#+BEGIN_SRC d
@@ -228,6 +315,7 @@ template SiSUrgxInitFlags() {
#+name: ao_defaults_templates
#+BEGIN_SRC d
template SiSUbiblio() {
+ // required: deemed_author (author || editor); year; fulltitle;
auto biblio_entry_tags_jsonstr = `{
"is" : "",
"sortby_deemed_author_year_title" : "",
@@ -377,6 +465,9 @@ static src_fn_insert = ctRegex!(`^(?P<path>[a-zA-Z0-9._-]+/)*(?P<fil
static src_fn_find_inserts = ctRegex!(`^(?P<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[im])$`);
static insert_src_fn_ssi_or_sst = ctRegex!(`^<<\s*(?P<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[ti])$`);
// static insert_ssi_or_sst_fn = ctRegex!(`^<<\s*[a-zA-Z0-9._-]+[.]ss[ti]`);
+// static ssm_fn = ctRegex!(`^[a-zA-Z0-9._-]+[.]ssm$`);
+/+ insert markup file +/
+// static insert_src_fn_ssi_or_sst = ctRegex!(`^<<\s*([a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[ti])$`);
#+END_SRC
** comments :comment:
#+name: ao_rgx
@@ -385,18 +476,37 @@ static insert_src_fn_ssi_or_sst = ctRegex!(`^<<\s*(?P<path>[a-zA-Z0-9._-]+/)*(?
static comment = ctRegex!(`^%+ `);
static comments = ctRegex!(`^%+ |^%+$`);
#+END_SRC
-** header :header:
+** native header :native:header:
#+name: ao_rgx
#+BEGIN_SRC d
/+ header +/
-static header = ctRegex!(`^@([a-z_]+):(?:\s|$)`);
-static header_make = ctRegex!(`^@(make):(?:\s|$)`);
-static header_meta = ctRegex!(`^@([a-z_]+):(?:\s|$)`);
-static header_sub = ctRegex!(`^[ ]+:([a-z_]+):\s`);
-static head_main = ctRegex!(`^@(?P<header>[a-z_]+):\s*(?P<content>.*)`, "m");
-static head_sub = ctRegex!(`^[ ]*:(?P<subheader>[a-z_]+):\s+(?P<content>.+)`, "m");
-static head_value_title = ctRegex!(`@title`);
-static head_value_author = ctRegex!(`@author`);
+static main_headers =
+ ctRegex!(`^(?:creator|title|rights|date|original|classify|identifier|notes|publisher|make|links)$`, "m");
+static native_header = ctRegex!(`^@([a-z_]+):(?:\s|$)`);
+static native_header_make = ctRegex!(`^@(make):(?:\s|$)`);
+static native_header_meta =
+ ctRegex!(`^@(?:creator|title|rights|date|original|classify|identifier|notes|publisher|links):(?:\s|$)`);
+static native_header_main = ctRegex!(`^@(?P<header>[a-z_]+):\s*(?P<content>.*)`, "m");
+static native_header_sub = ctRegex!(`^[ ]*:(?P<subheader>[a-z_]+):\s+(?P<content>.+)`, "m");
+// static native_header_sub = ctRegex!(`^[ ]+:([a-z_]+):\s`);
+static native_header_meta_title = ctRegex!(`^@title:\s`, "m");
+static variable_doc_title = ctRegex!(`@title`);
+static variable_doc_author = ctRegex!(`@author`);
+#+END_SRC
+** subheader :native:subheader:
+#+name: ao_rgx
+#+BEGIN_SRC d
+/+ head +/
+static native_subhead_creator = ctRegex!(`^(?:author|translator|illustrator)$`, "m");
+static native_subhead_title = ctRegex!(`^(?:main|sub(?:title)?|full|language|edition|note)$`, "m");
+static native_subhead_rights = ctRegex!(`^(?:copyright|illustrations|license|cover)$`, "m");
+static native_subhead_date = ctRegex!(`^(?:published|created|issued|available|valid|modified|added_to_site)$`, "m");
+static native_subhead_original = ctRegex!(`^(?:title|language|source)$`, "m");
+static native_subhead_classify = ctRegex!(`^(?:topic_register|subject|keywords|loc|dewey)$`, "m");
+static native_subhead_identifier = ctRegex!(`^(?:oclc|pg|isbn)$`, "m");
+static native_subhead_notes = ctRegex!(`^(?:abstract|description)$`, "m");
+static native_subhead_publisher = ctRegex!(`^(?:name)$`, "m");
+static native_subhead_make = ctRegex!(`^(?:cover_image|home_button_image|home_button_text|footer|headings|num_top|breaks|substitute|bold|italics|emphasis|texpdf_font|css)$`, "m");
#+END_SRC
** heading & paragraph operators :paragraph:operator:
#+name: ao_rgx
@@ -563,22 +673,6 @@ static parent = ctRegex!(`([0-7]):([0-9]+)`);
/+ json +/
static tailing_comma = ctRegex!(`,$`, "m");
#+END_SRC
-** head :header:
-#+name: ao_rgx
-#+BEGIN_SRC d
-/+ head +/
-static main_headers = ctRegex!(`^(?:creator|title|rights|date|original|classify|identifier|notes|publisher|make|links)$`, "m");
-static subhead_creator = ctRegex!(`^(?:author|translator|illustrator)$`, "m");
-static subhead_title = ctRegex!(`^(?:main|sub(?:title)?|full|language|edition|note)$`, "m");
-static subhead_rights = ctRegex!(`^(?:copyright|illustrations|license|cover)$`, "m");
-static subhead_date = ctRegex!(`^(?:published|created|issued|available|valid|modified|added_to_site)$`, "m");
-static subhead_original = ctRegex!(`^(?:title|language|source)$`, "m");
-static subhead_classify = ctRegex!(`^(?:topic_register|subject|keywords|loc|dewey)$`, "m");
-static subhead_identifier = ctRegex!(`^(?:oclc|pg|isbn)$`, "m");
-static subhead_notes = ctRegex!(`^(?:abstract|description)$`, "m");
-static subhead_publisher = ctRegex!(`^(?:name)$`, "m");
-static subhead_make = ctRegex!(`^(?:cover_image|home_button_image|home_button_text|footer|headings|num_top|breaks|substitute|bold|italics|emphasis|texpdf_font|css)$`, "m");
-#+END_SRC
** biblio tags :biblio:tags:
#+name: ao_rgx
#+BEGIN_SRC d