-
Notifications
You must be signed in to change notification settings - Fork 275
RSS reader
T-UI beta 6.4 introduced a great new feature: RSS reader. The system is pretty easy to understand, but you'll need to know what an RSS feed is, and also how XML works.
$ rss -add [ID] [update time in seconds] [URL]
-
[ID]-> a unique number that you'll use in future to set up your RSS feed -
[update time in seconds]-> the number of time that will pass between two RSS feed updates -
[URL]-> the URL of your RSS feed
$ rss -rm [ID]
$ rss -l [ID]
If include_rss_default is true:
$ rss -exclude_if_matches [ID] [regex]
will create a filter which will exclude every item where [regex] can find a match.
If include_rss_default is false:
will create a filter which will include only those items where [regex] can find a match.
$ rss -show [ID] [true/false]
If the second argument is false, you won't receive updates from that feed anymore, but it will be updated silently.
`$ rss -update_time [ID] [update time in seconds]
$ rss -color [ID] [color]
$ rss -format [ID] [format]
%[length][color]tag
The values between square brackets ([]) are optional, feel free to exclude them if you want.
tag is the name of the feed tag that you want to show ("title", "description", ...)
For instance:
%[1000][teal]title --- %[50][#00ff00]description (%pubDate)
The tag link will show a direct link (if available) to the corresponding webpage.
You can define a format that you will be able to use many times inside differents RSS feeds.
rss -add_format [ID] [format ID]
Then, you'll just need to set the [format] value of an RSS feed to the ID that you just created:
rss -format [ID] [format ID]
You can ask T-UI to execute a given command when a new RSS item contains a specified set of words.
rss -add_command [command ID] [IDs (separated by commas)] [regex] [cmd]
-
[command ID]-> a unique number identifying this specific command -
[IDs]-> the IDs of the RSS feeds on which you will apply the following regex. -
[regex]-> if this finds one or more matches inside a new item,[cmd]will be executed -
[cmd]-> the command that will be executed
Important!
[regex] can't contain spaces. What is after an eventual space would be considered as part of [cmd].
To overcome the problem, replace every space inside your regex with a \s (= any type of space in regexes [tab, newline, single space]) or change the cmd editing the file rss.xml.
Invalid publication date tag: file.xml
This happens when the RSS feed that you're trying to read uses a non-standard pubDate tag.
To fix this, you just need to open the RSS feed in your browser. Then check what's the name of the tag that tells the publication date of the item.
For instance:
` /u/JavaReallySucks https://www.reddit.com/user/JavaReallySucks <table> <tr><td> <a href="https://www.reddit.com/r/gifs/comments/7a0qs5/transforming_werewolf_costume/"> <img src="https://b.thumbs.redditmedia.com/MZ84Smn7zPtz2diGcJNDCGIKb2on8N03QLoa_ohtULk.jpg" alt="Transforming werewolf costume" title="Transforming werewolf costume" /> </a> </td><td>   submitted by   <a href="https://www.reddit.com/user/JavaReallySucks"> /u/JavaReallySucks </a>   to   <a href="https://www.reddit.com/r/gifs/"> r/gifs </a> <br/> <span><a href="https://i.imgur.com/MheQHbM.gifv">[link]</a></span>   <span><a href="https://www.reddit.com/r/gifs/comments/7a0qs5/transforming_werewolf_costume/">[comments]</a></span> </td></tr></table> t3_7a0qs5
2017-11-01T02:15:27+00:00 <title>Transforming werewolf costume</title> `Francesco Andreuzzi, Italy, [email protected]