PasTim wrote: 
> That hasn't changed the current low or forecast High/Low temps from F to
> C.  I've done %f to %F and %z to %Z. The forward values at %_5 and so on
> do not seem to be defined on the player settings page.  I guessed that
> %_5 and %_7 should be %_6 and %_8 for centigrade, and I guessed right. 
> Are these values documented anywhere?

Unfortunately it is not documented on the either of the settings pages. 
Greg had not done it in the original SDT plugin and I have tackled it
since I've been supporting the plugin because the HTML is kind of a
hassle to edit.  I'll consider it adding better documentation in a
future release.

In the meantime I've pasted the 2 subroutines from the plugin.pm file
that stiff the data into the macro variables.  They are pretty easy to
read to figure out what variables give you what data.

Current data:

Code:
--------------------
    
  sub replaceMacros {
  my $string = shift;
  my $client = shift;
  
  for ($string) {
  #Replace custom macros from other plugins. Do custom before default in case 
overriding
  for my $key ( keys %macroHash ) {
  $string =~ s/$key/$macroHash{$key}/;
  }       
  
  my $date = $client->longDateF();
  s/%2/$date/;
  
  s/%t/$wetData{'temperatureF'}°/;
  s/%T/$wetData{'temperatureC'}°/;
  s/%h/$wetData{'humidity'}/;
  s/%p/$wetData{'pressureIN'}$wetData{'pressureT'}/;
  s/%P/$wetData{'pressureMB'}$wetData{'pressureT'}/;
  s/%d/$wetData{'dewpointF'}°/;
  s/%D/$wetData{'dewpointC'}°/;
  s/%f/$wetData{'feelslikeF'}°/;
  s/%F/$wetData{'feelslikeC'}°/;
  s/%w/$wetData{'windspeed_mh'}/;
  s/%W/$wetData{'windspeed_kh'}/;
  s/%q/$wetData{'windspeed_kth'}/;
  s/%Q/$wetData{'windspeed_ms'}/;     
  s/%u/$wetData{'UVindexNum'}/;
  s/%U/$wetData{'UVindexTxt'}/;
  s/%b/$wetData{'rain'}/;
  s/%B/$wetData{'snow'}/;
  
  #Wunderground
  s/%e/$wetData{'wu_temperatureF'}°/;
  s/%r/$wetData{'wu_temperatureFr'}°/;
  s/%E/$wetData{'wu_temperatureC'}°/;
  s/%R/$wetData{'wu_temperatureCr'}°/;
  s/%H/$wetData{'wu_humidity'}/;
  s/%l/$wetData{'wu_pressureIN'}/;
  s/%L/$wetData{'wu_pressureMB'}/;
  s/%m/$wetData{'wu_dewpointF'}°/;
  s/%M/$wetData{'wu_dewpointC'}°/;
  s/%j/$wetData{'wu_windspeed_mh'}/;
  s/%J/$wetData{'wu_windspeed_kh'}/;
  s/%k/$wetData{'wu_windspeed_kth'}/;
  s/%K/$wetData{'wu_windspeed_ms'}/;      
  }
  
  return $string;
  }
  
--------------------



Other period data including 10day:

Code:
--------------------
    
  sub replaceMacrosPer {
  my $string  = shift;
  my $location = shift;
  my $client = shift;
  
  $string = replaceMacros($string, $client);
  
  for ($string) {
  s/%a/$wetData{$location}{'average_F'}°/;
  s/%A/$wetData{$location}{'average_C'}°/;
  s/%c/$wetData{$location}{'record_F'}°/;
  s/%C/$wetData{$location}{'record_C'}°/;
  s/%g/$wetData{$location}{'record_year'}/;
  s/%s/$wetData{$location}{'sunrise'}/;
  s/%S/$wetData{$location}{'sunset'}/;
  
  s/%z/$wetData{$location}{'forecastType'} 
$wetData{$location}{'forecastTempF'}°/;
  s/%Z/$wetData{$location}{'forecastType'} 
$wetData{$location}{'forecastTempC'}°/;
  s/%!z/$wetData{$location}{'forecastTempF'}/;
  s/%!Z/$wetData{$location}{'forecastTempC'}/;
  s/Low/ Low/;
  
  s/%x/$wetData{$location}{'forecastPrec'}/;
  
  s/%y/$wetData{$location}{'forecastTOD'}/;
  s/%v/$wetData{$location}{'skyCondition'}/;
  
  #10day stuff
  s/%_3/$wetData{$location}{'day'}/;
  s/%!_3/$wetData{$location}{'shortday'}/;
  s/%_4/$wetData{$location}{'date'}/;
  s/%_5/$wetData{$location}{'highF'}°/;
  s/%_6/$wetData{$location}{'highC'}°/;
  s/%_7/$wetData{$location}{'lowF'}°/;
  s/%_8/$wetData{$location}{'lowC'}°/;
  s/%_9/$wetData{$location}{'precip'}/;
  s/%_0/$wetData{$location}{'condition'}/;
  }       
  
  return $string;
  }
  
--------------------


In addition to ten day (d1-d10) the following periods are also
availble:

Code:
--------------------
    
  #   Period defintions
  #   Period  Day                 Night
  #   ------  -----------------   --------------
  #   -1      Current             Current         
  #    0      Today               Tonight         
  #    1      Tonight             Tomorrow        
  #    2      Tomorrow            Tomorrow Night  
  #    3      Tomorrow Night      N/A
  
--------------------


------------------------------------------------------------------------
BoomX2's Profile: http://forums.slimdevices.com/member.php?userid=33529
View this thread: http://forums.slimdevices.com/showthread.php?t=68269

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to