From b6b5c9e32bd53adec873e6efdd9b896eefcb7c30 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 24 May 2025 09:48:09 +0200 Subject: tighten workflow diagrams --- Makefile | 6 +++++- _conclusion.qmd | 2 +- _intro.qmd | 7 ++++--- workflow/phase1.cwl | 6 +++--- workflow/phases.cwl | 52 ++++++++++++++++++++++++++-------------------------- 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 -- cgit v1.2.3