[Scribus] MySQL / Python connection script question; attn: subik

Petr Vanek petr
Thu Jan 31 10:28:22 CET 2008


hi Andy,

...
> We make the menus with OpenOffice, and I'm very attracted to Scribus
> because it's a desktop publishing app with the hook into the DB.  We
> eventually plan on using postgesql as our db, but for the interim and for
> my sanity and testing purposes we will use MySQL for the sample python
> patch included with Scribus.

I have tested Scribus connecting to huge amount of databases: MySQL,
Postgresql, Oracle, and Sqlite. It's working fine.

...

> I would greatly appreciate an example Scribus document, DB tables, and
> script to get me started in the correct direction, or else a very detailed
> explaination.  Something very simple would probably be good for me.

It's very hard to make an universal example - DB usage depends on what you
exactly want to do.
Example "workflow":

Create a basic template document with predefined styles.
Run a script in Scribus. This script will ask for date and location of the
restaurant. (Create a dialog with date entry and e.g. combobox with
loications).
Then perform SELECT * FROM menu WHERE location = :location AND active_from
>= :date etc.
Then take results in a loop and paste text into frame with predefined
styles.

Believe me, it is not so hard as it looks.

If you are looking for a complex scripts, take a Sjc's FontSampler (included
in the distribution) or CalendarWizard (included too).
There are *very* nice scripts at:
http://henning.cco-ev.de/scribus/

or a class-work of one of "my" student:
http://www.assembla.com/wiki/show/scribusmailmerge

And you can read this article (It's about scribus and mysql propably - I
wish I can undesrand Spanish). But only if your restaurants offer burritos
of course ;)
http://midias-digitais.blogspot.com/2007/05/usando-scribusmysql.html

anyway, you can always ask here.
And we are looking forward your results if you will share it later ;)

all the best
Petr





More information about the scribus mailing list