Get text from sourceforge, unzip it and, as root, make install. This puts three files in /usr/local/bin: cwmm, cwpcm and cwtext. Chmod them to 777.
Write a shell script to get and save the current time to a file:
#!/bin/bash date "+%H:%M" > /home/paul/current_projects/Morse_Clock/time.txt
Save it as /home/$user/current_projects/Morse_Clock/get_time
Chmod to 777.
Set up a cron job to run get_time once a minute. I used webmin because I am not familiar with the vim editor that the usual crontab -e invokes.
Once a minute, get_time will run and overwrite time.txt file with the current time in hh:mm format.
To announce the time in Morse Code, set up the following script:
#!/bin/bash cat /home/paul/current_projects/Morse_Clock/time.txt | cwpcm -w 50 -f 1200 > /dev/dsp
Save as /opt/Morse_time and chmod 777.
Add /opt to path.
Now by running Morse_time at the command line, the computer internal speaker will announce the time in Morse.
Photo by TPG13