Skip to main content

A command line tool to backup local photos to Flickr

Project description

A command line tool to synchronise pictures from the local file system to Flickr

Requirements

Python3
Wand
A Flickr account

Install

$ sudo apt install python3-wand
$ sudo pip3 install flickrsync

References

Setup

  1. Edit the configuration file

    • configuration file is created during the pip installation

    • location will be somewhere in your python library ../flickrsync/etc/config.ini

    • add your Flickr username, API Key and API Secret

    • edit your pictures directory as required

  2. Authenticate the FlickrSync application with Flickr (see usage, below)

Usage

To see a list of commands
$ flickrsync --help

To authenticate FlickrSync with Flickr
$ flickrsync --auth

To perform a one way sync from the local file system to Flickr
$ flickrsync --sync

To perform a two way sync between the local file system to Flickr
$ flickrsync --sync2

To create Flickr photosets based upon the local file system
$ flickrsync --photosets

Features

  1. Duplicate copies of the same picture on the local file system are identified.

    • Image hash signature of the picture is used

    • only a single copy of the picture will be uploaded

  2. Does not rely on the local pathname for identifying the picture.

    • moving a picture to a different directory will not cause the picture to be uploaded again

  3. A SQLite database is used to index local and Flickr pictures.

    • destroying the database will not result in any pictures being uploaded again

    • database is automatically recreated

  4. Perform a two way sync between the local file system and Flickr.

Sync Process

Local <==> Flickr
  1. Creates an index of pictures on the local file system.

  2. Creates an index of pictures on Flickr.

  3. Identify duplicate pictures on local file system.

  4. Match local pictures to Flickr.

  5. Download and scan unmatched Flickr pictures.

  6. Upload unmatched local pictures to Flickr.

  7. Download pictures from Flickr that are missing on the local file system.

  8. Create Flickr photosets based upon the original filepath of the picture.

Picture Matching

Local

Flickr

DateTimeOriginal

Filename

Signature

DateTakenUnknown

DateTaken

Title

Signature

Match

x

x

0

x

x

yes

x

x

yes

Note: x indicates a match betwen local and Flickr

  1. Pictures will be matched by either:-

    • picture file name + date picture was taken, or

    • ImageMagick hash signature of picture

  2. Each uploaded picture is tagged with its ImageMagick hash signature.

  3. Pictures on Flickr have a datetaken, https://www.flickr.com/services/api/misc.dates.html.

  4. If the Flickr datetaken is generated from the pictures Exif data, then Flickr will set the DateTakenUnknown to 0.

  5. If it exists, the Exif DateTimeOriginal is extracted from each picture on the local file system.

  6. The Flickr title is based upon the original filename of the uploaded picture.

  7. File names are compared without the file extension. This is because Flickr does not always maintain the file extension during upload as it is dependent upon the upload client used.

Photosets

  1. A photoset is based upon a flattened directory path of each picture.

  2. Photosets created by FlickrSync are identified as such by their photoset description.

    • (re)creating the photosets could delete any photosets that are not being used

    • only photosets previously created by FlickrSync are deleted

Notes

  1. FlickrSync does NOT require sudo to run.

  2. Pictures will not be deleted on either the local file system or Flickr.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flickrsync-0.1.0rc1.tar.gz (28.7 kB view details)

Uploaded Source

Built Distribution

flickrsync-0.1.0rc1-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file flickrsync-0.1.0rc1.tar.gz.

File metadata

File hashes

Hashes for flickrsync-0.1.0rc1.tar.gz
Algorithm Hash digest
SHA256 0c7268a90ede788b025451a68c49db54da62124d0310f99187313960c7c36754
MD5 411deeb378dbef41b42a27e4bef87ba9
BLAKE2b-256 03bb6eecb983ba299f1ddb4a0fc751f29f13c770cc1d48f5b627362b85cd093d

See more details on using hashes here.

File details

Details for the file flickrsync-0.1.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for flickrsync-0.1.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 5ef3f11f155414bd3b2db0d98f40581b43e8a2a253d88f2a429da350343a543b
MD5 d4718f67a4a95fb64faed1d79fcd3e91
BLAKE2b-256 b206216b73a704df459a24fd61766e382841852646ed71a98f6f516edfe49e0c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page