Difference between revisions of "Scribus Scripts"

From Scribus
Jump to navigation Jump to search
(Created page with "Scripting in Scribus refers to the usage of a short program, written in Python in order to automate various tasks. This might be used to carry out a sequence of operations on...")
 
Line 1: Line 1:
 
Scripting in Scribus refers to the usage of a short program, written in Python in order to automate various tasks. This might be used to carry out a sequence of operations on one or more objects in your document, including creating those objects if necessary. Scripts can also be used to create a document from scratch, and thus would be an alternative to using a template to recreate some set layout, including creating and using the styles needed for the document.
 
Scripting in Scribus refers to the usage of a short program, written in Python in order to automate various tasks. This might be used to carry out a sequence of operations on one or more objects in your document, including creating those objects if necessary. Scripts can also be used to create a document from scratch, and thus would be an alternative to using a template to recreate some set layout, including creating and using the styles needed for the document.
  
You might start by reviewing the scripts which are included with your Scribus distribution. As of the 1.5.x versions of Scribus, you have the following included scripts, found and used by selecting from the menu, Scripter > Scribus Scripts:
+
You might start by reviewing the scripts which are included with your Scribus distribution. As of the 1.5.x versions of Scribus, you have the following included scripts, found and used by selecting from the menu, ''Scripter > Scribus Scripts''.
 
* Align_image_in_frame
 
* Align_image_in_frame
 
* Autoquote
 
* Autoquote
Line 15: Line 15:
 
* InfoBox
 
* InfoBox
 
* LigaturSatz
 
* LigaturSatz
 +
The titles of the scripts are terse, and may only give a vague sense of what they do. To learn more, select from the menu ''Scripter > About Script...'' Unfortunately, Scribus will not automatically find the location of these scripts. In Linux, the standard location for Scribus installed on the system you are using should be /usr/share/scribus/scripts. Let's look at the information which is included with the script '''Align_image_in_frame''':
 +
 +
This script will align an image inside a frame to one of 9 possible positions: Top left, top center, top right; middle left, middle center, middle right; or bottom left, bottom center, bottom right. USAGE Select one or more image frames. Run the script, which asks for your alignment choice (all selected frames will need to have the same alignment). Choose the position in the dialog radio button grid, click Align. Image(s) are aligned, and script quits. Note There is minimal error checking, in particular no checking for frame type.

Revision as of 00:14, 12 December 2019

Scripting in Scribus refers to the usage of a short program, written in Python in order to automate various tasks. This might be used to carry out a sequence of operations on one or more objects in your document, including creating those objects if necessary. Scripts can also be used to create a document from scratch, and thus would be an alternative to using a template to recreate some set layout, including creating and using the styles needed for the document.

You might start by reviewing the scripts which are included with your Scribus distribution. As of the 1.5.x versions of Scribus, you have the following included scripts, found and used by selecting from the menu, Scripter > Scribus Scripts.

  • Align_image_in_frame
  • Autoquote
  • Autoquote2
  • CalendarWizard
  • Caption
  • color2csv
  • ColorChart
  • csv2color
  • DirectImageImport
  • FontSample
  • Importcsv2table
  • InfoBox
  • LigaturSatz

The titles of the scripts are terse, and may only give a vague sense of what they do. To learn more, select from the menu Scripter > About Script... Unfortunately, Scribus will not automatically find the location of these scripts. In Linux, the standard location for Scribus installed on the system you are using should be /usr/share/scribus/scripts. Let's look at the information which is included with the script Align_image_in_frame:

This script will align an image inside a frame to one of 9 possible positions: Top left, top center, top right; middle left, middle center, middle right; or bottom left, bottom center, bottom right. USAGE Select one or more image frames. Run the script, which asks for your alignment choice (all selected frames will need to have the same alignment). Choose the position in the dialog radio button grid, click Align. Image(s) are aligned, and script quits. Note There is minimal error checking, in particular no checking for frame type.