Skip to main content

FlickrSync

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

Requirements

Python3
Pip
ImageMagick
A Flickr account

Install

$ sudo apt install python3-pip
$ sudo apt install libmagickwand-dev
$ sudo pip3 install flickrsync

References

Setup

  1. Create the configuration file

    • name the file $HOME/.flickrsync/config.ini

    • add your Flickr username, API Key and API Secret

    • edit your pictures directory as required

    • a template configuration file can be found somewhere in your python library ../flickrsync/etc/config.ini

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

Usage

To see a full 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 and 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.

  5. Multi-threaded.

Sync Process

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

  2. Creates an index of pictures on Flickr.

  3. Download and scan unmatchable Flickr pictures.

  4. Identify duplicate pictures on local file system.

  5. Match local pictures to Flickr.

  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. Date matching is turned on by default and can be disabled using the option [–nodatematch]. Use this option if you have pictures which do not have correct DateTimeOriginal.

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

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

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

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

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

  8. 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.

Metadata

Release files for flickrsync 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flickrsync 0.1.1
File Size Uploaded Provenance Actions
flickrsync-0.1.1.tar.gz 28.4 kB Without provenance Details for flickrsync-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flickrsync 0.1.1
File Interpreter ABI Platform Actions
flickrsync-0.1.1-py3-none-any.whl Python 3 none any Details for flickrsync-0.1.1-py3-none-any.whl

Total release size: 47.6 kB

Release files / flickrsync-0.1.1.tar.gz

Download URL flickrsync-0.1.1.tar.gz
Size 28.4 kB
Tags Source
SHA-256 checksum
How to use checksums
05b94be9257a3aa8b4b500192b3d5fc8d1462fdc8c5b52b5628889cac14abdc1
BLAKE2b-256 checksum
How to use checksums
8718b2e79c9169221dce88183d3fab102859b92eb5860833f7c5e7e0a9458e43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / flickrsync-0.1.1-py3-none-any.whl

Download URL flickrsync-0.1.1-py3-none-any.whl
Size 19.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee58870efb98d125dafbfd355c58ee08c86ed309b81d7ec7fa24fa9014ae90cb
BLAKE2b-256 checksum
How to use checksums
5ee28fd4fa919d55e5a80ee2928c19b9df91e55668a552f4f97fb49d3f75fbc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for flickrsync 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page