← Back to team overview

phatch-dev team mailing list archive

Re: inkscape?

 

On Fri, Jun 4, 2010 at 10:26 PM, Carl Karsten <carl@xxxxxxxxxxxxxxxxx> wrote:
> I saw you mentioned inkscape - can you point me to where it's used?  I
> use it with popen.process('inkscape...') and hoping there is something
> better:
>
> This tweaks an svg, writes it out and uses inkscape to render a png:
>
>    cooked_svg_name='%s.svg'%output_base
>    open(cooked_svg_name,'w').write(xml.etree.ElementTree.tostring(tree[0]))
>    png_name="%s.png"%output_base
>    if self.options.verbose: print png_name
>    cmd=["inkscape", cooked_svg_name, "--export-png", png_name]
>    self.run_cmds(episode,[cmd])
Phatch uses the subprocess module to do something similar.
>
> http://github.com/CarlFK/veyepar/blob/master/dj/scripts/enc.py
>
> That works, but I am hoping that I can inject things into a live
> inkscape session so that I can query the size of the resulting object,
> and maybe change the font size if it is too big,
Maybe this is interesting for you:
http://wiki.inkscape.org/wiki/index.php/PythonEffectTutorial

> like the title slide
> here:
>
> http://psone.blip.tv/file/3696634/




-- 
Phatch Photo Batch Processor - http://photobatch.stani.be
SPE Python IDE - http://pythonide.stani.be



References