Plugin ff_FeedCleaner

Post plugins and custom CSS snippets here
feader
Bear Rating Master
Bear Rating Master
Posts: 160
Joined: 26 Dec 2012, 20:03

Plugin ff_FeedCleaner

Postby feader » 27 May 2013, 19:48

I created a plugin whose main purpose is to allow for correcting faulty feed data, therefore the FeedCleaner suffix. It can also be used to modify feed URLs for the af_FeedMod plugin. It is available [url=https://github.com/wltb/ff_feedcleaner]on github[/url]. It needs Tiny Tiny RSS version 1.8 or later.

Some documentation is provided on the github page. For a first example, the erroneous feed [url=http://tt-rss.org/forum/viewtopic.php?f=1&t=2018]described here[/url] can be corrected with this
[code]
[
{
"URL": "http://www.iswintercoming.com/feed.php",
"type" : "regex",
"pattern" : "/sid=[0-9a-f]{32}/",
"replacement" : ""
}
]
[/code]
as input, the regular expressions are those from the [url=http://www.php.net/manual/en/book.pcre.php]pcre module[/url].
Last edited by feader on 17 Jul 2013, 21:49, edited 6 times in total.

Latimer
Bear Rating Master
Bear Rating Master
Posts: 131
Joined: 17 Mar 2013, 19:35

Re: Plugin ff_FeedCleaner

Postby Latimer » 28 May 2013, 03:47

Thanks, I'll definitely check it out once 1.7.10, or, rather, 1.8, is out.

wib
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 11 May 2013, 13:42

Re: Plugin ff_FeedCleaner

Postby wib » 13 Jun 2013, 16:01

This is exactly what I needed. Looking forward to testing.

robinmarlow
Bear Rating Trainee
Bear Rating Trainee
Posts: 11
Joined: 21 May 2013, 13:58

Re: Plugin ff_FeedCleaner

Postby robinmarlow » 15 Jun 2013, 13:40

Thank you, this looks great. Sadly I can't get it to work!

For[url]http://adc.bmj.com/rss/ahead.xml[/url]

I want to replace the links to the full articles e.g.
http://adc.bmj.com/cgi/content/short/ar ... 59v1?rss=1
to
http://adc.bmj.com/cgi/content/long/arc ... 59v1?rss=1

I'm trying:
[code]{
"#^http://adc\\.bmj\\.com/rss/ahead\\.xml#" : {
"type" : "regex",
"pattern" : "#cgi/content/short#",
"replacement" : "cgi/content/long"
}
}[/code]

but it's not working. What am i doing wrong? Is there a better way?

Thank,

Robin

feader
Bear Rating Master
Bear Rating Master
Posts: 160
Joined: 26 Dec 2012, 20:03

Re: Plugin ff_FeedCleaner

Postby feader » 15 Jun 2013, 15:10

[quote="robinmarlow"]
For[url]http://adc.bmj.com/rss/ahead.xml[/url]

I want to replace the links to the full articles e.g.
http://adc.bmj.com/cgi/content/short/archdischild-2013-303959v1?rss=1
to
http://adc.bmj.com/cgi/content/long/archdischild-2013-303959v1?rss=1

Hi Robin,

for me, your RegEx does exactly what you are trying to achieve, I see only links to content/long in Tiny Tiny RSS. When clicking on such a link, for example http://adc.bmj.com/cgi/content/long/archdischild-2013-303959v1?rss=1, I get redirected to http://adc.bmj.com/content/early/2013/06/13/archdischild-2013-303959.long?rss=1.

Is that your problem?