aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sisudoc/spine.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sisudoc/spine.d')
-rw-r--r--src/sisudoc/spine.d20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/sisudoc/spine.d b/src/sisudoc/spine.d
index e42a5f1..db6c8ac 100644
--- a/src/sisudoc/spine.d
+++ b/src/sisudoc/spine.d
@@ -168,6 +168,8 @@ string program_name = "spine";
"latex-header-sty" : false,
"light" : false,
"manifest" : false,
+ "markdown" : false,
+ "md" : false,
"hide-ocn" : false,
"no-ocn" : false,
"ocda-db" : false,
@@ -296,6 +298,8 @@ string program_name = "spine";
"latex-header-sty", "latex document header sty files", &opts["latex-header-sty"],
"light", "default light theme", &opts["light"],
"manifest", "process manifest output", &opts["manifest"],
+ "markdown", "markdown output (.md, CommonMark)", &opts["markdown"],
+ "md", "markdown output (--markdown)", &opts["md"],
"no-ocn", "object cite numbers", &opts["no-ocn"],
"ocda-db", "document abstraction (write ocda.db sqlite file)", &opts["ocda-db"],
"ocn-off", "object cite numbers", &opts["ocn-off"],
@@ -582,7 +586,7 @@ Verifying:
stdout.flush;
exit(_loaded.loaded ? 0 : 1);
}
- enum outTask { source_or_pod, sqlite, sqlite_multi, latex, typst, odt, epub, html_scroll, html_seg, html_stuff, text, skel }
+ enum outTask { source_or_pod, sqlite, sqlite_multi, latex, typst, markdown, odt, epub, html_scroll, html_seg, html_stuff, text, skel }
struct OptActions {
@trusted bool allow_downloads() {
return opts["allow-downloads"];
@@ -713,6 +717,9 @@ Verifying:
@trusted bool latex() {
return opts["latex"];
}
+ @trusted bool markdown() {
+ return (opts["markdown"] || opts["md"]) ? true : false;
+ }
@trusted bool typst() {
return (opts["typst"] || opts["typ"] || opts["pdf"]) ? true : false;
}
@@ -1074,6 +1081,7 @@ Verifying:
if (odt) schedule ~= outTask.odt;
if (latex) schedule ~= outTask.latex;
if (typst) schedule ~= outTask.typst;
+ if (markdown) schedule ~= outTask.markdown;
if (text) schedule ~= outTask.text;
if (skel) schedule ~= outTask.skel;
return schedule.sort().uniq;
@@ -1092,25 +1100,28 @@ Verifying:
|| odt
|| latex
|| typst
+ || markdown
+ || text
|| manifest
|| sqlite_discrete
|| sqlite_delete
|| sqlite_update
- || text
|| skel
) ? true : false;
}
@trusted bool require_processing_files() {
return (
opts["abstraction"]
- || epub
|| curate
|| html
|| html_seg
|| html_scroll
+ || epub
+ || odt
|| latex
|| typst
- || odt
+ || markdown
+ || text
|| manifest
|| show_abstraction
|| ocda_db
@@ -1121,7 +1132,6 @@ Verifying:
|| source_or_pod
|| sqlite_discrete
|| sqlite_update
- || text
|| xhtml
|| skel
) ? true : false;