By Francis Tseng, for Python 2.7
Import Wordpress posts (in an XML export) into Tumblr.
Based on Jon Thorton's wp2tumblr.py.
- Install the only dependency:
$ pip install oauth2
-
Register an application on your Tumblr account to get your consumer key and consumer secret: http://www.tumblr.com/oauth/apps
-
Get your access token and access secret for your account here: https://api.tumblr.com/console//calls/user/info
-
In your Wordpress blog, go to Tools > Export, select 'Posts' and download the export file.
-
Set the proper values in this script:
CONSUMER_KEY
,CONSUMER_SECRET
,ACCESS_TOKEN
,ACCESS_SECRET
,BLOG
, andWP_XML
-
Run the script:
$ python wp2tumblr.py