jdg_rss <- rdf/rss/xml/html screen scraper

jdgordon

New member
jdg_rss &lt;- rdf/rss/xml/html screen scraper

hey all..
plugin #2 from me :)

this 1 lets u grab text from any webpage or xml feed and dump it on the lcd...

New version...

renamed to jdg_rss (remember to rename cc2_rss.ini to jdg_rss.ini if your upgrading) so people dont think CF is responsible for my crappy coding :D

read the readme in the zip file

update:....
$whitespace$ works again...

edit: new download.. backup your old one incasse this doesnt work :p
________
Menus Marijuana Dispensaries
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

Attachments

Last edited:

reider

New member
Absolutely brilliant-many many thanks for this. Only got simple details showing at the moment as I`m going back to work after a week off so its gonna be hectic! But, in the interests of science I`ll recount my steps.

(1) Download and paste in the rss.dll in CF
(2) As an example, go to Weather.com , select the international weather link if necessary, then the xml button, this is the paste link you require so make a note of it. Mine for Manchester Airport is http://www.weatherclicks.com/xml/EGCC
(3) Amend the screen for a 631/635 as necessary-my example is for a 631-add the screen and restart cc2. you need to put in the address as above, the count and the details you want to read between.
(4) the address is self explained, the count-if reading from the start of <item> to the end of item </item> you will see this appears a few times in the file. I changed mine to 3 and this got to the one I wanted, thus......

#----- Weather Feed -------------
[m02-s29]
screen_name="Weather Feed"
options=0
alt_delay=10000

[m02-s29-r00]
options=5
scroll_speed=250

[m02-s29-r00-i00]
id=3268417450
options=0
length=0

[m02-s29-r01]
options=5
scroll_speed=250

[m02-s29-r01-i00]
id=2085788532
options=0
length=0

This is my weather screen straight from the cc2_service.ini so not a 'normal' screen as most of you would expect.

Steve
 

CF Mark

Administrator
There are some problems with this plugin at the moment.
Mainly in the way it uses INIs.

The problems will probably occour if you use the plugin to get data from more than one web site.

Jdgordon said he will fix this soon.
 

jdgordon

New member
like CC_Admin said, there are big problems with the ini so its getting redone today with the "correct" way of doing things

im going to try getting username:password websites working aswell coz some feeds do require it (i.e the gmail atom feed)
________
FIX PS3
 
Last edited:

jc634

Administrator
Just got the weather.com xml feed loaded and working. That is a very nice feature to *finally* have working in CC2.:) Even with the current "bugs".

Keep up the good work!

Jim
 

jc634

Administrator
Also, FWIW, the xml data reads fine on my CFA-635, but not on my CFA-634. I get [E01]'s on each line.

I will recheck the screen code (it could be my "all-thumbs" curse going, again).:)

Jim

edit:

I recopied/repasted and changed the m#'s and s#'s again, and it seems to work now. I would swear that both old and new were identical, but who knows...

I will let you know if anything reverts back to [E01]'s
 
Last edited:

reider

New member
Edited details......
I will recheck the screen code (it could be my "all-thumbs" curse going, again).:)

Jim

edit:

I recopied/repasted and changed the m#'s and s#'s again, and it seems to work now. I would swear that both old and new were identical, but who knows...

I will let you know if anything reverts back to [E01]'s [/B]
I think you mean the CFA-633 and CFA-634 don`t you? Thumbs again, the CFA-633 is the one with the 6 keys isn`t it?

Steve
 

reider

New member
daks001 said:
Yeah, that's the one. The 633 is the only one with 6 keys... ;)
Phew, thought I was dreamin n there was a new one out there somewhere!

All I wanna do, ghee whiz
is dream, dream, dream
ah`m dreamin ma life awayyyyy!

la de dah de dah!

Steve ;)
 

reider

New member
Heres a slightly updated screen working on an RSS Feed from the same address. I cheated and typed the local weather address in manually as the RSS feed put too much detail in (poetic licence).

This is suitable for the 631 but slight amendment and it will work on the ahem, 633 and 634. Change the EGCC to your nearest airport (details from the weather site). The "My Weather" string should be changed to your town name. Some of the other details have changed from the previous screen to give more varied 'current' weather details. 634 details to follow.

[pre]
rows=2
cols=20

[screen]
screen_name="Weather Feed"
options=0
alt_delay=10000

[from00]
from="cc2_rss.ini"
sec="feed-00"
opt01="id=@01"
opt02="url=http://www.weatherclicks.com/rss/EGCC"
opt03="interval=60"

[from01]
from="cc2_rss.ini"
sec="item-00"
opt01="id=@02"
opt02="url=@01"
opt03="section=description"
opt04="count=2"

[from02]
from="cc2_rss.ini"
sec="item-03"
opt01="id=@03"
opt02="url=@01"
opt03="start=<description>"
opt04="end=</description>"

[r00]
options=5

[r00-i00]
string="My Weather"

[r01]
options=5

[r01-i00]
id=@02

Steve
 

reider

New member
634 weather on RSS feed as above.

[pre]
rows=4
cols=20

[screen]
screen_name="Weather Feed"
options=0
alt_delay=10000

[from00]
from="cc2_rss.ini"
sec="feed-00"
opt01="id=@01"
opt02="url=http://www.weatherclicks.com/rss/EGCC"
opt03="interval=60"

[from01]
from="cc2_rss.ini"
sec="item-00"
opt01="id=@02"
opt02="url=@01"
opt03="section=description"
opt04="count=2"

[from02]
from="cc2_rss.ini"
sec="item-03"
opt01="id=@03"
opt02="url=@01"
opt03="start=<description>"
opt04="end=</description>"

[r00]
options=5

[r00-i00]
string="My Weather"

[r01]
options=5

[r01-i00]
string=" "

[r02]
options=5

[r02-i00]
id=@02

[r03]
options=5

[r03-i00]
string=" "
 

jdgordon

New member
reider: nice work... cept your gonna kill me when i update this plugin later today with the new "correct" way of doing things...

i see your using start=<description> and end=</description>... is that to show other ppl how to use it? coz if u put description in section= it will do exactly that...
________
Ipad cases
 
Last edited:

jc634

Administrator
Like this?:

[pre]
rows=4
cols=20

[screen]
screen_name="Weather Feed"
options=0
alt_delay=20000

[from00]
from="cc2_rss.ini"
sec="feed-00"
opt01="id=@01"
opt02="url=http://www.weatherclicks.com/xml/52302"
opt03="interval=60"

[from01]
from="cc2_rss.ini"
sec="item-00"
opt01="id=@02"
opt02="url=@01"
opt03="section=title"
opt04="count=0"

[from02]
from="cc2_rss.ini"
sec="item-01"
opt01="id=@03"
opt02="url=@01"
opt03="section=pubDate"
opt04="count=0"

[from03]
from="cc2_rss.ini"
sec="item-02"
opt01="id=@04"
opt02="url=@01"
opt03="section=title"
opt04="count=3"

[r00]
options=5
[r00-i00]
id=@02

[r01]
options=5
[r01-i00]
id=@03

[r02]
options=5
[r02-i00]
id=@04

Question: is there any advantage/disadvange of xml vs rss? they definitely seem to output the same formatted information. Just curious for future reference...

Jim
 

jc634

Administrator
Another question, checking my LCD display, the information displayed is from 16:52 (4:52 PM). It is now 9:30 which means it never updated (at least after 4 hours).

Per my screen from the previous post, it is set to check to every 60 minutes.

Any ideas?, or did I break something again with the "thumbed" hands?;)

Jim
 

jc634

Administrator
Duh!,

Me thinks that this is more a matter of how often weather.com updates their forecasts!

Jim
 

reider

New member
jdgordon said:
reider: nice work... cept your gonna kill me when i update this plugin later today with the new "correct" way of doing things...

i see your using start=<description> and end=</description>... is that to show other ppl how to use it? coz if u put description in section= it will do exactly that...
I just 'bing banged' it all till it started giving the info. Every time I changed a setting at one end I lost the title, when I did the title I lost the data. I did realise they both did the same, I tied them up the same as it worked no problems.

When you change it then the screens will change again. Most importantly, someone needs to follow what we do and be able to get it working on more than one type of module. Hence, a couple of examples.

Steve
 

jc634

Administrator
Installed the new plug-in, rewrote the screens and everything is OK.

Much easier to write sections for weather (and I assume other feeds).

Jim
 

jc634

Administrator
Well, I am back to checking the xml feed from weather.com and the rss/xml plug-in does not appear to be updating the screen. I thought originally that it was a matter of the timing of updates from weather.com.

However, my display still shows the feed from 2:52 this PM while a trip direct to the xml web page shows the currebt feed coming out at 9:52, which is more than 1 hour ago. The plug-in should have read the current information by now. My current screen code, based on the current plug-in is:

[pre]
rows=4
cols=20

[screen]
screen_name="Weather Feed"
options=0
alt_delay=20000

[from00]
from="cc2_rss.ini"
sec="feed-#"
opt01="url=http://www.weatherclicks.com/xml/52302"
opt02="interval=60"
opt03="item00_id=@01"
opt04="item00_section=title"
opt05="item00_count=0""
opt06="item01_id=@02"
opt07="item01_section=pubDate"
opt08="item01_count=0""
opt09="item02_id=@03"
opt10="item02_section=title"
opt11="item02_count=3""

[r00]
options=5
[r00-i00]
id=@01

[r01]
options=5
[r01-i00]
id=@02

[r02]
options=5
[r02-i00]
id=@03


Any ideas?

Jim
 

jdgordon

New member
can u check the log for any warnings?? ill add some more warning feedback if there isnt anything in it...

im gonna test the same feed and see what happens

EDIT: i added some log info and kept an eye on it... the weather gets updated fine... my internet usage isnt tho... there must be a small bug somewhere....
________
Love stories advice
 
Last edited:
Top