From 0c4b3cb3707c3b16cd171620427e651d71182813 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 13 Dec 2019 09:09:24 -0500 Subject: present per document metadata --- src/doc_reform/meta/conf_make_meta_structs.d | 1 + src/doc_reform/meta/conf_make_meta_yaml.d | 6 ++++++ src/doc_reform/meta/defaults.d | 3 ++- src/doc_reform/meta/metadoc_harvest.d | 1 + src/doc_reform/meta/metadoc_harvests_authors.d | 13 +++++++------ src/doc_reform/meta/metadoc_harvests_topics.d | 20 +++++++++++++------- 6 files changed, 30 insertions(+), 14 deletions(-) (limited to 'src/doc_reform/meta') diff --git a/src/doc_reform/meta/conf_make_meta_structs.d b/src/doc_reform/meta/conf_make_meta_structs.d index 91ecab7..7f220aa 100644 --- a/src/doc_reform/meta/conf_make_meta_structs.d +++ b/src/doc_reform/meta/conf_make_meta_structs.d @@ -206,6 +206,7 @@ struct MetaComposite { string links; string notes_abstract; string notes_description; + string notes_summary; string original_language; string original_language_char; string original_publisher; diff --git a/src/doc_reform/meta/conf_make_meta_yaml.d b/src/doc_reform/meta/conf_make_meta_yaml.d index 5576b1c..1467fea 100644 --- a/src/doc_reform/meta/conf_make_meta_yaml.d +++ b/src/doc_reform/meta/conf_make_meta_yaml.d @@ -679,6 +679,12 @@ static template contentYAMLtoSpineStruct() { ) { _struct_composite.meta.notes_description = _yaml["notes"]["description"].get!string; } + if ("summary" in _yaml["notes"] + && _yaml["notes"]["summary"].type.string + && _yaml["notes"]["summary"].tag.match(rgx.yaml_tag_is_str) + ) { + _struct_composite.meta.notes_summary = _yaml["notes"]["summary"].get!string; + } } } if ("original" in _yaml diff --git a/src/doc_reform/meta/defaults.d b/src/doc_reform/meta/defaults.d index 847dcb9..b3f6bba 100644 --- a/src/doc_reform/meta/defaults.d +++ b/src/doc_reform/meta/defaults.d @@ -101,8 +101,9 @@ template spineHarvest() { string uid = ""; string date_published = ""; string[] topic_register_arr = []; - string path_html_segtoc = ""; + string path_html_metadata = ""; string path_html_scroll = ""; + string path_html_segtoc = ""; string path_epub = ""; string path_abs_html_segtoc = ""; string path_abs_html_scroll = ""; diff --git a/src/doc_reform/meta/metadoc_harvest.d b/src/doc_reform/meta/metadoc_harvest.d index 704e960..362ba34 100644 --- a/src/doc_reform/meta/metadoc_harvest.d +++ b/src/doc_reform/meta/metadoc_harvest.d @@ -33,6 +33,7 @@ template spineMetaDocHarvest() { hvst.harvest.uid = doc_matters.src.doc_uid; hvst.harvest.date_published = doc_matters.conf_make_meta.meta.date_published; hvst.harvest.topic_register_arr = doc_matters.conf_make_meta.meta.classify_topic_register_arr; + hvst.harvest.path_html_metadata = pth_html_rel.fn_metadata(doc_matters.src.filename); hvst.harvest.path_html_scroll = pth_html_rel.fn_scroll(doc_matters.src.filename); hvst.harvest.path_html_segtoc = pth_html_rel.fn_seg(doc_matters.src.filename, "toc"); hvst.harvest.path_abs_html_scroll = pth_html_abs.fn_scroll(doc_matters.src.filename); diff --git a/src/doc_reform/meta/metadoc_harvests_authors.d b/src/doc_reform/meta/metadoc_harvests_authors.d index f733a80..19ed583 100644 --- a/src/doc_reform/meta/metadoc_harvests_authors.d +++ b/src/doc_reform/meta/metadoc_harvests_authors.d @@ -270,11 +270,9 @@ string theme_light_1 = format(q"┃

Metadata Harvest - Authors (output organised by language & filetype)

-

[ HOME ] also see Metadata Harvest - Topics

+

[ HOME ] [ Metadata Harvest - Topics ]


-

English   

-

ABCDEFGHIJKLMNOPQRSTUVWXYZ,  ┃", _opt_action.css_theme_default ? theme_light_0 : theme_dark_0, @@ -296,31 +294,34 @@ string theme_light_1 = format(q"┃ ) { if (doc_harvest.author_surname_fn != _prev_auth) { _au[doc_harvest.author_surname_fn] - = format(q"┃

%s

%s "%s" [%s]

┃", + = format(q"┃

%s

%s "%s" [ %s ]

┃", doc_harvest.author_surname.translate([' ' : "_"]), doc_harvest.author_surname_fn, (doc_harvest.date_published.length > 0) ? doc_harvest.date_published : "", doc_harvest.path_html_segtoc, doc_harvest.title, + doc_harvest.path_html_metadata, doc_harvest.language, ); _prev_auth = doc_harvest.author_surname_fn; } else { _au[doc_harvest.author_surname_fn] - ~= format(q"┃

%s "%s" [%s]

┃", + ~= format(q"┃

%s "%s" [ %s ]

┃", (doc_harvest.date_published.length > 0) ? doc_harvest.date_published : "", doc_harvest.path_html_segtoc, doc_harvest.title, + doc_harvest.path_html_metadata, doc_harvest.language, ); } - _author_date_title ~= format(q"┃%s %s "%s" [%s]%s┃", + _author_date_title ~= format(q"┃%s %s "%s" [ %s ]%s┃", doc_harvest.author_surname_fn, (doc_harvest.date_published.length > 0) ? "(" ~ doc_harvest.date_published ~ ")" : "", doc_harvest.title, + doc_harvest.path_html_metadata, doc_harvest.language, (_opt_action.very_verbose) ? "\n " ~ doc_harvest.path_abs_html_scroll : "", ); diff --git a/src/doc_reform/meta/metadoc_harvests_topics.d b/src/doc_reform/meta/metadoc_harvests_topics.d index 82601fc..5e11b7e 100644 --- a/src/doc_reform/meta/metadoc_harvests_topics.d +++ b/src/doc_reform/meta/metadoc_harvests_topics.d @@ -311,12 +311,10 @@ string theme_light_1 = format(q"┃

Metadata Harvest - Topics (output organised by language & filetype)

-

[ HOME ] also see Metadata Harvest - Authors

+

[ HOME ] [ Metadata Harvest - Authors ]

ABCDEFGHIJKLMNOPQRSTUVWXYZ


-

English   

-
┃", _opt_action.css_theme_default ? theme_light_0 : theme_dark_0, _opt_action.css_theme_default ? theme_light_1 : theme_dark_1, @@ -359,10 +357,12 @@ string theme_light_1 = format(q"┃ ); } } - topics ~= format(q"┃

"%s" -%s┃", + topics ~= format(q"┃

"%s" - %s [ %s ]┃", t_a_.path_html_segtoc, t_a_.title, _auth, + t_a_.path_html_metadata, + t_a_.language, ) ~ "\n"; if (_opt_action.very_verbose) { writeln("- ", t_a_.title, " - ", t_a_.author); @@ -399,10 +399,12 @@ string theme_light_1 = format(q"┃ ); } } - topics ~= format(q"┃

%s -%s┃", + topics ~= format(q"┃

%s - %s [ %s ]┃", t_a_.path_html_segtoc, t_a_.title, _auth, + t_a_.path_html_metadata, + t_a_.language, ) ~ "\n"; if (_opt_action.very_verbose) { writeln(" - ", t_a_.title, " - ", t_a_.author); @@ -440,10 +442,12 @@ string theme_light_1 = format(q"┃ ); } } - topics ~= format(q"┃

%s -%s┃", + topics ~= format(q"┃

%s - %s [ %s ]┃", t_a_.path_html_segtoc, t_a_.title, _auth, + t_a_.path_html_metadata, + t_a_.language, ) ~ "\n"; if (_opt_action.very_verbose) { writeln(" - ", t_a_.title, " - ", t_a_.author); @@ -481,10 +485,12 @@ string theme_light_1 = format(q"┃ ); } } - topics ~= format(q"┃

%s -%s┃", + topics ~= format(q"┃

%s - %s [ %s ]┃", t_a_.path_html_segtoc, t_a_.title, _auth, + t_a_.path_html_metadata, + t_a_.language, ) ~ "\n"; if (_opt_action.very_verbose) { writeln(" - ", t_a_.title, " - ", t_a_.author); -- cgit v1.2.3