Share examples of using programs on FreeBSD to make vector images and diagrams. What command line or GUI programs do you use?
I've used graphics/dia before. I've been unaware of the program devel/dia2code which makes code out of diagrams made from graphics/dia. Now I'm trying graphics/pikchr. It uses a markup language, which is then converted into an svg (which is written as an XML file) or to an html file.
I'll make a file with vim:
Not sure what the suffix is supposed to be, but I made it into .pkr, maybe the suffix is supposed to be .pikchr.
Running pikchur on this file outputs to html. So, use
A lot of image viewers won't work with svg. A browser is often needed. FreeBSD forums don't support SVG files either.
Converting svg to a jpg, png or other image file is difficult on FreeBSD. At first, ImageMagick didn't convert it properly, but after destalling and reinstalling dependencies of other programs in an attempt to convert svg, ImageMagick6 finally rendered the image file correctly. As a note, the convert command was replaced in ImageMagick7.
Setting the background color in the pikchr file helped some programs render correctly, as without it, some programs place the same color foreground on the same color background. Place
Another program for diagrams from a language is graphics/d2. However, this is a scripting language rather than a markup language. A markup language seems more direct from description to code. A scripting language depends more on commands.
When trying other conversion programs
librsvg wants to deinstall everything, including my browser, to install an overly Linuxified set of dependencies. I want a simple command line converter. Inkscape on the command line doesn't produce a valid image file. There's no nox11 flavor, and it comes a lot of dependencies, but it's nowhere as bad as librsvg. Then, a dependency of Inkscape conflicts with ImageMagick6. Nearly every svg library or program on FreeBSD comes with tons of unrelated or unnecessary dependencies.
For basic output rendering, one svg library I've tried in the past wanted to install Cairo and everything with it. Nothing wrong with Cairo itself, it's the way it's implemented and put together that's the problem. This dependency hell was imported from Linux distributions doing things a certain way, and not cleaned up. It appears that this SVG library was one which was a dependency option for JWM, which happens to be graphics/librsvg2.
When setting the background color in the pikchr file, the SVG files convert correctly under different programs.
Other interesting SVG programs
graphics/svgbob is an interesting program, as it converts ASCII diagrams into SVG. graphics/plantuml and related UML (Unified Modeling Language) ports are interesting as well. There are a few Python ports for creating and converting SVG as well. converters/py-svglib converts svg into pdf. It doesn't convert into other formats, in reference to the description which says bitmap will be supported in the future. I've tried Inkscape for vectors in the past.
What have you used for vectors, including diagrams on the GUI or command-line? Perhaps if you've used anything from the math, science, textproc or cad categories for diagrams or vectors as well.
I've used graphics/dia before. I've been unaware of the program devel/dia2code which makes code out of diagrams made from graphics/dia. Now I'm trying graphics/pikchr. It uses a markup language, which is then converted into an svg (which is written as an XML file) or to an html file.
I'll make a file with vim:
Code:
line; box "pikchr" "to svg"; arrow
Running pikchur on this file outputs to html. So, use
pikchr --svg-only file.pkr > file.svg
. Without the redirect to a file, it only displays the svg text. Then, you'll need to use a web browser to view either the svg or html file.A lot of image viewers won't work with svg. A browser is often needed. FreeBSD forums don't support SVG files either.
Converting svg to a jpg, png or other image file is difficult on FreeBSD. At first, ImageMagick didn't convert it properly, but after destalling and reinstalling dependencies of other programs in an attempt to convert svg, ImageMagick6 finally rendered the image file correctly. As a note, the convert command was replaced in ImageMagick7.
Setting the background color in the pikchr file helped some programs render correctly, as without it, some programs place the same color foreground on the same color background. Place
fill = white
at the beginning of the file.Another program for diagrams from a language is graphics/d2. However, this is a scripting language rather than a markup language. A markup language seems more direct from description to code. A scripting language depends more on commands.
When trying other conversion programs
librsvg wants to deinstall everything, including my browser, to install an overly Linuxified set of dependencies. I want a simple command line converter. Inkscape on the command line doesn't produce a valid image file. There's no nox11 flavor, and it comes a lot of dependencies, but it's nowhere as bad as librsvg. Then, a dependency of Inkscape conflicts with ImageMagick6. Nearly every svg library or program on FreeBSD comes with tons of unrelated or unnecessary dependencies.
For basic output rendering, one svg library I've tried in the past wanted to install Cairo and everything with it. Nothing wrong with Cairo itself, it's the way it's implemented and put together that's the problem. This dependency hell was imported from Linux distributions doing things a certain way, and not cleaned up. It appears that this SVG library was one which was a dependency option for JWM, which happens to be graphics/librsvg2.
When setting the background color in the pikchr file, the SVG files convert correctly under different programs.
Other interesting SVG programs
graphics/svgbob is an interesting program, as it converts ASCII diagrams into SVG. graphics/plantuml and related UML (Unified Modeling Language) ports are interesting as well. There are a few Python ports for creating and converting SVG as well. converters/py-svglib converts svg into pdf. It doesn't convert into other formats, in reference to the description which says bitmap will be supported in the future. I've tried Inkscape for vectors in the past.
What have you used for vectors, including diagrams on the GUI or command-line? Perhaps if you've used anything from the math, science, textproc or cad categories for diagrams or vectors as well.