Instant perl project! I ended up writing a piece of code that, after 2 rounds of modifications, ran two processes, one to take a picture every nth interval of time, and the other to clean up. The pictures were stored in a tree such that every 24 hours, it would loop back and overwrite the previous day's pics, but the cleanup process was used to insure that all old pics really were removed. This was necessary since it used the sleep() command and it wasn't guaranteed to take exactly 5 pictures per minute every minute.
It's been sitting idly waiting for more work, though. I'd like to modify it so it's not as intense on the webcam server end. It may also have to do with the webcam software, which I don't have much control over. In the end, though, it's a pretty cool little script since you can specify what server you want to hit, so if there's a webcam out on the web that spits out a live feed, but only a single frame per hit on the server, this will let you effectively build a 24 hour period archive.
Oh yeah, if you tell it to stop, as in 'wackyass.pl stop' at the command line, it will kill the archiving process, and within the next minute (whenever the cleanup process wakes up) it will do last minute cleanup and then kill that process.
I guess if you want to have something to do, like I do sometimes, find a stupid little pet project to work on. Look for the smallest necessity, and then take it to a grand level. I know next time I am actually looking for work, I'm going to use that script to demonstrate what my code is like.
ALL HAIL BRAK!!!
In reply to RE: Where do your code ideas come from?
by PsychoSpunk
in thread Where do your code ideas come from?
by Macphisto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |