I'm not sure this is an inkscape questions, but apparently inkscape cannot find my svg files when I run using some kind of batch. Either as a .bat file or in python using os.system calls. If I run each line individually from the same directory on the command line it works fine... Can someone post how they have run a batch of inkscape command lines in case I'm doing something wrong?
Under cygwin I created to_png.bat and just filled it with inkscape command lines used to convert my SVG files to PNG. If I run these commands myself on the command line they will execute successfully. If I run the to_png.bat file I get the following error:
** (inkscape.exe:3856): WARNING **: Specified document 'svgs/ace.svg' cannot be opened (does not exist or not a valid SVG file)
I am running from the same directory of course and I also tried specifying the absolute path in case somehow the working directory inkscape saw was different when running the .bat file. I just did this using python and os.system calls and had the same problem.
to_png.bat:
inkscape -h 120 -e 'pngs/ace.png' 'svgs/ace.svg'
inkscape -h 120 -e 'pngs/king.png' 'svgs/king.svg'
inkscape -w 120 -e 'pngs/queen.png' 'svgs/queen.svg'
Batch processing from the command line
Re: Batch processing from the command line
a .bat file is executed by windows command line interpreter. if you want it handled by cygwin bash shell instead-as it understands forward slash path separator-then rename your .bat to a .sh
anyhow that's what it's complaining about. as windows uses backslash as path separator
anyhow that's what it's complaining about. as windows uses backslash as path separator
Re: Batch processing from the command line
Thanks got it now, not only that in .bat files you need to use double quotes " instead of the single.
Re: Batch processing from the command line
i noticed your queen is getting width adjusted instead of height...or is that correct or just typo in this posting?
how do you make sure the export is aligned to the pixel grid when calling inkscape in batch mode?
have fun with cygwin
how do you make sure the export is aligned to the pixel grid when calling inkscape in batch mode?
have fun with cygwin