This handles all the interacetions with the FlickrAPI module as well as dealing with mapping contacts <–> flickr accounts and local image files <–> flickr images
SQL Alchemy magic.
Used to share the session object between classes more easily
| Parameters: |
|
|---|
Used as a proxy to the FlickrAPI objects. This is for unit testing the rest of the system
| Variables: |
|
|---|
Setup the flickr object and perform the login to flickr
It is safe to call this function several times. Subsequent calls have no effect.
Linking information between Flickr contacts and google contacts
SQLAlchemy table for storing contact linking information between Google and flickr
| Parameters: |
|---|
Used as the other_id key in an Image object
Used as the other_id key in an Image object
| Parameters: |
|
|---|
Flickr ID
Flickr username
Management class for our flickr contacts. Handles the details of mapping e-mail addresses to flickr ids
| Parameters: |
|
|---|
| Parameters: |
|
|---|
Faces that are contained in photos, with the ghash and flickr ID
At this time this table is unused. It can be used for caching later to reduce the number of queriest to Flickr, but there’s the question of “What happens if someone removes a face directly from the image?”
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in kwargs.
Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
Primary key
Flickr image ID
Linking information between a Flickr image and a local image
| Parameters: |
|
|---|
Local filename of the image
When flickr thinks the photo was taken
Flickr image ID
Flickr photo secret id used for generating links
Used to manage the actual photo objects that are on flickr v.s. what is on the local computer
| Parameters: |
|
|---|
Add a single Image instance or a list/tuple of Image to the list of images that FlickrImageManager will work on
| Parameters: | imgs – single Image instance or a list of Image instances |
|---|
Find the corresponding photos in flickr that match this set of photos
For now this is done by matching exactly the EXIF time of the photo, so if the user has modified this even slightly it will throw off the matching
| Parameters: | flickr_proxy – The flickr proxy passed into the calling func. |
|---|
Sync facial data for the Image objects for which we know the linking information.
Note
This does not attempt to generate that linking information. That means it’s possible to just run the sync form linking information that has been cached in the DB w/o querying flickr.
| Parameters: | flickr_proxy – The flickr proxy passed into the calling func. |
|---|