Commit Graph

8 Commits (e5907ad380e46fad5a2394fdbefe635ac94e0177)

Author SHA1 Message Date
Niels Giorno e5907ad380 Fix jinja2 dump in temporary file for Windows
tempfile.NamedTemporaryFile() creates **and opens** the file.
jinja2.stream().dump() will try to open the file too, if given a str
(filename). This does not cause issue on Linux, but on Windows the same
file cannot be open twice at the same time...

The solution was to pass a file pointer to 'dump()' instead of the
filename, so jinja2 does not need to open it again.
2020-08-28 12:53:46 +02:00
Niels Giorno 01f90de9c2 Fix export when cairosvg module is not found
If not found, the program should not try to export the image using it
anyway.
2020-08-28 12:52:53 +02:00
Niels Giorno deb2e031a1 Fix temporary file suffix svg -> .svg 2020-08-28 12:51:49 +02:00
Lertsenem cadb53e3b4 Add context debug in export 2020-07-25 14:51:04 +02:00
Lertsenem f807cf9c6f Fix str-to-pathlib conversion issues 2020-07-22 20:29:23 +02:00
Lertsenem 9b2388973c Add cachedir argument for export function
Use system-specific user cache directory thanks to appdirs
2020-07-22 18:07:52 +02:00
Lertsenem 2e7dfe4bec Remove tmp svg file for inkscape export 2020-07-16 22:22:25 +02:00
Lertsenem 1272a64d54 Add export submodule to handle output
This submodule will handle saving the outfile to whatever format you
want.

For now, it can save in svg (default), png using inkscape, png, pdf or
ps using cairosvg.
2020-07-09 14:31:22 +02:00