diff options
Diffstat (limited to 'src/sdp/meta/conf_make_meta_structs.d')
-rw-r--r-- | src/sdp/meta/conf_make_meta_structs.d | 275 |
1 files changed, 121 insertions, 154 deletions
diff --git a/src/sdp/meta/conf_make_meta_structs.d b/src/sdp/meta/conf_make_meta_structs.d index d46b462..add72d6 100644 --- a/src/sdp/meta/conf_make_meta_structs.d +++ b/src/sdp/meta/conf_make_meta_structs.d @@ -10,36 +10,28 @@ import std.utf, std.conv : to; struct ConfCompositeMakeStr { - string bold = ""; - string breaks = ""; - string cover_image = ""; - string css = ""; - string emphasis = ""; - string footer = ""; + string bold; + string breaks; + string cover_image; + string css; + string emphasis; + string footer; string[] headings; - string home_button_image = ""; - string home_button_text = ""; - string italics = ""; - string num_top = ""; - string num_depth = ""; + string home_button_image; + string home_button_text; + string italics; + string num_top; + string num_depth; string[][] substitute; - string texpdf_font = ""; + string texpdf_font; } struct confCompositeMakeBuild { - auto bold_rgxmatch(string _mk) { - auto _rgxtxt = (_mk.empty) - ? `=NULL` - : `(` ~ _mk.dup ~ `)`; - return (cast(char[]) (_rgxtxt)); - } - auto bold_substitute_abstract() { - return "*{$1}*"; - } - auto bold_substitute_sisu_markup() { - return "*{$1}*"; - } - auto bold_substitute_html() { - return "<b>$1</b>"; + auto bold(string _mk) { + string[] _out; + if (_mk) { + _out = [ (cast(string) (`(` ~ _mk.dup ~ `)`)), "*{$1}*", "<b>$1</b>"]; + } + return _out; } auto breaks(string _mk) { return _mk; @@ -50,20 +42,12 @@ struct confCompositeMakeBuild { auto css(string _mk) { return _mk; } - auto emphasis_rgxmatch(string _mk) { - auto _rgxtxt = (_mk.empty) - ? `=NULL` - : `(` ~ _mk.dup ~ `)`; - return (cast(char[]) (_rgxtxt)); - } - auto emphasis_substitute_abstract() { - return "!{$1}!"; - } - auto emphasis_substitute_sisu_markup() { - return "!{$1}!"; - } - auto emphasis_substitute_html() { - return "<em>$1</em>"; + auto emphasis(string _mk) { + string[] _out; + if (_mk) { + _out = [ (cast(string) (`(` ~ _mk.dup ~ `)`)), "!{$1}!", "<em>$1</em>" ]; + } + return _out; } auto footer(string _mk) { return _mk; @@ -77,20 +61,12 @@ struct confCompositeMakeBuild { auto home_button_text(string _mk) { return _mk; } - auto italics_rgxmatch(string _mk) { - auto _rgxtxt = (_mk.empty) - ? `=NULL` - : `(` ~ _mk.dup ~ `)`; - return (cast(char[]) (_rgxtxt)); - } - auto italics_substitute_abstract() { - return "/{$1}/"; - } - auto italics_substitute_sisu_markup() { - return "/{$1}/"; - } - auto italics_substitute_html() { - return "<i>$1</i>"; + auto italics(string _mk) { + string[] _out; + if (_mk) { + _out = [ (cast(string) (`(` ~ _mk.dup ~ `)`)), "/{$1}/", "<i>$1</i>" ]; + } + return _out; } auto num_top(string _mk) { return _mk; @@ -106,112 +82,103 @@ struct confCompositeMakeBuild { } } struct ConfCompositeMakeInit { - char[] bold_rgxmatch = `=NULL`.dup; - auto bold_substitute_abstract = "*{$1}*"; - auto bold_substitute_sisu_markup = "*{$1}*"; - auto bold_substitute_html = "<b>$1</b>"; - string breaks = ""; - string cover_image = ""; - string css = ""; - char[] emphasis_rgxmatch = `=NULL`.dup; - auto emphasis_substitute_abstract = "!{$1}!"; - auto emphasis_substitute_sisu_markup = "!{$1}!"; - auto emphasis_substitute_html = "<em>$1</em>"; - string footer = ""; + string[] bold; + string breaks; + string cover_image; + string css; + string[] emphasis; + string footer; string[] headings; - string home_button_image = ""; - string home_button_text = ""; - char[] italics_rgxmatch = `=NULL`.dup; - auto italics_substitute_abstract = "/{$1}/"; - auto italics_substitute_sisu_markup = "/{$1}/"; - auto italics_substitute_html = "<i>$1</i>"; - string num_top = ""; - string num_depth = ""; + string home_button_image; + string home_button_text; + string[] italics; + string num_top; + string num_depth; string[][] substitute; - string texpdf_font = ""; + string texpdf_font; } struct ConfCompositeSiteLocal { - string webserv_url_root = ""; - string webserv_path = ""; - string webserv_images = ""; - string webserv_cgi = ""; - string webserv_cgi_host = ""; - string webserv_cgi_host_path = ""; - string webserv_cgi_port = ""; - string webserv_cgi_user = ""; - string webserv_cgi_file_links = ""; - string processing_path = ""; - string processing_dir = ""; - string processing_concord_max = ""; - string flag_act0 = ""; - string flag_act1 = ""; - string flag_act2 = ""; - string flag_act3 = ""; - string flag_act4 = ""; - string flag_act5 = ""; - string flag_act6 = ""; - string flag_act7 = ""; - string flag_act8 = ""; - string flag_act9 = ""; - string default_papersize = ""; - string default_text_wrap = ""; - string default_emphasis = ""; - string default_language = ""; - string default_digest = ""; - string permission_share_source = ""; - string search_flag = ""; - string search_action = ""; - string search_db = ""; - string search_title = ""; + string webserv_url_root; + string webserv_path; + string webserv_images; + string webserv_cgi; + string webserv_cgi_host; + string webserv_cgi_host_path; + string webserv_cgi_port; + string webserv_cgi_user; + string webserv_cgi_file_links; + string processing_path; + string processing_dir; + string processing_concord_max; + string flag_act0; + string flag_act1; + string flag_act2; + string flag_act3; + string flag_act4; + string flag_act5; + string flag_act6; + string flag_act7; + string flag_act8; + string flag_act9; + string default_papersize; + string default_text_wrap; + string default_emphasis; + string default_language; + string default_digest; + string permission_share_source; + string search_flag; + string search_action; + string search_db; + string search_title; } struct MetaComposite { - string classify_dewey = ""; - string classify_keywords = ""; - string classify_loc = ""; - string classify_subject = ""; - string classify_topic_register = ""; - string creator_author = ""; - string creator_author_email = ""; - string creator_illustrator = ""; - string creator_translator = ""; - string date_added_to_site = ""; - string date_available = ""; - string date_created = ""; - string date_issued = ""; - string date_modified = ""; - string date_published = ""; - string date_valid = ""; - string identifier_isbn = ""; - string identifier_oclc = ""; - string identifier_pg = ""; - string language_document = ""; - string language_document_char = ""; - string links = ""; - string notes_abstract = ""; - string notes_description = ""; - string original_language = ""; - string original_language_char = ""; - string original_publisher = ""; - string original_source = ""; - string original_title = ""; - string publisher = ""; - string rights_copyright = ""; - string rights_copyright_audio = ""; - string rights_copyright_cover = ""; - string rights_copyright_illustrations = ""; - string rights_copyright_photographs = ""; - string rights_copyright_text = ""; - string rights_copyright_translation = ""; - string rights_copyright_video = ""; - string rights_license = ""; - string title_edition = ""; - string title_full = ""; - string title_language = ""; - string title_main = ""; - string title_note = ""; - string title_short = ""; - string title_sub = ""; - string title_subtitle = ""; + string classify_dewey; + string classify_keywords; + string classify_loc; + string classify_subject; + string classify_topic_register; + string creator_author; + string creator_author_email; + string creator_illustrator; + string creator_translator; + string date_added_to_site; + string date_available; + string date_created; + string date_issued; + string date_modified; + string date_published; + string date_valid; + string identifier_isbn; + string identifier_oclc; + string identifier_pg; + string language_document; + string language_document_char; + string links; + string notes_abstract; + string notes_description; + string original_language; + string original_language_char; + string original_publisher; + string original_source; + string original_title; + string publisher; + string rights_copyright; + string rights_copyright_audio; + string rights_copyright_cover; + string rights_copyright_illustrations; + string rights_copyright_photographs; + string rights_copyright_text; + string rights_copyright_translation; + string rights_copyright_video; + string rights_license; + string title_edition; + string title_full; + string title_language; + string title_main; + string title_note; + string title_short; + string title_sub; + string title_subtitle; } struct ConfComposite { MetaComposite meta; |