[scribus] batch load svg files into scribus
Meaux Mazey
meauxmazey at gmail.com
Tue Aug 4 19:08:03 UTC 2020
Thanks!
That should get me where I need to be. The files are sized already. You've
given me 99% of what I need and I should be able to tinker out the custom
bits.
Thanks
Meaux
On Mon, Aug 3, 2020, 9:18 AM Gregory Pittman <gpittman at iglou.com> wrote:
> On 8/3/20 2:47 AM, Meaux Mazey wrote:
> > I'm new to email list servers. I'm not seeing my post on the archive. Do
> I
> > need to resend?
> >
> >
> > On Sat, Jul 25, 2020 at 5:59 PM Meaux Mazey <meauxmazey at gmail.com>
> wrote:
> >
> >> Hello world,
> >> I was looking for a script to batch load svg files into a scribus
> document.
> >> I found a thread from 2015 that gave the function placeSVG (filename,
> x,y)
> >> one function is not a script.
> >> Is there a batch script written?
> >>
>
> Hi Meaux,
>
> I don't know what happened, but the message never showed up on the 25th.
>
> As far as your question, I think that importing SVGs has a lot of
> considerations that are hard to generalize, since the placeSVG() command
> just places the SVG without regard to its size.
> Here is a very small script that just places a chosen SVG at 100, 100 (I
> use points units).
>
> ********
> #!/usr/bin/env python
>
> # File: impsvg.py
> # Imports SVG to document to current page
>
> import scribus
> import os
>
> mySVG = scribus.fileDialog('Select an SVG','SVG files (*.svg)')
> scribus.placeSVG(mySVG,100,100)
>
> ********
>
> If you had a number of SVGs in a directory you could put in a command to
> select a directory, like
>
> svgdir = scribus.fileDialog('Select SVG
> Directory','Directories',isdir=True)
> d = os.listdir(svgdir)
> D = []
> for file in d:
> if file.endswith('.svg') or file.endswith('.SVG'):
> D.append(file)
>
> After this, you would have to have some scheme of where the SVGs would be
> placed, and go through your list D to place them.
> This is something like the script I wrote from creating an album of
> images, though there I had a much wider range to image types to consider,
> but this used a fixed layout:
>
>
> https://wiki.scribus.net/canvas/Automatic_import_of_images:_Versions_not_requiring_Tkinter
>
> Hopefully that's enough to get you started.
>
> Greg
>
> ___
> Scribus Mailing List: scribus at lists.scribus.net
> Edit your options or unsubscribe:
> http://lists.scribus.net/mailman/listinfo/scribus
> See also:
> http://wiki.scribus.net
> http://forums.scribus.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20200804/f3213b2e/attachment.htm>
More information about the scribus
mailing list