FLICKR_UPLOAD(1p)
π FLICKR_UPLOAD(1p) π
okay bestie, buckle up β this is flickr_upload, straight out of the User Contributed Perl Documentation section of the manual. she's a whole vibe and she uploads ur pics. let's go β¨
πΈ NAME πΈ
flickr_upload β upload photos to flickr.com. that's it. that's the job. she does it in batches and she does it beautifully. π
π¦ SYNOPSIS π¦
flickr_upload [--auth] --auth_token <auth_token> [--title <title>]
[--description description] [--public <0|1>] [--friend <0|1>]
[--family <0|1>] [--tag <tag>] [--option key=value] [--progress]
<photos...>
π DESCRIPTION π
Batch image uploader for the Flickr.com service. she takes ur photos, she sends them to the cloud, she comes back with URLs. iconic behavior fr fr π
also!! flickr_upload may also be useful for generating authentication tokens against other API keys/secrets β like, if you wanna embed them in scripts? yeah. she's flexible like that. π
β¨ OPTIONS β¨
--authβ this flag makesflickr_uploadgenerate an authentication token against its API key and secret (or, if you're feeling fancy, your own specific key and secret). the catch: you need a browser handy so you can cut and paste a url. yes, cut and paste, we're living in the past a little, it's fine. π«Ά the resulting token should be stashed somewhere like~/.flickrrc, because you literally need it to actually upload images. no token, no pics. periodt.--auth_token <auth_token>β the authentication token. you must get one using--authbefore you can upload images. no shortcuts bestie. see the EXAMPLES section below. π--oauthβ interactively perform OAuth authorization with Flickr. the user gets a URL to visit at Flickr whereFlickr::Uploadmust be granted write permissions. after granting permission, you'll get redirected to a dummy URL that contains an OAuth token and verifier. you paste that URL at the prompt, andflickr_uploadsaves the resulting credentials in~/.flickroauth.st. slay. π--title <title>β title to use on all the images. optional. β--description <description>β description to use on all the images. optional. π--public <0|1>β override the defaultis_publicaccess control. optional. π--friend <0|1>β override the defaultis_friendaccess control. optional. π«--family <0|1>β override the defaultis_familyaccess control. optional. π--tag <tag>β images get tagged withtag. you can hand over multiple--tagoptions, or just dump them all into a single space-separated list. if you want a tag with spaces in it, the quotes have to be part of the tag itself. this works in bash:
flickr_upload --tag='"tag one"' --tag='"tag two"' image.jpg
π·οΈ
--reverseβ reverse the list of supplied images. super useful when uploading the contents of a directory with sorted filenames. the following example will upload the last glob-expanded file first and vice versa. so the last file appears first in your target photo stream. π«
flickr_upload --reverse *.jpg
--set <NAME>β after successfully uploading all photos, create a new set namedNAME, and add the photos into the set. one (random) photo will be the set's thumbnail. random thumbnail? main character energy, honestly. π--option key=valueβ Flickr periodically adds new features to the uploading API, and these are almost always implemented as new key/value pairs. instead of waiting around for a newFlickr::Uploadrelease, you can specify any of the upload API's optional arguments using--option.
flick_upload --option content_type=1 --tag='cats' two_cats.jpg
you may also use --option instead of flickr_upload's command-line options:
flickr_upload --option is_public=1 --option title='cats' two_cats.jpg
while Flickr may add new options at any time (peep <https://www.flickr.com/services/api/upload.api.html> for the most up-to-date list), currently known options include:
--option safety_level=<1|2|3>β override the defaultsafety_levelnotation. set to 1 for Safe, 2 for Moderate, or 3 for Restricted. refer to <https://www.flickr.com/help/filters/>. π--option content_type=<1|2|3>β override the defaultcontent_typenotation. set to 1 for Photo, 2 for Screenshot, or 3 for Art/Illustration. refer to <https://www.flickr.com/help/filters/>. πΌοΈ--option hidden=<1|2>β override the defaulthiddennotation. set to 1 to keep the photo in global search results, 2 to hide from public earches. π
note that options unknown to Flickr will result in undefined behaviour. no cap. π
--checkβ checks the authentication token via theflickr.auth.checkTokenAPI call. this is how you verify API keys and credentials without trying to upload an image. the output is the raw results of the API call. raw and unfiltered, we love that. π--progress,--no-progressβ display a progress bar for each upload withTerm::ProgressBar. that optional module will have to be installed on the system. the default is not to display a progress bar. you can change that in the configuration file:
echo progress=1 >~/.flickrrc
π
--report,--no-reportβ report the status of each upload ticket after uploading the batch viaFlickr::Upload'scheck_uploadmethod. on by default. checking the status can be canceled by pressing ctrl-C. the default is to display a report after each upload. you can change that in the configuration file:
echo report=0 >~/.flickrrc
ποΈ
--key <api_key>--secret <secret>β your own API key and secret. useful if you wanna useflickr_uploadin auth mode as a token generator. you need bothkeyandsecret. bothkeyandsecretcan be placed in~/.flickrrc, which lets you mixflickr_uploadwith your own scripts using the same API key and authentication token. getting your own API key and secret is encouraged if you're tyingflickr_uploadto some automated process. π
heads up bestie: if you do get an authentication token against your own API key and secret, you'll need to specify the key and secret along with the token when uploading images. the default flickr_upload API key and token won't work in that case. π
<photos...>β list of photos to upload. uploading stops as soon as a failure is detected during the upload. the script exit code will indicate the number of images on the command line that were not uploaded. for each uploaded image, a Flickr URL will be generated.flickr_uploaduses asynchronous uploading, so while the image is usually transferred fairly quickly, it might take a while before it's actually available to users.flickr_uploadwill wait around for that to complete, but be aware that delays of upwards of thirty minutes have (rarely) been known to occur. π thirty. minutes. we wait. patiently. π°οΈ
π EXAMPLES π
first, you need to get an authentication token. this is a requirement driven by how Flickr manages third-party applications:
cpb@earth:~$ flickr_upload --auth
1. Enter the following URL into your browser
https://www.flickr.com/services/auth?api_sig=<...>&frob=<...>&perms=write&api_key=<...>
2. Follow the instructions on the web page
3. Hit <Enter> when finished.
Your authentication token for this application is
<token>
unless you like typing long numbers on the command-line, you should keep the <token> somewhere handy, like a configuration file:
echo auth_token=<token> >~/.flickrrc
uploading a bunch of images is then as easy as:
flickr_upload --tag 'dog' 'kernel in a window.jpg' 'sad in sunbeam.jpg'
look at her go. πΆπͺβοΈ
π CONFIGURATION π
to avoid having to remember authentication tokens and such (or have them show up in the process table listings π), default values will be read from $HOME/.flickrrc if it exists. any field defined there can, of course, be overridden on the command line. for example:
# my config at $HOME/.flickrrc
auth_token=334455
is_public=0
is_friend=1
is_family=1
note, however, that these defaults override the defaults you've assigned in your Flickr profile. you may want to do all that stuff in one place. pick a lane, bestie. π
π BUGS π
error handling could be better. that's it. that's the bug report. she said it herself. π
π«Ά AUTHORS π«Ά
Christophe Beauregard, cpb@cpan.org.
Γvar ArnfjΓΆrΓ° Bjarmason, <avar@cpan.org>.
legends, both of them. π
π SEE ALSO π
- flickr.com
Flickr::Upload- <https://www.flickr.com/services/api/>
- <https://www.flickr.com/help/filters/>
and that's the whole page, bestie!! this lil beauty ships with perl v5.34.0 and she was last touched on 2022-06-14 β and honestly? she still ate. π β¨ go forth and upload, you've got this. π¦πΈπ
π¦ where this page comes from
- debian bookworm: libflickr-upload-perl 1.60-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libflickr-upload-perl 1.60-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libflickr-upload-perl 1.60-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libflickr-upload-perl 1.60-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libflickr-upload-perl 1.60-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms