Moshe Wagner who wrote the Zmanim GUI notified me in August that that he created a command line interface for zmanim using my Zmanim API. The technical approach of using reflection was similar to the way I used reflection in the Zmanim Clock Applet, but he took it to new heights. Sample use of accessing zmanim using his CLI interface is:
moshe@debian:~/Desktop$ java -jar ZmanimCLI.jar sunrise 6:10:28
moshe@debian:~/Desktop$ java -jar ZmanimCLI.jar --date 2010/08/12 tzais72 20:38:15
moshe@debian:~/Desktop$ java -jar ZmanimCLI.jar Usage: ZmanimCLI [options] [Time] Options: -d --date <yyyy/mm/dd> Set date. (Year first!) -lat --latitude <latitude> Set location's latitude -lon --longitude <longitude> Set location's longitude -e --elevation <elevation> Set location's elevation; Positive only -tz --timezone <timezone> Set location's TimeZone Help: -h --help Show this help -stl --time-list Show common available times to display -ftl --full-time-list Show all available times to display -tzl --timezone-list Show available timezones Example: ZmanimCLI --latitude 31.7780 --longitude 35.235149 --elevation 600 --timezone Israel Sunrise Will show the sunrise time today in Jerusalem
While your first reaction may be that it is interesting in a theoretical geeky way, but has no practical value, I will quote Moshe’s explanation as to why it is useful:
Why is this useful? Well, first of all it was a nice experiment. But mainly, you can now use Zmanim (although externally), via any language you want, no longer being tied to Java.
Months later, Moshe actually put this to practical use in his C++ based Luach project. This Luach (similar to the known Kaluach) uses the Qt framework. utilizing libhdate for the date stuff (something not offered by the Zmanim API, and the topic of a future Zmanim API FAQ), displaying zmanim using the Zmanim API via CLI for the zmanim calculations. While you would expect such an approach to be slow, using the Luach seemed almost instantaneous. I will post more about his Luach program (recently reviewed at KosherDev.com) at some point in the future.