-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsaa.sh
63 lines (50 loc) · 931 Bytes
/
saa.sh
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
#!/bin/bash
#set -vx
# Hardware: Modified keyboard for inputs, & Camera
#
# Software: streamer --from xawtv, and imagemagic
#
# Objective: capture frames and assemble an animation
#
#keys are P5T6
i=0
mkdir ~/Desktop/ani
bgin(){
i=0
cd ~/Desktop/ani
rm *.jpeg
rm *.jpeg
}
capture(){
cd ~/Desktop/ani
streamer -c /dev/video0 -s 800x600 -o outfile$i.jpeg
let i++
}
play(){
cd ~/Desktop/ani
M=$(date).gif
convert -delay 20 -loop 0 *.jpeg $M
rm *.jpeg
((sleep 10 && killall animate)&); animate -loop 0 $M
}
send(){
mv $M ~/Desktop/ani/server
echo "Your Image is at: http://server$M"
}
while true; do
#clear
echo "s = capture, w = start over, a= play, d = send"
read -rsn1 input
if [ "$input" = "t" ]; then
play
elif [ "$input" = "5" ]; then
capture
elif [ "$input" = "p" ]; then
send
elif [ "$input" = "6" ]; then
bgin
else
echo "something went wrong: $input"
exit
fi
done