[scribus] Add-In Development Documentation

Gregory Pittman gregp_ky at yahoo.com
Sun Jan 29 17:39:23 UTC 2012


On 01/27/2012 08:30 PM, Rob Oakes wrote:
> Dear Scribus Users,
>
> At the moment, I'm putting together some material for a blog post about
> creating eBooks (ePub and Kindle) from Scribus and LyX. This blog post
> is based on a talk I was going to give last year and never had time to
> finish. (I got really interested in the whole thing again after playing
> around with iBooks Author and wondering how hard it would be to create
> similar books with open tools.)
>
> Right now, I'm pretty psyched because it seems like all of the bits are
> present to really make beautiful things. However, they need some gluing
> together.
>
> To that end, I'm going to write Python code so that Scribus can export
> its styles as CSS and import an eBook style-sheet for editing. The
> inability to design (rather than code) style sheets is one of the
> biggest weaknesses in open eBook tools. Scribus already has a fantastic
> styles editor, which I think can be adapted nicely to this purpose. As
> I've started to experiment with options, I had a couple of questions:
>
>   1. Is there a guide to scripting with Scribus1.4? The only guide I was
>      able to find was quite old.

Scripting is mostly about Python. If you look at the online manual, you 
can get a terse description of commands. Beyond that, I think the best 
way to gather further specifics is to check scripts on the wiki or those 
included with Scribus for the precise syntax for the commands, as well 
as ways to combine commands for various tasks.
One of the things I added to this page:

http://wiki.scribus.net/canvas/Category:Scripts

was a listing of which commands are used in selected script examples.

>   2. What about up to date documentation about render frames? I'm hopeful
>      that these can be used to create and insert dynamic content (like
>      HTML gallery widgets, models, and such).

I think the online manual is about as up to date as anything. We could 
use some wiki articles which demonstrate some particular techniques 
other than LaTeX.

>   3. Is there any way to access the Qt UI controls in Scribus via the
>      ScriptingNG interface? I know that this can be done on Linux,
>      because I experimented with it a while ago
>      (http://blog.oak-tree.us/index.php/2010/08/25/scribus-dockwidgets).
>      But, as I understand it, Python ships its own interpreter on Mac and
>      Windows.

Supposedly one of the things that was to come from NG was an easier way 
to add commands.
This:
http://wiki.scribus.net/canvas/Category:Scripts#Extension_scripts_and_PyQt
is all I know of about Qt extensions.

In regard to your project, it's worth being aware of PressBooks:

http://pressbooks.com/about

which is now open to anyone. It's based on WordPress, but allows for the 
easy creation of ePub and PDFs, and since your work is also published a 
blog-like format, you also get HTML. Once you have ePub, you can easily 
use calibre to convert to Kindle format. I was hoping that eventually we 
might see an ability to interact with Scribus via IDXML files, once 
importing becomes possible into Scribus and the export from PressBooks 
is usable.

My experience using PressBooks has been that it's easy enough to work 
with, but getting things where you want them on the page (the layout) 
can be challenging. Sometimes getting the PDF to work doesn't for ePub 
and vice versa.

A recently added feature at PressBooks is an ability to import your own 
CSS files, but so far there hasn't been documentation of the structure 
of those, and the ones used natively by PressBooks are not accessible.

Greg



More information about the scribus mailing list