GithubHelp home page GithubHelp logo

unclebumpy / export-flickr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from photo/export-flickr

0.0 2.0 0.0 128 KB

Export tool for Flickr

Home Page: http://theopenphotoproject.org

License: Apache License 2.0

Python 100.00%

export-flickr's Introduction

Open Photo API / Export tool for Flickr

OpenPhoto, a photo service for the masses


Overview

This script fetches all of your photos from Flickr and stores them into text files which can then be easily imported to OpenPhoto.

Setting up an API key

Before you get started you'll need a Flickr API key.

  1. Go to http://www.flickr.com/services/apps/create/apply/
  2. Apply for a non-commercial key
  3. Provide a name and description (this can be anything)
  4. Take note of your key and secret, you'll need them soon
  5. Click Edit auth flow for this app
  6. Put anything in for the callback URL, http://theopenphotoproject.org works
  7. Save changes

Getting dependencies

The only dependencies you need the flickrapi and argparse modules.

sudo easy_install flickrapi argparse
# you may also use pip to install them
# sudo pip install flickrapi argparse

If you're using Ubuntu or Debian, installing using their packages should also work:

sudo aptitude install python-flickrapi python-argparse

Downloading the script

Using git

git clone git://github.com/photo/export-flickr.git

Using wget

mkdir export-flickr
wget -O export-flickr/fetch.py https://raw.github.com/photo/export-flickr/master/fetch.py --no-check-certificate

Using file->save

Click the link below and save the file into a directory named export-flickr.

https://raw.github.com/photo/export-flickr/master/fetch.py

Running the script

Start a terminal and enter the following.

cd export-flickr
python fetch.py --api-key=******************************** --api-secret=****************

For api-key and api-secret, enter what Flickr returned you in step 4 of above.

Next you'll be given a URL which you need to copy and paste into a browser. If you're not logged into Flickr you'll have to sign in. Once logged in you need to approve the application access to your account.

NOTE: This script ONLY asks for read permissions. If it's asking for write permissions throw your computer in the trash.

Open the following URL in your browser 
This Url >>>> http://api.flickr.com/services/auth/?perms=read&api_sig=********************************&api_key=********************************

After this you'll be redirected to the URL you specified as your callback. Copy and paste the entire URL into the terminal.

When you're ready press ENTER 
Copy and paste the URL (from theopenphotoproject.org) here:  http://theopenphotoproject.org/?frob=*******************************************

Thanks!

Now the script gets to work downloading the information for your photos. It doesn't download the actual photos so it should be relatively fast.

Parsing URL for the token... OK
Fetching user id... OK
Fetching page 1... OK
  * Storing photo 6109695003 to fetched/6109695003.json... OK
  * Storing photo 6109694841 to fetched/6109694841.json... OK
  * Storing photo 6109694637 to fetched/6109694637.json... OK
  * Storing photo 6110240318 to fetched/6110240318.json... OK
  * Storing photo 6110240222 to fetched/6110240222.json... OK
  * Storing photo 6065502023 to fetched/6065502023.json... OK
Fetching page 2... OK

YAY

Now you've got a bunch of text files. These can be fed into our import tool to transfer all of your photos into your OpenPhoto account.

Don't worry, we'll have a nice web based GUI for all of this soon :).

Known issues

  1. Fetches URL of original photos, which only works for Flickr pro accounts.
  2. Flickr allows multiple licenses but OpenPhoto does not.
  3. Flickr has machine tags, do we implement something similar?
    • Proposal is to store them even if we don't do anything special with them
  4. Flickr has a place_id
    • Proposal is to store it as a tag flickr:place_id=xxxxxxx
  5. Flickr has a woe_id (http://developer.yahoo.com/geo/geoplanet/guide/concepts.html)
    • Proposal is to store it as a tag geo:woe_id=xxxxxxx
    • Since it's not Flickr specific (maybe Yahoo! specific) store it as a geo attribute
  6. How to deal with contacts and groups?
    • Proposal is to auto create two groups (friends and family) and add photos to the given group for permissions. The user can then add people to the group since we won't import the actual contacts. This way if a photo is to be shared with family, it still is once they add family members to their group.

export-flickr's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.