drouse
Dec 10 2003, 12:52 PM
I'd like to automate the importing of text files into a blog, but I'd rather not use the import function, as it requires a site rebuild. And that is likely to take some time to finish after the site has been up a while.
So I've been looking at the MT::Entry synopis, but the OO style Perl stuff is a tiny bit beyond me. Is there a working example somewhere, or can someone point me in the right direction on how to stuff the fields correctly?
Also -- the Perl API does allow a proper post, correct? I'd like to avoid having to do a site rebuild after each set of posts are sent in.
I'm aware of the python script for command line posting, but I'd rather not stop and try to learn another language...
Thanks for any help or suggestions.
Annoying Old Guy
Dec 10 2003, 05:11 PM
Have you looked at the XML RPC? It's not hard to use. One thing I do with it is mirror
this Blogger weblog into this
Movable Type weblog. It's all done via a PERL script that runs at regular intervals.
drouse
Dec 11 2003, 05:07 AM
Thanks, I'll give that a look as well.
My main concern is to be able to set authors with it. Each set of files will have entries from different authors.
(The application is a small newspaper website. Stories will be dumped from our print publication software's database to files that look like MT import files, edited by the editors, then picked up by a cron script and sent to MT)
Annoying Old Guy
Dec 11 2003, 05:51 AM
Yes, you can set the author via the RPC. It's not the most effecient interface but I think it's the easiest to use. If you're using PERL, you should have a PERL script called "xmlrpcsh.pl". This is a very nice little interface that lets you type in the RPC call as it it were a PERL subroutine call and have it sent to MT. It makes figuring out how the RPC works much easier.
drouse
Dec 11 2003, 07:35 AM
Thanks, I'll certainly make a search for that script.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.