Skip to contentSkip to conversation

add support for diagrams generated from SVG sources

RFC In review Michael Opdenacker 3 participants 14 messages May 15, 2021 – May 28, 2021

lore
Share & tools
lore
#0 lore raw

cover add support for diagrams generated from SVG sources

This RFC proposes modifications to the Makefile and the Sphinx configuration (conf.py file) to support:

- The generation of PNG diagrams from SVG sources for the generation of the EPUB manual. Directly using SVG in EPUB shows at least font size and alignment issues.

The conf.py file has been modified to let the EPUB builder know that it should prefer PNG over SVG when both formats are available.

- The generation of PDF diagrams from SVG sources for the generation of the PDF manual. PDF output cannot use SVG, and needs PDF diagrams instead.

New diagrams are stored in separate "svg" directories so that generated .png and .pdf files can be "gitignored" without ignoring the original .png files that have no .svg source.

In the source .rst files, new diagrams can now be included as, for example:
image:: svg/git-workflow.*

Note that the way the Makefile was modified can most probably be improved, as my "make" skills are pretty limited. I'm interested in your suggestions!

My goal is to progressively replace PNG diagrams with SVG ones:
- To get high quality definition output documents, in all output formats
- To Have the ability to update diagrams
I would indeed do this very progressively, a little bit every week, not at the expense of other tasks.

Michael Opdenacker (3):
Makefile: allow epub and latexpdf outputs to use diagrams from SVG
sources
conf.py: prefer PNG to SVG in EPUB output
overview-manual: SVG diagram for the git workflow

 documentation/.gitignore                      |    2 +
 documentation/Makefile                        |   29 +-
 documentation/conf.py                         |    4 +
 .../development-environment.rst               |    4 +-
 .../overview-manual/figures/git-workflow.png  |  Bin 26586 -> 0 bytes
 .../overview-manual/svg/git-workflow.svg      | 1205 +++++++++++++++++
 6 files changed, 1239 insertions(+), 5 deletions(-)
 delete mode 100644 documentation/overview-manual/figures/git-workflow.png
 create mode 100644 documentation/overview-manual/svg/git-workflow.svg
Signature · 1 line
2.25.1
#1 lore raw

RFC 1/3 Makefile: allow epub and latexpdf outputs to use diagrams from SVG sources

html output is great when directly using SVG
epub output has to use exported PNG because of issues using SVG directly latexpdf output cannot use SVG, it needs exported PDF instead

This adds rules to generate PNG and PDF formats from new SVG sources.

Newly added diagrams have be stored in svg/ subdirectories so that PNG and PDF files generated from SVG can be "gitignored" without ignoring the original PNG diagrams that have no SVG source.

Note: had to remove the dependency to "Makefile" in the final "catch-all" target, otherwise it was also catching my SVG to PNG and SVG to PDF targets. Any suggest to avoid having to do this?

---
 documentation/.gitignore |  2 ++
 documentation/Makefile   | 29 ++++++++++++++++++++++++++---
 2 files changed, 28 insertions(+), 3 deletions(-)
documentation/.gitignore +2 -0
index c44580b088..35ead8af66 100644
@@ -1,3 +1,5 @@
 _build/
 Pipfile.lock
 .vscode/
+*/svg/*.png
+*/svg/*.pdf
documentation/Makefile +26 -3
index d40f390e2b..acb09726cd 100644
@@ -6,8 +6,11 @@
 SPHINXOPTS    ?= -j auto
 SPHINXBUILD   ?= sphinx-build
 SOURCEDIR     = .
+IMAGEDIRS     = */svg
 BUILDDIR      = _build
 DESTDIR       = final
+SVG2PNG       = inkscape
+SVG2PDF       = inkscape
 
 ifeq ($(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi),0)
 $(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed")
@@ -17,7 +20,7 @@ endif
 help:
 	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
 
-.PHONY: help Makefile clean publish
+.PHONY: help Makefile clean publish epub latexpdf
 
 publish: Makefile html singlehtml
 	rm -rf $(BUILDDIR)/$(DESTDIR)/
@@ -26,10 +29,30 @@ publish: Makefile html singlehtml
 	cp $(BUILDDIR)/singlehtml/index.html $(BUILDDIR)/$(DESTDIR)/singleindex.html
 	sed -i -e '[email protected]#@singleindex.html#@g' $(BUILDDIR)/$(DESTDIR)/singleindex.html
 
+# Build a list of SVG files to convert to PDFs
+PDFs := $(foreach dir, $(IMAGEDIRS), $(patsubst %.svg,%.pdf,$(wildcard $(SOURCEDIR)/$(dir)/*.svg)))
+
+# Build a list of SVG files to convert to PNGs
+PNGs := $(foreach dir, $(IMAGEDIRS), $(patsubst %.svg,%.png,$(wildcard $(SOURCEDIR)/$(dir)/*.svg)))
+
+# Pattern rule for converting SVG to PDF
+%.pdf : %.svg
+	$(SVG2PDF) --export-filename=$@ $<
+
+# Pattern rule for converting SVG to PNG
+%.png : %.svg
+	$(SVG2PNG) --export-filename=$@ $<
+
 clean:
-	@rm -rf $(BUILDDIR)
+	@rm -rf $(BUILDDIR) $(PNGs) $(PDFs)
+
+epub: $(PNGs)
+	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+latexpdf: $(PDFs)
+	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
 
 # Catch-all target: route all unknown targets to Sphinx using the new
 # "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
-%: Makefile
+%:
 	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Signature · 1 line
2.25.1
#2 lore raw

Re: [docs] [RFC 1/3] Makefile: allow epub and latexpdf outputs to use diagrams from SVG sources

Quoted 36 lines · Michael Opdenacker

html output is great when directly using SVG
epub output has to use exported PNG because of issues using SVG directly latexpdf output cannot use SVG, it needs exported PDF instead

This adds rules to generate PNG and PDF formats from new SVG sources.

Newly added diagrams have be stored in svg/ subdirectories so that PNG and PDF files generated from SVG can be "gitignored" without ignoring the original PNG diagrams that have no SVG source.

Note: had to remove the dependency to "Makefile" in the final "catch-all" target,
otherwise it was also catching my SVG to PNG and SVG to PDF targets. Any suggest to avoid having to do this?

---
 documentation/.gitignore |  2 ++
 documentation/Makefile   | 29 ++++++++++++++++++++++++++---
 2 files changed, 28 insertions(+), 3 deletions(-)
documentation/.gitignore +2 -0
index c44580b088..35ead8af66 100644
@@ -1,3 +1,5 @@
 _build/
 Pipfile.lock
 .vscode/
+*/svg/*.png
+*/svg/*.pdf
documentation/Makefile +0 -0
index d40f390e2b..acb09726cd 100644

documentation/Makefile line 14

Quoted 9 lines
documentation/Makefile +3 -0
@@ -6,8 +6,11 @@
 SPHINXOPTS    ?= -j auto
 SPHINXBUILD   ?= sphinx-build
 SOURCEDIR     = .
+IMAGEDIRS     = */svg
 BUILDDIR      = _build
 DESTDIR       = final
+SVG2PNG       = inkscape
+SVG2PDF       = inkscape
 

It is a new host dependency, we need to update the README and have a meaningful error message.

Quoted 62 lines
documentation/Makefile +0 -0
 ifeq ($(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else
 echo 0; fi),0)

$(error "The '$(SPHINXBUILD)' command was not found. Make sure you have
Sphinx installed")

documentation/Makefile +1 -1
@@ -17,7 +20,7 @@ endif
 help:
        @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
 $(O)
 
-.PHONY: help Makefile clean publish
+.PHONY: help Makefile clean publish epub latexpdf
 
 publish: Makefile html singlehtml
        rm -rf $(BUILDDIR)/$(DESTDIR)/
documentation/Makefile +0 -0
@@ -26,10 +29,30 @@ publish: Makefile html singlehtml
        cp $(BUILDDIR)/singlehtml/index.html

$(BUILDDIR)/$(DESTDIR)/singleindex.html
sed -i -e '[email protected]#@singleindex.html#@g'
$(BUILDDIR)/$(DESTDIR)/singleindex.html

documentation/Makefile +2 -0
+# Build a list of SVG files to convert to PDFs
+PDFs := $(foreach dir, $(IMAGEDIRS), $(patsubst %.svg,%.pdf,$(wildcard

$(SOURCEDIR)/$(dir)/*.svg)))

documentation/Makefile +3 -0
+
+# Build a list of SVG files to convert to PNGs
+PNGs := $(foreach dir, $(IMAGEDIRS), $(patsubst %.svg,%.png,$(wildcard

$(SOURCEDIR)/$(dir)/*.svg)))

documentation/Makefile +13 -1
+
+# Pattern rule for converting SVG to PDF
+%.pdf : %.svg
+       $(SVG2PDF) --export-filename=$@ $<
+
+# Pattern rule for converting SVG to PNG
+%.png : %.svg
+       $(SVG2PNG) --export-filename=$@ $<
+
 clean:
-       @rm -rf $(BUILDDIR)
+       @rm -rf $(BUILDDIR) $(PNGs) $(PDFs)
+
+epub: $(PNGs)
+       @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)

$(O)

documentation/Makefile +3 -0
+
+latexpdf: $(PDFs)
+       @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)

$(O)

# Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
-%: Makefile
+%:

        @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)

$(O)
--
2.25.1

#3 lore raw

Re: [docs] [RFC 1/3] Makefile: allow epub and latexpdf outputs to use diagrams from SVG sources

Nicolas,

Quoted 7 lines · Nicolas Dechesne

+SVG2PNG       = inkscape
+SVG2PDF       = inkscape

It is a new host dependency, we need to update the README and have a meaningful error message.

Yes, depending on the solution that is used, I'll update the list of package requirements.

I guess we will also have to install those on the autobuilder machine(s) too, otherwise it will break. Will this be manual, or is there a file we need to fill so that the right packages are automatically installed on the autobuilder(s)?

Thanks

Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

Re: [docs] [RFC 1/3] Makefile: allow epub and latexpdf outputs to use diagrams from SVG sources

Quoted 11 lines · Michael Opdenacker

Nicolas,

Quoted 7 lines · Nicolas Dechesne

+SVG2PNG = inkscape
+SVG2PDF = inkscape

It is a new host dependency, we need to update the README and have a meaningful error message.

Quoted 8 lines

Yes, depending on the solution that is used, I'll update the list of package requirements.

I guess we will also have to install those on the autobuilder machine(s) too, otherwise it will break. Will this be manual, or is there a file we need to fill so that the right packages are automatically installed on the autobuilder(s)?

Good question, I think Richard should answer it. The AB uses a 'docs' buildtools, but I don't remember where it's coming from..
http://git.yoctoproject.org/cgit/cgit.cgi/yocto-autobuilder-helper/tree/scripts/run-docs-build#n8

Quoted 11 lines

Thanks

Michael.

--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#5 lore raw

Re: [docs] [RFC 1/3] Makefile: allow epub and latexpdf outputs to use diagrams from SVG sources

In reply to Michael Opdenacker

Hi Michael,

Quoted 78 lines · Michael Opdenacker

html output is great when directly using SVG
epub output has to use exported PNG because of issues using SVG directly latexpdf output cannot use SVG, it needs exported PDF instead

This adds rules to generate PNG and PDF formats from new SVG sources.

Newly added diagrams have be stored in svg/ subdirectories so that PNG and PDF files generated from SVG can be "gitignored" without ignoring the original PNG diagrams that have no SVG source.

Note: had to remove the dependency to "Makefile" in the final "catch-all" target, otherwise it was also catching my SVG to PNG and SVG to PDF targets. Any suggest to avoid having to do this?

---
 documentation/.gitignore |  2 ++
 documentation/Makefile   | 29 ++++++++++++++++++++++++++---
 2 files changed, 28 insertions(+), 3 deletions(-)
documentation/.gitignore +2 -0
index c44580b088..35ead8af66 100644
@@ -1,3 +1,5 @@
 _build/
 Pipfile.lock
 .vscode/
+*/svg/*.png
+*/svg/*.pdf
documentation/Makefile +21 -2
index d40f390e2b..acb09726cd 100644
@@ -6,8 +6,11 @@
 SPHINXOPTS    ?= -j auto
 SPHINXBUILD   ?= sphinx-build
 SOURCEDIR     = .
+IMAGEDIRS     = */svg
 BUILDDIR      = _build
 DESTDIR       = final
+SVG2PNG       = inkscape
+SVG2PDF       = inkscape
 
 ifeq ($(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi),0)
 $(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed")
@@ -17,7 +20,7 @@ endif
 help:
 	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
 
-.PHONY: help Makefile clean publish
+.PHONY: help Makefile clean publish epub latexpdf
 
 publish: Makefile html singlehtml
 	rm -rf $(BUILDDIR)/$(DESTDIR)/
@@ -26,10 +29,30 @@ publish: Makefile html singlehtml
 	cp $(BUILDDIR)/singlehtml/index.html $(BUILDDIR)/$(DESTDIR)/singleindex.html
 	sed -i -e '[email protected]#@singleindex.html#@g' $(BUILDDIR)/$(DESTDIR)/singleindex.html
 
+# Build a list of SVG files to convert to PDFs
+PDFs := $(foreach dir, $(IMAGEDIRS), $(patsubst %.svg,%.pdf,$(wildcard $(SOURCEDIR)/$(dir)/*.svg)))
+
+# Build a list of SVG files to convert to PNGs
+PNGs := $(foreach dir, $(IMAGEDIRS), $(patsubst %.svg,%.png,$(wildcard $(SOURCEDIR)/$(dir)/*.svg)))
+
+# Pattern rule for converting SVG to PDF
+%.pdf : %.svg
+	$(SVG2PDF) --export-filename=$@ $<
+
+# Pattern rule for converting SVG to PNG
+%.png : %.svg
+	$(SVG2PNG) --export-filename=$@ $<
+
 clean:
-	@rm -rf $(BUILDDIR)
+	@rm -rf $(BUILDDIR) $(PNGs) $(PDFs)
+
+epub: $(PNGs)

documentation/Makefile publish: Makefile html singlehtml · line 58

Quoted 10 lines
documentation/Makefile +5 -1
+	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+latexpdf: $(PDFs)
+	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
 
 # Catch-all target: route all unknown targets to Sphinx using the new
 # "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
-%: Makefile
+%:
 	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

Probably just a note to self but there's now a better chance of me not forgetting :)

If this ever makes it (there's some interest so it'll probably make it :) ), I'd very much like to see a make all which calls the epub, latexpdf and html make targets so that I don't need to type all three when I modify something :) (and it's easier if we decide to upload all three kinds of outputs on yoctoproject.org).

Cheers,
Quentin

#6 lore raw

Re: [docs] [RFC 1/3] Makefile: allow epub and latexpdf outputs to use diagrams from SVG sources

Hi Quentin,

Quoted 8 lines · Quentin Schulz

Probably just a note to self but there's now a better chance of me not forgetting :)

If this ever makes it (there's some interest so it'll probably make it :) ), I'd very much like to see a make all which calls the epub, latexpdf and html make targets so that I don't need to type all three when I modify something :) (and it's easier if we decide to upload all three kinds of outputs on yoctoproject.org).

Good idea! I'll keep in in mind for the first patch I submit, hopefully soon.

Thanks,

Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

RFC 2/3 conf.py: prefer PNG to SVG in EPUB output

In reply to Michael Opdenacker

SVG directly included in EPUB output has multiple issues, in particular font size and alignment ones (tested on two EPUB readers).

---
 documentation/conf.py | 4 ++++
 1 file changed, 4 insertions(+)
documentation/conf.py +4 -0
index 5a2e25f7b2..798a365c7f 100644
@@ -136,3 +136,7 @@ latex_elements = {
     'passoptionstopackages': '\PassOptionsToPackage{bookmarksdepth=5}{hyperref}',
     'preamble': '\setcounter{tocdepth}{2}',
 }
+
+# Make the EPUB builder prefer PNG to SVG because of issues rendering Inkscape SVG
+from sphinx.builders.epub3 import Epub3Builder
+Epub3Builder.supported_image_types = ['image/png', 'image/svg+xml', 'image/gif', 'image/jpeg']
Signature · 1 line
2.25.1
#8 lore raw

Re: [docs] [RFC 2/3] conf.py: prefer PNG to SVG in EPUB output

Quoted 23 lines · Michael Opdenacker

SVG directly included in EPUB output has multiple issues, in particular font size and alignment ones (tested on two EPUB readers).

---
 documentation/conf.py | 4 ++++
 1 file changed, 4 insertions(+)
documentation/conf.py +2 -0
index 5a2e25f7b2..798a365c7f 100644
@@ -136,3 +136,7 @@ latex_elements = {
     'passoptionstopackages':
 '\PassOptionsToPackage{bookmarksdepth=5}{hyperref}',
     'preamble': '\setcounter{tocdepth}{2}',
 }
+
+# Make the EPUB builder prefer PNG to SVG because of issues rendering

Inkscape SVG

documentation/conf.py +2 -0
+from sphinx.builders.epub3 import Epub3Builder
+Epub3Builder.supported_image_types = ['image/png', 'image/svg+xml',
Quoted 2 lines

'image/gif', 'image/jpeg']

If you concluded svg has issues, should we remove it from this list instead?

Quoted 7 lines

--
2.25.1

#9 lore raw

Re: [docs] [RFC 2/3] conf.py: prefer PNG to SVG in EPUB output

Hi Nicolas,

Thanks for the review!

Quoted 33 lines · Nicolas Dechesne

On Sat, May 15, 2021 at 9:13 AM Michael Opdenacker <[email protected] <mailto:[email protected]>> wrote:

    SVG directly included in EPUB output has multiple issues,
    in particular font size and alignment ones (tested on two
    EPUB readers).

    Signed-off-by: Michael Opdenacker <[email protected]
    <mailto:[email protected]>>
    ---
     documentation/conf.py | 4 ++++
     1 file changed, 4 insertions(+)

    diff --git a/documentation/conf.py b/documentation/conf.py
    index 5a2e25f7b2..798a365c7f 100644
    --- a/documentation/conf.py
    +++ b/documentation/conf.py
    @@ -136,3 +136,7 @@ latex_elements = {
         'passoptionstopackages':
    '\PassOptionsToPackage{bookmarksdepth=5}{hyperref}',
         'preamble': '\setcounter{tocdepth}{2}',
     }
    +
    +# Make the EPUB builder prefer PNG to SVG because of issues
    rendering Inkscape SVG
    +from sphinx.builders.epub3 import Epub3Builder
    +Epub3Builder.supported_image_types = ['image/png',
    'image/svg+xml', 'image/gif', 'image/jpeg']
Quoted 2 lines

If you concluded svg has issues, should we remove it from this list instead?

This definitely makes sense, indeed. I made this change for the next version I submit.

Cheers,

Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#10 lore raw

RFC 3/3 overview-manual: SVG diagram for the git workflow

In reply to Michael Opdenacker

Set in full-width mode to make it ready in PDF
and EPUB outputs.

---
 .../development-environment.rst               |    4 +-
 .../overview-manual/figures/git-workflow.png  |  Bin 26586 -> 0 bytes
 .../overview-manual/svg/git-workflow.svg      | 1205 +++++++++++++++++
 3 files changed, 1207 insertions(+), 2 deletions(-)
 delete mode 100644 documentation/overview-manual/figures/git-workflow.png
 create mode 100644 documentation/overview-manual/svg/git-workflow.svg
documentation/overview-manual/development-environment.rst +2 -2
index 1decf01e43..ba03f2d5b4 100644
@@ -286,8 +286,8 @@ develop, test, and submit changes to "contrib" areas for the maintainer
 to examine. The maintainer then chooses which changes are going to
 become a permanent part of the project.
 
-.. image:: figures/git-workflow.png
-   :align: center
+.. image:: svg/git-workflow.*
+   :width: 100%
 
 While each development environment is unique, there are some best
 practices or methods that help development run smoothly. The following
documentation/overview-manual/figures/git-workflow.png deleted binary +0 -0
deleted file mode 100644
index e401330a1217d4792a8007600442731fcb72d084..0000000000000000000000000000000000000000
GIT binary patch
documentation/overview-manual/svg/git-workflow.svg new file +1205 -0

1,205 lines not on this page · raw message

Signature · 1 line
2.25.1
#11 lore raw
In reply to Michael Opdenacker
Quoted 19 lines · Michael Opdenacker

This RFC proposes modifications to the Makefile and the Sphinx configuration (conf.py file) to support:

- The generation of PNG diagrams from SVG sources for the generation of the EPUB manual. Directly using SVG in EPUB shows at least font size and alignment issues.

The conf.py file has been modified to let the EPUB builder know that it should prefer PNG over SVG when both formats are available.

- The generation of PDF diagrams from SVG sources for the generation of the PDF manual. PDF output cannot use SVG, and needs PDF diagrams instead.

New diagrams are stored in separate "svg" directories so that generated .png and .pdf files can be "gitignored" without ignoring the original .png files that have no .svg source.

Quoted 6 lines

In the source .rst files, new diagrams can now be included as, for example:
image:: svg/git-workflow.*

Note that the way the Makefile was modified can most probably be improved, as my "make" skills are pretty limited. I'm interested in your suggestions!

Getting more svg files is definitely the way to go.. thanks for starting this. It seems like there are sphinx extensions to convert images as needed, e.g.
https://www.sphinx-doc.org/en/master/usage/extensions/imgconverter.html
or
https://github.com/sephalon/sphinxcontrib-svg2pdfconverter
which seems to support inkscape:
https://github.com/sephalon/sphinxcontrib-svg2pdfconverter/blob/master/sphinxcontrib/inkscapeconverter.py

Have you looked into that or not?

Quoted 29 lines

My goal is to progressively replace PNG diagrams with SVG ones:
- To get high quality definition output documents, in all output formats
- To Have the ability to update diagrams
I would indeed do this very progressively, a little bit every week, not at the expense of other tasks.

Michael Opdenacker (3):
Makefile: allow epub and latexpdf outputs to use diagrams from SVG
sources
conf.py: prefer PNG to SVG in EPUB output
overview-manual: SVG diagram for the git workflow

 documentation/.gitignore                      |    2 +
 documentation/Makefile                        |   29 +-
 documentation/conf.py                         |    4 +
 .../development-environment.rst               |    4 +-
 .../overview-manual/figures/git-workflow.png  |  Bin 26586 -> 0 bytes
 .../overview-manual/svg/git-workflow.svg      | 1205 +++++++++++++++++
 6 files changed, 1239 insertions(+), 5 deletions(-)
 delete mode 100644 documentation/overview-manual/figures/git-workflow.png
 create mode 100644 documentation/overview-manual/svg/git-workflow.svg

--
2.25.1

#12 lore raw

Hi Nicolas,

Quoted 15 lines · Nicolas Dechesne

Getting more svg files is definitely the way to go.. thanks for starting this. It seems like there are sphinx extensions to convert images as needed, e.g.
https://www.sphinx-doc.org/en/master/usage/extensions/imgconverter.html
<https://www.sphinx-doc.org/en/master/usage/extensions/imgconverter.html>
or
https://github.com/sephalon/sphinxcontrib-svg2pdfconverter
<https://github.com/sephalon/sphinxcontrib-svg2pdfconverter>
which seems to support inkscape:
https://github.com/sephalon/sphinxcontrib-svg2pdfconverter/blob/master/sphinxcontrib/inkscapeconverter.py
<https://github.com/sephalon/sphinxcontrib-svg2pdfconverter/blob/master/sphinxcontrib/inkscapeconverter.py>

Quoted 1 line

Have you looked into that or not?

Not yet, but this sounds like a much better option for converting SVG to PNG and PDF, rather than having to do this manually in the Makefile. I will try to use those.

Thanks for the great suggestion!
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#13 lore raw
Quoted 22 lines · Michael Opdenacker

Hi Nicolas,

Quoted 9 lines · Nicolas Dechesne

Getting more svg files is definitely the way to go.. thanks for starting this. It seems like there are sphinx extensions to convert images as needed, e.g.
https://www.sphinx-doc.org/en/master/usage/extensions/imgconverter.html
<https://www.sphinx-doc.org/en/master/usage/extensions/imgconverter.html

Quoted 5 lines

or
https://github.com/sephalon/sphinxcontrib-svg2pdfconverter
<https://github.com/sephalon/sphinxcontrib-svg2pdfconverter>
which seems to support inkscape:

https://github.com/sephalon/sphinxcontrib-svg2pdfconverter/blob/master/sphinxcontrib/inkscapeconverter.py

Quoted 1 line

<

https://github.com/sephalon/sphinxcontrib-svg2pdfconverter/blob/master/sphinxcontrib/inkscapeconverter.py

Quoted 2 lines
Quoted 7 lines
Quoted 1 line

Have you looked into that or not?

Not yet, but this sounds like a much better option for converting SVG to PNG and PDF, rather than having to do this manually in the Makefile. I will try to use those.

FWIW, I really like the PDF output.. the whole doc in a single PDF is great. We should make it a goal for this release cycle to produce and release PDF (I know some prefer epub.. so perhaps we can do both).

We should probably review the PDF output and tweak it a bit, for example, I don't think we need the "Current and Previous releases" sections.

Quoted 10 lines

Thanks for the great suggestion!
Michael.

--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com