Skip to main content

A mirror Flickr photostream tool

Project description

Mirroring Flickr Photostream

Overview

A command line aims to create a local backup of your Flickr Photostream in your computer. Since there might be certain issues related to data lost, you might want to have this install to save your data at anytime. It can only mirro images with the highest resolution and data (description, comments and title) a json file

This command line utilize 2 download methods:

  • First in first out: Download from the last images from the last page
  • Last in first out: Always download from the lastest images

Usage

Since this is mainly developed in Linux, install in Windows might not work but i will be develop later on

An example of install

# Setup a binary directory to install our Flickr mirroring utility
$ mkdir -p ~/.local/bin/intek_flickr_mirroring
$ cd ~/.local/bin/intek_flickr_mirroring

# Setup a Python virtual environment
$ pipenv shell --three
Creating a virtualenv for this project...
Pipfile: /home/intek/.local/bin/intek_flickr_mirroring/Pipfile
Using /usr/local/bin/python3.7 (3.7.4) to create virtualenv...
⠦ Creating virtual environment...Using base prefix '/usr/local'
New python executable in /home/intek/.virtualenvs/intek_flickr_mirroring-wqvphFZ0/bin/python3.7
Also creating executable in /home/intek/.virtualenvs/intek_flickr_mirroring-wqvphFZ0/bin/python
Installing setuptools, pip, wheel...done.
Running virtualenv with interpreter /usr/local/bin/python3.7

✔ Successfully created virtual environment!
Virtualenv location: /home/intek/.virtualenvs/intek_flickr_mirroring-wqvphFZ0
Creating a Pipfile for this project...
Launching subshell in virtual environment...
 . /home/intek/.virtualenvs/intek_flickr_mirroring-wqvphFZ0/bin/activate

# Install our Flickr mirroring utility
(intek_flickr_mirroring) $ pipenv install Flickr-Mirror-Ngoc-Dang
Installing intek-flickr-mirroring...
Adding intek-flickr-mirroring to Pipfile's [packages]...
✔ Installation Succeeded
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
✔ Success!
Updated Pipfile.lock (96799b)!
Installing dependencies from Pipfile.lock (96799b)...
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 38/38 — 00:00:56

# Execute our Bash script
(intek_flickr_mirroring) $ mirror_flickr --help
usage: mirror_flickr [-h] [--cache-path CACHE PATH]
                     [--consumer-key CONSUMER KEY]
                     [--consumer-secret CONSUMER SECRET] [--debug LEVEL]
                     [--fifo] [--image-only] [--info-level LEVEL]
                     [--info-only] [--lifo] [--save-api-keys] [--verify-image]
                     --username USERNAME

Flickr Mirroring

optional arguments:
  -h, --help            show this help message and exit
  --cache-path CACHE PATH
                        specify the absolute path where the images and/or
                        information of the photos downloaded from Flickr need
                        to be cached
  --fifo                specify the First-In First-Out method to mirror the
                        user's photostream, from the oldest uploaded photo to
                        the earliest
  --image-only          specify whether the script must only download photos'
                        images
  --info-level LEVEL    specify the level of information of a photo to fetch
                        (value between 0 and 2)
  --info-only           specify whether the script must only download photos'
                        information
  --lifo                specify the Last-In First-Out method to mirror the
                        user's photostream, from the earliest uploaded photo
                        to the lastest (default option)
  --save-api-keys       specify whether to save the Flickr API keys for
                        further usage
  --username USERNAME   username of the account of a user on Flickr to mirror
                        their photostream

An example of downloading file

# save api key for first time used
# download with lifo( default is also lifo)
# select your username or any valid username
$ mirror_flickr --username manhhai --save-api-keys --lifo
Enter your Flickr API key:
Enter your Flickr API secret:
2020-03-23 08:49:27,630 [INFO] Scanning page 1/1026...
2020-03-23 08:43:40,648 [INFO] Caching image of photo 6dbf9c52ccec1722e32161cd41d6a290...
2020-03-23 08:43:41,546 [INFO] Caching image of photo f5275b3940b714fdb083995086ca2b83...
2020-03-23 08:49:27,660 [INFO] Caching image of photo ee6557cf53ebcfdbd66c617ca9e6c75f...
2020-03-23 08:49:32,540 [INFO] Caching image of photo 0e35aa2fab6527ebc98cc7a285d2cc12...
2020-03-23 08:49:33,637 [INFO] Caching image of photo 397d6bc91f7f6642373a5323dea291fb...

Contact information

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

Flickr_Mirror_Ngoc_Dang-1.0.3.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

Flickr_Mirror_Ngoc_Dang-1.0.3-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file Flickr_Mirror_Ngoc_Dang-1.0.3.tar.gz.

File metadata

  • Download URL: Flickr_Mirror_Ngoc_Dang-1.0.3.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

File hashes

Hashes for Flickr_Mirror_Ngoc_Dang-1.0.3.tar.gz
Algorithm Hash digest
SHA256 ae8fa13387feb8cc6a41f3ab2cee55dfcce95aa6c58f6b663c1b1302ecd17e78
MD5 885c7a40a66b095b226c71739aa4b22a
BLAKE2b-256 b3881db5d5d13dabc0308e7683196dedbe40205a5d11b8a417bb24715ac81a4f

See more details on using hashes here.

File details

Details for the file Flickr_Mirror_Ngoc_Dang-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: Flickr_Mirror_Ngoc_Dang-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

File hashes

Hashes for Flickr_Mirror_Ngoc_Dang-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b10598c462fa8b286c814ccf20edd9f32c99bde02f972ddd4d64d8a3286dd570
MD5 c6f85b51cf3f79412e528ef139105960
BLAKE2b-256 6539a3876afd167bed96f02e381949381a556c92ca077f96915558623877905c

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