reST and HTML woes
Well, I went through and cleaned up my old entries, using this
technique. When I was done, I decided to clean up all the entries
that were generating reST errors because reST was freaking out trying to
interpret raw HTML. I basically went through and cleaned up all of
Nutella's entries and a bunch of Sam's.
For Nutella, he essentially wrote everything as one solid block of HTML,
often with no newlines at all. So what I did was wrap most of his
entries in reST's raw html directive, like so:
.. raw:: html
<cite>blarblarblar</cite> etc etc <a
The outcome is as you'd expect:
etc etc a link
Nutella used <cite> a lot, and decimal unicode entities to print hanzi.
For Sam, he had written most of his entries in the wiki markup, using
only occasional HTML for URLs and <pre> blocks and so on. I wrapped a
few individual paragraphs in the .. raw:: html bit, but mostly I
just fixed his bad entries to be properly reSTy.
Come on Team
Well, maybe if they're mile-long stilts they can.
How to Fix Old Entries
So one somewhat bothersome aspect of the blosxom system is that if you
edit a file, that bumps it up to the top of the listing. This is
because pyblosxom sorts all entries by the modification time of the
There are quite a few old entries in here that could do with a few
repairs, but they really don't belong at the top of the page or the RSS
feed. So for you folks, I give you the magic of touch!
Here is an example of how to use cp and touch to edit old
entries while keeping their posting date the same:
$ cd /var/www/motd/madness/goober/
$ cp -a no-its-true.txt /tmp/old-entry
$ vi no-its-true.txt
$ touch no-its-true.txt -r /tmp/old-entry
First, the cp -a causes the file in /tmp/ to have the same exact
modification time as the oirginal file. We are actually just backing up
the modification time here, and don't care about the contents.
Then we edit the file as normal (I use vi, but I know that many folks
Finally, we use touch -r to make the edited entry have the same
modification time as our backup in /tmp/.
So this would be helpful for folks like Nutella, who need to go in and
mass-replace a lot of <br> and <p> stuff with ordinary blank lines.
If you edit an old entry, let me know and I'll give the full site build a push.
Right now pyblosxom only updates files that have brand new mtimes, so this
trick will sneak past that. I can force a full rebuild that will update