It is currently May 26th, 2024, 1:56 pm

Weather plugin - Fahrenheit to Celsius

General topics related to Rainmeter.
x3minater
Posts: 3
Joined: May 9th, 2011, 3:39 pm

Weather plugin - Fahrenheit to Celsius

Post by x3minater »

Hi,

im trying to make this wealther plugin (not sure if thats how you guys call it) to show the temperature in the celsius scale.

This is a short part of the .ini file:

Code: Select all

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=3600
Url=#URL#
RegExp="(?siU)<weather ver="(.*)">(.*)<tmp>(.*)</tmp>(.*)<t>(.*)</t>(.*)<icon>(.*)</icon>(.*)<day d="1" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="2" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="3" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)"
StringIndex=1
 
[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=3
Im using a weather.com url
URL=http://xoap.weather.com/weather/local/#ZIP#?cc=*&dayf=6&link=xoap&prod=xoap&par=#partnerid#&key=#key#

What can i do to make it show Celsius instead of Fahrenheit?

Thanks in advance ;)
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Weather plugin - Fahrenheit to Celsius

Post by Seahorse »

I'm pretty sure all you need do is add this after the [Rainmeter] section if you don't have any defined variables.

Code: Select all

[Variables]

;F for Imperial, M for Metric
ImperialorMetric=m
Someone smarter than me will be along shortly if that's not right... :thumbup:
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

x3minater
Posts: 3
Joined: May 9th, 2011, 3:39 pm

Re: Weather plugin - Fahrenheit to Celsius

Post by x3minater »

Nope, that didn't do it =/

Maybe cuz im parsing the site information to a string. What i was looking for was a way to retrieve the Fahrenheit value alone and then convert it to Celsius and then put it back to the same string... dont know if thats possible (im quite new at rainmeter :oops: ).

Or any easier way :D
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather plugin - Fahrenheit to Celsius

Post by jsmorley »

If you add:

&unit=m

to the URL, it will return the information in metric, including Celsius, instead of imperial and Fahrenheit. (which would be &unit=f)

URL=http://xoap.weather.com/weather/local/#ZIP#?cc=*&dayf=6[b]&unit=m[/b]&link=xoap&prod=xoap&par=#partnerid#&key=#key#
x3minater
Posts: 3
Joined: May 9th, 2011, 3:39 pm

Re: Weather plugin - Fahrenheit to Celsius

Post by x3minater »

jsmorley wrote:If you add:

&unit=m

to the URL, it will return the information in metric, including Celsius, instead of imperial and Fahrenheit. (which would be &unit=f)

URL=http://xoap.weather.com/weather/local/#ZIP#?cc=*&dayf=6[b]&unit=m[/b]&link=xoap&prod=xoap&par=#partnerid#&key=#key#
It worked :D
Thanks a lot!
SABERWOLF
Posts: 21
Joined: April 29th, 2011, 6:34 pm

Re: Weather plugin - Fahrenheit to Celsius

Post by SABERWOLF »

jsmorley wrote:If you add:

&unit=m

to the URL, it will return the information in metric, including Celsius, instead of imperial and Fahrenheit. (which would be &unit=f)

URL=http://xoap.weather.com/weather/local/#ZIP#?cc=*&dayf=6[b]&unit=m[/b]&link=xoap&prod=xoap&par=#partnerid#&key=#key#
I am trying to do the opposite of what this guy is doing, I am trying to change my VCloud rain meter to Fahrenheit instead Celsius, how can I do that?
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather plugin - Fahrenheit to Celsius

Post by jsmorley »

Just use the same URL, but upside down...

#ʎǝʞ#=ʎǝʞ&#pıɹǝuʇɹɐd#=ɹɐd&dɐox=poɹd&dɐox=ʞuıן&ɯ=ʇıun&9=ɟʎɐp&*=ɔɔ¿#dız#/ןɐɔoן/ɹǝɥʇɐǝʍ/ɯoɔ˙ɹǝɥʇɐǝʍ˙dɐox//:dʇʇɥ=ןɹn
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather plugin - Fahrenheit to Celsius

Post by jsmorley »

Actually, since I have no idea what VCloud is doing, or what weather RSS it uses, or anything else about it, can you PLEASE help me to help you... What is the URL your skin is using now?
SABERWOLF
Posts: 21
Joined: April 29th, 2011, 6:34 pm

Re: Weather plugin - Fahrenheit to Celsius

Post by SABERWOLF »

jsmorley wrote:Actually, since I have no idea what VCloud is doing, or what weather RSS it uses, or anything else about it, can you PLEASE help me to help you... What is the URL your skin is using now?
Image

I have been trying to find text files associate with this rain meter for converting Fahrenheit instead Celsius, but can't seem to find anything?

All I see is a text file where you put in your code that allows you to view your weather in your location.

Here it is, I hope it helps?

Maybe you could tell me where this text would be for converting?
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather plugin - Fahrenheit to Celsius

Post by jsmorley »

You need to find the line that starts with URL= in the skin. That is the connection to the weather rss feed, and is where you will use a code to define whether you want celsius or fahrenheit.

It will be in whatever .ini you are loading, VClouds has a lot of "variants" in the folder. It should look like:

Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Unit#&dayf=10

Above that line, up in the [Variables] section, is a line like this:

Unit=m

Change the "m" to "f" and you should be good to go.
VClouds.jpg
You do not have the required permissions to view the files attached to this post.