diagrams-builder: hint-based build service for the diagrams graphics EDSL.

[ bsd3, graphics, library ] [ Propose Tags ] [ Report a vulnerability ]

diagrams-builder provides backend-agnostic tools for dynamically turning code into rendered diagrams, using the hint wrapper to the GHC API. It supports conditional recompilation using hashing of diagrams source code, to avoid recompiling code that has not changed. It is useful for creating tools which compile diagrams code embedded in other documents. For example, it is used by the BlogLiterately-diagrams package (a plugin for BlogLiterately) to compile diagrams embedded in Markdown-formatted blog posts.

Executables specific to the cairo, SVG, postscript, and rasterific backends are included (more executables specific to other backends may be included in the future). All take an input file and an expression to render, and output an image file. If you want these executables you must explicitly enable the -fcairo, -fsvg, -fpostscript, or -frasterific flags.

A LaTeX package, diagrams-latex.sty, is also provided in the latex/ directory of the source distribution, which renders diagrams code found within diagram environments. Note that diagrams-latex.sty is licensed under the GPL.


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
cairo

install cairo-specific builder tool

Disabled
svg

install svg-specific builder tool

Disabled
ps

install postscript-specific builder tool

Disabled
postscript

install postscript-specific builder tool

Disabled
rasterific

install rasterific-specific builder tool

Disabled
pgf

install PGF-specific builder tool

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.2.0.0, 0.2.1.0, 0.3, 0.3.0.1, 0.4, 0.4.0.1, 0.4.0.2, 0.4.0.3, 0.4.0.4, 0.4.0.5, 0.4.0.6, 0.4.1, 0.4.2, 0.5, 0.5.0.1, 0.5.0.2, 0.5.0.3, 0.5.0.4, 0.5.0.5, 0.5.0.6, 0.5.0.7, 0.5.0.8, 0.5.0.9, 0.5.0.10, 0.5.0.11, 0.6, 0.6.0.1, 0.6.0.2, 0.6.0.3, 0.6.0.4, 0.7.0.0, 0.7.0.1, 0.7.0.2, 0.7.0.3, 0.7.0.4, 0.7.1, 0.7.1.1, 0.7.2.0, 0.7.2.1, 0.7.2.2, 0.7.2.3, 0.7.2.4, 0.8, 0.8.0.1, 0.8.0.2, 0.8.0.3, 0.8.0.4, 0.8.0.5, 0.8.0.6 (info)
Change log CHANGES.markdown
Dependencies base (>=4.10 && <4.20), base-orphans (>=0.3 && <0.10), cmdargs (>=0.6 && <0.11), diagrams-lib (>=1.4 && <1.5), directory (>=1.3 && <1.4), exceptions (>=0.3 && <0.11), filepath (>=1.4 && <1.6), hashable (>=1.1 && <1.6), haskell-src-exts (>=1.18 && <1.24), haskell-src-exts-simple (>=1.18 && <1.24), hint (>=0.4 && <0.10), lens (>=4.0 && <5.4), mtl (>=2.1 && <2.4), split (>=0.2 && <0.3), transformers (>=0.3 && <0.7) [details]
Tested with ghc ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2
License BSD-3-Clause
Author Brent Yorgey
Maintainer diagrams-discuss@googlegroups.com
Revised Revision 2 made by BrentYorgey at 2024-10-16T19:51:20Z
Category Graphics
Home page https://diagrams.github.io
Bug tracker https://github.com/diagrams/diagrams-builder/issues
Source repo head: git clone https://github.com/diagrams/diagrams-builder
Uploaded by BrentYorgey at 2023-07-10T18:13:04Z
Distributions LTSHaskell:0.8.0.6, NixOS:0.8.0.6, Stackage:0.8.0.6
Reverse Dependencies 4 direct, 0 indirect [details]
Executables diagrams-builder-pgf, diagrams-builder-rasterific, diagrams-builder-ps, diagrams-builder-svg, diagrams-builder-cairo
Downloads 39878 total (165 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-07-10 [all 1 reports]

Readme for diagrams-builder-0.8.0.6

[back to package description]

Build Status

diagrams-builder provides backend-agnostic tools for dynamically turning code into rendered diagrams, using the hint wrapper to the GHC API. It supports conditional recompilation using hashing of diagrams source code, to avoid recompiling code that has not changed. It is useful for creating tools which compile diagrams code embedded in other documents. For example, it is used by the BlogLiterately-diagrams package (a plugin for BlogLiterately) to compile diagrams embedded in Markdown-formatted blog posts, and by the diagrams-latex.sty package for embedding diagrams in LaTeX documents (see below).

Executables specific to the cairo, svg, postscript, rasterific, and PGF backends are included. Each takes an input file and an expression to render and outputs an image file using the appropriate backend. You must explicitly enable whichever executables you want using flags like -fcairo, -fsvg, and so on.

A LaTeX package, diagrams-latex.sty, is also provided in the latex/ directory of the source distribution, which renders diagrams code found within diagram environments. It can make use of any of the diagrams-builder-cairo, diagrams-builder-postscript, or diagrams-builder-pgf executables, so if you want to use diagrams-latex.sty you should install diagrams-builder with the appropriate option. Note that diagrams-latex.sty is licensed under the GPL. For more information on using diagrams-latex.sty, see this tutorial.