-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
81 lines (57 loc) · 2.81 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
http://www.flickr.com/photos/thwarted/sets/72157623777255069/
https://github.com/thwarted/picsofourlives
These scripts take pictures from your webcam when certain events are detected.
Requirements:
bash
mplayer
a working v4l2 compatible webcam (test with the bin/cam-view script)
Optional:
netpbm (to work around camera warmup time)
There are scripts to detect different actions:
bin/watch-for-screensaver
if you use xscreensaver, this will take a picture at some random time
within a minute after the screensaver is deactivated. This way it almost
guarantees that you'll be at the computer when a picture is taken.
bin/watch-for-gnome-screensaver
integrates with dbus to receive events from gnome-screensaver, same as
above.
bin/watch-for-quake
this script attempts to take a picture every five minutes if it sees a
connection in netstat to quakelive.com's XMPP server. This XMPP
connection seems to be active all the time when quakelive is running.
I'm trying to see if I can capture any good facial expressions while I'm
playing (all I've found so far is that I barely move and am always in the
same position when playing).
You can put more scripts in bin named watch-for-foo and they will be started
by the control script. Send me additional scripts for other events; pull
requests on github are welcome.
Control with
ctlwatchers start
ctlwatchers stop
ctlwatchers status
ctlwatchers restart
ctlwatchers start-if-not-running
The watch-for-* scripts will spawn bin/take-picture to actually take the
picture and they will be placed in the same dir that ctlwatchers exists,
unless you set PICSOFOURLIVES_DESTDIR to a directory name.
The image files will be named
YYYY-MM-DD HH:MM:SS.png
YYYY-MM-DD HH:MM:SS (extra text).png
where the latter form is used if bin/take-picture is passed arguments to be the
"extra text".
I usually start it manually when I first login, but you can put something like
the following in your crontab:
*/5 * * * * PICSOFOURLIVES_DESTDIR=/target/dir /home/user/picsofourlives/ctlwatchers start-if-not-running > /dev/null 2>&1
which will attempt to start it every 5 minutes.
My process is:
- start it when logging in
- every once and a while, check the directory for new images (it's a shortcut
in my Places menu)
- open kflickr using the desktop icon in the directory
- drag the ones I want to upload, select the flickr set to upload to
- move the ones I've uploaded into pics-transfered
- move other ones I didn't upload but that I want to keep into pics-extra
I don't upload every picture taken automatically because sometimes they come
out crappy (blurry because of movement) and because I deactivate my
screensaver dozens of times a day and I really only want to make two or three
at most available from each day.