buzzard
Group: Members
Posts: 34
Joined: Jan. 2007 |
|
Posted: May 20 2007,01:27 |
|
Quote (beakmyn @ May 16 2007,08:46) | So, I'm looking into ways to make my digital picture frame 'parent' friendly. I'd like to ultimately have it so that "mom or dad" could take the memory card out of their camera and plug it into a USB SD adapter and DSL would magically mount the device, search it for jpegs and copy those jpegs to a pre-defined directory.
So far I know I probably need something like automount or similar and a some way for automount to call a script that copies the files off the drive to my picture drive.
There is something for that other OS http://www.dps.uk.com/freeware_transferer.htm
in case you can't figure out what I'm trying to do. My version will not have a gui.
Since the copy operation would be in a script I could add aplay to play a "Files copied" wav to indicate the copy process was finished or maybe kill feh and start it back up pointing to a "finished" jpeg then timeout after 5 seconds.
But, that's all bells and whistles right now I'm trying to iron out the automgacial mount, copy, unmount part.
So is my idea far fetched or is there something that already does this that I can wedge into DSL? |
Just a possibility here.....
The BASH script (looping.sh):
#!/bin/sh while true; do mount /dev/sda1 /mnt/hd && cp /mnt/hd/* /mnt/hda1 sleep 3 umount /mnt/hd && beep sleep 15; done;
the beep file (beep.c) compile it using tcc:
main() { printf("%c",7); }
Have looping.sh start in your bootlocal.sh maybe? (with & after it) might have to tweak the dir names... It should keep going, even when no usb thing inserted, just declaring "Oh, theres nothing there" over and over, until someone inserts one.
I haven't actually tested looping.sh but beep.c will beep (note the &&... it should only beep if it loaded some files... hopefully.)
Oh, and when it beeps, you must remove the USB thing within 15 seconds.
|