Publish::movable_type
30分プログラム、その67。
id:mzp:20070617:mtをPraggerでやってみよう。
require 'movabletype' def movable_type(config,data) url = config['url'] blogid = config['blogid'] username = config['username'] password = config['password'] title = config['title'] cat = config['category'] mt = MovableType::Entry.new(url,blogid,username,password) post = MovableType::Post.new title,data.map{|item| %(<a href="#{item.link}">#{item.title}</a>) }.join("\n") mt.post! post,false mt.set_categories post,MovableType::Entry::Category.new(cat,nil) mt.publish post data end
movabletypeが必要です。
- このライブラリいまひとつ使いづらい。作ったの俺だけど。
- これをPHPに移植してくれたら、お金がでます。というか、移植するのが今度の仕事です