osmith has uploaded this change for review.

View Change

build/graphviz-filter.conf: add config for svgs

Add a custom graphviz-filter.conf, so asciidoc instructs graphviz to
generate svgs.

Related: SYS#6380
Change-Id: Iee54012c41f554608b0915d707f7cf64bfbdc418
---
M build/Makefile.asciidoc.inc
A build/graphviz-filter.conf
2 files changed, 45 insertions(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/58/31958/1
diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc
index 1b7375e..848f1f1 100644
--- a/build/Makefile.asciidoc.inc
+++ b/build/Makefile.asciidoc.inc
@@ -38,7 +38,14 @@
UPLOAD_FILES += $(ASCIIDOC_PDF)

ABS_SRCDIR := $(or $(abs_srcdir),$(shell realpath $(srcdir)))
-ASCIIDOC_OPTS := -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf -f $(BUILDDIR)/docinfo-releaseinfo.conf -a srcdir='$(ABS_SRCDIR)' -a commondir='$(COMMONDIR)'
+ASCIIDOC_OPTS := \
+ -f $(BUILDDIR)/mscgen-filter.conf \
+ -f $(BUILDDIR)/diag-filter.conf \
+ -f $(BUILDDIR)/docinfo-releaseinfo.conf \
+ -f $(BUILDDIR)/graphviz-filter.conf \
+ -a srcdir='$(ABS_SRCDIR)' \
+ -a commondir='$(COMMONDIR)' \
+ $(NULL)
DBLATEX_OPTS := -s $(ASCIIDOCSTYLE) -P draft.mode=yes -P draft.watermark=0

ifeq (,$(BUILD_RELEASE))
diff --git a/build/graphviz-filter.conf b/build/graphviz-filter.conf
new file mode 100644
index 0000000..bf32927
--- /dev/null
+++ b/build/graphviz-filter.conf
@@ -0,0 +1,24 @@
+#
+# AsciiDoc Graphviz filter configuration file.
+#
+
+[graphviz-filter-style]
+graphviz-style=template="graphviz{format?-{format}}-block",subs=(),posattrs=("style","target","layout","format"),filter='dot -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" -T {format=svg} && echo " "'
+
+[blockdef-open]
+template::[graphviz-filter-style]
+
+[blockdef-listing]
+template::[graphviz-filter-style]
+
+[paradef-default]
+template::[graphviz-filter-style]
+
+[graphviz-block]
+template::[filter-image-svgblockmacro]
+
+[filter-image-svgblockmacro]
+{target%}{counter2:target-number}
+{target%}{set2:target:{docname}__{target-number}.svg}
+|
+template::[image-blockmacro]

To view, visit change 31958. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Iee54012c41f554608b0915d707f7cf64bfbdc418
Gerrit-Change-Number: 31958
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-MessageType: newchange