Hi Ken and WeatherCat
schemin' scripters,
I finally got a chance to try working with the web pages but I have some questions.
I have run a test and see the data I want but don't know how to get it to a text file so I can import into Numbers. How do I do this?
I also can't seem to find out when templates are run by WC. Can't figure out how to run just before midnight.
Answers to these questions might get me to where I want to be.
Okay, this is a midge more complicated than it might look from the outside. First WeatherCat takes templates that are put in one folder, processes them to substitute data for web tags and places the result file in another folder with exactly the same name. So you need to put your templates in one folder and specify which folder WeatherCat is supposed to put the results into.
You configure all this in the custom web preference pane. That is also where you can set how often WeatherCat generates all these files.
I think it would help you to read the documentation that comes with my SeaMonkey web templates that you can download here:
http://www.canebas.org/WeatherCat/Web%20templates/WeatherCat%20SeaMonkey%20web%20template%20(0.5.2).zipAs to grabbing the data so that you can input it into numbers, that requires another strategy.
The easiest way to do this is to use a simple UNIX command:
cat today-data-file.txt >> cumulative-data-file.txtThe trouble is that you need the complete UNIX paths to both files for this to work. Once you have that, you need to make it into a little shell command.
In this case all you would need is this tiny UNIX shell command file:
#!/bin/bash
cat today-data-file.txt >> cumulative-data-file.txt
You would need to save this file someplace and make it executable. Instructions on how to do this can be found here:
http://ss64.com/osx/syntax-shellscript.htmlThe final trick is to have this tiny UNIX shell script run just before midnight. The easiest way to do that is to create a UNIX
cron job. Thankfully, this can be done with a nice OS-X front end called CronniX.
http://code.google.com/p/cronnix/You could then schedule the little UNIX shell script to run just before midnight and everything would be in place.
Unfortunately, this solution is a very UNIX intensive and therefore not the most user-friendly way to do it. Another way to do try might be to use AppleScript, but I think it wouldn't be any simpler. I don't know of anything that has a nice OS-X feel to it that will also you manipulate files like this. However, perhaps another forum member does.
At least this is a start. You can explore and see where it takes you!
Cheers, Edouard
![Cheers [cheers1]](https://athena.trixology.com/Smileys/default/food-smiley-004.gif)
P.S. You might look at the latest version of my WeatherCat AppleScripts for ideas:
http://athena.trixology.com/index.php?topic=1039.0