Author Topic: Scripting in ImageSalsa  (Read 4612 times)

0 Members and 1 Guest are viewing this topic.

Offline PSJohn

  • Senior Contributor
  • ****
  • Posts: 158
    • DesertWeather.com
Scripting in ImageSalsa
« on: September 15, 2008, 04:40:31 AM »
Has anyone gotten the forecast script to put forecast data from VWS and then display in ImageSalsa? How does one set this up?

ImageSalsa.com has a sample script (http://www.imagesalsa.com/support.htm) that enables this but I can't figure out how to then display that data in ImageSalsa. I'm not proficient in VB Script so any help would be appreciated.
« Last Edit: September 15, 2008, 11:51:23 AM by PSJohn »
John Slama
Palm Springs, California
Davis Vantage Pro 2, FARS

Offline DataCrunchTech

  • Data Crunch Technologies
  • Moderator
  • Member
  • *****
  • Posts: 14
  • Developer of ImageSalsa and MovieSalsa
    • ImageSalsa Web Cam Software
Re: Scripting in ImageSalsa
« Reply #1 on: September 15, 2008, 11:54:52 PM »
John, did you mean the forecast from VWS or the forecast from the NWS? 

VWS has a forecast tag already in imagesalsa that generates the "Sunny", "Partly Cloudy", etc...

The NWS script was something that I worked on for a couple of weeks but I'm sure it still needs lots of help.  Basically, you need VWS to pull the NWS forecast (in text format).  Then the script munges on that file and generates a series of variables containing the parsed data.  Finally, your script modifies an existing canvas (both text and graphics items) to produce the forecast panel you are looking to achieve.

The parser is the part that will need the most time.  I found that the Sacramento NWS office would product predictable forecasts for awhile and then one day it would be different and I'd have to add more code to my parser.  I think it jsut depends on when folks in the NWS office take their vacation and someone fills in for them.  Gives you a strong appreciation for the big sites that have developed parsers for the entire country.

Jason
Jason
support@datacrunchtech.com


www.imagesalsa.com
Home of ImageSalsa and MovieSalsa

Offline PSJohn

  • Senior Contributor
  • ****
  • Posts: 158
    • DesertWeather.com
Re: Scripting in ImageSalsa
« Reply #2 on: September 16, 2008, 12:34:46 AM »
I do mean taking the NWS forecast that VWS produces. The way I understood the script was it pulls data from this txt file VWS produces. I wish I had the knowledge to get this working I would love to produce a forecast slide with ImageSalsa.

Thanks, I understand if you don't support these scripts and they need more work. If so I will find another solution.

John

Code: [Select]
<pre>

State:CA
Country:US
City:Thousand Palms
CityUnderscore:Thousand_Palms
TZName:America/Los_Angeles
TZOFFSET:-07
TZSTRING:PDT
Lat:33.81253052
Lon:-116.37657166
NEXRAD:SOX
RADREGION:d1

FORECAST:

Day:Mon
DayFull:Monday
High:110
Low:83
Conds:Clear
Icon:clear

Day:Tue
DayFull:Tuesday
High:101
Low:79
Conds:Partly Cloudy
Icon:partlycloudy

Day:Wed
DayFull:Wednesday
High:101
Low:79
Conds:Partly Cloudy
Icon:partlycloudy

Day:Thu
DayFull:Thursday
High:103
Low:76
Conds:Clear
Icon:clear

Day:Fri
DayFull:Friday
High:99
Low:76
Conds:Clear
Icon:clear

METAR:
Station:KPSP
City:Palm Springs
Lat:33.83000183
Lon:-116.51000214
State:California
Date:1221533580
TZOFFSET:-07
TZSTRING:PDT
TempF:96
DewpointF:42
Humidity:15%
Wind:5
WindGust:-9999
WindDir:SSE
Pressure:29.78
ConditionsFull:Clear
ConditionsLang:Clear
Icon:clear
FlightRule:VFR
Ceiling:Unlimited
METAR:METAR KPSP 160253Z AUTO 16004KT 10SM CLR 36/06 A2980 RMK AO2 SLP085 T03560056 53009

</pre>
<!-- 0.437:0 -->
John Slama
Palm Springs, California
Davis Vantage Pro 2, FARS

Offline DataCrunchTech

  • Data Crunch Technologies
  • Moderator
  • Member
  • *****
  • Posts: 14
  • Developer of ImageSalsa and MovieSalsa
    • ImageSalsa Web Cam Software
Re: Scripting in ImageSalsa
« Reply #3 on: September 17, 2008, 11:07:29 AM »
John, this looks like a fairly easy script modification.  Do you know if the lines are constant (i.e. line XYZ is always the first "DayFull" field?)  If so, we can create a script that provides tags such as <lineXXXfield> and <lineXXXvalue> that could be used to pick out any line and its contents.
Jason
support@datacrunchtech.com


www.imagesalsa.com
Home of ImageSalsa and MovieSalsa

Offline PSJohn

  • Senior Contributor
  • ****
  • Posts: 158
    • DesertWeather.com
Re: Scripting in ImageSalsa
« Reply #4 on: September 19, 2008, 03:12:17 AM »
Hi Jason, I found your NewTags script and am able to use the VWS "station 1" forecast tag, and it works perfectly.

Thanks
John Slama
Palm Springs, California
Davis Vantage Pro 2, FARS

Offline DataCrunchTech

  • Data Crunch Technologies
  • Moderator
  • Member
  • *****
  • Posts: 14
  • Developer of ImageSalsa and MovieSalsa
    • ImageSalsa Web Cam Software
Re: Scripting in ImageSalsa
« Reply #5 on: September 19, 2008, 10:44:17 PM »
Great!
Jason
support@datacrunchtech.com


www.imagesalsa.com
Home of ImageSalsa and MovieSalsa