autosnap: automatically take pictures of yourself
This is a self-documentation, post-privacy, psychology and art project by @scy.
The code here contains the scripts and tools I used to let several of my devices (laptops, mobile phones, tablets) shoot photos of myself in regular intervals. These photos were then uploaded to The Cloud™.
What does it do?
- Automatically shoots photos of myself.
- Automatically uploads these photos to a private Dropbox folder.
- Automatically renames and archives these photos to a private Google Drive folder.
- Automatically puts all photos of the current day into a shared Dropbox folder.
In short: As an experiment. How does it feel to have photos taken everywhere you are, even in the bathroom. And to show these photos to people, without first selecting which ones to show. You never know what gets photographed.
Long story: Read my talk description, but it’s in German only.
Since March 2013, I am no longer developing or maintaining autosnap, as my experiment has ended. It was an interesting experience, and if I find the time, I’ll possibly write something about it.
I may support you if you have questions, issues and, most importantly, are interested in becoming the new maintainer of this project, but I don’t feel obliged to. If I don’t feel like solving your problem or helping you out, you’re on your own. Sorry, but I have other things to do.
What do I need?
autosnap is flexible. Feel free to implement your own methods and maybe send me patches. But please note that autosnap is no longer actively maintained or under development. If you want to take over the project, contact me.
What you most definitely need: Something that shoots photos of yourself. The code currently supports Android devices running Tasker and FolderSync (both are paid apps) as well as Macs running imagesnap and Linux boxes with fswebcam or mplayer.
The scripts simply put files into folders or take them from there, all the cloud stuff is done by third party software: FolderSync or the Dropbox or Google Drive clients.
Basic folder structure
I use Dropbox for incoming photos and Google Drive for permanent archival, but you can use only one of them, if you want to. In fact, autosnap doesn’t depend on cloud storage at all, so if you want to sync via some other method, feel free to do that. autosnap simply stores in files, all the cloud syncing happens outside of it.
* Google Drive/ * autosnap/ * 2012/ (one folder for each year) * 10/ (one folder for each month) * 31/ (one folder for each day) * 2012-10-31_23-50-00_autosnap_crys.jpg * (more files named YYYY-MM-DD_hh-mm-ss_autosnap_devicename.jpg) * Dropbox/ * autosnap/ * incoming/ (where incoming files go to) * today/ (the shared folder that contains today’s files)
In the following examples,
$HOME/autosnap always means the directory where this repository is checked out to.
The maintenance machine
The maintenance machine should optimally be running 24/7. It takes the photos from the incoming folder, renames them, puts them into the correct output folder and maintains the “today” folder.
On my Mac mini, the following cron did that:
* * * * * "$HOME/autosnap/run-autosnap-maintenance.sh" "$HOME/Dropbox/autosnap" "$HOME/Google Drive/autosnap" > /tmp/autosnap.log 2>&1
Parameters are the input directory (
/incoming will be appended) and, if you want to, an output directory (the
YYYY/MM/DD subdirectories will be created there). Else, the input directory is used as output directory as well (which works fine, because input will be in
incoming and output in the date-based directories).
A Mac/Linux laptop
*/10 * * * * "$HOME/autosnap/autosnap.sh" "$HOME/Dropbox/autosnap/incoming" >/dev/null 2>&1
The parameter is the directory where the files should be put in.
An Android mobile phone or tablet
The tasker script is included in this repository as
- Install FolderSync and Tasker.
- For convenience, put
autosnap.tsk.xmlinto whatever you’re going to let your phone (or tablet) push the images to, for example the Dropbox
- Start FolderSync and, in the “Accounts” section, add your Dropbox or whatever account.
- Use the FolderSync file manager to locate and open the
autosnap.tsk.xmlfile with Tasker. You should now have an “autosnap” task in Tasker.
- In Tasker, customize the task. Edit step 6 (“Take Photo”) and choose the right camera (“Front”, I guess), resolution (you can browse for supported ones) and set the filename to
devicenameis a unique name for the device you’re on. The rest of the settings (chronological naming, don’t insert in gallery, discreet) should already be set correctly.
- In Tasker’s “Profile” section, create a new profile that actually triggers autosnap. Choose a name and use Event/Display/Display On as the triggering event. Then, select “autosnap” as the task to run. That’s it.
- In FolderSync, get to the “Folder Pairs” section and create a new one for your Dropbox (or whatever) account. The remote folder is
/autosnap/incoming, if you follow my setup. The local folder would be something like
/storage/sdcard0/DCIM/Tasker. Type of sync is “to remote folder”. You don't need scheduled syncing, instead select automatic sync and “move source files”. Select whether you only want to sync on WiFi, or on mobile data connections as well.
- Switch your display off and on again. Tasker should take a photo and FolderSync should upload it moments later.
(Disclaimer: I didn’t test these steps on a new machine. Also, my FolderSync talks German, I’m not sure whether I got the setting names right.)
What do all the files do?
- autosnap.sh: Takes a photo and puts it into the output directory defined as its first parameter (or
$HOME/Dropbox/autosnap/incomingif you didn’t specify anything). Run this from your crontab.
- run-autosnap-maintenance.sh: Runs the renamer, mover and rsyncer in the right order and with the right parameters. See “The maintenance machine” above for usage.
- autosnap-renamer.sh: Tasker’s datestamped file names aren’t the best and not even consistent, so this script does some cleanup on the file name in the directory passed in the
- autosnap-mover.sh: Moves the files in
$AUTOSNAPMVFROMto date-based subdirectories in
- autosnap-rsyncer.sh: Copies the files in today’s date-based subfolder of
$AUTOSNAPRSYNCFROMover to the
$AUTOSNAPRSYNCTOfolder using rsync. It uses the
--delflag; everything in the target directory will be deleted!
If you need more information, the code isn’t too hard to read. Alternatively, ask a question, file an issue or send a pull request.
- When Tasker takes a photo, your device may become unresponsive for about three seconds. Also, the system volume may be set to mute, video playback can stop, full-screen apps can exit full-screen mode and, most importantly, the on-screen keyboard can close.