![]() |
2013-06-12
, 09:51
|
Posts: 1,431 |
Thanked: 2,630 times |
Joined on Jan 2011
@ Touring
|
#2
|
![]() |
2013-06-12
, 10:08
|
Posts: 167 |
Thanked: 204 times |
Joined on Jul 2010
|
#3
|
![]() |
2013-06-12
, 10:37
|
|
Posts: 6,453 |
Thanked: 20,983 times |
Joined on Sep 2012
@ UK
|
#4
|
![]() |
2013-06-12
, 10:57
|
Posts: 167 |
Thanked: 204 times |
Joined on Jul 2010
|
#5
|
maemo:~# cat /usr/bin/camwatch #!/bin/bash WATCH_PATH="/media/mmc1/DCIM" FILENAMES="*.jpg" WATCH_COUNT=0 COUNTER=0 declare -i WATCH_COUNT; declare -i COUNTER; inotifywait -m --format '%f' -e close_write $WATCH_PATH | while read FILE do WATCH_COUNT=$WATCH_COUNT+1; COUNTER=$(ls -1 $WATCH_PATH/$FILENAMES | wc -l); NEWEST=$(ls -t1 $WATCH_PATH | head -n 1); echo "$COUNTER $NEWEST"; done
#!/bin/bash WATCH_PATH="/media/mmc1/DCIM" FILENAMES="*.jpg" WATCH_COUNT=0 declare -i WATCH_COUNT; inotifywait -m --format '%f' -e close_write $WATCH_PATH | while read FILE do WATCH_COUNT=$WATCH_COUNT+1; NEWEST=$(ls -t1 $WATCH_PATH | head -n 1); curl -T $WATCH_PATH/$NEWEST http://<user:pass>@files.memotoo.com/webFolder/DCIM/; echo "uploaded $WATCH_PATH/$NEWEST"; done
![]() |
2013-06-12
, 13:35
|
Posts: 167 |
Thanked: 204 times |
Joined on Jul 2010
|
#6
|
![]() |
2013-06-12
, 14:17
|
Posts: 1,808 |
Thanked: 4,272 times |
Joined on Feb 2011
@ Germany
|
#7
|
WATCH=/home/user/MyDocs/DCIM CLOUD=user@remote.host:/path/ inotifywait --monitor -e close_write --format "%w" $WATCH |\ while read file do echo (dbg) added $file, synchronizing.. # convert/mogrify to make a smaller version? rsync -avz $WATCH $CLOUD done
The Following 4 Users Say Thank You to reinob For This Useful Post: | ||
![]() |
2013-06-12
, 14:51
|
|
Posts: 5,028 |
Thanked: 8,613 times |
Joined on Mar 2011
|
#8
|
![]() |
2013-06-12
, 15:29
|
Posts: 167 |
Thanked: 204 times |
Joined on Jul 2010
|
#9
|
![]() |
2013-06-12
, 15:31
|
|
Posts: 889 |
Thanked: 2,087 times |
Joined on Sep 2010
@ Manchester
|
#10
|
![]() |
Tags |
inotify, interlace image |
|
Lately, our awesome contributor Copernicus (of Pierogi's fame) become real tornado master, and entered unbeliveable whirlwind of development. He is throwing new pasta applications at AK-47 rate, including (but not limited too) an all-purpose Torch and LED manipulation tool, which Lanterne:
http://talk.maemo.org/showthread.php?t=90229
...which does everything that is possible with N900's leds and more (like morse code text interpreter for sending!), or all-purpose audio and conversation recording tool, Orecchiette (currently heavy in development, alpha stage):
http://talk.maemo.org/showthread.php?t=90398
Still, Copernicus is eager for more, and asked users of his applications about ideas for usefull (and doable in less than lifetime
Actual background:
Amongst many things, I'm volounteering as activist, "fighting" against law-breaking corporations and, sometimes, corrupt or abusive members of uniformed services. Often, it requires taking proof-photos, and *very* often I'm risking losing device/sd card with proofs, to corporate security personnel or folks like that. Even worse, sometimes, I need to skip photo'ing some very important thing, in order to keep all material gathered to that point in safety.
Now, there are those wifi SD cards, which - in pair with closed source, windoze receiver software - automatically transfer photos to other machine, as soon as they're made. But, range of such card is pathetic, usable only in studios (if wifi coverage is good enough), and are not working with mobile connection.
Why not make our irreplaceable N900 even much better tool?
Idea:
Program, that would run when camera application is active (wrapper around camera-ui? It needs to live only when camera lives, to avoid power wasting), and monitor pre-defined folder. As soon as new file (photo) appears in that folder, it would automagically send it through internet, via pre-defined method (e-mail for good start, more advanced usage could be pre-defined ftp server. We already have at least 2 FOSS ftp clients for Maemo, that could be utilized, or lend necessary source code), of course utilising network access (most likely, gprs, but no reasons, why it shouldn't work via wifi too).
Thos would make life *much* easier, not only for activists - it could be utilized by "average joe" too, allowing to take pictures of high-size (for example RAW and JPG bundle from cssu'ish camera-ui, or fCam, or even vanilla camera-ui photos at highest settings), without risk of getting out of available space (custom option to delete file after successful sending?).
Just wild idea - I think it should be doable by someone who know how to watch for camera-related dbus events.
/Estel
// Edit
Also see:
http://talk.maemo.org/showthread.php?p=1351537
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
Last edited by Estel; 2013-06-13 at 08:56.