Scribus has become a robust application for the creation of PDFs, whether this be intended for printed publication in some format, distribution via the internet, creating of presentations, or other instances where the features of a PDF for showing well-constructed layout is either desirable or essential.
At this time, Scribus has a large number of built-in functions which allow for precise control over the layout and appearance of your PDF. Among these has been the ability to use Python to create small programs, or scripts, designed to automate tasks, especially when these might be done repetitively, either in the same document or perhaps commonly performed in a variety of documents.
What I intend to do in this book is to use a number of example scripts to break down scripting into its elements to show how to approach what might end up being a more complicated task you have in mind. In the process, I will try to explain each script so that you can more easily understand its components and the overall structure of the scripts. A constraint that you will find is that, while there are quite a number of Python commands in Scripter, there are only certain kinds of information or operations you have access to. Sometimes there are opportunities for working around some obstacle, but in some there simply is no way to accomplish some task with a script. Knowing these barriers is part of the design of a useful script.
For the most part, the scripts in this book come from the large number of them that I have written over the years. Some of these come from my own needs or wants, some come from user questions on the Scribus mail list, and there are also some that just were some intellectual curiosity I had about whether something could be done with Python. I have tried to select scripts that illustrate various methods for creating and editing documents.
As I have said a number of times on the Scribus mail list, there are also some tasks which will lend themselves to working on the main canvas rather than trying to do them with Python, so one should also become familiar with the capabilities of Scribus without scripting.
All of the fragments of scripts and complete scripts in this book are devoid of any restrictions, and may be copied, used, and modified as desired by the user. This includes the script colorchart_generic.py, which was made in cooperation with freieFarbe e.V. If you make something good, try to share it with others.
There has been error in communication with Booktype server. Not sure right now where is the problem.
You should refresh this page.