Home |
Documentation |
General Notes |
PyGETS Guide |
PyGEMZ Guide |
PyGERS Guide |
Credits |
Project Page |
Downloads |
|
Python Gutenberg E-text Project |
PyGEMZ has only a few user-settable options. These options include control over the general color scheme for the program and user-supplied settings for use during conversions of e-texts into zTxt files.
Control over the text and background colors used in the main application window depends on the underlying graphical environment.
GTK. On GTK-based environments, often found on Linux and Unix platforms, general application colors are set by installing GTK themes which serve to give all theme-enabled applications the same consistent look. On GTK-based systems, PyGEMZ will automatically exhibit the color scheme specified by the currently installed GTK theme.
Others. On other graphical environments, such as MS Windows, users are free to change the application text and background colors by invoking the menu command Edit->Colors. This command will bring up a dialog window with buttons for adjusting general foreground and background colors.
Within the dialog window, clicking either the TEXT COLOR or BACKGROUND buttons brings up a color selection window that allows selection of a new color for text or background. The dialog window will reflect how chosen colors will look when applied to the main application window.
Clicking on the dialog OK button will apply the newly selected color scheme, while clicking on the Cancel button will leave the color scheme unchanged.
Invoking the Edit->Conversion Options menu command results in a Conversion Options dialog box. An example view of this dialog box is shown in the figure below.
The dialog allows users to set parameters that can improve the quality of e-text conversions done by PyGEMZ.
Bookmark patterns allow PyGEMZ to recognize certain lines of text in an e-text for automatic inclusion in a list of generated bookmarks. An example of one common pattern might be all lines which start with the word "CHAPTER" followed by a number or Roman numeral.
Patterns are specified in a form called regular expressions. In general, regular expressions are a very powerful way to specify patterns of characters which can be used for matching and searching in text strings. A description of regular expressions as used in PyGEMZ can be found at http://www.amk.ca/python/howto/regex/regex.html.
Most users of PyGEMZ will only need to know a few basics about regular expressions to get the results they expect. A regular expression that matches the example cited earlier is "^ *CHAPTER[0-9IVXLC]+". The "^" character matches the beginning of a line. A space character followed by a "*" character matches zero or more spaces. The string "CHAPTER " matches itself. Finally, the string "[0-9IVXLC]+" matches any string of at least one character from the set of digits or Roman numeral letters.
E-texts from Project Gutenberg can be downloaded in a compressed zip form to reduce transfer time and save on required storage space. PyGEMZ contains a built-in decompressor for zip files, but it may not correctly work for all zipped e-texts. In those cases where conversion is not successful because of zip incompatibility, PyGEMZ can use an external unzip program to perform decompression.
To specify an external program for decompressing zip files, click on the Browse button of the Conversion Options dialog box and locate the executable file for the unzip program using the resulting dialog.
Supported unzip programs are unzip from Info-Zip which runs on many platforms, and WinZip which runs on MS Windows systems.
Last modified: Wed Aug 06 02:59:06 PST 2003 |
Copyright © Gary Shao, 2003. All rights reserved. |