Toon app: Newsreader (RSS)

Forum about forum-provided applications on Toon

Moderators: marcelr, TheHogNL, TerrorSource, Toonz

Re: Toon app: Newsreader (RSS)

Postby mAiden » Tue Jan 15, 2019 11:38 am

Toonz wrote:when you give the command:
Code: Select all
wget http://feeds.feedburner.com/tweakers/mixed -O  tweakers.txt


do you get a file like in this zipfile?
tweakers.zip


Yes, have the app installed via the Toonstore.
Will look at it tonight, will then post the log file. Will then also test, if I have add tweaksers in the Usersettings, if a get the same thing.

To be continued
mAiden
Member
Member
 
Posts: 221
Joined: July 2017

Re: Toon app: Newsreader (RSS)

Postby mAiden » Tue Jan 15, 2019 8:03 pm

UserSettings:

Code: Select all
{"LastUsedSourceIndex":0,"Newsfeeds":["NOS Algemeen@http://feeds.nos.nl/nosnieuwsalgemeen","NOS Sport@http://feeds.nos.nl/nossportalgemeen","NOS Economie@http://feeds.nos.nl/nosnieuwseconomie","NOS Nieuws Tech@http://feeds.nos.nl/nosnieuwstech","AD@http://www.ad.nl/rss.xml","NRC@http://www.nrc.nl/rss","Bright@http://feeds.bright.nl/brightmagazine?format=xml","New York Times@http://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml","Nu.nl Opmerkelijk@http://www.nu.nl/rss/Opmerkelijk","Nu.nl Algemeen@http://www.nu.nl/rss/Algemeen","Tweakers@http://feeds.feedburner.com/tweakers/mixed","Nu.nl Wetenschap@http://www.nu.nl/rss/Wetenschap"],"TrayIcon":"Yes"}


When i do wget http://feeds.feedburner.com/tweakers/mixed -O tweakers.txt, got the right things to see in to logfile. (have added the logfile by this post. See tweakers.7z)
Have now added the link directly to the usersettings. This does work, via the News app control panel, he does not load him properly..
Attachments
tweakers.7z
(9.45 KiB) Downloaded 29 times
mAiden
Member
Member
 
Posts: 221
Joined: July 2017

Re: Toon app: Newsreader (RSS)

Postby Toonz » Tue Jan 15, 2019 9:28 pm

if I add the tweakers source manually via the settings page it works ok as well.
Not sure what went wrong in your case.
Can you reproduce it? If yes, I would be interested to see if the userSettings file shows a different entry as the copied one.
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1098
Joined: December 2016

Re: Toon app: Newsreader (RSS)

Postby Hmmbob » Sat Mar 09, 2019 7:23 pm

I'd like to use this app to display a few items that come out of my Home Assistant environment (I know, "there's an app for that" but I prefer this way). However, switching to that feed will crash my Toon and I can't figure out why.

Home Assistant is outputting the following (dynamically build):
Code: Select all
<rss>
<title>Sensors 19:11</title>
<item>
<title>Inside temperature</title>
<description>20.42 °C</description>
</item>
<item>
<title>Reistijd Hmmbob naar huis</title>
<description>0 min</description>
</item>
</rss>

My userSettings.json looks like this:
Code: Select all
{"LastUsedSourceIndex":0,"Newsfeeds":["NOS Algemeen@http://feeds.nos.nl/nosnieuwsalgemeen","Home Assistant@https://subdomain.domain.com:9999/api/rss_template/sensors"],"TrayIcon":"Yes"}
(with the full part of subdomain, domain and port being something else, but you get the point). The NOS feed loads fine, switching to the other feed will crash my Toon. However, loading that very exact URL https://subdomain.domain.com:9999/api/r ... te/sensors will give me the correct information in my browser.

Any idea whats happening? Is there maybe some problem related to the port specified?
Hmmbob
Starting Member
Starting Member
 
Posts: 13
Joined: January 2019

Re: Toon app: Newsreader (RSS)

Postby Hmmbob » Sat Mar 09, 2019 7:55 pm

Huh, there was a reply here 1 minute ago?

Anyway,
Toonz wrote:Could it be that that specific URL delivers News items according to the ATOM standard (you can check that in your browser by looking at the source of the page) ?
At the moment the News reader app only supports the RSS standard, not (yet ) the ATOM standard.
I will include this in a next release for sure....
However, if it is true RSS, can you send me the source of the returned page in your browser in a PM?

Appreciate the help! This is literally all there is in the source:

Code: Select all
<?xml version="1.0" encoding="utf-8"?>

<rss>
  <title>Sensors 19:46</title>
  <item>
    <title>Inside temperature</title>
    <description>19.9 °C</description>
  </item>
  <item>
    <title>Reistijd Hmmbob naar huis</title>
    <description>0 min</description>
  </item>
</rss>


By the way, I am using this component to (dynamically) create the RSS: https://www.home-assistant.io/component ... _template/
Source code of that component: https://github.com/home-assistant/home- ... _init__.py
Hmmbob
Starting Member
Starting Member
 
Posts: 13
Joined: January 2019

Re: Toon app: Newsreader (RSS)

Postby Toonz » Sat Mar 09, 2019 8:02 pm

Hmmbob wrote:Any idea whats happening? Is there maybe some problem related to the port specified?


The newsreader app is currently looking for the <channel> tag at the start which is missing in your example.
I assumed that that tag is always there (as it is in all my used public sources).
For each item is also expects the <pubDate> tag.

And yes, the code doesn't properly handle input files with these missing tags.
I can make the app compatible with this, but will combine this with the implementation of the ATOM standard (newer then RSS) in a next release.

Coming soonish (without comitting to a date :-) ).....

Kind regardz,

Toonz
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1098
Joined: December 2016

Re: Toon app: Newsreader (RSS)

Postby Hmmbob » Sat Mar 09, 2019 8:04 pm

OK, that's easy to fix - I'll just hack the outputting Home Assistant component.

Can those items be empty, or do they need to contain anything specific?
Hmmbob
Starting Member
Starting Member
 
Posts: 13
Joined: January 2019

Re: Toon app: Newsreader (RSS)

Postby Toonz » Sat Mar 09, 2019 8:18 pm

Hmmbob wrote:OK, that's easy to fix - I'll just hack the outputting Home Assistant component.

Can those items be empty, or do they need to contain anything specific?


The pubdate field should contain a date/time value normally. The time is extracted and shown in the screen, not sure if it can be empty, just try :-).
The input should look like this at minimum:
Code: Select all
<channel>
  <item>
    <title> bla bla </title>
    <description> bla bla </description>
    <pubDate>valid date-time format</pubDate>
  </item>
</channel>)
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1098
Joined: December 2016

Re: Toon app: Newsreader (RSS)

Postby Hmmbob » Sat Mar 09, 2019 9:04 pm

Toonz wrote:
Hmmbob wrote:OK, that's easy to fix - I'll just hack the outputting Home Assistant component.

Can those items be empty, or do they need to contain anything specific?


The pubdate field should contain a date/time value normally. The time is extracted and shown in the screen, not sure if it can be empty, just try :-).
The input should look like this at minimum:
Code: Select all
<channel>
  <item>
    <title> bla bla </title>
    <description> bla bla </description>
    <pubDate>valid date-time format</pubDate>
  </item>
</channel>)
Works! Looks like this now (and all info is filled dynamically):
Code: Select all
<channel>
<rss>
<title>Sensors 20:57</title>
<item>
<title>Hmmbob is thuis.</title>
<description>Hmmbob is thuis.</description>
<pubDate>Sat, 09 Mar 2019 20:57:15</pubDate>
</item>
<item>
<title>Reistijd Hmmbob naar huis: 0 min</title>
<description>Reistijd Hmmbob naar huis: 0 min</description>
<pubDate>Sat, 09 Mar 2019 20:57:15</pubDate>
</item>
</rss>
</channel>
Hmmbob
Starting Member
Starting Member
 
Posts: 13
Joined: January 2019

Re: Toon app: Newsreader (RSS)

Postby Toonz » Mon Jun 10, 2019 6:13 pm

Hi all,

a new version of the Newsreader app is available in the ToonStore.
Changelog version 1.1.1:
- when a new article is displayed, the text is now shown from the beginning.
previous releases kept the scrolling position from the previous read article when opening a new one.

Kind regardz,

Toonz
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1098
Joined: December 2016

Previous

Return to Toon Apps

Who is online

Users browsing this forum: No registered users and 1 guest