I'm working with Inkscape in cli no (--without-gui
or -z
) to :
- Select multiple nodes by id (
hanzi
,pinyin
) ; - Create an union of them ;
- Save as a new file (
test-union-cli.svg
).
Command
So I use this command:
inkscape -z -f ./䖠-x45A0.svg \
--select=hanzi --select=pinyin \
--verb SelectionUnion --verb FileSaveCopyAs \
--verb=FileClose test-union-cli.svg
Output error
** (inkscape:27462): CRITICAL *: Inkscape::XML::Document sp_repr_read_file(const gchar*, const gchar*): assertion `Inkscape::IO::file_test( filename, G_FILE_TEST_EXISTS )' failed
** (inkscape:27462): CRITICAL *: Inkscape::XML::Document sp_repr_read_file(const gchar*, const gchar*): assertion `Inkscape::IO::file_test( filename, G_FILE_TEST_EXISTS )' failed
** (inkscape:27462): WARNING **: Specified document test-union-cli.svg cannot be opened (does not exist or not a valid SVG file)
The file test-union-cli.svg
is not supposed to exists. So what am I doing wrong here?
tl;dr
-z
or--without-gui
.Verbs don't take parameters
Asked on
#inkscape
and it come out that currently (Inkscape 0.48.3.1 r9886 (Jan 29 2013)
) doesn't support verb's parameters:There is a bug confirmed on this topic (see: Bug:Provide scriptable method of saving files).
Verb imply GUI
Bug is confirmed Allow suppressing the GUI (-z) when using --verb option(s) and added to whishlist.
Temporary Solution
Newer version of Inkscape may fix this "issue", currently you can solve it by doing
Hope (v.049)
Improvement is on its way lp:~7-eric/inkscape/effectscript: