Tag: Hack

Dashwire Photo Export

February 6, 2012 » Geek

I used to have a Windows phone, and I used a cool service called Dashwire to sync all my photos, contacts, etc. to the web.

Dashwire is shutting down this month, which is sad, but I haven’t used it in a long time, since I switched to Android. However, I’ve still got photos on there, and I’d like to grab them before they are gone. Unfortunately, Dashwire doesn’t have an easy export option that I could find.

So, pass one involved the photos RSS feed available on the site. I wrote this script to grab the feed, parse and download the photos.

import sys
import time
import feedparser
import urllib

if 2 > len( sys.argv ):
  print "usage: %s " % ( sys.argv[0], )

url = 'http://dashwire.com/%s/photos/feed' % ( sys.argv[1], )

print "Fetching: ", url

rss = feedparser.parse( url )

for item in rss.entries:
  timestamp  = time.strftime( '%Y-%m-%d %H:%M:%S', item.date_parsed )
  file_url   = item.media_content[0]['url'].replace( '-mobile.jpg', '.jpg' )
  file_local = '%s - %s.jpg' % ( timestamp, item.title )

  print "Downloading %s to %s" % ( file_url, file_local )

  request = urllib.urlopen( file_url )
  with open( file_local, 'wb' ) as handle:
    handle.write( request.read() )

It works as advertised, but it only drags down public photos, and only the most recent 30.

For round two I opened up the Dashwire dashboard and poked around their AJAX calls.

Turns out they have an images.json which has entries for every one of your photos in it.

  "rotation": 0,
  "unique_id": "-1294276037.2068.1142222",
  "modified_at": 1252717454,
  "body": null,
  "title": null,
  "seconds": 1252373668,
  "guid": "aWGu0CNZGr3OCJadbiFPIW",
  "private": true,
  "bucket": "media3.dashwire.com",
  "tags": [],
  "type": "Image",
  "id": 6734053,
  "height": 1920,
  "comments_count": 0,
  "ratings_average": 0,
  "width": 2560

To get this file, log into the dashboard, then download http://my.dashwire.com/images.json.

Once you have that, you will also need to figure out your user guid. You can do that with JavaScript, it’s stored in Dashwire.User.guid.

Then just plug it into the script below to get your stuff out!

import sys
import time
import json
import urllib

USER_KEY = '[get this from dashwire]'
obj = None

with open( 'images.json', 'r' ) as handle:
  obj = json.loads( handle.read() )

for image in obj:
  file_url = 'http://%s/media/%s/%s.jpg' % ( image['bucket'], USER_KEY, image['guid'] )
  timestamp = time.strftime( '%Y-%m-%d %H:%M:%S', time.localtime( image['seconds'] ) )
  file_local = '%s - %s.jpg' % ( timestamp, image['title'] )

  print "Downloading %s to %s" % ( file_url, file_local )

  request = urllib.urlopen( file_url )
  with open( file_local, 'wb' ) as handle:
    handle.write( request.read() )

Now sit back and enjoy as it downloads your photos!

Hurry up though, it all shuts down on Febuary 15th

Sugru To The Rescue!

July 3, 2010 » Consume, Geek, Life

I finally got a hold of some Sugru a few days ago. I had pre-ordered a sample pack (12 small sachets) and it arrived at last.

First off, when they say that a sachet is small, they mean it. However, this stuff goes a long way.

Sachet Size
Sachet Size

My first fix was my beloved flip flops. I’ve had these for 5+ years and they are the most comfortable things ever. Darcy would tell you that I only hang on to them because she hates them BUT THATS A LIE! (mostly)

The Sandals
The Sandals (Post-Op)

These sandals had major issues. Before I repaired them there was a rip all the way through (depth wise) and almost all the way across (width wise). Previously I had closed that gap with long nails, which worked for most of a summer, but they were not a long term solution.

Underside Repair
Underside Repair

But Sugru was just the ticket, it worked great. I followed the instructions and washed up then opened a packet and got to work. I found that it stuck to me more than the shoe in my case, but with some push and quick pull-back I managed to get it where I wanted it.

I used two sachets on this, but looking back I could have done the job with one. The first packet I put up top and I rushed a bit and got sloppy. Later I put the bottom packet on and I think that’s what actually did the job.

Foot Area Repair
Foot Area Repair

All in all a nice experience. My only issue with Sugru is that is stained my hands for a while, but that’s a pretty minor complaint. My sandal is comfy, solid and ready for years more action.