require "xmlrpc/client";

server  = XMLRPC::Client.new("marc-seeger.de";, "/cgi-bin/mt/mt-xmlrpc.cgi";)
content = { :title => ‘Testpost using ruby and xml-rpc', :description => ‘hello world' }
result  = server.call("metaWeblog.newPost";, 5, "USER";, "PASSWORD";, content, true)


works like a charm :)

Just to make some things clear:
/cgi-bin/mt/mt-xmlrpc.cgi   <— movable type xmlrpc file
5                                     <— my blog id (I could see it in my admin interfaces URL)

Good sources to look at:
http://crafterm.net/blog/articles/2006/09/22/blog-content-migration-from-movabletype-to-typo-using-xml-rpc
http://www.xmlrpc.com/metaWeblogApi
http://www.agileprogrammer.com/dotnetguy/articles/BlogImporterInRuby.aspx

A good piece of source concerning the upload of pictures using "newMediaObject";:
http://www.koders.com/ruby/fid677AC3CD05E375C051C4E6153FA6D0711B3DEB30.aspx?s=ruby+cgi.#L637

Comments