#!/usr/bin/perl
use strict;
use Net::Blogger;
my $blog = Net::Blogger->new(engine => 'slash', debug => 0);
$blog->Username(2710);
$blog->Password(*****);
$blog->Proxy("http://use.perl.org/journal.pl");
$blog->Uri("http://use.perl.org/Slash/Journal/SOAP");
my ($ok, @posts) = $blog->getRecentPosts();
die "Error! Can't get use.perl recent posts!" unless $ok;
my $post = $blog->getPost($posts[0]->{postid});
my ($title, $content) = split/\n/, $post->{content}, 2;
my $new_post = <<"POST";
<p><i><font size="-1">From: <a href="http://use.perl.org/~gav/journal/">use.perl</a> Posted On: $post->{dateCreated}</font></i></p><p>$content</p>
POST
my $mt = Net::Blogger->new(engine => "movabletype", debug => 0);
$mt->Proxy("http://www.estey.com/cgi-bin/mt-xmlrpc.cgi");
$mt->Username( *****);
$mt->Password(*****);
$mt->BlogId(2);
$mt->metaWeblog->newPost(
title => $title, description => $new_post, publish => 1
);
I'm going to tweak things a bit, saving the id's of posts so I can cron it to run hourly.
cross blogging 0 Comments More | Login | Reply /