Last active
August 29, 2015 14:05
-
-
Save dardo82/9f8bbf0e94c699ab12a0 to your computer and use it in GitHub Desktop.
Italian speaking clock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>EnableGlobbing</key> | |
<true/> | |
<key>Label</key> | |
<string>it.dardo82.TellTheTime</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Library/Application Support/Tell The Time/ttt.sh</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>StartCalendarInterval</key> | |
<array> | |
<dict> | |
<key>Minute</key> | |
<integer>0</integer> | |
</dict> | |
<dict> | |
<key>Minute</key> | |
<integer>15</integer> | |
</dict> | |
<dict> | |
<key>Minute</key> | |
<integer>30</integer> | |
</dict> | |
<dict> | |
<key>Minute</key> | |
<integer>45</integer> | |
</dict> | |
</array> | |
</dict> | |
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
H=$(date +%H) | |
M=$(date +%M) | |
case ${M#0} in | |
0) M="in punto";; | |
15) M="e un quarto";; | |
30) M="e mezzo";; | |
45) M="meno un quarto"; H=$[H+1];; | |
*) M="e ${M#0}";; | |
esac | |
case ${H#0} in | |
1|13) H="é l'una";; | |
0|24) H="é mezzanotte";; | |
12) H="é mezzogiorno";; | |
*) H="sono le $[H%12]";; | |
esac | |
say "[[volm 0.5]] $H $M" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To download and install execute these commands:
mkdir "
/Library/Application Support/Tell The Time/"/Library/Application Support/Tell The Time/"cd "
curl -s -o ttt.tgz https://gist.github.com/dardo82/9f8bbf0e94c699ab12a0/download
tar --strip-components 1 -zxvf ttt.tgz; rm ttt.tgz
mv it.dardo82.TellTheTime.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/it.dardo82.TellTheTime.plist