User:Stefan/sqlite: Difference between revisions
Jump to navigation
Jump to search
(Mac Ports installed) |
|||
Line 12: | Line 12: | ||
What the script should do: | What the script should do: | ||
* '''Fill a scribus document''', the "workdoc", with content from a sqlite database | |||
* '''Use''' another scribus doc, the "template", for general layout setup eg. fonts, page sizes | |||
* '''Use sqlite database''' to create pages, text and image frames in workdoc | |||
* '''Import text''' from a wiki, where the authors edit on it | |||
* '''Export text''' back to wiki, with wiki markup und frame info as needed | |||
* Page Planning support | |||
* Deadlines support | |||
==Data Structure== | ==Data Structure== |
Latest revision as of 08:59, 25 June 2011
A notebook about my scripting experiments with scribus, python, python-sqlite bindings & sqlite one-file database.
Why?
Document creation automation
Setup testing
I want to use it on Mac Snow Lep. Tested & works so far
Document Creation
What the script should do:
- Fill a scribus document, the "workdoc", with content from a sqlite database
- Use another scribus doc, the "template", for general layout setup eg. fonts, page sizes
- Use sqlite database to create pages, text and image frames in workdoc
- Import text from a wiki, where the authors edit on it
- Export text back to wiki, with wiki markup und frame info as needed
- Page Planning support
- Deadlines support
Data Structure
create table if not exists beitrag( id, titel, untertitel1, untertitel2, intro, outro, byline, deadline, notiz ); create table if not exists beitragelement( id, typ, untertitel, seite, x,y,h,b, notiz ); create table if not exists bildspeicher( id, rohdaten, arbeitskopie ); create table if not exists scribuselement( id, scribusname, scribustyp, notiz ); create table if not exists geschrieben_von( beitrag, autor ); create table if not exists textspeicher( id, text, notiz ); create table if not exists steht_auf( beitrag, seite ); create table if not exists autor( id, name, nick, mail, fon, twitter, wiki, notiz ); create table if not exists seite( id, seitenzahl, inhalt, notiz ); """)
This works in scribus scripter console
Works with Windows
at least with the bundled python and sqlite in Scribus 1.4.0rc5
Works with Mac OS
Snow Leopard. The Scribus dmg package does not include working sqlite python bindings. Instead I use Scribus from Mac Ports. Scribus auto-compiled with Mac Ports, together with python and sqlite from Mac Ports.