I wrote flickr_email because I couldn't find a way to notify friends and family members that new (private) pictures had been posted to my Flickr.
Install the dependencies with pip or easy_install:
Clone the project: git clone http://www.github.com/paour/flickr_email
-
Create a new app on Flickr
-
Run
python flickr_email.py
once without arguments, which will create a file calledstate.ini
-
Edit
state.ini
to provide your API_KEY and API_SECRET -
To add a user
- Run
python flickr_email.py --user_add
, which provides a URL - Open the URL (you can send it to another user), and authorize the app, this will provide a result containing an oauth_verifier
- Run
python flickr_email.py --user_auth_verifier <oauth_verifier>
to finalize authorizing the user
- Run
-
You can also use an interactive authorization system or use an existing old (pre-OAuth) token (but be warned Flickr will then disable that token for other apps), see the help for more info
-
Edit
state.ini
and set thesmtp_from
andsmtp_to
parameters (if you're not using the local sendmail, you can set thesmtp_server
,smtp_port
,smtp_tls
,smtp_user
andsmtp_password
);smtp_to
,smtp_cc
andsmtp_bcc
are comma-separated lists of bare email addresses -
You can customize the
email.jinja2
file, which is a Jinga2 template and receives theuser_photos
(a dict of username: flickr.photos.recentlyUpdated associations),user_photos_by_taken
(sorted by capture date rather than latest update) andusers
(a dict of username: flickr.people.getInfo associations)
- Just run
python flickr_email.py
to cause emails to be sent; on first run, it will select photos from the last day and on subsequent runs, new photos since the last run (deletelast_date
instate.ini
to reset)
docker run paour/flickr_email -v config:/app/config