It is currently March 29th, 2024, 9:32 am

Webparser caching

Report bugs with the Rainmeter application and suggest features.
kati42
Posts: 35
Joined: May 4th, 2009, 4:25 am

Webparser caching

Post by kati42 »

I'd like to be able to cache an RSS feed so that when I'm away from a network connection at the time Rainmeter tries to get the weather info, it will just show the old info instead of n/a. This could also be useful for getting RSS info that I can read on the plane, etc.
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Webparser caching

Post by dragonmage »

How bout we just put in a stripped down version of Gecko...
kati42
Posts: 35
Joined: May 4th, 2009, 4:25 am

Re: Webparser caching

Post by kati42 »

Um... if you mean the HTML layout engine, that wouldn't seem to do the same thing?

I just want to be able to download the RSS information, save a temporary copy, and if on the next request the data can not be fetched, the older temporary copy will be used for parsing instead. If there is a successful connection, it over-writes the old cached copy. So, one file write per fetch, and a little logic (could even be in the config with the right commands), be able to say "if new info not available, used cached copy".

Others have requested the ability to parse a file, so this request could be fulfilled by allowing the parser to read a local file, and then we can incorporate the testing into our measures.
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Webparser caching

Post by dragonmage »

No, I wasn't suggesting that as a solution for your problem. I was just suggesting that a built in browser would let us do a lot of other things.
kati42
Posts: 35
Joined: May 4th, 2009, 4:25 am

Re: Webparser caching

Post by kati42 »

True. I don't know enough about Gecko and whether it has built-in caching to know if it'd solve the problem I have, though.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Webparser caching

Post by jsmorley »

If you set debug=2 it saves a copy of the webpage in your root directory as WebParser.log or something. (not sure of the name, test it and see)

I wonder if you could then point a WebParser measure at that file with a URL of:

file:///c:/webparser.log

and have it read it?
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Webparser caching

Post by dragonmage »

It's WebParserDump.txt. No you can't parse a local file, but the request has already been put in to move the RegExp handling code from the webparser to the Rainmeter core, which will allow for using RegExp in any part of Rainmeter.
sgtevmckay

Re: Webparser caching

Post by sgtevmckay »

kati42 wrote:True. I don't know enough about Gecko and whether it has built-in caching to know if it'd solve the problem I have, though.
This may be of assistance

SeaMonkey and the final Netscape browser (4.3 thru 4.7) were all built on Gecko, and is still commonly utilized as the basis of Firefox ;)