-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
56 lines (44 loc) · 2.49 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Welcome to FlikBak!
FlikBak is a commandline utility that downloads your Flickr photos to your computer.
o Requirements
o Usage
o Photos in sets
o Photos not in sets
Requirements
============
FlikBak only requires a normal install of Ruby 2. No extra gems are required.
To use FlikBak you will need a Flickr API key and secret. The first time you run FlikBack it will open the default browser for you to grant it permission to access your Flickr account. Flickr will display a code in the browser. Copy/paste this code into the terminal where requested. You only need to do this once as the OAuth tokens are stored in TOKENS_DIR. If you delete the tokens, FlikBak will recreate them using the browser.
Usage
=====
ruby flikbak.rb APIKEY SECRET TOKENS_DIR PHOTOS_DIR MODE OVERWRITE
APIKEY = your Flickr api key.
SECRET = your Flickr api secret.
TOKENS_DIR = full path of directory to store oauth tokens. If this gets deleted or emptied, flickbak will rebuild the oauth tokens using the browser.
PHOTOS_DIR = full path of directory to store downloaded photos and metadata.
MODE = One of: sets notinset collections
OVERWRITE = one of: overwrite keep
e.g. to download all your collections:
ruby flikbak.rb YOUR_APIKEY YOUR_SECRET /Users/you/flickr/tokens /Users/you/flickr/photos collections overwrite
If you have to cancel FlikBak during a lengthy download, use keep as the OVERWRITE parameter next time to skip over those you've already downloaded. If you need to redownload photos, set it to overwrite.
User info
=========
The following files are created:
PHOTOS_DIR/user/contacts.json
PHOTOS_DIR/user/groups.json
Photos in sets
==============
Photos in sets are downloaded to:
PHOTOS_DIR/sets/PhotosetTitle-PhotosetId/PhotosetTitle.json
PHOTOS_DIR/sets/PhotosetTitle-PhotosetId/PhotoTitle-PhotoId/PhotoTitle-PhotoId.original_file_extension
PHOTOS_DIR/sets/PhotosetTitle-PhotosetId/PhotoTitle-PhotoId/PhotoTitle-PhotoId.json
Photos not in sets
==================
Photos not in sets are downloaded to:
PHOTOS_DIR/not_in_set/PhotoTitle-PhotoId/PhotoTitle-PhotoId.original_file_extension
PHOTOS_DIR/not_in_set/PhotoTitle-PhotoId/PhotoTitle-PhotoId.json
Collections
==================
Collections are downloaded to:
PHOTOS_DIR/collections/CollectionTitle-CollectionId/PhotosetTitle/PhotosetTitle.json
PHOTOS_DIR/collections/CollectionTitle-CollectionId/PhotosetTitle/PhotoTitle-PhotoId/PhotoTitle-PhotoId.original_file_extension
PHOTOS_DIR/collections/CollectionTitle-CollectionId/PhotosetTitle/PhotoTitle-PhotoId/PhotoTitle-PhotoId.json