Python for batch exporting

Post about projects that use Inkscape for web design.
mikahl
Posts: 2
Joined: Sun Jul 05, 2009 8:06 am

Python for batch exporting

Postby mikahl » Sun Jul 05, 2009 8:17 am

Hey guys

I just found out inkcape only batch exports to the home directory. This isn't exactly ideal for webdeveloperes, who need
to export multiple little images, often in different directories.
Im wondering if inkscape's python api allows for batch exporting to different directories. Has anyone tried this?

Thanks

CarlCravens
Posts: 26
Joined: Wed May 27, 2009 7:32 am

Re: Python for batch exporting

Postby CarlCravens » Sun Jul 05, 2009 10:29 am

Maybe I'm not understanding what you mean by "batch export", but when I use --export-png=myfile.png, it saves it in the current directory. Or I can specify a relative or fully-qualified path and it will save it there.

Using 0.46 under Debian "lenny".

mikahl
Posts: 2
Joined: Sun Jul 05, 2009 8:06 am

Re: Python for batch exporting

Postby mikahl » Mon Jul 06, 2009 2:16 am

I was actually using the GUI, not the command line.
That being said, the command line does output to different directories - thanks for the tip.

However, I don't see any command line option to output each object as its own, separate png, using
its ID as the filename.

I'm on OSX 10.5.7

Quiark

Re: Python for batch exporting

Postby Quiark » Sat Jul 25, 2009 7:10 am

I was also trying to do this in Python, but couldn't find a single word on the internet about Inkscape Python API (not the one that gets svg on stdin and outputs a svg on the stdout) :|

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Python for batch exporting

Postby ~suv » Sun Jul 26, 2009 6:31 am

Quiark wrote:about Inkscape Python API (not the one that gets svg on stdin and outputs a svg on the stdout)
doesn't yet exist beyond 'inkex.py', 'run_command.py', 'simplestyle.py', 'simpletransform.py' and other python extensions in share/extensions/. For a preview what's currently work in progress as part of the 'Googles Summer Of Code 2009' project follow this thread on the inkscape-devel mailing list.

hth, ~suv


Return to “Inkscape & the Web”

Who is online

Users browsing this forum: No registered users and 8 guests