Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Convert your Svpply data into a Tumblr blog

View Svpply to Tumblr.md

Svpply to Tumblr

Svpply is a neat service that, in essence, allowed people to track and share items they wanted. In essence, it is a wishlist service that works across all sites, and captures the price and the image of the item you want.

Svpply is shutting down, but gladly they are allowing users to download their data -- in essence, all the info they stored in the Svpply site. I still wanted the data accessible on the web, and this turned out to be a near trivial project to write in python.

Limits: You can only upload 150 pictures a day to Tumblr. This may mean you need to break you wants.csv file into chunks of 150 lines.

See PyTumblr and Tumblr's API console for details.

View Svpply to Tumblr.md
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
import csv
import pytumblr
 
blogname = '<blog_name>'
 
client = pytumblr.TumblrRestClient(
'<consumer_key>',
'<consumer_secret>',
'<oauth_token>',
'<oauth_secret>',
)
 
with open('wants.csv') as data:
reader = list(csv.reader(data))
length = len(reader)
count = 0
for row in reversed(list(reader)):
response = client.create_photo('inplaceofconsumption',
state="queue",
tags=["svpply", "backup", "like"],
format="html",
caption='<a href="%s">%s</a>, %s' % (row[1], row[0], row[3]),
source=row[8])
if u'response' in response.keys() and u'errors' in response['response'].keys():
for e in response['response']['errors']:
print e
exit()
else:
count += 1
if (count % 10) == 0:
print count, "out of ", length

did you finished the code? it would be a great solution to keep the svpply data alive!

import csv
import pytumblr

blogname = ''

client = pytumblr.TumblrRestClient(
'',
'',
'',
'',
)

with open('wants.csv') as data:
reader = list(csv.reader(data))
length = len(reader)
count = 0
for row in reversed(list(reader)):
response = client.create_photo('inplaceofconsumption',
state="queue",
tags=["svpply", "backup", "like"],
format="html",
caption='%s, %s' % (row[1], row[0], row[3]),
source=row[8])
if u'response' in response.keys() and u'errors' in response['response'].keys():
for e in response['response']['errors']:
print e
exit()
else:
count += 1
if (count % 10) == 0:
print count, "out of ", length

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.