It is currently May 7th, 2024, 12:51 am

Help~! Webparser.dll and Time Format

Get help with creating, editing & fixing problems with skins
User avatar
Valentine
Posts: 70
Joined: June 30th, 2011, 11:01 am
Location: Daegu, South Korea

Help~! Webparser.dll and Time Format

Post by Valentine »

Hello ^_^

I made skin with webparser.dll, but some problem.....

Webpage source is <td class="num">2011.09.23</td> so i made regexp="(?siU)<td class="num">(.*)</td>"

However skin present : Fri Sep 23 00:08:05 KST 2011.

Can i make time format GMT into yy mm dd on Skin edit page? or any other method?....
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help~! Webparser.dll and Time Format

Post by jsmorley »

Valentine wrote:Hello ^_^

I made skin with webparser.dll, but some problem.....

Webpage source is <td class="num">2011.09.23</td> so i made regexp="(?siU)<td class="num">(.*)</td>"

However skin present : Fri Sep 23 00:08:05 KST 2011.

Can i make time format GMT into yy mm dd on Skin edit page? or any other method?....
First, what you are describing is not possible. If the RegExp is capturing "2011.09.23" the skin will dislpay "2011.09.23", not "Fri Sep 23 00:08:05 KST 2011". WebParser nor Rainmeter has any way to know that text you captured is a date, and certainly will not format it in any way.

I think we need to resolve this before we talk about how you might deal with a date string from a web site and do conversions. I will hint up front that you are almost certainly going to need some Lua scripting to accomplish it.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Help~! Webparser.dll and Time Format

Post by MerlinTheRed »

My bet is that the web page contains more than one <td class="num">..</td> tags. Because that's just an entry in a table if I remember my html correctly. You should try to find something more specific to anchor your regexp to.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
Valentine
Posts: 70
Joined: June 30th, 2011, 11:01 am
Location: Daegu, South Korea

Re: Help~! Webparser.dll and Time Format

Post by Valentine »

Thank you for answer.

I have also thought using lua script, but i don't know lua (T.T).

Hmm...other method is just my hope?....

now i go to the lua web site........^^;; Thanks