summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/rss.rb
AgeCommit message (Collapse)Author
2011-01-31comments and message fixesGiuseppe Bilotta
2011-01-12Ruby 1.9 cleanup: variables warningsGiuseppe Bilotta
Fix most ruby 1.9 warnings about shadowed variables (still one remaining in keywords.rb). The only significant changes are in the quiz game plugin. Also fix an issue in dictclient where the block parameter of a method was not correctly isolated from the previous parameter.
2011-01-11rss: obviously, the precending patch wasn't enoughGiuseppe Bilotta
Proper support for a 'modified' element actually requires its model to be defined and added to the RSS Atom namespace.
2011-01-11rss: updated can be nilGiuseppe Bilotta
An Atom item can reply to updated even though its value is nil, so check for it actually being valued instead. Also, some malformed Atom feeds use the nonstandard 'modified' element instead, so check for that too.
2010-11-25rss: watch handle case during renameGiuseppe Bilotta
We allow rss handles to be of any case on creation, even though matching is case-insentivie. However, when renaming an rss using 'rss change handle' and only changing the case, two things prevented this from working correctly: * since the new downcased handle was equal to the old downcased handle, the bot would prevent the renaming due to the existence of the new handle * the new handle was forcefully downcased, preventing the user from renaming handle 'case' to 'CaSe'. Fix by checking for this case explicitly, and handling it separately.
2010-11-18rss plugin: don't fail when feed.last_success is nilGiuseppe Bilotta
The first_run check comparing the time delta from last success failed when feed.last_success was nil. Prevent this from happening by checking if we are on the first run before the rest of the checks.
2010-09-02rss plugin: support atom categoriesGiuseppe Bilotta
Atom categories don't have a content attribute, and obviously they don't have an empty? method. Squash them to their label rather than bombing out with error during the blank2nil processing.
2009-06-02rss plugin: categories fixGiuseppe Bilotta
Don't break when the feed doesn't define categories.
2009-05-16rss plugin: categoriesGiuseppe Bilotta
Some feeds have more than one category. Make all of them available in the :categories stream key.
2009-04-20rss: minor comment fixGiuseppe Bilotta
2009-03-16rss: whitespace fix for handle_wrapGiuseppe Bilotta
2009-03-15rss: allow easier customization of output formatsGiuseppe Bilotta
Rather than hard-coding the handle, date and title formatting, make it customizable via appropriate *_wrap keys.
2009-03-15rss: refactor item date generationGiuseppe Bilotta
2009-03-15rss: configurable announce methodGiuseppe Bilotta
Since the RSS update announcements do not expect any form of reply, they could be considered the typical IRC message that should use NOTICE rather than PRIVMSG. However, for backwards compatibility and since NOTICEs are not always appreciated (and since their handling from clients is not always optimal, either), we still allow rss announces to use the traditional method, and that is in fact selected as default. Explicit rss show request always go with PRIVMSG.
2009-03-15rss: clean up options parsing in printFormattedRssGiuseppe Bilotta
2009-03-13rss: refactor rss types loadingGiuseppe Bilotta
Make use of the new custom filter loading procedure to move most of the type definitions into its own file (data/rbot/filters/rss.rb) and only define some essential ones in the plugin itself. As an added benefit, user types can be loaded from filters/rss.rb and rss/types.rb in the botclass directory.
2009-03-11rss: more detailed forum typeGiuseppe Bilotta
2009-02-28rss plugin: upper limit for watched feedsGiuseppe Bilotta
Config option to set the maximum number of items that will be announced when a feed updates. 0 means all of them, anything else clips the list to the latest ones, and also announces that some of the updates will not be listed.
2009-02-19remove whitespaceRaine Virta
2009-02-06rss plugin: don't abort if errors were found but rss is definedGiuseppe Bilotta
If we always abort, a failing first parser will cause a failure even though a subsequently tried parser succeeded in getting the feed right. So only return nil if rss was nil when the error list wasn't empty.
2009-02-01+ (plugins/rss) rss.announce_timeout config variabledmitry kim
2009-01-31rss plugin: fix return/error handling in parseRssGiuseppe Bilotta
Commit 36f1f28e668919dfab75c8fc4d1020abad351bd1 borked error handling as it assumed that a false or nil rss implied a nonempty errors, and it failed to return early. Fix by removing the early check for a missing rss and wrapping the report_problem (and the previously missing 'return nil') in the check for a nonempty errors array.
2009-01-30rss plugin: try all RSS parsersGiuseppe Bilotta
Some feeds fail when parsed by some parsers, but work correctly with others (e.g. http://www.blueman.com/community/rss fails with xmlparser but not with REXML). So try all of them and only abort if none works rather than failing because the default parser fails.
2009-01-28rss plugin: don't warn on rewatchGiuseppe Bilotta
There is no need to warn when calling watchRss on a watched feed; in fact, since watchRss() is called every time a watcher is added, it just spam the channels with a useless message that also provides unnecessary information. So just return.
2009-01-28rss plugin: compact list of rss feedsGiuseppe Bilotta
When lots of rss feeds are defined, the bot will flood the channel on rss list. Fix by showing a compact list when the number of feeds is higher than the maximum output lines.
2009-01-28* (rss.rb) bypass the http cache on !rss rewatchdmitry kim
2009-01-26rss plugin: fix watcher for empty feedGiuseppe Bilotta
2009-01-26rss plugin: parseRss returns the number of found itemsGiuseppe Bilotta
Change the parseRss routine to return the number of found items, or nil in case of error. This helps clearly differentiate between empty feeds (which are still legit) and b0rked feeds. This change in logic does not alter the fact that a feed update with no items will not wipe existing old feed items.
2009-01-24+ (rss.rb) monkey-patch some basic common api over different rss item implsdmitry kim
2009-01-22rss plugin: mangle email in git formatGiuseppe Bilotta
Also fix a comment typo on the flyby
2008-12-29rss plugin: typo in helpGiuseppe Bilotta
2008-12-28plugins: raise a descriptive LoadError when the db is corrupt on loadGiuseppe Bilotta
2008-11-20rss plugin: prevent double UTF-8 decondingGiuseppe Bilotta
The rss parser looks at the encoding specified into the XML file and converts everything to UTF-8. Since we do the UTF-8 conversion ourselves, monkey-patch the XML 'encoding' declaration to claim it's UTF-8 already (as it actually is).
2008-10-16rss plugin: 'headlines' uses date if handle not presentGiuseppe Bilotta
When the feed handle is empty or not used (e.g. during rss show), the headlines output filter will display the date before the title.
2008-10-16rss plugin: strip feed title of initial/final whitespaceGiuseppe Bilotta
2008-10-16rss plugin: 'headlines' output formatGiuseppe Bilotta
A simple output format that only provides feed titles, skipping all other data, including the feed link. Requested by step on #rbot.
2008-10-16rss plugin: use %{at} instead of @ in output filtersGiuseppe Bilotta
2008-07-30rss plugin: don't claim to be using old data when we don'tGiuseppe Bilotta
2008-07-30rss plugin: check for unhandled Atom feeds (old Ruby/RSS library)Giuseppe Bilotta
2008-07-18rss plugin: strip whitespace from link, category and authorGiuseppe Bilotta
2008-07-18* (plugins/rss) more item uid calculation fixesdmitry kim
2008-07-10* (plugins/rss) fixed item unique idsdmitry kim
2008-07-02rss plugin: comment out a couple of potentially oververbose debug linesGiuseppe Bilotta
2008-06-12* rss.rb: use guids to check for seen itemsdmitry kim
2008-04-19rss plugin: return from select_nonempty() as soon as nonempty is foundGiuseppe Bilotta
Don't map over all parameters, because some parameters might not respond to empty?. Also, it's unnecessarily slow. Just return as soon as we found a nonempty parameter.
2008-03-28+ rss.rb: optional :delay param to '!rss rewatch'dmitry kim
2008-03-23rss plugin: check for <channel when <rdf:RDF is foundGiuseppe Bilotta
RSS htmlinfo filter was catching some false positives because some web pages have embedded RDF resources (e.g. for trackbacks) even though they are not RSS feeds. So check for the obligatory channel tag when an rdf:RDF tag is found.
2008-03-23rss plugin: rescue RSS parsing in htmlinfo filterGiuseppe Bilotta
2008-03-23rss plugin: missing 9 in FEED_NS regexpGiuseppe Bilotta
2008-03-23rss plugin: make htmlinfo input filter less greedyGiuseppe Bilotta