GithubHelp home page GithubHelp logo

imclab / py-flarchive Goto Github PK

View Code? Open in Web Editor NEW

This project forked from straup/py-flarchive

0.0 2.0 0.0 116 KB

py-flarchive is a very simple Python library for archiving the metadata for the Flickr photos belonging to a user.

py-flarchive's Introduction

py-flarchive

What is this?

py-flarchive is a very simple Python library for archiving the metadata for the Flickr photos belonging to a user. For all a user's photos the library will try to download and store the raw API (JSON) output for the following methods:

For example:

INFO:root:process photo ID 11331441996
DEBUG:root:calling flickr.photos.getInfo
DEBUG:root:creating ./data/16870059@N04/113/314/419/96
DEBUG:root:writing ./data/16870059@N04/113/314/419/96/11331441996-i.json
DEBUG:root:calling flickr.photos.getExif
DEBUG:root:writing ./data/16870059@N04/113/314/419/96/11331441996-e.json
DEBUG:root:calling flickr.photos.getSizes
DEBUG:root:writing ./data/16870059@N04/113/314/419/96/11331441996-s.json
DEBUG:root:calling flickr.photos.getAllContexts
DEBUG:root:writing ./data/16870059@N04/113/314/419/96/11331441996-ctx.json
DEBUG:root:calling flickr.photos.comments.getList
DEBUG:root:writing ./data/16870059@N04/113/314/419/96/11331441996-c.json

Usage

import flarchive

apikey='1234567'
apisecret=None
datadir='/where/to/write/files'

nsid='9999@N01'
authtoken=None

fl = flarchive.flickr(apikey, apisecret, datadir)
fl.archive_user(nsid, authtoken)

Or you can just call the flarchive __init__.py library from the command line:

$> python ./flarchive/__init__.py -v -a <APIKEY> -n <NSID> -d <DATA>

There are also a few helper make commands included with this with package:

$> make user APIKEY=<APIKEY> NSID=<NSID>

$> make list-commons APIKEY=<APIKEY>

Caveats

This has largely been optimized for public photo streams. It should work with private photos but there may still be bugs.

TO DO

  • Clean up auth token handling
  • Pagination for photo comments
  • Packaging, setup scripts and general spit and polish

See also

py-flarchive's People

Contributors

thisisaaronland avatar

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.