This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urlparse | |
import oauth2 as oauth | |
consumer_key = '' | |
consumer_secret = '' | |
request_token_url = 'http://www.tumblr.com/oauth/request_token' | |
access_token_url = 'http://www.tumblr.com/oauth/access_token' | |
authorize_url = 'http://www.tumblr.com/oauth/authorize' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo gem install mechanize ratom --no-ri --no-rdoc | |
%W{rubygems mechanize atom/pub net/http}.each { |r| require r } | |
module Wordpress | |
# A proof of concept class, displaying how to manage a WP blog through ruby | |
class Blog | |
attr_accessor :agent, :blog_uri, :username, :password, :logged_in | |
def initialize blog_uri, username, password | |
@username = username | |
@password = password | |
@blog_uri = blog_uri.gsub(/\/$/,"") # remove last slash if given |
NewerOlder