[Scribus] scribus + bash

Gregory Pittman gpittman
Fri Dec 2 22:52:28 CET 2005


Adrianna Pinska wrote:

>On 12/2/05, Marcin Kuk <marcin.kuk at gmail.com> wrote:
>  
>
>>> You could use OpenOffice.org for such a work. Don't know if command line is
>>>possible, but is it really required ?
>>>      
>>>
>>Yes ... we work on specialized programs in text mode and we need
>>generate and print about 1000 invoices in one month (this must be done
>>in 2 last days in month).
>>Now we can print straight looking invoices on old printer.
>>    
>>
>
>Hmm.  I had forgotten about the printing - I don't think there will be
>any way of converting the scribus documents to pdf, or printing them
>directly, from the command line - and it sounds like opening them and
>printing them from scribus manually will not be an option.
>  
>
I can guarantee that this is /possible/, since I've done something 
similar with Perl with images from a directory (before I later made my 
Python script for doing the same from within Scribus).
It's clumsy, but it works.  Much like Adrianna suggests, you simply 
create a series of building block text variables that you assemble, 
plugging in your data as you go.

If you make an example of 2-3 pages according to your template you can 
then analyze the .sla file with a text editor to see how the page and 
objects are created and how they expand to add more pages and text 
frames.  Once again, it's ugly programming, but once you understand the  
pattern and create your building blocks, whatever kind of loop process 
you like becomes easy.
The idea would be to create a single .sla file, in which each page is a 
new invoice. That could be then converted to one PDF or a PDF for each 
page by Scribus, or you could print directly from Scribus.

It no doubt could also be done from within Scribus with a script, using 
an external data file.

Greg




More information about the scribus mailing list