From: Jürgen Purtz <juergen@purtz.de>
To: pgsql-docs@postgresql.org
Subject: Re: Graphic to visualize data flow between processes, buffers and files
Date: Fri, 8 Jan 2016 21:52:27 +0100
Message-ID: <5690218B.9060103@purtz.de> (raw)
In-Reply-To: <20160105193334.GA296052@alvherre.pgsql>
References: <20160105193334.GA296052@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>
On 05.01.2016 20:33, Alvaro Herrera wrote:
> As in the original discussion, this is probably too fiddly and the
> resulting SVG files are going to be really ugly anyway. I think the
> consensus was that we should use some toolchain that uses a source
> format that looks like actual source code, such as the dot or xfig
> formats, of stuff like that -- which is "compiled" into the target
> graphic format. As I recall, what we lacked was somebody with time and
> knowledge to actually produce a useful image starting from such a
> source, produce Makefile rules to run the transformation from the
> Makefiles, and to inject the image into the SGML so that it works in
> the HTML and PDF outputs. With such a proof of concept we're much more
> likely to take this idea seriously.
I don't want to be intrusive, but obviously I didn't get the point at
the first attempt. I hope that I now have understood the needs and
concerns of the community: you are looking for tools and a source code
format for SVN files which is easy to handle, diff-able and convertible
into different graphic formats.
To achieve these objectives I composed a suite of tools and templates:
* The SVN file is edited with a text editor. This sounds a little
crazy, as SVN editors are trendy and easy to handle. But in
conjunction with a set of templates this job gets relative easy. Of
course the developer needs some knowledge about SVN, but it is
intended that only few and simple elements of SVN are used to keep
the source clear. After a short period of familiarization and with a
look at existing files everyone can work this way. Also the range of
lines keeps small as there are predefined complex objects which can
be included with one line of code.
* Actually there are three files with predefined SVN objects and CSS
definitions. This facilitates the work and leads to consistent use
of graphic elements like fonts, colors, sizes. One file contains
simple objects like text or ellipses with predefined attributes, the
next one contains complex pictures like PCs, and the last one
contains all CSS stuff.
* As fare as I have seen, the SVN files are rendered consistently by
browsers and image viewers. Using Inkscape in batch-mode they can be
converted to pdf, png and other formats without loss of elements or
significant image sharpness.
* Using xmlling the SVN files can be validated against the SVN DTD.
* In the readme file there are examples of converting and XML validation.
* There is the problem, that Inscape does not consider external CSS
files. I described a workaround in the CSS file.
Please study the attached three example files: simple.svn,
simple_with_external_file.svn and pg_processes.svn. The last two make
use of pg_lib_basic_objects.svn, pg_lib_external_objects.svn and
pg_lib_css.svn.
Regards, Jürgen Purtz
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docsAttachments:simple.svg (image/svg+xml, 3.0K) downloadview image
simple.pdf (application/pdf, 10.3K) downloadsimple.png (image/png, 11.8K) downloadview imagesimple_with_external_file.svg (image/svg+xml, 2.5K) downloadview image
simple_with_external_file.pdf (application/pdf, 13.6K) downloadsimple_with_external_file.png (image/png, 15.4K) downloadview imagepg_processes.svg (image/svg+xml, 3.1K) downloadview image
pg_processes.pdf (application/pdf, 20.2K) downloadpg_processes.png (image/png, 43.7K) downloadview imagereadme.txt (text/plain, 458B) download
# Use Inkscape for conversion. Most other tools fail because they miss CSS support
# and/or create ugly redered graphics.
# Inkscape in combination with external CSS file fails also, see comments and
# recommended workarround in CSS file.
inkscape --export-pdf=simple.pdf simple.svg
inkscape --export-png=simple.png simple.svg
# use xmllint for XML validation
xmllint --dtdvalid http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-flat-20110816.dtd simple.svg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: juergen@purtz.de
Subject: Re: Graphic to visualize data flow between processes, buffers and files
In-Reply-To: <5690218B.9060103@purtz.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox