我正在cli no(--without-gui
或-z
)中使用Inkscape:
hanzi
,pinyin
); test-union-cli.svg
)。所以我使用这个命令:
inkscape -z -f ./䖠-x45A0.svg \
--select=hanzi --select=pinyin \
--verb SelectionUnion --verb FileSaveCopyAs \
--verb=FileClose test-union-cli.svg
**(inkscape:27462):CRITICAL * :Inkscape :: XML :: Document sp_repr_read_file(const gchar *,const gchar *):断言 `Inkscape :: IO :: file_test(filename,G_FILE_TEST_EXISTS)'失败
**(inkscape:27462):CRITICAL * :Inkscape :: XML :: Document sp_repr_read_file(const gchar *,const gchar *):断言 `Inkscape :: IO :: file_test(filename,G_FILE_TEST_EXISTS)'失败
**(inkscape:27462):警告**:无法打开指定的文档test-union-cli.svg(不存在或不是有效的SVG文件)
文件test-union-cli.svg
不应该存在。那么我在这里做错了什么?
答案 0 :(得分:10)
-z
或--without-gui
。在#inkscape
上被问及当前(Inkscape 0.48.3.1 r9886 (Jan 29 2013)
)不支持动词的参数:
动词不接受参数 - >您无法保存打开的文件 '-f'以不同的名称首先复制文件(例如在脚本中), 并编辑并保存复制的文件
此主题上有错误已确认(请参阅:Bug:Provide scriptable method of saving files)。
目前的动词(有稳定的)总是需要打开GUI(即使 不需要互动)
错误已确认Allow suppressing the GUI (-z) when using --verb option(s)并已添加到列表中。
较新版本的Inkscape可能会修复此“问题”,目前您可以通过执行
来解决此问题cp 䖠-x45A0.svg test-union-cli.svg && inkscape -g -f ./test-union-cli.svg \
--select=hanzi --select=pinyin --verb=SelectionUnion \
--verb=FileSave --verb=FileClose
改进正在进行中lp:~7-eric/inkscape/effectscript:
在此处阅读修订版12388的提交日志 https://code.launchpad.net/~7-eric/inkscape/effectscript - 这是 最近合并到trunk,AFAIU允许运行boolops动词 没有GUI的cli - >可能下一个主要版本的inkscape(0.49)将有更好的cli支持