Recent posts

#1
General Discussion / Re: Imagedata format in SLA fi...
Last post by a.l.e - Today at 09:47:54 PM
@Nermander : in that case i would suggest to create a pdf and extract the images from there : - )

@AdmFubar : yes, i thought that it might be missing. but rather than fighting the xml, the better solution is to create the commands for exporting the images and submit a patch (or ask the community to create the commands).
then the problem is not only solved for the one user, but for everybody (creating a command for the scripter is a bit more tedious than necessary, but to 90% copy paste work)
#2
General Discussion / Re: Imagedata format in SLA fi...
Last post by AdmFubar - Today at 09:35:02 PM
thought i might have a solution, and tried "collect for output" option .. alas embedded images stay firmly planted in the .sla and not exported into a sub-directory as i had hoped.

From what i can gather by looking over the available commands in python, there seems to be no option to allow exporting embedded images via a script. I checked even for a command to remove the embedding, nothing available to implement that idea.

Look like the only recourse is to parse the .sla , find the point(s) where the embedded image(s) and decode,extract and save them.
#3
General Discussion / Re: Imagedata format in SLA fi...
Last post by Nermander - Today at 08:11:29 PM
Maybe someone has several SLAs with dozens of embedded images and don't want to extract them manually one by one?
#4
General Discussion / Re: Imagedata format in SLA fi...
Last post by a.l.e - Today at 03:17:05 PM
hi utnik,

now that i think about it, i also can't really find a use case where this would be necessary.

if one wants to create scripts that process the .sla and modify the images, it's much easier not to use embedded images at all...

maybe they're processing scribus files created from pdfs or from idml?

who knows, maybe one day we will find out what sunil is up to...
#5
Scripts and Plugins / Re: Sample scripts and plugin
Last post by a.l.e - Today at 03:12:09 PM
you probably need a -- before the .sla file name:

"c:\Program Files\Scribus 1.6.1\Scribus.exe" -g -py d:\bat\to-pdf.py -- d:/tmp/test/scribus-test/1.sla
#6
General Discussion / Re: Imagedata format in SLA fi...
Last post by utnik - Today at 12:35:18 PM
i still don't understand why the extraction of embedded images calls for parsing the .sla file...
#7
Scripts and Plugins / Re: Sample scripts and plugin
Last post by skhullar - Today at 12:03:12 PM
Baby step 1
Trying to run To_PDF defined in https://wiki.scribus.net/canvas/Command_line_scripts
but its not working (Windows)

using command line - "c:\Program Files\Scribus 1.6.1\Scribus.exe" -g -py d:\bat\to-pdf.py d:/tmp/test/scribus-test/1.sla

What am I missing here?

thanks

Sunil
#8
General Discussion / Re: How to show the file name ...
Last post by a.l.e - Today at 11:10:00 AM
1. learn python (depending on your existing programming skills, this could be rather easy or take some time...)

   there are tons of online tutorials for it.

2. understand what the scribus' scripter api allows to use (the "export all text" script is probably a good start)

3. find a script that does something similar to what you need and adapt it.

(ah, and i forgot to repeat it: read the the scribus help, the section "for developers")
#9
General Discussion / Re: How to show the file name ...
Last post by Geoat - Today at 11:01:28 AM
Oh, great !
But I am not fluent in python.
What I have to do ?
Can you explain me from beginning ?
#10
Scripts and Plugins / Re: Sample scripts and plugin
Last post by a.l.e - Today at 09:21:26 AM
this is my collection of scribus scripts:

https://github.com/aoloe/scribus-script-repository

the most recent ones contains best practices that i consider to be better : - )

when you open the scribus help, in the "for developers" section you have some help for creating scripts.

personally, i tend to use the web version i have created:

https://impagina.org/scribus-scripter-api/