Hey You! If you like this app, write a comment and suggest how it can be improved.
In my quest to become a more effective worker and husband, I have been paying a lot of attention lately to websites like David Allen’s Getting Thing Done (for workflow management), LifeHacker (tips and tricks), and more recently Quantified Self. The latter is a gathering point for lifelogging enthusiasts.
One primary task of lifelogging is to capture data about oneself and one’s surroundings as:
- detailed as possible
- often as possible
- easily as possible.
The first two are fairly easy for me, with dual backgrounds in physiographic research (trained to make detailed, reliable, repeatable, meaningful statistical measures) and web application development (heck, we can log interesting things as often as we want with cellular, PHP, MySQL, and statistical software like R/SPSS/SAS). The third– ease of capturing data– is very difficult to get right for a busy guy like me.
This post details my first attempt at automating screenshot capture and saving it to a private online archive. The idea is to be able to run all sorts of analyses on what I see each day through a primary lens of my life: my laptop and my mobile phone screens. With screenshots, we can run activity-by-time analyses by comparing the number of pixels that differ between successive shots. We can run color psychology analyses: is there an effect on my happiness/productivity/other quality-of-life measures based on what I see? We can run OCR on each screenshot and do a semantic content analysis at the word/phrase/sentence/paragraph/corpus levels of what I see/read all day, and how that evolves over time, and how it correlates to other aspects of my life.
And so forth.
But it must be effortless– if any of the logging requires intervention from me, it just won’t work. I am too busy to mess with lifelogging on a continuous basis. Luckily, OSX provides a handy little tool called Automator that you can use to, well, automate routine tasks like taking a screenshot, giving it a meaningful timestamp name, and uploading it to an archive for safekeeping and later analyses. The bonus to this approach is that it won’t suck up hard drive space on my machine. Each screenshot is only about 300K (as a .png image file), but that adds up fast if you’re taking one every second, minute, or even hour.
Here’s how I automate lifelogging screenshots:
Have a web host with unlimited disk storage and bandwidth. I use
DreamHost (yep, that’s a referral link). They’re super inexpensive these days.
Open Automator. It looks like this in OSX Mountain Lion:
Choose the Application type of document. That way, you can set it to run in the background whenever your computer starts.
Add a Pause action to the empty right hand pane. I start with a pause to give the computer time to finish starting up and me time to log onto my usual home work or mobile network. The pause also allows a sensible interval between screenshots so that I’m not uploading gigs of images everyday (that’s not necessary with long term statistical analyses) or creating images faster than I can upload them.
Now, add a Run Shell Script action and fill it in with the following text, like so:
The first line just sets up what shell we’re using to run this script (bash, in this case. Linux folks, don’t hate! 🙂 )
The tmp=$… line asks our little app to create a temporary .png file with a unique filename.
The screencapture line actually takes the shot (silently, using the -x) and writes it to our temporary image file
The Filename=… line designates that we want the filename for the image to be a YEAR-MONTH-DAY_HOURS:MINUTES:SECONDS.png timestamp. Very useful for later sorting and analyses.
Then we FTP into our webserver. Replace my.website.name.com with the appropriate URL to your FTP site.
Replace CreationEngine with your FTP username and replace MyTopSecretPassword with your FTP password.
We select binary transfer mode to send the image.
The cd screencaptureSubdirectory line moves us to the remote folder we have created previously to store the images (now’s a good time to make it before you run this program!). IMPORTANT: cd to a folder that is NOT web-accessible. You’re creating a profoundly personal and private log of your daily activity with this… don’t share it. Seriously.
We upload the file with the put… line.
Then we disconnect and destroy the local version of the screenshot so it doesn’t eat up our hard drive.
Then we add a Loop action to the Automator workflow:
I set it to loop 999 times automatically, without waiting for user input.
Good, now save this Automator workflow as an application. Make sure to choose file format: Application. Save it wherever you like. Now is a good time to hit the play button in Automator to verify that your shell script is successfully screenshotting, renaming, and uploading your desktop.
Now, set the application to launch whenever your computer starts. Go to the Apple Menu –> System Preferences… –> Users & Groups control panel.
Click the Login Items button at the top of the right pane to reveal a list of all the stuff that starts up when your computer does. Then click the “+” button at the bottom of the list and add your app. Above, mine is called AutomatedScreenshotUploader. Check the box to the left of your app once it is added to hide it from regular use. Apparently you’ll still see the spinning gear icon in your OSX menubar. I’m going to try to hide that later, as it is annoying.
Restart your computer to test that it works— after sufficient time has passed, you should be able to FTP into your server and see screenshots:
And, you’re done!
Note on the classic monomyth: use this app for good, never for evil.
Note on performance: On my late 2010 MacBook Pro, this eats about four and a half percent of my cpu to run in the background. Overkill? Totally. I’ll keep looking for a more efficient route.
Note on Reliability: I have no idea how well this will handle getting on/offline, VPNs, all sorts of other considerations. If you know of a way to improve this, please share with me and everyone else in the comments, below.
Related
Don’t even think about buying thoughts about You –
Tube and Twitter. Mega sites, alternatively, are perfect for Ad
– Sense. People soon stumbled on realize that getting listed inside online directories could lead to an increased search results ranking, plus they begun to exploit that.
Set a tiny goal to begin to reduce water retention and lose excess excess fat.
However, also take into account to speak with a health
professional or possibly a doctor before attempting out this diet.
Chubby cheeks, dark under eye circles and double chins can be the results
of lack of exercise and not eating a nicely balanced diet.
http://www.volleyballonlinebet.com/Volleyball betting bonus
However, these websites lack their individual support,
and usually involve higher rates of interest than unions.
Also visit my webpage – car loans bad credit no down payment uk –
Ruby,
She started a similar line of renewals and needed financing out in the second division.
Here is my web site – how to buy a car with bad credit and No money down
Our wish is always just pretend the loan never occurred and to mend the camaraderie.
Here is my site car loan for bad credit private seller (Aaron)
I just could not go away your website before suggesting that
I really enjoyed the usual info a person provide to your guests?
Is going to be again frequently in order to check ouut new
posts
The very first point Supercell revealed in the infamous release of preview prior to the update were
level 5 dragons.
Feel free to visit my site; Losmejorescontenidos.Com
You wish to have other passions to count on. Be wary of just how much time you spend playing
video games, as it can come to be addictive.
Here is my web blog :: http://www.sadosomalia.org
Clash of Clans Hack console is now getting even more tries
to retry submittion of injection; up to 999
efforts!
Also visit my blog post – accc.tresor.gouv.ci
Although, as Clash of Clans features in-app acquisitions, you should
hold your horses if you do not want to pay.
Also visit my weblog ascentcycle.com; Indira,
Additionally watch out for titles from workshops that are known forever patching and assistance.
Feel free to visit my website – webdesignfarm.com.au (Alfonso)
If you are interested in pc gaming, or you have a family member that is, this write-up will
certainly work to you.
Look into my web-site :: http://www.klostertorvet.dk
However, take into consideration that more recent
models are likely to come out soon. It may be worth it to offer the aged ones and also hesitate.
My homepage – http://uac.bru.ac.th/
Party games make social gatherings a blast.
Take a look at my web page grandvoyage.dn.ua (Benny)
Clash of Clans has actually been continuously
progressing to offer more straightforward, consistent and also fun on-line experiences for
Supercell players.
Here is my website … officedesires.co.ke (Yong)
Know the indications of dependency and keep
an eye out for them!
My blog post http://www.victoriapark.com.au
When you take these short breaks, you will begin to discover just how much far better you play
the video games.
Also visit my blog :: http://www.Univoz.Com.Br
Exactly what you assumed was a fairly un-risky video game can transform
a whole lot worse with among these mods.
Also visit my blog post … nmcinteriordesign.co.za
(Buddy)
Terrific article! This is tthe type of info that should be shared across the internet.
Disgrace on the search engines for not positioning
this puut up higher! Come on over and talk over with my website
. Thanks =)
From new account with fundamental resources provided by Supercell,
to optimal hackable amount from our Clash of Clans make
use of.
Feel free to visit my web blog: http://www.jeremyroy.fr
Clash of Clans is a signed up trademark of Supercell Oy. Xi’an Chuangteng Network & Innovation Co.
Ltd.
My homepage :: http://Www.Bktz.Com.Ua
On Facebook, Clash of Clans has more than 12 million fans while on Twitter it has 887,000.
my web-site :: http://www.bibliotekaw4.cba.pl
Since you think they’re all blood and also gore, do not just create off video clip games!
Stop by my web-site; http://www.endemol.co.za
Every customer in Garage Door Repair Cleveland OH (vid.me), OH
will certainly experience fair, truthful as well aas impartial workmanship.
He has provided fans a wonderful 7 min summary of the brand-new Clash
of Clans functions.
Stop by my blog post … http://Creckmodeling.chem.polimi.it/?option=com_k2&view=itemlist&Task=user&id=384214
Which wouldn’t take pleasure in a few hours spent combating
satanic forces and vampires or saving their kingdom of gold?
Look at my website: http://rr-hh.es/?option=com_k2&view=itemlist&task=user&id=344721
Ensure you make sure when doing this. Don’t download from shady websites which could give
you an infection.
Also visit my blog post http://Www.Itlangas.Lt
This piece of writing will help the internet people for
setting up new webpage or even a weblog from start to end.
It’s the healthy thing to do.
Here is my web-site – http://www.eiabc.edu.et
No one plays video games to shed!
Feel free to surf to my website http://www.lexposia-advertising.com
Don’t buy video games that do not offer you the alternative of shutting
off conversation. Ask a salesman or do some on the internet research study to be certain.
My web-site … http://www.evropskiuniverzitet-brcko.com
Although, as Clash of Clans includes in-app acquisitions, you have to be patient if you don’t
want to pay.
My web-site :: yishangclass.com.cn (Collin)
Attempt playing the video game for a while before you get
rip off codes.
My blog: http://www.profumeriamarisa.it
It’s remarkable to go to see this web page and reading the views of all friends on the topic of this post,
while I am also keen oof getting familiarity.
This is serious – work your distribute!
My web blog 3rdsector.org
It’s truly very complex in this busy life to
listen news on TV, thus I just use world wide web
for that purpose, and take the newest information.