From 9125357297e005a555586c354be18ea03701d342 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 25 Jun 2023 18:18:51 -0400 Subject: replace directory listing, blank index.html --- org/out_xmls.org | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) (limited to 'org/out_xmls.org') diff --git a/org/out_xmls.org b/org/out_xmls.org index d9c4800..febee54 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -439,7 +439,7 @@ import ) { string o; string metadata_links = ((doc_matters.opt.action.html_link_curate) - ? format(q"┃

[ ≅ | %s | ◆ |%s%s ⌘• | ⌘A | ⌘T ]

┃", + ? format(q"┃

⟰  [ %s  ◆ %s%s ⌘• ]   ≅ | 🖋 | ⌘ |

┃", (doc_matters.opt.action.webserver_url_doc_root.length > 0) ? doc_matters.opt.action.webserver_url_doc_root : doc_matters.conf_make_meta.conf.w_srv_data_root_url @@ -458,7 +458,7 @@ import ~ doc_matters.src.filename_base ~ "." ~ doc_matters.src.lng - ~ ".a4.portrait.pdf\"> □ |") + ~ ".a4.portrait.pdf\"> □ ") : "", (doc_matters.opt.action.html_link_pdf || doc_matters.opt.action.html_link_pdf_letter) ? (" □ |") + ~ ".letter.portrait.pdf\"> □ ") : "", (type == "seg") ? "../" : "", doc_matters.src.filename_base, (type == "seg") ? "../" : "", (type == "seg") ? "../" : "", + (type == "seg") ? "../" : "", ) : ""); o = format(q"┃ @@ -2007,9 +2008,15 @@ default: if (!exists(pth_html.base)) { pth_html.base.mkdirRecurse; } - auto f = File(pth_html.fn_scroll(doc_matters.src.filename), "w"); - foreach (o; doc) { - f.writeln(o); + { + auto f = File(pth_html.fn_scroll(doc_matters.src.filename), "w"); + foreach (o; doc) { + f.writeln(o); + } + } + if (!exists(pth_html.base ~ "/index.html")) { + auto f = File(pth_html.base ~"/index.html", "w"); + f.writeln(""); } } catch (ErrnoException ex) { // Handle error @@ -2373,10 +2380,16 @@ default: if (!exists(pth_html.css)) { (pth_html.css).mkdirRecurse; } - auto f = File(pth_html.fn_seg_css, "w"); - f.writeln(css.html_seg); - f = File(pth_html.fn_scroll_css, "w"); - f.writeln(css.html_scroll); + { + auto f = File(pth_html.fn_seg_css, "w"); + f.writeln(css.html_seg); + f = File(pth_html.fn_scroll_css, "w"); + f.writeln(css.html_scroll); + } + if (!exists(pth_html.css ~ "/index.html")) { + auto f = File(pth_html.css ~"/index.html", "w"); + f.writeln(""); + } } catch (ErrnoException ex) { // Handle error } @@ -2409,6 +2422,10 @@ default: } } } + if (!exists(pth_html.image ~ "/index.html")) { + auto f = File(pth_html.image ~"/index.html", "w"); + f.writeln(""); + } } } #+END_SRC @@ -3140,6 +3157,10 @@ zip -0 file.epub mimetype && zip -r -9 file.epub META-INF OEBPS if (!exists(pth_epub3.base)) { pth_epub3.base.mkdirRecurse; } + if (!exists(pth_epub3.base ~ "/index.html")) { + auto f = File(pth_epub3.base ~"/index.html", "w"); + f.writeln(""); + } { /+ debug +/ if (doc_matters.opt.action.debug_do_epub) { if (!exists(pth_epub3.dbg_doc_meta_inf(doc_matters.src.filename))) { -- cgit v1.2.3