There is also something else you can do--btw, thanks for the script Travis.

You can do a basic time and date check by taking the line I will place below and putting it in /usr/bin with a name like a (the letter a). However, it will sound a bit funny with digits zero through nine, so I'll show a line below that which I use for those times. The reason I haven't put these together into one file is that I'm just using them with cron to get a time announcement more frequently than the one in date and time; However, they could be put together into one file with conditions. also, if you want to try different formats, read the info page for date and strftime. If you make a file with one of these lines and place it in /usr/bin, be sure to then do chmod +x /usr/bin/a (or whatever you name it) so it will be executable. After that, just go to terminal and type the name of the file (the letter a in my case) and enter and the time will be announced. For me it's faster than finding an applescript and clicking on it sometimes. By putting it in /usr/bin you are left only to type the name and enter and not the path to get it to work.



Basic line for saying "the time is now" and the time:

date +"The time is now %l %M %p" | say


Better format for single-digit times:

date +"The time is now %l:%M %p" | say

Makes on the hour sound better:

date +"The time is now %l %p" | say


Put in the -v option with your voice if you want other than the default voice. You can also get chime sounds from a debian package called grandfatherclock and put them in files with the darwinports package qtplay (using the -q option) and set them up in crontab to have Westminister sound chimes or sounds from "Close encounters of a third kind" at quarter hour, half hour, and/or hour.






--
Cheryl
"Where your treasure is,
there will your heart be also".



Reply via email to