[Scribus] Scribus + TeX combo [album scripts]

Gregory Pittman gpittman
Sat Dec 17 00:12:09 CET 2005


Gregory Pittman wrote:

>Gregory Novak wrote:
>
>  
>
>>For example, I have a bunch of digital photos and it'd be nice to use
>>Scribus to lay it out a photo album for them.  However, I don't know
>>how to effectivley script together the text, photos, etc.  I do,
>>however, know how to do this for TeX, so that's what I'm using now.
>>    
>>
>Like many things in Linux, this has already been done.  I made a script 
>to do just this, actually two scripts, one for US Letter, one for A4 paper.
>
>How they work is this:
>When you fire up the script, you get a requester to indicate a directory 
>and also which image format types to include. The script then makes 
>pages from your images -- one version simply makes 6 pictures on a page, 
>the other puts only four in a staggered format, so that you have room 
>for comment text frames beside images as needed/desired.  It also 
>automatically labels the page as to the directory and each image.  As 
>far as I know, there is no upper limit to the number of images in a 
>directory, it will just crank along until it's done.  Because of the way 
>it works, you need to designate and load a directory with everything you 
>want in your album.
>I need to find these scripts, so I can attach them to a subsequent email.
>  
>
Here are the scripts. I had to blow away my old cvs directory and start 
over to get Scripter back (?!).
scribalbuma4.py  makes pictures on A4 pages (8/page)
scribalbum.py make pictures on US Letter (4/page)

The limit to how many pictures relates to memory issues on your system. 
I figured this out after I tried some directories that were too big.
The system I tried it on has 256MB of RAM and 512MB of swap.  With a 
directory of 33MB of JPEGs (80+ images), Scribus managed to eat all my 
swap and almost all the RAM -- not sure why it uses up memory like this.

Just for fun I have included scribalbum.pl, a Perl script that will 
create a Scribus .sla file from the files in a directory.  This works 
"outside the Scribus box" so to speak -- you just run it from the 
command line.  As written it creates a 1.2 compatible file that will 
also load into 1.3.x.  In contrast to a Scripter-driven script within 
Scribus, this makes the file of whatever size in a second or less.  My 
large directory of JPEG files that kept killing Scribus generated a file 
of 1.5MB size (which I can't load into Scribus, at least on this 
machine), and keep in mind this is just the .sla file that contains no 
image data, just filenames.  No wonder Scribus was choking!

What it brings up is a desirability if not need in the future to 
compress files (maybe with the new format?), since there is so much 
repetition in them. And they're getting bigger: my directory of 33MB of 
images resulted in a 1.2 version .sla file of 289K (without images), the 
1.3 version: 362K (this is loading the 1.2 version into Scribus then 
saving from 1.3.2cvs, so it's an identical file, content-wise).

Greg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scribalbum.py
Type: text/x-python
Size: 6976 bytes
Desc: not available
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20051217/38d0d314/attachment.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scribalbuma4.py
Type: text/x-python
Size: 5708 bytes
Desc: not available
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20051217/38d0d314/attachment-0001.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scribalbum.pl
Type: application/x-perl
Size: 9339 bytes
Desc: not available
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20051217/38d0d314/attachment.pl 



More information about the scribus mailing list