A few weeks ago I released a tool that allows you to export your WordPress posts to a nicely formatted PDF file. I have today pushed some changes to the code which you can find on the GitHub page. This includes the following:
- Heading (H1, H2 & H3) tags are all now supported
- List (ordered & unordered) tags are now supported
- Inline images (not supported) captions are silently dropped
- A new command line parameter to choose the order of output
- Progress now shows the number of posts out of the total processed (see image below)
- Improvements in the handling of special characters
- Other bug fixes.
Choose the output order
An optional parameter now allows you to output posts either oldest to newest (ASC, the default) or newest to oldest (DESC). You can now run the command as follows:
php index.php "URL of your site" "name of the WordPress user" "your Application Password" "local folder where you would like the output placed" "output order"
I will continue to iterate and one of the next things I will try and sort is code blocks which would certainly be helpful for this blog.