User-level post-processing with XML

This is a walkthrough of that allows you to use the bookcove XML processing code to "post-process" an example file. This post-processing step is typically done on a user's local machine after downloading the ppxml source files and example book from the public GitHub repository for this code. After processing the example file, you will have all the necessary code on your local machine to produce books in various formats from ppxml source files.

The sequence is provided as a series of steps for Linux/Mac users. Windows users can follow similar steps using a terminal emulator such as Git Bash or Windows Subsystem for Linux (WSL).

# Copy the code and example text from GitHub:
# Visit https://github.com/rbfrank/ppxml and download the repository as a ZIP file
#   by clicking the "Code" button and selecting "Download ZIP"
# That will create the zip file ppxml-main.zip in your Downloads folder
unzip ppxml-main.zip
cd ppxml-main/example
# In that directory you will find the example ppxml file: firebrand.xml
#   along with the images and CSS file specific to this book.
# Next, run the post-processing script to generate the text and HTML files:
python3 ../ppxml.py firebrands.xml firebrands.txt
python3 ../ppxml.py firebrands.xml firebrands.html --css mystyles.css
# At this point you should have the text and HTML files generated in the example directory.
# You can view the HTML file in your web browser to see the formatted book.
# You may want to insert the external CSS into the generated HTML file. Use this command:
python3 ../insert_css.py mystyles.css firebrands.html
# This will modify firebrands.html to include the CSS styles directly within the file.

At this point, you have successfully used the user-level ppxml post-processing to generate book files from the XML source. You can now explore further customizations or modifications to the ppxml files and re-run the processing steps as needed. The elements available to you are documented here.