diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2019-10-04 21:42:07 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2019-10-17 19:07:20 -0400 |
commit | b70dfcf862ef81795210d6ceafc6ba9082199bf9 (patch) | |
tree | a04a2a4f9b517d02082eee336093ebbe404f5edd /src/doc_reform/meta/metadoc_show_config.d | |
parent | path related, mostly cosmetic code (diff) |
--show-{config,make,metadata,summary}doc-reform_v0.8.0
Diffstat (limited to 'src/doc_reform/meta/metadoc_show_config.d')
-rw-r--r-- | src/doc_reform/meta/metadoc_show_config.d | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/src/doc_reform/meta/metadoc_show_config.d b/src/doc_reform/meta/metadoc_show_config.d new file mode 100644 index 0000000..25300aa --- /dev/null +++ b/src/doc_reform/meta/metadoc_show_config.d @@ -0,0 +1,106 @@ +module doc_reform.meta.metadoc_show_config; +template DocReformShowConfig() { + void DocReformShowConfig(T)( + T doc_matters, + ) { + import + doc_reform.meta.defaults, + doc_reform.meta.rgx; + import + std.array, + std.exception, + std.regex, + std.stdio, + std.string, + std.traits, + std.typecons, + std.uni, + std.utf, + std.conv : to; + mixin InternalMarkup; + auto markup = InlineMarkup(); + auto min_repeat_number = 66; + auto char_repeat_number = (doc_matters.conf_make_meta.meta.title_full.length + + doc_matters.conf_make_meta.meta.creator_author.length + 4); + char_repeat_number = (char_repeat_number > min_repeat_number) + ? char_repeat_number + : min_repeat_number; + if (doc_matters.opt.action.show_config + && doc_matters.opt.action.debug_do + ) { + writeln(doc_matters.conf_make_meta.conf); + } + if (doc_matters.opt.action.show_config) { + writefln( + "%s\n\"%s\", %s\n%s\n%s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n%30-s%10-s\n", + markup.repeat_character_by_number_provided("-", char_repeat_number), + doc_matters.conf_make_meta.meta.title_full, + doc_matters.conf_make_meta.meta.creator_author, + doc_matters.src.filename, + markup.repeat_character_by_number_provided("-", char_repeat_number), + "- webserv url domain:", + doc_matters.conf_make_meta.conf.webserv_url_domain, + "- webserv doc root:", + doc_matters.conf_make_meta.conf.webserv_url_doc_root, + "- webserv doc path:", + doc_matters.conf_make_meta.conf.webserv_url_doc_path, + "- webserv images (location):", + doc_matters.conf_make_meta.conf.webserv_images, + "- webserv cgi:", + doc_matters.conf_make_meta.conf.webserv_cgi, + "- webserv cgi host:", + doc_matters.conf_make_meta.conf.webserv_cgi_host, + "- webserv cgi host path:", + doc_matters.conf_make_meta.conf.webserv_cgi_host_path, + "- webserv cgi port:", + doc_matters.conf_make_meta.conf.webserv_cgi_port, + "- webserv cgi user:", + doc_matters.conf_make_meta.conf.webserv_cgi_user, + "- webserv cgi file links:", + doc_matters.conf_make_meta.conf.webserv_cgi_file_links, + "- output path:", + doc_matters.conf_make_meta.conf.output_path, + "- processing concordance max:", + doc_matters.conf_make_meta.conf.processing_concord_max, + "- flag act0:", + doc_matters.conf_make_meta.conf.flag_act0, + "- flag act1:", + doc_matters.conf_make_meta.conf.flag_act1, + "- flag act2:", + doc_matters.conf_make_meta.conf.flag_act2, + "- flag act3:", + doc_matters.conf_make_meta.conf.flag_act3, + "- flag act4:", + doc_matters.conf_make_meta.conf.flag_act4, + "- flag act5:", + doc_matters.conf_make_meta.conf.flag_act5, + "- flag act6:", + doc_matters.conf_make_meta.conf.flag_act6, + "- flag act7:", + doc_matters.conf_make_meta.conf.flag_act7, + "- flag act8:", + doc_matters.conf_make_meta.conf.flag_act8, + "- flag act9:", + doc_matters.conf_make_meta.conf.flag_act9, + "- default papersize:", + doc_matters.conf_make_meta.conf.default_papersize, + "- default text wrap:", + doc_matters.conf_make_meta.conf.default_text_wrap, + "- default emphasis markup symbol:", + doc_matters.conf_make_meta.conf.default_emphasis, + "- default language:", + doc_matters.conf_make_meta.conf.default_language, + "- default hash digest:", + doc_matters.conf_make_meta.conf.default_digest, + "- search flag:", + doc_matters.conf_make_meta.conf.search_flag, + "- search action:", + doc_matters.conf_make_meta.conf.search_action, + "- search db:", + doc_matters.conf_make_meta.conf.search_db, + "- search title:", + doc_matters.conf_make_meta.conf.search_title, + ); + } + } +} |