#!/usr/bin/perl # # Post Delicious Links to MovableType with XPath # (MT installed on local machine) # # Jeffrey Veen # jeff at veen dot com # # 10 December 2003 # # Distributed under the Creative Commons "Share Alike" license. # http://creativecommons.org/licenses/sa/1.0/ # ### # load modules use POSIX; use lib "/path/to/your/mt/lib"; # change to your installation use MT; use MT::Entry; use XML::XPath; # set up local variables - change to suit your needs my $MTauthor = "1"; my $MTblogID = "2"; my $MTconfig = "/path/to/your/mt/mt.cfg"; my $delUser = "veen"; my $delPW = "****"; # get today's date and format it my $date=strftime( "%Y-%m-%d", localtime()); # go get the xml file my $xml = `curl -s -u $delUser:$delPW http://del.icio.us/api/posts/get?dt=$date`; # get a new XPath object my $xp = XML::XPath->new(xml => $xml); # see if anything was posted to day if ($xp->exists('/posts/post')) { my $title = "Links: $date"; my $guts = "