No commit activity in last 3 years
No release in over 3 years
feedfilter - feed filter and rules for easy (re)use
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
 Project Readme

feedfilter gem - feed filter and rules for easy (re)use

Usage

strip_ads (in AdsFilter module)

require 'feedfilter'

include FeedFilter::AdsFilter      # lets us use strip_ads


before_snippet =<<EOS
<div class="feedflare">
 <a href="http://feeds.feedburner.com/~ff/Rubyflow?a=1wUDnBztAJY:fzqBvTOGB9M:3H-1DwQop_U">
   <img src="http://feeds.feedburner.com/~ff/Rubyflow?i=1wUDnBztAJY:fzqBvTOGB9M:3H-1DwQop_U" border="0"></img>
 </a>
</div>
EOS


snippet = strip_ads( before_snippet )

puts snippet

Use Text Patterns (Regex) for Filters

Ads Example:

FEEDFLARE_ADS = %r{
     <div[^>]*?
        class=("|')feedflare\1
        [^>]*?>
          .*?
     <\/div>
       }mix

FEEDBURNER_BUGS = %r{
      <img[^>]*?
         src=("|')(:?http:)?//feeds\.feedburner\.com/~r/[^>]+?\1
         .*?>
       }mix

...

or as one-liners (if you prefer)

FEEDFLARE_ADS   = %r{<div[^>]*?class=("|')feedflare\1[^>]*?>.*?<\/div>}mi
FEEDBURNER_BUGS = %r{<img[^>]*?src=("|')(:?http:)?//feeds\.feedburner\.com/~r/[^>]+?\1.*?>}mi
...

License

The feedfilter scripts are dedicated to the public domain. Use it as you please with no restrictions whatsoever.

Questions? Comments?

Send them along to the wwwmake Forum/Mailing List. Thanks!