Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

WebTxt (Read text from the internet)

Announcements of new plugins or updates.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
krisp
Plugin Author
Posts: 51
Joined: February 17th, 2006, 4:53 am

WebTxt (Read text from the internet)

Post 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
Last edited by krisp on February 25th, 2006, 7:33 pm, edited 1 time in total.

jonny
Posts: 48
Joined: December 18th, 2005, 5:50 am

Post 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?

krisp
Plugin Author
Posts: 51
Joined: February 17th, 2006, 4:53 am

Post 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.

jonny
Posts: 48
Joined: December 18th, 2005, 5:50 am

Post 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?

krisp
Plugin Author
Posts: 51
Joined: February 17th, 2006, 4:53 am

Post 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.

krisp
Plugin Author
Posts: 51
Joined: February 17th, 2006, 4:53 am

Post by krisp »

Modification complete, download the new version and check the readme for how to get just the line you want.

caesar
Forum Supporter
Posts: 734
Joined: October 15th, 2005, 10:39 am
Location: Romania
Contact:

Post 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.

Pingo
Posts: 4
Joined: June 12th, 2006, 5:59 pm

ShoutCast stats with WebTxt

Post 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.

stef942
Posts: 5
Joined: August 21st, 2006, 9:59 am
Location: France

Post by stef942 »

hello,

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

limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

Take it here
You do not have the required permissions to view the files attached to this post.

stef942
Posts: 5
Joined: August 21st, 2006, 9:59 am
Location: France

Post by stef942 »

thank you :smt023

Marbles_00
Posts: 4
Joined: February 19th, 2007, 8:54 pm

Post 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.

barnabas1969
Posts: 14
Joined: July 31st, 2011, 3:07 am

Re: WebTxt (Read text from the internet)

Post 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)

Guest

Re: WebTxt (Read text from the internet)

Post 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?


Last bumped by Anonymous on November 14th, 2011, 11:38 pm.

Post Reply