Page 1 of 1

WebTxt (Read text from the internet)

Posted: February 22nd, 2006, 10:39 pm
by krisp
Hello,

This plugin reads a text file from the internet and returns the contents back to LCDSmartie. It is very simple, it reads the file line by line and returns the whole thing back. It takes two arguments, URL and refresh interval in seconds. More information can be found in the readme, and the source is of course included.

This plugin has been updated to allow you to specify which line of the text file you want to return, so it's easier to parse with another plugin. Check the README file for more information.

Download: http://krisp.com/plugins/webtxt.zip

Posted: February 25th, 2006, 6:31 pm
by jonny
Great addition, but I am a bit confused while trying to apply this plugin. Is there any way to return the whole file at once so I can parse it with other plugins, and only return what I want to see?

Posted: February 25th, 2006, 7:02 pm
by krisp
It should be returning the entire text file at once. However, line feeds and such will be intact, so you'll have to make note of that. It just returns the raw data from whatever file you point it at, so if you point it at a text file you get ascii text, if you point it at an HTML file you get the raw html.

Posted: February 25th, 2006, 7:04 pm
by jonny
i'm trying to point it at an html file, so it has about 20 lines of just header stuff that I dont want to display on the lcd. Is there a way to just take the line that I want?

Posted: February 25th, 2006, 7:09 pm
by krisp
You can try combining it with the "cut" plugin or reverseengineerd's new RegExp plugin to pull out only the data that you want. However, I will modify it so that you can select the line number of the text you want to return using the second parameter soon, that way there is less to parse.

Posted: February 25th, 2006, 7:34 pm
by krisp
Modification complete, download the new version and check the readme for how to get just the line you want.

Posted: March 15th, 2006, 6:59 pm
by caesar
Hi!

I am trying your plugin but it seems it doesn't pass along with the url a username and password

http://username:password@my.router.lan/ ... treive.txt

I get: Exception: The remote server returned an error: (401) Unauthorized.

Maybe you could look into this?

Thank you!
Caesar.

ShoutCast stats with WebTxt

Posted: June 12th, 2006, 6:03 pm
by Pingo
Hi all!

This WebTxt-plugin is very nice. Just a note for you who run your own radio stations with ShoutCast. I use WebTxt to give me info on the current status of the station. If it's online or not, what stream is currently running, how many listeners (and how many slots) and on the fourth row, I show what tune is currently playing.

I use WebTxt to pull info from GMTT ShoutCast Stats 2.3-program. It's a small PHP-script, and duplicating the "radio_stats.php" to "radio_stats2.php" and calling that from WebTxt gives you all info you need. You need to edit the HTML though to pure text. Other than that, it's extremely easy and works very well.

Posted: August 21st, 2006, 11:12 am
by stef942
hello,

the link to dl is dead :( , do you know where to get it? thks

Posted: August 21st, 2006, 5:26 pm
by limbo
Take it here

Posted: August 22nd, 2006, 4:06 pm
by stef942
thank you :smt023

Posted: April 4th, 2007, 5:55 pm
by Marbles_00
Is the Webtxt plugin still available somewhere? All links to it seem to be dead.

Thanks in advance.

*EDIT*

Okay, I didn't realize the by logging in gave me the link to download. All fine now.

Re: WebTxt (Read text from the internet)

Posted: August 4th, 2011, 3:24 pm
by barnabas1969
I realize that this is a very old thread. However, I am trying to use webtxt to pull information from my Ceton InfiniTV4 CableCARD tuner. It has a web interface to display things like tuner temperatures. I am using a combination of webtxt and cut.dll to display the tuner temperatures. It does display a temperature. The problem is that the temperature never updates unless I exit LCD Smartie and then start it again. Also, since I'm trying to display four tuner temperatures all on the same line of the display, I think the minimum 1 second refresh interval is a problem... all four temps display the same number. I can verify that the four tuners each have a slightly different temperature by going to the Ceton status page via my browser.

Any help is much appreciated.

Thanks,
Brian

EDIT: This is strange, but it's working now. I don't really understand why it was displaying all the same temps before. Here's my display line, just in case anyone else has a Ceton tuner and wants to display tuner temps on their LCD:

Code: Select all

Tunr:$CustomChar(7,28,20,28,0,0,0,0,0)$dll(cut.dll,1,141#2,$dll(webtxt,1,http://192.168.200.1/get_var?i=0&s=diag&v=Temperature,1#0))$Chr(135) $dll(cut.dll,1,141#2,$dll(webtxt,1,http://192.168.200.1/get_var?i=1&s=diag&v=Temperature,1#0))$Chr(135) $dll(cut.dll,1,141#2,$dll(webtxt,1,http://192.168.200.1/get_var?i=2&s=diag&v=Temperature,1#0))$Chr(135) $dll(cut.dll,1,141#2,$dll(webtxt,1,http://192.168.200.1/get_var?i=3&s=diag&v=Temperature,1#0))$Chr(135)

Re: WebTxt (Read text from the internet)

Posted: November 14th, 2011, 11:38 pm
by Guest
I'm having a similar problem to barnabas1969...only my installation hasn't miraculously stopped misbehaving.
I'm trying to read information from JDownloader's remote control interface to monitor download status. The control interface listens to http requests on port 10025 (by default) and gives a simple text response.
My code for the screen is

Code: Select all

Text01="Jdownloader is"
Text02="$dll(webtxt,1,http://localhost:10025/get/downloadstatus,5#0)"
Text03="Downloads:$dll(webtxt,1,http://localhost:10025/get/speed,5#0)kB/s"
Text04="" 
and my problem is that this produces an output which cycles from

Code: Select all

Jdownloader is
RUNNING
Downloads:RUNNINGkB/s
to

Code: Select all

Jdownloader is
RUNNING
Downloads:100kB/s
to

Code: Select all

Jdownloader is
100
Downloads:100kB/s
and back to the first screen (100 is a sample figure-the actual speed does update). If I remove line three (Text03="") without restarting, line 2 will still cycle between the status and the speed. However if I then restart lcdsmartie, then the cycling stops and only the status is displayed.
The output from jdownloader seems stable in firefox, and the behaviour continues in spite of trying different refresh intervals. I've tried fiddling with various different settings, all to no avail, and the problem is the same whether I use 5.4 or the latest 5.4.2.92 Beta. For the record I'm using a parallel hd44780 4x20 display. Does anyone have any bright ideas?