aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-05-24 09:48:09 +0200
committerJonas Smedegaard <dr@jones.dk>2025-05-24 09:55:02 +0200
commitb6b5c9e32bd53adec873e6efdd9b896eefcb7c30 (patch)
treeb13c85ff2774e4373280e294ba0e004f401bdb4c
parent4d0e9adfe61c2957dd5cb59a13f1f7784c06a4f1 (diff)
tighten workflow diagrams
-rw-r--r--Makefile6
-rw-r--r--_conclusion.qmd2
-rw-r--r--_intro.qmd7
-rwxr-xr-xworkflow/phase1.cwl6
-rwxr-xr-xworkflow/phases.cwl52
5 files changed, 39 insertions, 34 deletions
diff --git a/Makefile b/Makefile
index 0ced723..3e4cefa 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,11 @@ $(SYNTAX_DIAGRAMS): %.svg: %.py
python3 $<
$(WORKFLOW_DIAGRAMS): %.svg: %.cwl
- cwltool --print-dot $< | gvpr -f workflow/rotate.gvpr | dot -Tsvg > $@
+ cwltool --print-dot $< \
+ | gvpr -f workflow/rotate.gvpr \
+ | perl -pe 's/phase\d_//g;' \
+ -e 's/label=\K[^\s",]+|translate_to_\w+/ "\"".join(" ", split(m{_}, $$&))."\"" /ge' \
+ | dot -Tsvg > $@
check: $(DIFFTESTS:%=check-%)
luacheck --quiet $(FILTER)
diff --git a/_conclusion.qmd b/_conclusion.qmd
index 5e7c9ec..fbc19c0 100644
--- a/_conclusion.qmd
+++ b/_conclusion.qmd
@@ -59,7 +59,7 @@ This work has been phase 1 of a larger set of projects,
all building on the same codebase,
illustrated in @fig-phases.
-![Implementation levels.](workflow/phases.svg){#fig-phases}
+![A filter strips, extracts or translates annotations.](workflow/phases.svg){#fig-phases}
Phase 2 will extend the Pandoc filter
to support extraction of annotations,
diff --git a/_intro.qmd b/_intro.qmd
index 7cc5f54..7c4c5a1 100644
--- a/_intro.qmd
+++ b/_intro.qmd
@@ -91,11 +91,12 @@ as discussed in @sec-rdf.
The idea is to introduce semantic text annotation to Markdown authoring
without disruptions in the Markdown-based workflows.
-Annotations in Markdown gets filtered out,
-so that further processing need to know about the new markup,
+A filter is added to the document generation workflow
+that strips semantic text annotations from the Markdown content,
+so that further processing need not know about the new markup,
as illustrated in @fig-phase1.
-![Simplest implementation level.](workflow/phase1.svg){#fig-phase1}
+![Filter strips annotations from content.](workflow/phase1.svg){#fig-phase1}
### Evolve accepted formats and tools
diff --git a/workflow/phase1.cwl b/workflow/phase1.cwl
index 1aa0bc2..d4d40c0 100755
--- a/workflow/phase1.cwl
+++ b/workflow/phase1.cwl
@@ -7,17 +7,17 @@ $namespaces:
license: https://spdx.org/licenses/
inputs:
- annotated_markdown: File
+ annotated_Markdown: File
outputs:
- plain_markdown:
+ plain_Markdown:
type: File
outputSource: strip/markdown
steps:
strip:
in:
- input_file: annotated_markdown
+ input_file: annotated_Markdown
output_format:
default: commonmark
run: pandoc-filter-tool.cwl
diff --git a/workflow/phases.cwl b/workflow/phases.cwl
index 208ef63..3158170 100755
--- a/workflow/phases.cwl
+++ b/workflow/phases.cwl
@@ -7,56 +7,56 @@ $namespaces:
license: https://spdx.org/licenses/
inputs:
- annotated_markdown: File
+ annotated_Markdown: File
outputs:
- annotated_html:
+ Markdown_with_metadata:
type: File
- outputSource: phase3_convert_to_html/html_with_rdfa
- annotated_pdf:
+ outputSource: phase2_extract/markdown
+ annotated_HTML:
type: File
- outputSource: phase3_convert_to_pdf/latex_with_xmp
- markdown_with_metadata:
+ outputSource: phase3_translate_to_RDFa/html_with_rdfa
+ annotated_PDF:
type: File
- outputSource: phase2_extract/markdown
- plain_markdown:
+ outputSource: phase3_translate_to_XMP/latex_with_xmp
+ plain_Markdown:
type: File
outputSource: phase1_strip/markdown
steps:
- phase3_convert_to_html:
+ phase1_strip:
in:
- input_file: annotated_markdown
+ input_file: annotated_Markdown
output_format:
- default: html
+ default: commonmark
run: pandoc-filter-tool.cwl
out:
- - html_with_rdfa
- - latex_with_xmp
- phase3_convert_to_pdf:
+ - markdown
+ phase2_extract:
in:
- input_file: annotated_markdown
+ input_file: annotated_Markdown
output_format:
- default: pdf
+ default: commonmark
run: pandoc-filter-tool.cwl
out:
- - html_with_rdfa
- - latex_with_xmp
- phase2_extract:
+ - markdown
+ phase3_translate_to_RDFa:
in:
- input_file: annotated_markdown
+ input_file: annotated_Markdown
output_format:
- default: commonmark
+ default: html
run: pandoc-filter-tool.cwl
out:
- - markdown
- phase1_strip:
+ - html_with_rdfa
+ - latex_with_xmp
+ phase3_translate_to_XMP:
in:
- input_file: annotated_markdown
+ input_file: annotated_Markdown
output_format:
- default: commonmark
+ default: pdf
run: pandoc-filter-tool.cwl
out:
- - markdown
+ - html_with_rdfa
+ - latex_with_xmp
dc:license: license:GPL-3.0-or-later
dc:rights: Copyright 2025, Jonas Smedegaard <dr@jones.dk>