Blosxom dates entries by file modification times, which really sucks if I want to update a post but leave the time as it is. It may have some plugin or entries file or other gizmo to maintain the modification times of each entry, but I wanted something that didn't make me break my blosxom installation, install something new, or change what I was doing.
So, I just wrapped a call to the editor in a little Perl script that remembers the modification time, edits the file, and resets the time when it's done.
#!/usr/bin/perl
my $time = -e $ARGV[0] ? (stat $ARGV[0])[9] : time;
system '/usr/bin/pico', $ARGV[0];
utime $time, $time, $ARGV[0];
No big whoop, or maybe merely a "Almost cool" use of perl: just something I should have done a while ago.
--
brian d foy <bdfoy@cpan.org>
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.