Skip to content

This program converts a WordPress WXR (WordPress eXtended RSS) file to a PDF document.

License

Notifications You must be signed in to change notification settings

fergbrain/WordPress-WXR-to-PDF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

Copyright (C) 2024 Fergcorp, LLC

For more information, please contact:
Andrew Ferguson
[email protected]


Description:
This program converts a WordPress WXR (WordPress eXtended RSS) file to a PDF document.
It parses the WXR file to extract blog posts and pages, including their content,
authors, publication dates, and comments. The extracted data is then formatted and
written to a PDF file, which includes a title page, a table of contents, and the content
of each post and page. The program can be run from the command line with the WXR file
and output PDF file specified as arguments.

Getting started:

Contents of the wp-content/uploads folder needs to be in ./content
You will need to download DejaVu font and put it in ./fonts: https://dejavu-fonts.github.io/


# Create a virtual environment
python -m venv env

# Activate the virtual environment
# On Windows
.\env\Scripts\activate
# On macOS and Linux
source env/bin/activate

# Install required packages
pip install -r requirements.txt

# Run the script
python wxr-to-pdf.py -i path_to_wxr_file -o output_pdf_file

# Deactivate the virtual environment when done
deactivate

About

This program converts a WordPress WXR (WordPress eXtended RSS) file to a PDF document.

Topics

Resources

License

Stars

Watchers

Forks

Languages