Joshua on August 1st, 2009
  • kids are having their first "in my space" fight in the car. planning to build a wall down the middle or maybe jetson bubbles. #
  • leaving to hike onion creek trail, mckinney falls state park. http://is.gd/1M90V #
  • back from our 2.81 mile hike. Dreams of hiking th AT fading. It is 765 times longer. off to get ice cream. #
  • Amber and I have decided that RC Cola tastes like Pepsi that had ice in it, but now is flat and warm. Bluck… #
  • Just woke up from a three hour nap. Amber is now officially a saint. #
  • The Crow Paradox : NPR http://bit.ly/12gHDv –crows can recognize individual people, but people don't know crow #
  • Don't Worry he'll be chewing on the cat soon. RT: @codinghorror: sad moments in parenting#87: you realize your baby is, chewing on a cat toy #
  • 30 min on phone with ATT because modem forgot my username/passwrd. Nichole was nice, but really wanted me to restart my computer. A lot. #
  • I should add that if you have ATT DSL & your internet light is out, you need to login to modem 'cause it forgot who you are 192.168.0.1 #
  • And no I did not restart my computer or reopen my browser or any of the other stupid things that were suggested. I just lied and said I did. #
  • RT: @donttrythis: Life expectancy in countries with Universal Healthcare vs. the US. http://bit.ly/yHnEM #
  • Heaven help me I'm at the sprint store. 65% chance there will be yelling. 10% there will be physical contact. 5% I get arrested. #
  • sprint how about this? whoever has the most lines on their acct gets to go first. Move over mr 3line family plan. I have 26 #
  • Typical sprint customer service, but I smiled throughout. Will do a jig on their corporate grave. I can't believe it is taking so long. #
  • I'm dreaming of some kind of magnetic restraint that keeps a kid safely
    /humanely in bed. Also it keeps them from screaming. #
  • RT: @Smarterware: Gmail Adds Custom SMTP Servers, Drops “On Behalf Of” http://bit.ly/4cMD7u #
 

Tags:

Joshua on July 27th, 2009

If you know me, you know that we take a lot of pictures.  You’ll also likely have heard me say something along the lines of “There will be a whole generation of kids who grows up and as adults have no photos of themselves when they were young.”  Or something like “There are only two kinds of photos online: The ones that never go away (that kegstand photo that shows up at your job interview) and the ones that disappear forever (your baby’s first birthday pictures).” I really do believe this to be true.  Think about all the people you know where the only pictures they have of their kids are on their cell phone. When the phone is lost so are the pictures.  Or photos are stored on a single hard drive that crashes.  Or photos that never get off the memory card of the camera.  At least with film you could always find that shoebox in the attic full of your childhood photos.

So as part of my paranoia about losing the photos we take a couple of precautions.  First we get the pictures off the memory cards and onto the computer as soon as we can.  Then we back the whole computer up using Carbonite.  I’ve talked about it before. This includes all the photos.  It gets the photos themselves off site in case the computer is stolen or hard drive crashes.  Next we upload all of the photos to Flickr.  It acts as both a backup system and of course a way to share our photos.  When we upload to Flickr we also add tags and descriptions.

It occurred to me a couple of weeks ago that all this additional data, the metadata of tags and descriptions, is almost as import as the pictures themselves.  With all that metadata we can search for and find photos which would be impossible without it.  We can search for and find photos that have Wesley and Jillian swimming and find them all in just a few minutes. Want only the ones that also have Amber? No problem.  But what if Flickr goes away? They might shutdown or kick us off for no reason at all. It happens with web services all the time.  Then we’d have copies of the pictures on our computer and backed up off site, but I’d have no way to find a specific picture and we’d also have no idea what was happening in those pictures.

I decided we needed a local copy of the metadata as well.  Luckily Flickr has an awesome API.  You can programmatically interface with all your images and data.  I decided that I’d use Python to do the heavy lifting and (Beej’s) Python Flickr API kit to interface with Flickr. I wrote my script (download at the bottom of this page) using ActiveState Python version 2.6.1 on Windows Vista, but it should work on a wide variety of systems.

The program downloads the most critical information about each photo, but not the photo itself.  A lot of variables are set near the top of the script and are easily and safely edited by the user.  These control things like the name of the database file (it uses SQLite for persistent storage) and date ranges (upload dates) of photo information you want to download.  It handles exporting the data to a CSV file (easily loaded into an Excel spreadsheet) and a few database management tasks.

Prerequisites: You’ll need these in place to begin (and they are all free!)

What it can do:

  • Download the photoID (flickr’s unique ID for each uploaded item), the file format (jpg, gif, etc), tags, descriptions, photo upload and taken dates, and the URL for the photo on Flickr.  Right now it only downloads photo information, not other media.
  • Export the information to a CSV file you can open with Excel and use however you like
  • Handle basic database management like removing duplicates and compacting the database

How you use it:

  • Once you have your Flickr Key insert the information they give you along with your UserID into the script near the top of the Variables section.  You have to have this setup to download your photos. The first time you run it you will be asked to authenticate this application on your account.  A browser window will launch automatically and taking you to Flickr.
    flickr_authentication
    app_auth_text
  • Edit any information you want to change (date range perhaps) and then run the script (either from the command line or by double clicking the icon). It will proceed to create your database (if not already there), query Flickr for photo IDs, check to see if you already have them in your database, and download your new data.  My experience has been that I am able to download information on about 10,000 photos before my connection to Flickr fails.  Sometimes it is more, sometimes I only get a few thousand.  Luckily because the program writes info to the database nothing is lost and you don’t have to start fresh.  Just launch the program again and it will pick up where it left off.  It took me four or five runs to get everything about all 36,000 photos we have online.
  • To export data to a CSV file run the application from the command line using the “–export” flag.
  • To shrink the database use the “–compactdb” flag at the command line.  You only need to do this if data has been removed.
  • To remove any duplicates use the “–dedup” flag at the command line.  You shouldn’t have duplicates, as it should skip them during download, but just in case.
  • You can use the “–help” command line flag to pull up brief help.
    command_line_options

What’s Coming:

The program isn’t perfect (but I ask you, who among us is?) and I already have a long list of things I’d like to improve.  I just wanted to get it out there since it works even if it isn’t pretty.  I’m sure the code could be cleaned up a lot.  It currently stands at almost 400 lines about 120 of which are comments (mostly so I can remember what the heck I was thinking when I wrote each bit).  Some of the improvements and new features are found as comments in the application itself including:

  • Catch errors and exit more gracefully.  Currently it just spews out errors and exits hard.
  • Get it to restart a download after Flickr errors a given number of times.
  • Retrieve comments left on photos, security settings, and exif data.
  • Move user configurable variables to .ini file using ConfigParser module.
  • Once the .ini is done it might be possible to create this as .exe so you wouldn’t need to install Python or anything else.
  • Use indexes in the db to speed up some of the query and export processes.  I’ve played with this a bit and using indexes has sped my export from 10 minutes to 10 seconds.
  • Add a command line option for statistics (# of photos, unique tags, etc).
  • Add a command line option to allow removal of data about a single photo id (remove photo, tags, etc) or range of ids.  By date range too.
  • Converting the Unicode characters to ASCII or UTF8 so some characters in descriptions (and presumably comments) render correctly.  Flickr uses Unicode, so does the database, but the module that writes the CSV file doesn’t.

SQLite Manager:

One of the best things about this application is that it uses an SQLite database.  This is the same kind of database used by applications like the FireFox browser to store your bookmarks, Skype, the iPhone, etc.  They claim that it is “the most widely deployed SQL database engine in the world”.  With the data in the database you can interact with it using Transactional-SQL to do data manipulation like you never could in a spreadsheet.  And the best way to play with all your newly downloaded data is to use the SQLite Manager plugin for firefox.  It offers a graphical way to browse, query, and alter your database.  It is easy to use and you can use it to peak into all the various SQLite databases residing on your computer you didn’t even realize were there.  You might even learn a little SQL.  Be sure to make a copy of your database before you go messing around.

sqlitemanager

DOWNLOAD: Flickr MetaData Downloader (1328) (right click and save as)

 

Tags: , ,

Joshua on July 27th, 2009

outline700

Well, we’ve finished the fourth week of our HundredPushups workout plan.  So far I can say we are both feeling the difference, but I doubt that either of us will be able to do 100 consecutive pushups after we finish the last two weeks.  Maybe I’m wrong, but it doesn’t seem possible.

That isn’t to say we aren’t making progress.  We certainly are.  Last week alone Amber did a minimum of 231 pushups and I did 449.  Will we make it to 100 in a row?  I’ll let you know in two weeks.

 
Joshua on July 26th, 2009

Yesterday we set off to McKinney Falls State Park to take a little hike.  We got there shortly after 10a so we weren’t hiking in the worst of the heat, but it was still very warm.  The trail we chose, Onion Creek [giant pdf trail map], is about 2.8 miles long and paved (we didn’t realize this) the entire way.  It winds past one set of the waterfalls and then through the unimproved campsites and then spends a couple miles meandering through the parkland.  It is, as I would say, “Texas beautiful”.  Not really much to look at, but lots of Oaks and cactus everywhere.  Mostly flat with the exception of one hill and benches spread out every half mile or so.  The kids lasted about 5 feet before wanting to climb into the Ergo or the Sherpani.  From there on out it was in the pack, out of the pack, in the pack, out of the pack, in the pack … you get the idea.

20090725_IMG_1897

Jillian in the Sherpani at the start

Trading. Now it is Wesley's turn.

Trading. Now it is Wesley's turn.

After the hike we stopped at the visitor’s center (closed this weekend FYI) to have lunch. Amber packed us a picnic of PB&J, watermelon and ice water.  Yummy cold ice water.

Eating lunch.

Eating lunch.

Eating lunch and refusing to have his photo taken.  It didn't work.

Eating lunch and refusing to have his photo taken. It didn't work.

After lunch we headed home.  But we were still hot and tired so what could be better than some ice cream. And pop.  And chips.

Amber with her Snickers ice cream.

Amber with her Snickers ice cream.

Wesley eating his BlueBell Rainbow pop.

Wesley eating his BlueBell Rainbow pop.

Too impatient to even unwrap it.

Too impatient to even unwrap it.

Jillian showing off what is left of her Rainbow Pop.

Jillian showing off what is left of her Rainbow Pop.

It was fun, but frustrating.  The kids were seemingly worn out before we even got out of the car.  The same kids that can fly around my house like the monkeys from the Wizard of Oz are worn out after two minutes on the trail.  Any crazy dreams of thru-hiking the AT (at 765 times as long) are certainly waning.

 

Tags: ,