Original version of TouchSelfie was based on the, now deprecated, PICASA web API. The Picasa Web API is discontinued since January 2019. This version of TouchSelfie handles the new API with the following conditions:
scripts/google_client_id.json
setup.py
script. For this, just use the Select Album
button and choose the <Create new>
entry. (If you prefer to upload your photos in your photos library instead of an album as your camera does, just select <No Album>
instead). Once your album is created, it will be populated with a random color square: don't remove it, otherwise this will delete the album)Open Source Photobooth forked and improved from wyolum/TouchSelfie
For hardware construction, see Make Magazine article
For a very nice How-To of how to set up your photobooth, don't miss the video below! Many thanks to Caroline Dunn for her great teaching skills.
# update system
sudo apt-get update
# Install ImageTk, Image from PIL
sudo apt-get install python-imaging
sudo apt-get install python-imaging-tk
# Install google data api and upgrade it
sudo apt-get install python-gdata
sudo pip install --upgrade google-api-python-client
sudo pip install --upgrade oauth2client
# Install ImageMagick for the 'Animation' mode
sudo apt-get install imagemagick
# Install CUPS for the Printing function(optional)
sudo apt-get install cups
sudo apt-get install python-cups
# Setting up CUPS/printer(optional)
https://www.techradar.com/how-to/computing/how-to-turn-the-raspberry-pi-into-a-wireless-printer-server-1312717
Test device:
Canon Selphy CP1300 with the Canon SELPHY CP900 - CUPS+Gutenprint v5.2.11 driver over USB
If google chrome is not on your system, the following might be necessary:
sudo apt-get install luakit
sudo update-alternatives --config x-www-browser
This is only needed if you plan to use the 'send email' or 'upload images to cloud' features of TouchSelfie. Here's an article that will help you creating a project and downloading its credentials
run setup.sh
script, this will:
photobooth.sh
launchersetup.sh
creates a configuration file scripts/configuration.json
, you can edit this file to change configuration parameters, such as:
Optionally you can change lower-level configuration options in the file scripts/constants.py
such as:
setup.sh
assistant will guide you through the configuration of the features you need (send_email, auto-upload) and will help you install the Google credentials.scripts/constants.py
to enable hardware buttons.PiCamera
builtin image effects for more creative snapshotsconstants.py
for customizations.Removed configuration button to avoid pranks
setup.sh
to setup credentials and setup Google Photo Albumconstants.py
snapshot display now supports animated gifs
Mail address logging available in configuration
command line arguments to enable/disable some features:
python user_interface.py --help
for a description of command line optionsThe Original TouchSelfie script used to store you google account and password in a .credentials
file.
Considering it was a security risk, I prefered to code an alternate email-sending procedure that wouldn't require your password to get things done.
This is achieved via OAuth2 mechanism that only requires that you accept (once) that this application can access to your email. This way is safer since there's no way for the application to do anything other than what you accepted it to do.
To simplify the setup process, the setup assistant points you to a google credentials download page where email authorization is enabled by default. You can change this.
If you configured TouchSelfie to not send emails, you don't need to authorize access to your mail box, just change this during the credentials download process. This way, the application will only require basic authorization to your account.
No, but don't take my word!
This is the beauty of opensource: everybody can read the source code and check if it's harmfull. Plus, with Github, you can't hide anything: every versions of this code is archived and I can't delete them: you will always be able to verify that I didn't do anything harmfull in the past.
Maybe you don't have the competency to verify the sourcecode, but others have and I trust they will alert the world if they find something nasty (or just file an Issue!).
Hint for future verifyiers: the scripts/oaut2services.py
contains all the code that accesses the Google Accounts. As you will see in the __init__
method of the OAuthServices
class, the only scope that is requested it the https://www.googleapis.com/auth/gmail.send
that restricts the permission of the application to only sending emails on your behalf. (See this official doc)
No, but again, don't take my word for it ;)
take a look at scripts/oauth2services.py
where all Google account access are done. In the __init__
method of the OAuthServices
class, the only scope(s) that are requested for the photo library are:
https://www.googleapis.com/auth/photoslibrary.appendonly
: can't browse for your photos or directorieshttps://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata
: can only access items created by this appSee official doc for the Google Photos API scopes.
Your Security and My Quota.
By retrieving yourself application credentials, you basically authorize yourself to access your own google account and you can revoke this whenever you want. Also, Application Credentials have a daily limit of free use, If I were to provide you my own credentials, a group of users would consume this quota in no time, leaving everybody with a bad experience.