[scribus] patches to run a python script and exit

William Bader williambader at hotmail.com
Fri Aug 29 03:57:39 UTC 2014


I have posted updated sets of 13 patches from Juraj for Scribus 1.4 http://bugs.scribus.net/view.php?id=12594 and Scribus 1.5 http://bugs.scribus.net/view.php?id=12572 to run a python script from a command line and then exit without requiring user interaction.
The patches make it easier to write scripts that use Scribus to print files, and they also add support for reading and saving PDF options and for specifying PDF 1.5.
The patches allow you to do more than just print.  For example, you could generate form letters.by writing text from a database into text frames.
If anyone tests the patches, please send feedback.
0001: Add the '--python-script file' CLI option to run 'file' as python script.
0002: Now help(scribus.newDocument) in python console runs without error.
0003: Translate strings to variable names with unitGetUntranslatedStrFromIndex instead of unitGetStrFromIndex so python scripts are not dependent on the locale.
0004: Fix the help message for scribus.PDFfile.
0005: Fix reading the prefs file. Scribus was opening the wrong file.
0006: Set ScribusMainWindow::ScriptRunning earlier in the initialization process. Scribus was using it before it was initialized.
0007: Add two python commands readPDFOptions(file) and savePDFOptions(file).
0008: Fix errors when reading PDFOptions.
0009: Fix errors in error messages related to reading PDFOptions files.
0010: Escape HTML codes in scripter error messages so error messages enclosed by <> show correctly.
0011: Enable the --no-gui CLI option so 'scribus --no-gui --python-script myscript.py' runs a script and exits without starting the GUI.
0012: Update the python scripter to allow exporting documents in PDF 1.5. Scribus limited the 'version' variable to 14 instead of 15.
0013: Do not show a messagebox when python scripts raise an error.
Regards,William
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20140828/8cee4fff/attachment.html>


More information about the scribus mailing list