I want to customize my RSS Reader, so that it only refresh when my PC goes online. Otherwise, if my PC goes offline, it will display the content from the last connection.
Is it possible to save latest RSS value (since it is dynamic) to a local file that will be remaining even after I reboot my PC? I think it will be great since if I restart my computer without any internet connection, this RSS reader will not be empty (displaying the latest value).
It is currently April 19th, 2024, 1:29 am
Help: make RSS Reader only refresh when online
-
- Posts: 6
- Joined: May 29th, 2009, 10:14 am
- Location: Indonesia
-
- Moderator
- Posts: 995
- Joined: June 10th, 2009, 12:44 pm
- Location: Sweden
Re: Help: make RSS Reader only refresh when online
http://rainmeter.net/cms/Plugins-WebParser
You could probably download the feeds to a local file and then parse that file.
You would however have to find someway so it will delete the old feeds when it is time to refresh.
You could probably download the feeds to a local file and then parse that file.
You would however have to find someway so it will delete the old feeds when it is time to refresh.
I don't think, therefore I'm not.
-
- Posts: 6
- Joined: May 29th, 2009, 10:14 am
- Location: Indonesia
Re: Help: make RSS Reader only refresh when online
how could I download the feeds to a local file?
-
- Developer
- Posts: 263
- Joined: July 31st, 2009, 2:23 pm
- Location: Tokyo, JPN
Re: Help: make RSS Reader only refresh when online
This is the simple example.
Note:
"Source.txt" would be always downloaded every 3600 seconds. And [ParseSource] is always parsing "Source.txt".
When after restart, if the Internet has not been connected, existing "Source.txt" should be parsed.
Then after next 3600 seconds, if the connection is established, "Source.txt" would be overwritten by the latest one.
Code: Select all
[DownloadSource]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=3600
Url=http://rainmeter.net/forum/rss.php?f=5
Download=1
DownloadFile=Source.txt
[ParseSource]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=5
Url="file://#CURRENTPATH#DownloadFile\Source.txt"
RegExp="(?sU)<item>.*<title>(.*)<"
StringIndex=1
"Source.txt" would be always downloaded every 3600 seconds. And [ParseSource] is always parsing "Source.txt".
When after restart, if the Internet has not been connected, existing "Source.txt" should be parsed.
Then after next 3600 seconds, if the connection is established, "Source.txt" would be overwritten by the latest one.
-
- Posts: 6
- Joined: May 29th, 2009, 10:14 am
- Location: Indonesia
Re: Help: make RSS Reader only refresh when online
I just know this from here. I'll try it later (I'm in the middle of some work now).
Thank you! :thumbsu:
Thank you! :thumbsu:
-
- Posts: 6
- Joined: May 29th, 2009, 10:14 am
- Location: Indonesia
Re: Help: make RSS Reader only refresh when online
I've tried your code, but it doesn't work. The "this.txt" doesn't contain anything and the "Item1" doesn't show anything. Can you help me?
Code: Select all
[DownloadSource]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=3600
Url=http://rainmeter.net/forum/rss.php?f=5
Download=1
DownloadFile=D:\this.txt
[ParseSource]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=5
Url="file:D:\this.txt"
RegExp="(?sU)<item>.*<title>(.*)<"
StringIndex=1
[Item1]
Meter=STRING
MeasureName=ParseSource
X=10
Y=10
Prefix="Value: "
-
- Developer
- Posts: 263
- Joined: July 31st, 2009, 2:23 pm
- Location: Tokyo, JPN
Re: Help: make RSS Reader only refresh when online
It has the feature which downloads a file to "DownloadFile" folder in a current skin, and it isn't possible to define a download directory by an absolute path.ruki wrote:[DownloadSource]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=3600
Url=http://rainmeter.net/forum/rss.php?f=5
Download=1
DownloadFile=D:\this.txt
[ParseSource]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=5
Url="file:D:\this.txt"
RegExp="(?sU)<item>.*<title>(.*)<"
StringIndex=1
You only need to define filename for download file.
DownloadFile=this.txt
this.txt would be downloaded to "DownloadFile" folder in a current skin.
then, you have to define correct path of the downloaded file to parse it.
Url="file://#CURRENTPATH#DownloadFile\this.txt"
(Note that it is not possible to download to outside of current skin folder with DownloadFile.)
-
- Posts: 6
- Joined: May 29th, 2009, 10:14 am
- Location: Indonesia
Re: Help: make RSS Reader only refresh when online
Huaa.. I can't make it! :roll:
Is there any skin that using this method?
I would like to see and try to modify my own skin from it..
Is there any skin that using this method?
I would like to see and try to modify my own skin from it..
-
- Developer
- Posts: 263
- Joined: July 31st, 2009, 2:23 pm
- Location: Tokyo, JPN
Re: Help: make RSS Reader only refresh when online
You can use as actual skin by adding proper meter to first example code.
You should try and see result without any modification first.
Code: Select all
[DownloadSource]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=3600
Url=http://rainmeter.net/forum/rss.php?f=5
Download=1
DownloadFile=Source.txt
[ParseSource]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=5
Url="file://#CURRENTPATH#DownloadFile\Source.txt"
RegExp="(?sU)<item>.*<title>(.*)<"
StringIndex=1
[Item1]
Meter=STRING
MeasureName=ParseSource
SolidColor=FFFFFF
W=200
H=32
ClipString=1