Here’s an idea I thought of today.
I’ve been using WordPress 1.5 beta to maintain a worklog and I came across a situation today where a ‘HTML export’ feature would have been useful. I basically wanted to send a detailed description of a problem to a colleague but didn’t want to send the URL of the blog itself (for obvious reasons). HTML export would have been useful because of all the formatting and other similar reasons.
We can extrapolate this idea to a HTML export of the whole blog where you can have a neat offline website in the form of a diary (or maybe even chapters of a book if you can imagine that) and send to others or simply use it as a backup. This is useful in case where I can’t have a Apache server or MySQL etc. but still want to use or send across the information.
Does this ‘feature’ sound useful ?
I imagine implementing the HTML export by simply specifying a stream to file as the output for PHP instead of the usual stdout. Some of the tricks that might need to be done include export/saving of CSS and images to the output directory so that the HTML export is complete.
In case, it does sound useful and if some gurus on the WordPress Hackers list are willing to guide me, I might write this feature. However, I haven’t written anything big in PHP till now.
( I originally wanted to post this on the hackers-at-wordpress-dot-org list directly but it is down at the moment )
As you might have read in the comments section, I can achieve the same effect by writing a simple view.php where I can write the HTML and make the WordPress calls such as the_post() , etc. Why didn’t I think of that before? Duh. To reiterate, the best solutions are always the simplest ones.