aboutsummaryrefslogtreecommitdiff
path: root/workflow
diff options
context:
space:
mode:
Diffstat (limited to 'workflow')
-rwxr-xr-xworkflow/pandoc-filter-tool.cwl37
-rwxr-xr-xworkflow/phase1.cwl25
-rwxr-xr-xworkflow/phases.cwl47
-rw-r--r--workflow/rotate.gvpr3
4 files changed, 112 insertions, 0 deletions
diff --git a/workflow/pandoc-filter-tool.cwl b/workflow/pandoc-filter-tool.cwl
new file mode 100755
index 0000000..a433081
--- /dev/null
+++ b/workflow/pandoc-filter-tool.cwl
@@ -0,0 +1,37 @@
+#!/usr/bin/env cwl-runner
+
+cwlVersion: v1.0
+class: CommandLineTool
+label: Pandoc filter
+doc: Transforms Pandoc AST
+$namespaces:
+ dc: http://purl.org/dc/elements/1.1/
+ license: https://spdx.org/licenses/
+
+inputs:
+ input_file:
+ type: File
+ inputBinding:
+ position: 1
+
+outputs:
+ html_with_rdfa:
+ type: File
+ outputBinding:
+ glob: output
+ latex_with_xmp:
+ type: File
+ outputBinding:
+ glob: output
+ markdown:
+ type: File
+ outputBinding:
+ glob: output
+stdout: output
+
+baseCommand: pandoc
+arguments:
+- --output=output.${output_format}
+dc:license: license:GPL-3.0-or-later
+dc:rights: Copyright 2025, Jonas Smedegaard <dr@jones.dk>
+stdin: $(inputs.file1.path)
diff --git a/workflow/phase1.cwl b/workflow/phase1.cwl
new file mode 100755
index 0000000..f531e69
--- /dev/null
+++ b/workflow/phase1.cwl
@@ -0,0 +1,25 @@
+#!/usr/bin/env cwl-runner
+
+cwlVersion: v1.0
+class: Workflow
+$namespaces:
+ dc: http://purl.org/dc/elements/1.1/
+ license: https://spdx.org/licenses/
+
+inputs:
+ annotated_markdown: File
+
+outputs:
+ plain_markdown:
+ type: File
+ outputSource: strip/markdown
+
+steps:
+ strip:
+ in:
+ input_file: annotated_markdown
+ run: pandoc-filter-tool.cwl
+ out:
+ - markdown
+dc:license: license:GPL-3.0-or-later
+dc:rights: Copyright 2025, Jonas Smedegaard <dr@jones.dk>
diff --git a/workflow/phases.cwl b/workflow/phases.cwl
new file mode 100755
index 0000000..95df658
--- /dev/null
+++ b/workflow/phases.cwl
@@ -0,0 +1,47 @@
+#!/usr/bin/env cwl-runner
+
+cwlVersion: v1.0
+class: Workflow
+$namespaces:
+ dc: http://purl.org/dc/elements/1.1/
+ license: https://spdx.org/licenses/
+
+inputs:
+ annotated_markdown: File
+
+outputs:
+ annotated_html:
+ type: File
+ outputSource: convert/html_with_rdfa
+ annotated_pdf:
+ type: File
+ outputSource: convert/latex_with_xmp
+ markdown_with_metadata:
+ type: File
+ outputSource: extract/markdown
+ plain_markdown:
+ type: File
+ outputSource: strip/markdown
+
+steps:
+ convert:
+ in:
+ input_file: annotated_markdown
+ run: pandoc-filter-tool.cwl
+ out:
+ - html_with_rdfa
+ - latex_with_xmp
+ extract:
+ in:
+ input_file: annotated_markdown
+ run: pandoc-filter-tool.cwl
+ out:
+ - markdown
+ strip:
+ in:
+ input_file: annotated_markdown
+ run: pandoc-filter-tool.cwl
+ out:
+ - markdown
+dc:license: license:GPL-3.0-or-later
+dc:rights: Copyright 2025, Jonas Smedegaard <dr@jones.dk>
diff --git a/workflow/rotate.gvpr b/workflow/rotate.gvpr
new file mode 100644
index 0000000..33ca779
--- /dev/null
+++ b/workflow/rotate.gvpr
@@ -0,0 +1,3 @@
+// rotate rendering direction from default top → down to left → right
+BEG_G { $G.rankdir = "LR" }
+END_G { $O = $G; }