Hi, I want to use inkscape in a python program to convert SVGs to PNG and create bounding boxes. The fastest way is to use inkscape in shell mode:
```
$ inkscape --shell
$ file-load:"input.svg"
$ export-filename:"output.png"
$ export-do
```
This works pretty fast. I can also print all bounding boxes with $ query-all. The problem is, that printing all this information over stdout is terribly slow compared to the conversion. Is there a way to write this directly into a file to avoid slow bufering, like: `$ query-all > bboxes.csv`
Hi, I want to use inkscape in a python program to convert SVGs to PNG and create bounding boxes. The fastest way is to use inkscape in shell mode:
```
$ inkscape --shell
$ file-load:"input.svg"
$ export-filename:"output.png"
$ export-do
```
This works pretty fast. I can also print all bounding boxes with $ query-all. The problem is, that printing all this information over stdout is terribly slow compared to the conversion. Is there a way to write this directly into a file to avoid slow bufering, like:
`$ query-all > bboxes.csv`
inkscape --shell >&1 | tee -a shell.txt
Can you explain this? I am on windows, is there a working alternative?
I'm not sure about Windows.
You can install and run Inkscape on Ubuntu in the windows Linux subsystem.
https://ubuntu.com/desktop/wsl
Provided that you do not use commands that require the GUI ( which shell mode rejects anyway )