1FLICKR_UPLOAD(1)      User Contributed Perl Documentation     FLICKR_UPLOAD(1)
2
3
4

NAME

6       flickr_upload - Upload photos to "flickr.com"
7

SYNOPSIS

9       flickr_upload [--auth] --auth_token <auth_token> [--title <title>]
10            [--description description] [--public <0|1>] [--friend <0|1>]
11            [--family <0|1>] [--tag <tag>] [--option key=value] [--progress]
12           <photos...>
13

DESCRIPTION

15       Batch image uploader for the Flickr.com service.
16
17       flickr_upload may also be useful for generating authentication tokens
18       against other API keys/secrets (i.e. for embedding in scripts).
19

OPTIONS

21       --auth
22           The "--auth" flag will cause flickr_upload to generate an
23           authentication token against it's API key and secret (or, if you
24           want, your own specific key and secret).  This process requires the
25           caller to have a browser handy so they can cut and paste a url. The
26           resulting token should be kept somewhere like "~/.flickrrc" since
27           it's necessary for actually uploading images.
28
29       --auth_token <auth_token>
30           Authentication token. You must get an authentication token using
31           "--auth" before you can upload images. See the EXAMPLES section.
32
33       --oauth
34           Interactively perform OAuth authorization with Flickr. The user
35           will get a URL to visit at Flickr at which Flickr::Upload must be
36           granted write permissions. After granting permission, the user will
37           be redirected to a dummy URL that contains an OAuth token and
38           verifier. This user will paste this URL at the prompt, and
39           flickr_upload will save the resulting credentials in
40           "~/.flickroauth.st".
41
42       --title <title>
43           Title to use on all the images. Optional.
44
45       --description <description>
46           Description to use on all the images. Optional.
47
48       --public <0|1>
49           Override the default "is_public" access control. Optional.
50
51       --friend <0|1>
52           Override the default "is_friend" access control. Optional.
53
54       --family <0|1>
55           Override the default "is_family" access control. Optional.
56
57       --tag <tag>
58           Images are tagged with "tag". Multiple "--tag" options can be
59           given, or you can just put them all into a single space-separated
60           list. If you want to define a tag with spaces, the quotes have to
61           be part of the tag itself.  The following works in bash:
62
63             flickr_upload --tag='"tag one"' --tag='"tag two"' image.jpg
64
65       --reverse
66           Reverse the list of supplied images. Useful when uploading contents
67           of directory with sorted filenames. Following example will upload
68           the last glob expanded file as first and vice versa. The last file
69           will appear first in target photo stream.
70
71             flickr_upload --reverse *.jpg
72
73       --set <NAME>
74           After successfully uploading all photos, create a new set named
75           "NAME", and add the photos into the set. One (random) photo will be
76           the set's thumbnail.
77
78       --option key=value
79           Flickr periodically adds new features to the uploading API, and
80           these are almost always implemented as new key/value pairs. Rather
81           than waiting for a new Flickr::Upload release, you can specify any
82           of the upload API's optional arguments using "--option".
83
84             flick_upload --option content_type=1 --tag='cats' two_cats.jpg
85
86           You may also use "--option" rather than flickr_upload's command-
87           line options:
88
89             flickr_upload --option is_public=1 --option title='cats' two_cats.jpg
90
91           While Flickr may add new options at any time (see
92           <https://www.flickr.com/services/api/upload.api.html> for the most
93           up-to-date list), currently known options include:
94
95           --option safety_level=<1|2|3>
96               Override the default "safety_level" notation.  Set to 1 for
97               Safe, 2 for Moderate, or 3 for Restricted.  Refer to
98               <https://www.flickr.com/help/filters/>.
99
100           --option content_type=<1|2|3>
101               Override the default "content_type" notation.  Set to 1 for
102               Photo, 2 for Screenshot, or 3 for Art/Illustration.  Refer to
103               <https://www.flickr.com/help/filters/>.
104
105           --option hidden=<1|2>
106               Override the default "hidden" notation.  Set to 1 to keep the
107               photo in global search results, 2 to hide from public earches.
108
109           Note that options unknown to Flickr will result in undefined
110           behaviour.
111
112       --check
113           Checks the authentication token via the flickr.auth.checkToken API
114           call.  This can be used to verify API keys and credentials without
115           trying to upload an image. The output is the raw results of the API
116           call.
117
118       --progress, --no-progress
119           Display a progress bar for each upload with Term::ProgressBar. That
120           optional module will have to be installed on the system.
121
122           The default is not to display a progress bar. That can be changed
123           in the configuration file:
124
125               echo progress=1 >~/.flickrrc
126
127       --report, --no-report
128           Report the status of each upload ticket after uploading the batch
129           via Flickr::Upload's check_upload method. On by default. Checking
130           the status can be canceled by pressing ctrl-C.
131
132           The default is to display a report after each upload. That can be
133           changed in the configuration file:
134
135               echo report=0 >~/.flickrrc
136
137       --key <api_key>
138       --secret <secret>
139           Your own API key and secret. This is useful if you want to use
140           flickr_upload in auth mode as a token generator. You need both
141           "key" and "secret". Both "key" and "secret" can be placed in
142           "~/.flickrrc", allowing to mix flickr_upload with your own scripts
143           using the same API key and authentication token. Getting your own
144           API key and secret is encouraged if you're tying flickr_upload to
145           some automated process.
146
147           Note that if you do get an authentication token against your own
148           API key and secret, you'll need to specify the key and secret along
149           with the token when uploading images. The default flickr_upload API
150           key and token won't work in that case.
151
152       <photos...>
153           List of photos to upload. Uploading stops as soon as a failure is
154           detected during the upload. The script exit code will indicate the
155           number of images on the command line that were not uploaded. For
156           each uploaded image, a Flickr URL will be generated. flickr_upload
157           uses asynchronous uploading so while the image is usually
158           transferred fairly quickly, it might take a while before it's
159           actually available to users. flickr_upload will wait around for
160           that to complete, but be aware that delays of upwards of thirty
161           minutes have (rarely) been know to occur.
162

EXAMPLES

164       First, you need to get an authentication token. This is a requirement
165       driven by how Flickr manages third-party applications:
166
167          cpb@earth:~$ flickr_upload --auth
168               1. Enter the following URL into your browser
169
170               https://www.flickr.com/services/auth?api_sig=<...>&frob=<...>&perms=write&api_key=<...>
171
172               2. Follow the instructions on the web page
173               3. Hit <Enter> when finished.
174               Your authentication token for this application is
175               <token>
176
177       Unless you like typing long numbers on the command-line, you should
178       keep the "<token"> somewhere handy, like a configuration file:
179
180          echo auth_token=<token> >~/.flickrrc
181
182       Uploading a bunch of images is then as easy as:
183
184          flickr_upload --tag 'dog' 'kernel in a window.jpg' 'sad in sunbeam.jpg'
185

CONFIGURATION

187       To avoid having to remember authentication tokens and such (or have
188       them show up in the process table listings), default values will be
189       read from "$HOME/.flickrrc" if it exists. Any field defined there can,
190       of course, be overridden on the command line. For example:
191
192               # my config at $HOME/.flickrrc
193               auth_token=334455
194               is_public=0
195               is_friend=1
196               is_family=1
197
198       Note, however, that these defaults override the defaults you've
199       assigned in your Flickr profile. You may want to do all that stuff in
200       one place.
201

BUGS

203       Error handling could be better.
204

AUTHORS

206       Christophe Beauregard, cpb@cpan.org.
207
208       Ævar Arnfjörð Bjarmason, <avar@cpan.org>.
209

SEE ALSO

211       flickr.com
212
213       Flickr::Upload
214
215       <https://www.flickr.com/services/api/>
216
217       <https://www.flickr.com/help/filters/>
218
219
220
221perl v5.30.0                      2019-07-26                  FLICKR_UPLOAD(1)
Impressum