How to Take a photo with bash!
1) install fswebcam
sudo apt-get install fswebcam -y
2) install dropbox uploader
sudo git clone https://github.com/andreafabrizi/Dropbox-Uploader/
cd Dropbox-Uploader
chmod 777 *.*
3) setup dropbox uploader
./dropbox_uploader.sh info
Follow on screen instructions
4) create the capture file and uploader
sudo nano cam.sh
put the following in the file
#!/bin/sh
filename=$(date +"%m-%d-%y|||%H%M%S")
fswebcam -r 356x292 -d /dev/video0 $filename.jpg
./dropbox_uploader.sh upload $filename.jpg
5) save and exit and then chmod 777 cam.sh
6) type ./camsh and then check dropbox and your done.
cd Dropbox-Uploader
chmod 777 *.*
3) setup dropbox uploader
./dropbox_uploader.sh info
Follow on screen instructions
4) create the capture file and uploader
sudo nano cam.sh
put the following in the file
#!/bin/sh
filename=$(date +"%m-%d-%y|||%H%M%S")
fswebcam -r 356x292 -d /dev/video0 $filename.jpg
./dropbox_uploader.sh upload $filename.jpg
5) save and exit and then chmod 777 cam.sh
6) type ./camsh and then check dropbox and your done.
No comments:
Post a Comment