This script reads JPEG files in a directory and uploads them to Flickr.
- JPEGs are expected to have a Vernon ID before the underscore, i.e.
70152_001.jpg
- Uses the Auckland Museum API to get record data, using the ID from the filename.
- Logs to
flickrUpload.log
This project uses sybrenstuvel's flickrapi Python interface to the Flickr API.
Install pip dependencies:
pip install -r requirements.txt
Set up a Flickr App, and copy the key and secret into a .env
file. The script will look here to obtain the credentials.
Your .env
file should look like this, with <key>
and <secret>
replaced by the actual values:
FLICKR_KEY = "<key>"
FLICKR_SECRET = "<secret>"
Your access token will be stored in the local folder .flickr
. Be sure you don't upload this folder or your .env
file to a public repository.
python flickrUpload.py