WeatherCat > WeatherCat Integration

WeatherCat Scripts of 2013-12-01

(1/18) > >>

elagache:
Dear WeatherCat AppleScript fans,

NOTICE: The current version of ASTwitterLibrary used in WC Twitter Uploader is not working correctly and cannot authenticate new installations of the script.  Unfortunately the problem can only be solved by the author of ASTwitterLibrary and thus far, he has not been successful.  So until further notice, WC Twitter Uploader is only useable for for existing users.  For more information on the problem, see this thread on the WeatherCat forum:

http://athena.trixology.com/index.php?topic=1157.0

I have completed my latest update to my collection of AppleScripts for WeatherCat.  You can download the latest and greatest here:

http://www.canebas.org/WeatherCat/AppleScripts/WeatherCat%20Scripts%202013-12-01.zip

This release mainly provides expanded support for uploading text to Twitter and is a much more extensive modification than anything done in quite a while.  So upgrading is more messy.  Your old preference files for the following scripts WC Temperature Falling, WC Temperature Rising, WC Twitter Uploader, and WC Zambretti Forecaster will need to be modified because there are new configuration variables associated with the upgrade.

In addition, there are three new AppleScripts: WC Webtext Twitter which is template, and two examples of that template: WC Day Summary Twitter and WC Forecast Twitter.  These are basically little stubs that use new routines in the WC Script tools.scpt to pass strings from any AppleScript to WC Twitter Uploader.  In addition to periodically reporting current conditions, WC Twitter Uploader will collect all strings passed to it, and upload them to Twitter once a minute. 

WC Webtext Twitter has a very interesting feature of allowing to you create a WeatherCat web template containing any text that you can generate with WeatherCat tags and have them uploaded to Twitter.  The WC Forecast Twitter uploads the Davis (or others) forecast to Twitter.  WC Day Summary Twitter  generates a summary of the days weather and uploads that to Twitter.  The WeatherCat web templates do to that are also included in the new distribution along with two utility droplets: UNIX Path to Clipboard and HFS Path to Clipboard.  UNIX Path to Clipboard allows you to drag and drop a file onto it and it will paste the complete UNIX path of that file.  The analogous script: HFS Path to Clipboard does the same for the HFS (OS-9) file path format.  There is documentation for all these changes.  If you want to make your own custom scripts based on WC Webtext Twitter definitely go through the documentation on that before proceeding.

In case you haven't surmised this by now, this is a complex and potentially tricky upgrade.  If you have no interest in Twitter beyond what's already supported, don't bother upgrading.  If you decide to take this one - take care!  It it likely to be troublesome!

Cheers, Edouard  [cheers1]

P.S. Here the full release notes:


--- Quote ---December  1, 2013:

* Changed preference variable updateTime in WC Twitter Uploader from specifying the number of seconds between current weather conditions updates to the number of minutes between such updates.
* Added a handler to  WC Twitter Uploader allowing it to process strings from any other AppleScript as Twitter uploads.  The strings are queued up and then processed once a minute by  WC Twitter Uploader.
* Added two additional handlers to the WC Script tools library to simply uploading arbitrary strings to Twitter.  The forwardTwitterString handler can be used to send strings for upload.  The forwardFileTextToTwitter handler opens up a text file and extracts the string for uploading.  This is intended for uploading WeatherCat templates after processing.
* Added support to WC Zambretti Forecaster to optionally upload forecasts to Twitter.  This is controlled by the preference variable: useTwitter.
* Added support to WC Temperature Falling and WC Temperature Rising to optionally upload forecasts to Twitter.  This is controlled by the preference variable: useTwitter.  In addition added an additional preference variable: stationName, which can be used to assign a name to the report of a temperature exceeding a threshold.
* Created a prototype AppleScript: WC Webtext Twitter intended for modification into various user-created tools to upload WeatherCat templates to Twitter.  This AppleScript is intended to be refashioned as the two examples: WC Day Summary Twitter and WC Forecast Twitter have been.
* Created two examples of out to upload WeatherCat web template text to Twitter.  WC Forecast Twitter uses the Forecast text twit.txt WeatherCat web template to upload the forecast generated by the Davis Vantage Pro-2 station.  WC Day Summary Twitter uses the Daily summary text twit.txt WeatherCat web template to upload a summary of the preceding days conditions to Twitter.
* Created two utility AppleScripts to assist in creating customized versions of the WC Webtext Twitter AppleScript and related chores.  UNIX Path to Clipboard allows you to drag and drop a file onto it and it will paste the complete UNIX path of that file.  The analogous script: HFS Path to Clipboard does the same for the old HFS (OS-9) file format used by other AppleScripts like WC ET Reporter.
--- End quote ---

Steve:
Edouard and AppleScript experimenters,

As Edouard noted, I'd been testing the latest iteration of the Twitter script early last week and all was working fine. Then I went away for four days and found that things were not working so fine after all...

I'm only getting one Twitter post after I launch the Twitter Uploader script, and then nothing. I haven't had time to take out my modifications to see if something I've done caused toe problem, but I'll get to that soon.

I just thought I'd update with my results before too many folks swapped for the new version. Edouard has been running them fine on Snow Leopard for weeks, and I'm on Mavericks, so that might be some of the problem.

Steve

elagache:
Hi Steve and WeatherCat Scripters,


--- Quote from: Steve on December 02, 2013, 10:53:08 PM ---I'm only getting one Twitter post after I launch the Twitter Uploader script, and then nothing. I haven't had time to take out my modifications to see if something I've done caused toe problem, but I'll get to that soon.

--- End quote ---

If you have been doing a little hackin' of your own, one possibility is that the J.C. Computing library files were deleted through some sort of mysterious process that I don't understand myself, but appears to be defense against people trying to modify other people's code.  You need to have these two files: ASObject.scpt and ASTwitterLibrary.scpt in the Scripts folder of the resource bundle that comes with the WC Twitter Uploader application.  If they are missing you could just grab the files from the distribution and put them back using the instructions that you'll find in the WC Twitter Uploader documentation (complete with helpful screenshots.)

Sorry, I wish there was a way to avoid this, but I sure don't know of it!

Cheers, Edouard  [cheers1]

Steve:
Edouard,

That happened to be the first thing I checked. I remembered that problem from when you were first developing the scripts. Last evening I went into Time Machine and replaced my entire WeatherCat Scripts folder with the one from November 25, and I'm back to working OK for the every two hour posts. I'll start swapping in bits from a new download of the December 1 package and see if it continues working OK.

Steve

elagache:
Hi Steve and WeatherCat AppleScript fans,

Hmm, I'm not sure why things would be any different for the December 1 distribution over what I sent you back in November.  I've "improved" my packaging scheme so that I use the "live" files running on my computer.  I just copy the AppleScripts and then replace my preferences with the default set.  So WC Twitter Uploader should be the same AppleScript I sent you earlier.  Please do keep me posted.  If anybody else has problems also let me know!

Cheers, Edouard  [cheers1]

Navigation

[0] Message Index

[#] Next page

Go to full version