aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/meta
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/meta')
-rw-r--r--src/doc_reform/meta/conf_make_meta_json.d10
-rw-r--r--src/doc_reform/meta/conf_make_meta_structs.d1
-rw-r--r--src/doc_reform/meta/conf_make_meta_toml.d12
-rw-r--r--src/doc_reform/meta/metadoc.d15
-rw-r--r--src/doc_reform/meta/metadoc_harvest.d5
5 files changed, 23 insertions, 20 deletions
diff --git a/src/doc_reform/meta/conf_make_meta_json.d b/src/doc_reform/meta/conf_make_meta_json.d
index 5fd4499..45d3a5a 100644
--- a/src/doc_reform/meta/conf_make_meta_json.d
+++ b/src/doc_reform/meta/conf_make_meta_json.d
@@ -21,7 +21,7 @@ static template contentJSONtoDocReformStruct() {
doc_reform.meta.defaults,
doc_reform.meta.rgx;
ConfCompositePlus _struct_composite;
- auto contentJSONtoDocReformStruct(C,J)(C _struct_composite, J _json, string _identifier) {
+ auto contentJSONtoDocReformStruct(C,J,M)(C _struct_composite, J _json, M _manifest, string _identifier) {
mixin DocReformRgxInit;
static auto rgx = Rgx();
debug (json) {
@@ -545,13 +545,7 @@ static template contentJSONtoDocReformStruct() {
) {
_struct_composite.meta.date_valid = _json.object["date"]["valid"].str;
}
- _struct_composite.meta.author_date_title = format(
- "%s %s \"%s\"",
- _struct_composite.meta.creator_author_surname_fn,
- (_struct_composite.meta.date_published.length > 0)
- ? "(" ~ _struct_composite.meta.date_published ~ ")" : "",
- _struct_composite.meta.title_full,
- );
+ _struct_composite.meta.language_document_char = _manifest.src.language;
}
if ("links" in _json.object) {}
if ("notes" in _json.object) {
diff --git a/src/doc_reform/meta/conf_make_meta_structs.d b/src/doc_reform/meta/conf_make_meta_structs.d
index ff1ec76..3bd29e2 100644
--- a/src/doc_reform/meta/conf_make_meta_structs.d
+++ b/src/doc_reform/meta/conf_make_meta_structs.d
@@ -225,7 +225,6 @@ struct MetaComposite {
string title_short;
string title_sub;
string title_subtitle;
- string author_date_title;
}
struct ConfComposite {
MetaComposite meta;
diff --git a/src/doc_reform/meta/conf_make_meta_toml.d b/src/doc_reform/meta/conf_make_meta_toml.d
index f047c5d..6008996 100644
--- a/src/doc_reform/meta/conf_make_meta_toml.d
+++ b/src/doc_reform/meta/conf_make_meta_toml.d
@@ -30,14 +30,15 @@ static template configParseTOMLreturnDocReformStruct() {
doc_reform.meta.conf_make_meta_structs,
doc_reform.meta.conf_make_meta_json;
mixin contentJSONtoDocReformStruct;
- auto configParseTOMLreturnDocReformStruct(CCm, T)(
+ auto configParseTOMLreturnDocReformStruct(T,CCm,M)(
+ T _document_struct,
CCm _make_and_meta_struct,
- T _document_struct
+ M _manifest
){
TOMLDocument _doc = parseTOML(cast(string)(_document_struct.content));
auto _doc_json = _doc.toJSON;
_make_and_meta_struct
- = contentJSONtoDocReformStruct!()(_make_and_meta_struct, _doc_json, _document_struct.filename); // struct from json
+ = contentJSONtoDocReformStruct!()(_make_and_meta_struct, _doc_json, _manifest, _document_struct.filename); // struct from json
return _make_and_meta_struct;
}
}
@@ -60,9 +61,10 @@ static template docHeaderMakeAndMetaTupTomlExtractAndConvertToStruct() {
mixin DocReformRgxInit;
mixin contentJSONtoDocReformStruct;
static auto rgx = Rgx();
- auto docHeaderMakeAndMetaTupTomlExtractAndConvertToStruct(CCm, Src)(
+ auto docHeaderMakeAndMetaTupTomlExtractAndConvertToStruct(CCm,Src,M)(
CCm _make_and_meta_struct,
Src header_src,
+ M _manifest,
) {
TOMLDocument _doc;
if (header_src.match(rgx.toml_header_meta_title)) {
@@ -73,7 +75,7 @@ static template docHeaderMakeAndMetaTupTomlExtractAndConvertToStruct() {
}
auto _doc_json = _doc.toJSON;
auto _header_and_make_and_meta_struct
- = contentJSONtoDocReformStruct!()(_make_and_meta_struct, _doc_json, "header");
+ = contentJSONtoDocReformStruct!()(_make_and_meta_struct, _doc_json, _manifest, "header");
return _header_and_make_and_meta_struct;
}
}
diff --git a/src/doc_reform/meta/metadoc.d b/src/doc_reform/meta/metadoc.d
index a4b920b..a26756b 100644
--- a/src/doc_reform/meta/metadoc.d
+++ b/src/doc_reform/meta/metadoc.d
@@ -36,11 +36,15 @@ template DocReformAbstraction() {
O _opt_action,
M _manifest
){
- auto _config_document_struct = readConfigDoc!()(_manifest, _env); // document config file
- auto _config_local_site_struct = readConfigSite!()(_manifest, _env); // local site config
ConfCompositePlus _make_and_meta_struct;
- _make_and_meta_struct = configParseTOMLreturnDocReformStruct!()(_make_and_meta_struct, _config_document_struct);
- _make_and_meta_struct = configParseTOMLreturnDocReformStruct!()(_make_and_meta_struct, _config_local_site_struct);
+ { /+ document config file +/
+ auto _config_document_struct = readConfigDoc!()(_manifest, _env);
+ _make_and_meta_struct = _config_document_struct.configParseTOMLreturnDocReformStruct!()(_make_and_meta_struct, _manifest);
+ }
+ { /+ local site config +/
+ auto _config_local_site_struct = readConfigSite!()(_manifest, _env);
+ _make_and_meta_struct = _config_local_site_struct.configParseTOMLreturnDocReformStruct!()(_make_and_meta_struct, _manifest);
+ }
/+ ↓ read file (filename with path) +/
/+ ↓ file tuple of header and content +/
if ((_opt_action.debug_do)
@@ -72,7 +76,8 @@ template DocReformAbstraction() {
_make_and_meta_struct =
docHeaderMakeAndMetaTupTomlExtractAndConvertToStruct!()(
_make_and_meta_struct,
- _header_body_insertfilelist_imagelist[headBody.header]
+ _header_body_insertfilelist_imagelist[headBody.header],
+ _manifest,
);
if ((_opt_action.debug_do)
|| (_opt_action.very_verbose)
diff --git a/src/doc_reform/meta/metadoc_harvest.d b/src/doc_reform/meta/metadoc_harvest.d
index c3534f9..da1cae8 100644
--- a/src/doc_reform/meta/metadoc_harvest.d
+++ b/src/doc_reform/meta/metadoc_harvest.d
@@ -22,7 +22,10 @@ template DocReformMetaDocHarvest() {
auto markup = InlineMarkup();
harvest.title = doc_matters.conf_make_meta.meta.title_full;
harvest.author = doc_matters.conf_make_meta.meta.creator_author;
- harvest.author_date_title = doc_matters.conf_make_meta.meta.author_date_title;
+ harvest.author_surname_fn = doc_matters.conf_make_meta.meta.creator_author_surname_fn;
+ harvest.language_original = doc_matters.conf_make_meta.meta.original_language;
+ harvest.language = doc_matters.src.language;
+ harvest.uid = doc_matters.src.doc_uid;
harvest.date_published = doc_matters.conf_make_meta.meta.date_published;
harvest.topic_register_arr = doc_matters.conf_make_meta.meta.classify_topic_register_arr;
return harvest;