Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ 1 [2] >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Help with thinking through this, Insert USB Device -> mount -> copy *.jpg< Next Oldest | Next Newest >
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: May 16 2007,18:51 QUOTE

I don't see any reason to put it on a cron job, since it would probably consume more resources that way. The script sleeps for 10 seconds between each run anyway, so it's essentially the same result from running fewer processes.

--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
beakmyn Offline





Group: Members
Posts: 63
Joined: Sep. 2004
Posted: May 17 2007,12:34 QUOTE

Quote (mikshaw @ May 16 2007,14:51)
I don't see any reason to put it on a cron job, since it would probably consume more resources that way. The script sleeps for 10 seconds between each run anyway, so it's essentially the same result from running fewer processes.


Hopefully I'll have time to work on this, this weekend. I'll let you know how it turns out.
Ah, I didn't realize the sleep statement is seconds. I'm used to it being milliseconds. That makes sense then.


--------------
Have you seen my Damn Small Digital Picture frame?
http://www.frontiernet.net/~pictureframe
http://rapidshare.com/files/27769266/pframedsl.iso.html
http://www.joyceandkevin.com/dslpictureframe/pframedsl.rar
Back to top
Profile PM WEB AOL MSN YIM 
buzzard Offline





Group: Members
Posts: 34
Joined: Jan. 2007
Posted: May 20 2007,01:27 QUOTE

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.

:p
Back to top
Profile PM WEB YIM 
7 replies since May 16 2007,12:46 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ 1 [2] >/
reply to topic new topic new poll
Quick Reply: Help with thinking through this

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code