PPTools/Ppgen/PPW/Build
The purpose of this wiki page is to provide a one-stop shop for obtaining, setting up and using ppgen and related programs. Please feel free to add or edit, or PM carolyn-elpaso and I will be glad to do so if able.
PPGEN is a program used in post-processing in which a single-source working text file is encoded by the user with a series of dot-commands that will allow the file to be run, generating DP Best-Practices-Compliant hmtl, utf8 and latin-1 files which can be submitted to PG. Note, latin-1 files may at this point be obsolete as it is now appropriate to submit to PG only the utf-8 and html files; however, the program will continue to generate them. They may be discarded.
It is recommended that you review the PPGEN Manual and Training Materials, which can be located from the main PPGEN page: [[1]]
A number of tools have been developed to assist in presentation, standardization and error-checking of your files. They include ppsmq, ppspell, pptxt, jeebies and bookloupe. tfkowal has very kindly developed windows-accessible batch files, similar to the non-guiguts approach provided by windymilla in his installation guide, to facilitate running these programs for those who don't use GG (for which most of these, or similar tools, are built-in).
Below are links, batch files and instructions for the installation and use of these programs in a stand-alone workflow, with links where available to instructions for use with Guiguts and PPQT. The purpose of running your working files against the batch files is to obtain a separate file either with potential errors that should be checked against the original, or in the case of ppsmq, a second source file with curly quotes.
Following this section are more detailed instructions on the set-up and use of batch files provided, and an explanation of the file structure they assume.
Download and Setup of Primary and Optional Programs for Post-Processing with PPGEN
Download and set up the following programs (python and ppgen required; the remainder recommended):
- You will need a text editor. Guiguts and PPQT are text editors with built-in specialized post-processing options. If you prefer, there are other choices in free basic text editors include:
- Python 3.4 programming language must exist on your computer to use ppgen, pptxt and ppspell. Download and install from this link: [2]
- Note: Once installed, you won't need to program anything (unless you can and want to). It just needs to live on your computer, so no fears!
- PPGEN can be found using the link below, currently maintained by wfarrell at github. Be sure to verify that you are downloading the master file, or if you desire a development file, that you are aware that some functions may still be in "test":
- Github Location: ppgen
- Installation procedures for use with Guiguts or stand-alone can be located at the PPGEN Installation wiki: [3]
- Batch File for use with Windows:
c:\python34\python C:\DP\PP\Tools\ppgen\ppgen.py -i %1 pause
- ppsmq, a program used to convert straight quotes to directional quotes, can be downloaded here: ppsmq
- Note: In the destination file, the symbol @ is used, whenever the program was unable to decide on the placement of double quotes "
- After running your -src source file against the ppsqm batch file, you will obtain an secondary source file that now has directional quotes. It will NOT be complete (without extreme luck). You should search for the symbol @ , as well as searching for ' and " since some will require manual intervention (typically these are the leading single quotes in dialect).
- Batch File for use with Windows:
c:\python34\python C:\DP\PP\Tools\ppsmq\ppsmq.py -i %1 -o C:\DP\landingzone\postquotes pause
- A spell-checker, ppspell.py, is here: ppspell
- Batch File for use with Windows:
c:\python34\python C:\DP\PP\Tools\ppspell\ppspell.py -i %1 -o C:\DP\landingzone\ppspell-out pause
- Run your utf-8 file (obtained from running ppgen) against this file to obtain a list of potential errors to check.
- The plain text file checker, pptxt.py, is here: pptxt
- Batch File for use with Windows:
c:\python34\python C:\DP\PP\Tools\pptxt\pptxt.py -i %1 -o C:\DP\landingzone\pptxt-out.txt pause
- Run your utf-8 file (obtained from running ppgen) against this file to obtain a list of potential items to check.
- jeebies checks for he/be stealth scannos, and can be downloaded here: jeebies
- Batch File for use with Windows:
C:\DP\PP\Tools\jeebies\jeebies.exe %1 > c:\DP\landingzone\jeebies_out
- Run your utf-8 file (obtained from running ppgen) against this file to obtain a list of potential he/be errors to check.
- Additional information available here: [[4]]
- bookloupe is a utf-8 text analysis program similar to the latin-1 version gutcheck, available here: [5]
- Batch File for use with Windows:
C:\DP\PP\Tools\bookloupe\bookloupe-2.0-win32\bookloupe.exe %1 > C:\DP\landingzone\bookloupe-out.txt
- Run your utf-8 file (obtained from running ppgen) against this file to obtain a list of potential items to review.
Batch File Usage
The batch files are text files with commands containing the locations for the programs against which you are running your files, and contain destination file locations. The ones provided above assume the file structure described in the next section. Please adjust them to your preferred configuration.
The following instructions were provided for ppgen batch files in windymilla's installation guide, and are extremely useful in understanding their general useage for the remaining batch file short-cuts:
With your favourite editor create a file called run_ppgen.bat in a suitable folder (I chose C:\DP\PP\Tools\ppgen but it doesn't matter where it is). Enter the following text into the file and save it. Note that you may need to change the folder names depending on where you installed Python and ppgen.
c:\python34\python C:\DP\PP\Tools\ppgen\ppgen.py -i %1 pause
- In Windows Explorer, right-click your ppgen source file (which should be a .txt file). Select "Open with", then "Choose default program..."
- Make sure you un-check "Always use the selected program to open this kind of file"
- Click "Browse" and find run_ppgen.bat wherever you created it.
- Click "OK" and ppgen should run on the source file in a Command Prompt window, finishing with "Press any key to continue . . ."
- Press any key to continue :)
Running ppgen
- From now on, to run ppgen on any (.txt) source file, just right-click the file, choose "Open with", "run_ppgen.bat"
- Ppgen will run in a Command Prompt window.
- Press any key to continue and dismiss the window.
File Structure
The file structure for program and post-processing working files that is assumed in the batch files follows from the structure used above.
When running them against your source file (book-src.txt), the latin-1, utf-8 and html files will appear in the same directory as your source files.
For the destination files obtained when running the remaining tools, the assumption is that you have set up a directory (called LandingZone), and will place the resulting files there. You should move them (and possibly rename them) to your working directory for the book you are processing, since running them subequently will over-write the files.
My post-processing tools exist in a directory that looks like this:
C:\DP\PP\Tools\ \ppgen\ \ppsqm\ \bookloupe\ \ppspell\ \jeebies\ \pptxt\
and the landing zone directory is:
C:\DP\PP\LandingZone
I maintain the following structure for my working files:
C:\DP\Book1directory\book1\images
where the main directory for each book contains pretty much everything, the next directory (indicated in small caps) contains my primary working files (-src etc.) and the images directory contains, well, the processed images to which my -src file refers.
I locate the batch files in the \ next lower directory for each of the tools directories, and the program files may be in the same one, or in the next one drilled-down.
Already said, but if you use a different file structure, remember to change the source or destination file locations provided in the batch files, as needed.
Tool instructions still pending
Directions to come later for these; links not operational at this time.
tmpstore Will provide a temporary link that can be used to analyze your html file with Tidy, W3C HTML Validation and W3C CSS Validator.
The PGDP post-processing access requirements can be found here. Once you are eligible, proceed to the Post Processing screen and request access.
Learning about post-processing:
There are a variety of ways and means to post-process a book at PGDP. The traditional approach requires knowledge and use of HTML, typically with the use of the Guiguts post-processing editor although other approaches are available. Many resources are available which explain the process. Following are some of the more important wikis, however, some aspects may not be relevant such as html coding requirements, which are only required in the PPGEN approach if the PP provides his/her own literal code.
The Post Processing FAQ provides an excellent overview of the process.
Miller's Guide provides lots of advice to the beginner and experienced user. If you use Guiguts, this is a particularly useful; and also contains lots of information about parts of the process for non-GG users.
PP examples on PG provides examples of a variety of material that you may encounter. Similarly,
The PP Jargon Guide will help you decipher what everyone's talking about. psst--perhaps someone could update it for PPGEN.
The Post Processing Advice site provides a summary and links for lots of useful information. If you don't find the link you want here, the PP Advice wiki will surely have it.
The Guide to Image Processing provides advice on image manipulation and file size requirements for a variety of software including Irfanview, XNView and Gimp.
If you intend to qualify for Direct Upload Access, these pages can be of help:
By performing the steps in the PPV Guidelines, you may improve the quality of your projects over time in order to earn Direct Upload Status.