All Projects → lmammino → Flickr Set Get

lmammino / Flickr Set Get

Licence: mit
A simple command line app to download photos from a flickr set

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Flickr Set Get

Saldl
A lightweight well-featured CLI downloader optimized for speed and early preview.
Stars: ✭ 203 (+256.14%)
Mutual labels:  command-line, downloader, download
Github Files Fetcher
Download a specific folder or file from a GitHub repo through command line
Stars: ✭ 73 (+28.07%)
Mutual labels:  command-line, downloader, download
Py cui
A python library for intuitively creating CUI/TUI interfaces with widgets, inspired by gocui.
Stars: ✭ 380 (+566.67%)
Mutual labels:  command-line, command
Bilili
🍻 bilibili video (including bangumi) and danmaku downloader | B站视频(含番剧)、弹幕下载器
Stars: ✭ 379 (+564.91%)
Mutual labels:  downloader, download
Cobra
A Commander for modern Go CLI interactions
Stars: ✭ 24,437 (+42771.93%)
Mutual labels:  command-line, command
Tsukae
🧑‍💻📊 Show off your most used shell commands
Stars: ✭ 345 (+505.26%)
Mutual labels:  command-line, command
Speedtest
Command line client for speedtest.net written in Go
Stars: ✭ 361 (+533.33%)
Mutual labels:  command-line, download
N m3u8dl Cli
[.NET] m3u8 downloader 开源的命令行m3u8/HLS/dash下载器,支持普通AES-128-CBC解密,多线程,自定义请求头等. 支持简体中文,繁体中文和英文. English Supported.
Stars: ✭ 6,752 (+11745.61%)
Mutual labels:  command-line, downloader
Photon
A lightweight multi-threaded downloader based on aria2.
Stars: ✭ 3,030 (+5215.79%)
Mutual labels:  downloader, download
Fast Android Networking
🚀 A Complete Fast Android Networking Library that also supports HTTP/2 🚀
Stars: ✭ 5,346 (+9278.95%)
Mutual labels:  downloader, download
Downthemall
The DownThemAll! WebExtension
Stars: ✭ 512 (+798.25%)
Mutual labels:  downloader, download
Pget
The fastest file download client
Stars: ✭ 724 (+1170.18%)
Mutual labels:  downloader, download
Pyinstalive
Python script to download Instagram livestreams and replays.
Stars: ✭ 336 (+489.47%)
Mutual labels:  downloader, download
Negibox
All in one downloader 全能下载器
Stars: ✭ 335 (+487.72%)
Mutual labels:  downloader, download
Jwt Cracker
Simple HS256 JWT token brute force cracker
Stars: ✭ 365 (+540.35%)
Mutual labels:  command-line, command
Gallery Dl
Command-line program to download image galleries and collections from several image hosting sites
Stars: ✭ 4,199 (+7266.67%)
Mutual labels:  downloader, gallery
Pluradl.py
Automated download of Pluralsight courses
Stars: ✭ 406 (+612.28%)
Mutual labels:  downloader, download
Aruba
Test command-line applications with Cucumber-Ruby, RSpec or Minitest. The most up to date documentation can be found on Cucumber.Pro (https://app.cucumber.pro/projects/aruba)
Stars: ✭ 900 (+1478.95%)
Mutual labels:  command-line, command
Cliffy
NodeJS Framework for Interactive CLIs
Stars: ✭ 263 (+361.4%)
Mutual labels:  command-line, command
Shell Safe Rm
😎 Safe-rm: A drop-in and much safer replacement of bash rm with nearly full functionalities and options of the rm command! Safe-rm will act exactly the same as the original rm command.
Stars: ✭ 265 (+364.91%)
Mutual labels:  command-line, command

flickr-set-get

npm version Build Status Coverage Status Dependency Status

Flickr-set-get is a command line application written in node that allows you to download an entire set of photos from Flickr (a gallery). Once you have it installed, to start the download you just need to:

$ flickr-set-get get <setid> <userid>

Install

As simple as installing any other global node package. Be sure to have npm and node (>= 0.8 version, or io.js >= 1.0) installed and launch:

$ npm install -g flickr-set-get

Configuration

Usage screenshot

Flickr-set-get is already configured with a default api key to allow you to use it immediately. Anyway it's highly recommended to create your own Flickr api key in the Flickr app garden especially if you intend to make authenticated requests to download private photos and photo sets. Having your own api key will allow you to avoid rate limiting and to use a more secure authenticated communication.

To configure flickr-set-get to use your own api key you need to launch the following command:

$ flickr-set-get config

An interactive guide will then help you to complete the configuration process.

Start the download

At this stage you should be ready to download a Flickr photo set. A set is identified by two parameters: a setId and a userId. Given the url of a set (gallery) you can easily spot these two parameters as shown in the image below:

SetId and UserId parameters in a Flickr gallery url

So, given the url https://www.flickr.com/photos/[email protected]/sets/72157623488969696, to start the download you need to run:

$ flickr-set-get get 72157623488969696 [email protected]

And then just watch the command to do the hard work for you!

Download private photos and sets

Flickr supports private photos and private sets (sets that contains only private photos). To be able to download these photos from your sets you need to authenticate yourself and to send authenticated api requests. In order to do so you need to do configure your authentication options and get an authentication token with the flickr-set-get config command. Then you need to use the option --authenticated when using the flickr-set-get get command.

It's highly recommended to use your own api key and secret to achieve an optimal level of security. In fact the default api secret is shared in plain text in the code base of flickr-set-get, so it's not really a secret. Someone that might intercept a flickr-set-get authentication token for your Flickr profile (generated with the default api key and api secret) will be able to download all your private photos. Anyway it's not mandatory to provide personal api key and api secret and you can use the default values, especially if you just want to quick test the application to download some photos (ensure to be in a safe network in that case, and to revoke your authentication token at the end of the test).

Sub-commands, options and help

Flickr set get supports different sub-commands. You can access a comprehensive documentation with:

$ flickr-set-get --help

This will display all the available sub-commands and options. You can also access the specific help of a sub-command with:

$ flickr-set-get <sub-command> --help

For example flickr-set-get get --help will show:

  Usage: get|g [options] <setId> <userId>

  download a set of photos

  Options:

    -h, --help             output usage information
    --apiKey <value>       The flickr API key
    --authToken <value>    The flickr auth token
    --authenticated        Use authenticate request to access private photos (ensure to provide a valid `authToken` as option or in your config file)
    --config <value>       Define the config file to use
    -c, --concurrency <n>  The number of concurrent requests
    -o, --outputDir <s>    The directory where to save the downloaded images
    -s, --size <s>         The size of the image to download (eg. "Original", "Large", "Medium", etc.)
    -vs, --videoSize <s>   The size of the video to download (eg. "Video Original", "HD MP4", "Mobile MP4", etc.)
    -n, --noOverwrite      If set does not overwrite existing files

Current status

This project is currently on its early days so it's expected to have (a lot of) bugs and imperfections. Feel free to contribute to its development and to report bugs.

Programmatic API

Developers can integrate part of the code into their own apps (want to build a GUI for this command line app? :P) Here's a small documentation to get you going in these cases.

If you install the package as a dependency into an existing project (npm install --save flickr-set-get) you can require it's main module:

var Flickr = require('flickr-set-get');

var apiKey = 'someApiKey';
var options = {};

var client = new Flickr(apiKey, options);

Here follows a comprehensive documentation of the Flickr class.

Class: Flickr

A class that defines a set of methods to download an entire set of photos (gallery or set) from Flickr.

Available options:

  • concurrency number the maximum number of concurrent http requests (default: 10)
  • outputDir string the path where to save the images (default: ".")
  • size string The size of the image to download, eg. "Original", "Large", "Medium", etc. (default "Original")
  • noOverwrite boolean if true avoids to override already existing files (default: false)
  • auth boolean|object if false it will not use authentication. Otherwise it should be an object containing the keys secret and authToken (or miniToken) (default: false)

This class extends from {EventEmitter} and emits several events:

  • error Error in case of error
  • setInfo Object when info about a given set are successfully retrieved
  • photoSizes Object when the info about a photo (url to download the sizes) are retrieved
  • photoDownloaded Object when a photo is successfully downloaded
  • photoSkipped Object when a photo is skipped (already downloaded)
  • done Object when all the photo of the set are downloaded

Flickr.downloadSet(setId, userId)

Starts the download of the photos from a given Flickr set. Triggers events during the whole process

Parameters

setId: string, Starts the download of the photos from a given Flickr set. Triggers events during the whole process

userId: string, Starts the download of the photos from a given Flickr set. Triggers events during the whole process

Returns: Flickr

Flickr.getAuthToken(cb)

Get the authToken. Requires that the auth option has been correctly configured providing secret and miniToken

Parameters

cb: function, a callback function that gets called (with error and data arguments) once the request is finished

Returns: Flickr

Contributing

Everyone is very welcome to contribute to this project. You can contribute just by submitting bugs or suggesting improvements by opening an issue on GitHub.

You can also submit PRs as long as you adhere with the code standards and write tests for the proposed changes.

You can read a dedicated guide on how to contribute.

License

Licensed under MIT License. © Luciano Mammino.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].