[scribus-dev] Perfect book cover template script softcover_inch.py

Gregory Pittman gpittman at iglou.com
Fri Dec 26 00:08:34 UTC 2014


On 12/25/2014 04:20 PM, John Culleton wrote:
> I have opened up a wiki page JCulleton and placed
> the description of the script and the script
> itself on that page. The wiki software tends to
> do strange things to program text so a safer
> source for the script source  is:
> http://www.wexfordpress.com/softcover_inch.py
> 
> This completes my work on this project. Hopefully
> the script will in time be included in Scribus
> releases.
> 
I cleaned up the wiki page a bit.
One thing was to surround your script with tags:
<syntaxhighlight lang="python"> at the beginning,

</syntaxhighlight> at the end. This takes care of making the script look
as it should and be able to be copied from the wiki.

You don't really need the '#!/usr/bin/env python' at the beginning since
this only runs in Scribus (and you left out the ! so it would have been
interpreted as a comment anyway).

I deleted the line 'import from scribus *', since you already had
'import scribus' and your syntax conforms to that method.

Its simplicity is nice. Typically we recommend a section at the
beginning, starting and ending with 3 double quotes ("""). What you put
between them is a description of what the script is for, and something
about usage, requirements, etc. This text will show up when someone uses
Script > About Script... from the menu.

At some point you may want to move it to its own page instead of on your
user page. Then you might add (as a wiki edit)

{{Scripting Index}}

at the top of the page, to get it to show up in the index of scripts.
Those who find it useful may wish to expand it to allow for using other
units. Those not familiar with inches may not be sure what to enter for
some values.

Greg



More information about the scribus-dev mailing list