![]() ![]() Check the “Automatically Launch at Login” checkbox and close the GeekTool app (but, select the option not to close the Geeklets after the app quits)Ĩ. To the right of the command field, click the “…” button (it’s black and hard to see) and paste your API key after “APIKey=”. In the Properties window, look for the field labelled “Command:”. Then, open the GeekTool application and select the “WaniKaniAPIRequest” Geeklet on your Desktop (it’s the big empty rectangle you should see the name at the top of the Properties window).Ħ. Go to, scroll down, and copy your API key. Double Click every one of the ten *.glet files in the WaniKaniGeekTool folder you just downloaded and click YES each time you are asked if you would like to run the Geeklet.ĥ. Unzip the archive, and move the folder called “WKGeekToolResources” to /Users/Shared/ (If you can’t figure out how to get there, open a Finder window and hold down shift + command + G then, paste “/Users/Shared/” and click Go)Ĥ. Download my GeekTool scripts (version 2.0): ģ. Install GeekTool: (If you aren’t running OS X 10.6 or later, you can download an older version here: )Ģ. Luckily for you, I’ve already taken care of most of the work so you should be able to reproduce the above setup fairly easily.ġ. It is extremely versatile, though perhaps not terribly intuitive if you are unfamiliar with shell scripting. ![]() You can replace any of the PNG files in the zip with your own, and the PSD and AI files for the current set can be downloaded here.For those not familiar with it, GeekTool is a mac application that allows users to display all kinds of information right on the Desktop. I didn’t build this feature in because there are too many variables in the way people would use it, but hopefully someone will pick it up and provide options for that kind of feature. ![]() Then reset the $mycity value immediately after the localization file loads in the main script. The method he uses also returns a CountryAbbreviation field that you can use to load files ending with _EN, _DE, etc. Once you’ve set up the various localized settings files, use a function such as Jay posted to dynamically set the localization_file variable. ![]() With a little creative effort, you can make switching between locations automatic. You could also just hardcode an array of locations for the $mycity variable and select them via the argument. You can duplicate the same localization file multiple times to get multiple cities without changing languages, as long as the function sets the proper file. That file contains its own configuration settings, so by adding just one command line argument that tells it which file to use, each Geeklet could have a different city, langauge and additional configuration. You could use command line arguments to set the localization file used. I didn’t build them in, but if you (or someone you know) knows just a little Ruby, it would be easy to implement them. There are a couple of other things you could add to this script. Include your name and a link for attribution. If you build a new translation file, please send it to me for inclusion in the package. Any strings left blank will default to the original English translation. Then edit the empty strings in the file and optionally change the time format in the last function. To edit a localization file, copy the main weather_localization.rb to a new file with a country code extension (e.g. Polish: Joanna Kamrowska & Sebastian Szwac.Translator credits for localizations include: If you remove the localization file load from the main script, it will function as it used to. Then edit the main script ( weatherparser.rb) to set a localization file, and edit your settings in that localization file. There are sample Geeklet files included, just modify the path to match yours. Just download the package below and put it all in a folder to be referenced from GeekTool. Each localized file has its own copy of the main settings that will override what’s in the primary config. You can maintain as many localized settings as you need, and only change the name of the file to load in the main script. It uses two files now, the main script and a localized file, both in the same folder. It comes with Spanish, German, Dutch, Japanese and French. The GeekTool Weather and Forecast script has been updated to handle multiple languages and with a system that allows for more languages to be added easily. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |