<<

PostmasterGS Stamp Album Page Generator for 2 Scribus v1. .3

I. Overview and Installation

1. Overview.

The PostmasterGS Stamp Album Page Generator (PMGSSAPG) for Scribus is a script that’s designed to automate the insertion of frames, photos, and text onto stamp album . The script allows the use to build a frame to display the stamp, insert a photo within the frame, and surround it with up to four text boxes of custom text. The stamp data and settings are 2. stored System in a Requirements. spreadsheet.

a. Scribus. PMGSSAPG v1.2.3 requires:

Designed using v1.4.5. b. OpenOffice http://wiki.scribus.net/canvas/Download LibreOffice.

or Designed using LibreOffice 4.3.5.2. http://www.openoffice.org/download/ c. http://www.libreoffice.org/download/libreofficeNOTE: -­‐fresh/ Fiji Java SE

Certain previous versions of this software required and due to the photo-­‐straightening feature. This re featu has been removed, programs so those d. Known are no issues. longer required.

Previous versions of script this designed for have supported the ability o t convert photos to grayscale upon insertion. Scribus currently only supports grayscale conversion through the in-­‐program menus. As soon as Scribus adds ty the abili to convert photos grayscale to via code, a new 3. Installation.version will be released enabling that feature.

a.

i.The installation PMGSSAPG_scribus packages _v1_2 consists _3_batchSS.ods. of the following:

This is the OpenOffice/ ii. LibreOffice PMGSSAPG_scribus spreadsheet _v1_2_3 _ for batch.txt. storing the stamp data and settings.

This is the text file that stores the iii. PMGSSAPG_scribusstamp data ported ex _v 1 from _2_3_settings.txt. the spreadsheet prior to its import into Scribus.

This is the text file that stores the stamp box gn desi settings exported from the spreadsheet prior to its import iv. pytSAPGinto Scribus._v1_2 _3.py.

This is the Python script that imports the data into b. Scribus and i.-­‐iii. builds the stamp boxes.

The first three files ( ) must be stored in the same folder. The second can be placed anywhere. c. iv. lines 26 28 ii. iii. Open the Python script ( ) in Notepad or similar text file editor and change the i.filepaths at and to reflect the correct ath p to the two text files ( -­‐ ).

On a PC, they should be in a format – such as this ii. “C:\Users\Bob\Documents\Stamps\PMGSSAPG_scribus_v1_2_3_settings.txt”

On a Mac, they should be in a format such as this – “/Users/Bob/Documents/Stamps/PMGSSAPG_scribus_v1_2_3_settings.txt” II. The Spreadsheet

1. Understanding the Spreadsheet

a.

Open the spreadsheet in OpenOffice/LibreOffice’s spreadsheet program. You’ll see i.five tabs:Settings.

This tab contains the settings that control the appearance of the ii. .resulting stamp box.

iii. Presets. This tab contains a list of fonts installed on your computer.

iv. Feldpost. This tab contains preset settings.

v. Theresienstadt. This is sample data.

2. Settings Tab. This is sample data. Settings

a. Style Below is a brief explanation of the options on the tab.

i. . Switch Outside. between hree t styles of stamp box.

ii. Inside. A frame with up to four text boxes and a photo.

iii. Outside/Inside.A frame with a single text box in the center.

A frame with up to three text boxes outside the frame, and a photo and single text box inside the frame.

b. Singles or Set. Single Set Switch between generating boxes containing a single stamp NOTE: ( ) or boxes Single for multiple stamps ( ). Single DOES NOT mean Set you are restricted to creating a single stamp box at a time. If you select multiple stamps on the spreadsheet, will generate an individual stamp box for each stamp. will generate a single stamp box containing all selected stamps

Set Orientation. Set Horizontal Vertical When generating a , select Single between a or stamp box. This selection has no effect when generating Set Internal stamp boxes. Spacing (mm). Set Set the internal NOTE:spacing between stamps Set of a . Individual Group When generating a , the Title, Date, Catalog, and Caption can be set to or . Individual

When set to , a text box will be generated for each stamp (for example, a separate Catalog Group for each stamp shown at right).

When set to , a single text box will be generated or f the entire set (for example a single Title and Group Date for the entire set shown at right).

When using a Mi setting 6 , the text of the single text box is controlled by the first stamp selected in the spreadsheet Group ( in the example shown).

When using a setting, Individual care should be exercised with Vertical certain Set combinations. For example, attempting to Individual insert data at Top or Bottom of a will generate overlapping boxes because boxes are positioned relative to the individual stamps, not the box as a whole. c. Frame.

This section controls the appearance of the frame into which the stamps are i. inserted. Frame Style. External Internal Internal Controls whether the frame Internal is outside the stamp ( ) or hidden underneath Single stamp the ( ). Sets If , the resulting frame will be 90% the size of the stamp. When using , you are limited to generation of stamp boxes only (no ).

ii. Double Frame.

iii. Double Frame Allows Spacing. for insertion of -­‐ a double lined frame.

Controls the spacing, in millimeters, between the iv . Outer inner and Frame outer Thickness. frames of a double frame.

Controls the width, in points, of the outer frame v. Inner (single rame F and Thickness. double frame).

Controls the width, in points of the inner frame d. Padding (double (Stamp frame to only). Frame).

Sets the photo distance, in millimeters, between the stamp stamp and itself the surrounding frame. Note that this does not ntrol co the spacing between the and the frame, e. Margin but rather (Frame the to Text). and the frame.

Sets the distance, in millimeters, f. Vertical between the Spacing. outer frame and any surrounding text boxes.

Sets the vertical distance, in millimeters between text boxes when two or more text boxes are g. Outside/Inside positioned on the Spacing. same side of the frame. Outside/Inside

When using the style, controls the spacing between the photo and the single text h. Text box inside Boxes. he t frame. Settings Title, Date, Catalog, and Caption This script allows the user to insert up to four text boxes per stamp. On the tab, these text boxes are labeled as . As the options for these four text boxes will are identical, they be discussed here as NOTE: one. Inside Catalog If using the style, you are limited to a single Inside text box inside the stamp frame. The text box settings control the appearance and content of the single text box. All other text boxes are disable with the i.style. Include. on off off This value determines whether the text box is or . If a text box is , any data entered in the rest of the text box’s settings will be ii. Percentage disregarded of by the Frame Width. script. Single Set Group This value controls Set the Individual width of the text box, measuring the width as a percentage of the frame width ( , with setting) or percentage of the stamp width ( with setting).

100% of frame width 150% of frame width

iii. . Fonts Set the font of the text box. The font list is pulled from the list of iv. Font installed Size. fonts on the tab.

v. Font Spacing. Set the font size.

Set the font spacing. 1 = single spaced, 2 = double spaced, vi. Text etc. Alignment. left, center, right, justified. Set the text alignment within the text box to vii. Global or and Individual Styles. character style character style In Scribus, it’s possible to link text boxes to a particular predefined . If this is done, editing the settings of the predefined character (accessed style using the F3 key) changes the character settings of style all text boxes linked to that style. For example, if a series of text boxes is linked to a names “Title”, editing the font of the “Title” changes the font of all linked text boxes.

Global / Individual character style Global The Individual selection for Individual each text box controls whether the text boxes you insert character are linked to a style ( ) or not ( ). If a text box is inserted as , its style will not change upon editing the master . Instead, to change the settings, they must Global be edited individually. character style

Also, when is selected, the master Times settings New in Roman the document 12 are Global changed to reflect the settings exported from the spreadsheet. In other words, if character you insert style a Title text box with a Times font New of Roman size and 12 a setting, all Title text boxes in the document which are linked to the master Title will be changed to viii. Set Individual . or Group. Set Group This Individual option determines NOTE whether, when using a , a single text box is generated ( ), or a text box is generated for each stamp within the set ( ). See on page of 3 this manual ix. for End-­‐ of a -­‐Line detailed Hyphenation. description.

This setting determines whether words at the end of a line will be hyphenated or wrapped to the following line.

i. Photo. Photo

i. Include.The option allows on the off user to insert a photo within the stamp frame.

ii. Grayscale. Turns the photo or .

Due to current limitations in Scribus, it is not yet possible to automate the conversion of a photo to grayscale. However, there is a manual workaround – Ungroup

1. Right click on the stamp box Image and select Effects. 2. Click Grayscale off the select stamp box to clear the selection. 3. Right OK click on the photo and select . 4. Select and hit the >> button. 5. Select .

iii. Size Ratio.

Sets the size of the photo as a percentage of the actual size of stamp. This allows the photo to be shrunk slightly so as to avoid being j. Layout.visible behind a mounted stamp.

These options determine where the text boxes are placed in relation to the 3. Font stamp Tab. Font frame. Refresh Fonts PMGS Toolbar. The tab contains a list Font of all fonts installed Settings on your computer. The list should be refreshed on first use of the spreadsheet by clicking the icon on the 4. Presets This list Tab. provides the font names for the input boxes on the tab.

This tab contains e pres t settings, including those h t e user saves as presets.

5. Sample Data Tabs.

6. Important Limitations These tabs in Using contain the sample Spreadsheet. data.

The spreadsheet is designed such that the user can keep data permanently in the spreadsheet, e with separat tabs for different collecting areas, a. etc. New There Columns. are a few limitations, however. Columns A H The user can add new columns to the spreadsheet. New columns must not be inserted between and . When the data is exported from the spreadsheet to the text Columns files, it A H is in a very specific order and format. Scribus then uses the columns to determine what data goes in what blanks. The addition or deletion of columns between and will throw off the export and lead to b. unpredictable, New Worksheets. incorrect results.

The user can add new tabs to track other collecting areas. However, to create a new tab, the user should delete the data from a sample tab or copy an existing tab and delete the existing data, not create a new, blank tab. Again, this is to preserve the very strict formatting requirements of the export / import 6. Using process. the Spreadsheet.

The spreadsheet has a custom toolbar at the top with six options.

a. Refresh Fonts. 3.

b. Save as t. Prese See Above.

c. Load a Preset. Saves current settings as a Preset.

d. Reset Includes. Load settings Include? from a Preset. FALSE

e. Export. Resets the On all entries to .

Exports the settings and selected stamp data to the text files for import into f. Insert Scribus. Photo.

Opens a dialog box which allows the user to select a photo. Upon selection, the filepath o t the photo is inserted in the active cell. This prevents the user from having to manually enter the filepath to any photos.

IV. Scribus.

1. Open.

2. Running Open the Scribus Script. to an existing or new document. Script, Execute Script pytSAPG_v1_2.py Select Script, the Recent page on Scripts which you want the stamp boxes inserted, then select , and select the script file ( ). After running the script once, it should be available under , alleviating the need to re-­‐select the file every time.

V ersion History. v1.2.3 (20150317)

-­‐ Fixed bug with font spacing -­‐ in Global style text boxes -­‐ Added ability to hyphenate at end-­‐of-­‐line in text boxes -­‐ Added ability to save/load settings preset -­‐ Changed spreadsheet export from exporting all sheets data at once to v1.2.1 (20150309) exporting a single sheet, by selection v1.2 (20150308) -­‐ Added the ability to set font spacing within the text boxes

-­‐ Complete rewrite of underlying code to make future expansion possible -­‐ Added ability to generate Internal frames v1.1 (20150301) -­‐ Minor bug fixes

-­‐ Removed Fiji/Jython integration due to compatibility issues -­‐ Added ability to generate boxes for Sets of stamps v1.04 (20130706) -­‐ Added ability to independently set padding of all four sides

-­‐ Added Fiji/Jython script to rotate stamp scans, crop and them, return the v1.03 (20130622) -stamp Added ability dimensions to set vertical spacing between photo and interior text box when using “Outside/Inside” style boxes v1.02 (20130622) - Fixed minor errors in placement of text boxes in certain combinations - Added ability to use “Outside/Inside” style boxes v1.01 (20130621) - Fixed minor errors in placement of text boxes in certain combinations - Fixed bug with measurements if document was using units other than points - Added ability to tie text boxes to custom character styles v1.0 (20130619) - Initial release

Special thanks to Andy Pastuszak (apastuszak) for suggestions, beta testing, and bug fixes.