Convert SVG images to PNG

RTFD generates PDF documentation, but it lacks images since
they are in incompatible format. This patch adds tox target
svg2png that converts images and replaces references to
wild-card.

Change-Id: I0672328fb8012d34dc91867aa49f19cfbd19890d
This commit is contained in:
Ilya Shakhat 2015-12-16 17:04:17 +03:00
parent cbbf5ac873
commit 23a5b53fc9
9 changed files with 12 additions and 4 deletions

View File

@ -8,7 +8,7 @@ for results processing and report generation. The agent is light-weight and poll
the server and replies with the results. Agents have connectivity to the server, but the server does not
(so it is easy to keep agents behind NAT).
.. image:: images/architecture.svg
.. image:: images/architecture.*
Under the Hood

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -33,7 +33,7 @@ Installation on fresh system requires additional libraries needed by some of dep
Deployment
^^^^^^^^^^
.. image:: images/architecture.svg
.. image:: images/architecture.*
Requirements:

View File

@ -53,9 +53,9 @@ that allow control the scheduling precisely:
Examples:
.. image:: images/accommodation_single_room.svg
.. image:: images/accommodation_single_room.*
.. image:: images/accommodation_double_room.svg
.. image:: images/accommodation_double_room.*
As result of deployment the set of agents is produced. For networking testing this set contains
agents in ``master`` and ``slave`` roles. Master agents are controlled by ``shaker`` tool and execute commands.

3
tools/svg2png.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
for f in doc/source/images/*svg; do cairosvg ${f} -o ${f/\.svg/\.png} ; done

View File

@ -40,6 +40,11 @@ commands =
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:svg2png]
deps = cairosvg
whitelist_externals = bash
commands = bash tools/svg2png.sh
[flake8]
# E125 continuation line does not distinguish itself from next logical line
# H405 multi line docstring summary not separated with an empty line