First, let me say that most of you aren't going to care about this.
To the few of you who do, let me say that my long LiveJournal nightmare is over.
Not that I have as bad an opinion of LiveJournal as some, but the fact that it had been my primary blogging platform for so long was holding me back from bringing all my blogs together under one roof.
As I posted on Saturday, I'd written scripts a long time ago to let me crosspost
my LiveJournal entries to
my Movable Type blog, but now I wanted to switch that around and go the other direction. I wanted to be able to use Movable Type's superior content management system to work on more than one entry at a time, and to schedule them for automatic posting at future dates. It was only once I began looking into my options that I realized finding a solution would mean I could crosspost to LiveJournal from
all my blogs. Bonus.
Interestingly, it was people I know who led me to the answer. My very first Google search led me to
this 2008 post from Ben Rosenbaum, who was looking for a similar solution, and Tempest Bradford served it up in the very first comment. She pointed me toward a Movable Type plugin by Chip Marshall called
ljcrosspost that sounded perfect. Several other sites praised it highly. The only problem was, site where the source code was archived no longer existed.
I tried a couple of other plugins I ran across, but when I tested them they were kind of iffy. I kept coming back to
ljcrosspost in my Google searches, but was frustrated by the elusiveness of the source archive. If only I'd embarked on this project in 2008!
But then I realized I could probably get the code from the
Wayback Machine. Bingo!
There it was.
So finally I made some time today to familiarize myself with the code and to write a few test scripts. The
ljcrosspost plugin works by communicating with LiveJournal.com via
XML-RPC, and that makes it startlingly easy to post LiveJournal entries from a Perl script. (In fact, I probably annoyed the hell out of my LJ friends with all the placeholder entries I posted then deleted this afternoon.) Once I had the basic concepts down, I made some tweaks of my own to Mr. Marshall's code, and I was off to the races.
The cool thing about
ljcrosspost (and forgive me if I get too geeky) is that it not only lets you
crosspost but also
crossedit. When you first publish a blog entry on the Movable Type end, the plugin opens an RPC channel to LiveJournal, posts the entry there, and gets back a couple of unique identifiers which it then stores with the Movable Type entry's metadata. If you should ever go back and edit that entry, Movable Type sees from the metadata that a copy already exists at LiveJournal, so it posts an RPC request to
update the LiveJournal entry with the altered text. Very slick.
Another consequence of
ljcrosspost's design is that, once you've installed it, if you republish your entire Movable Type blog, all the existing entries will get posted to LiveJournal. I actually did that with my
Proper Manuscript Format and
Signs of Yesteryear blogs, which you can now see neatly mirrored
here and
here.
Of course, as you might guess, I made some of my own little tweaks to
ljcrosspost. First, I enabled the list of categories associated with a Movable Type entry to be translated into LiveJournal tags and passed to the remote server.
I also extended the
<MTLJCrosspost> tag so I can pass it an explicit list of categories to be added to all entries mirrored from a given blog. (This is how, for instance, I can give all the entries from my formatting blog the LiveJournal tag "manuscript format," even though that's not a category associated with any of the original Movable Type entries.)
And finally I inserted a little message at the end of each mirrored entry which incorporates the name of the originating blog and links back to the original version of the post.
You might think that's a lot of trouble to go to just to be able to send content to a site that doesn't entirely suit me anymore, and you'd be right. But the fact is, I still have a lot of great friends at LiveJournal, and I like interacting with them there even if the other aspects of the site aren't what they used to be. We've got a lot of history, and I'm glad I'll finally be able to put some of my other content in front of them without a lot of annoying crosslinking.
So anyway, I've tested my new setup pretty thoroughly, but this will be the first real new entry that I post with it. I'm going to schedule it to go live just before midnight. Then I'm going to cross my fingers and hope it gets to you LiveJournal folks.
Crossposted from Inhuman Swill