Giter Club home page Giter Club logo

radiant-rss-reader's Introduction

ABOUT

This is a RadiantCMS extension (originally a behavior by Alessandro Preite Martinez) that adds some tags to fetch and display RSS feeds. It uses the 'ruby-feedparser' module, and it is able to cache the raw feed data and to only fetch the new feed if it has been modified (using the If-Modified-Since HTTP header).

INSTALLATION

via Git

cd RADIANT_APP_ROOT
git clone git://github.com/lorenjohnson/radiant-rss-reader.git vendor/extensions/rss_reader

via Git (as submodule)

cd RADIANT_APP_ROOT
git submodule add git://github.com/lorenjohnson/radiant-rss-reader.git vendor/extensions/rss_reader

...then git submodule init and git submodule update as necessary.

via tarball

Download the tarball from http://github.com/lorenjohnson/radiant-rss-reader/tarball/master into RADIANT_APP_ROOT/vendor/extentions, then:

cd RADIANT_APP_ROOT/vendor/extentions
tar xvzf lorenjohnson-radiant-rss-reader.tgz
mv lorenjohnson-radiant-rss-reader rss_reader

USAGE EXAMPLE

Use it in your page like this (just an example):

<dl>
 <r:feed:items url="http://www.somefeed.com/rss" limit="5">
  <dt><r:feed:link /> - by <r:feed:creator />, <r:feed:date format="%b %d"/></dt>
  <dd><r:feed:content /></dd>
 </r:feed:items>
</dl>

You can also order by some feed entry attribute other than the date:

<ul>

  <r:feed:items
      url="http://feeds.boingboing.net/boingboing/iBag" 
      order="creator ASC">

    <li><r:feed:link /></li>

  </r:feed:items>

</ul>

And you can do headers to mark off sections:

<ul>

  <r:feed:items
      url="http://feeds.boingboing.net/boingboing/iBag" 
      order="creator ASC">

    <r:feed:header for="creator">
      <h2><r:feed:creator /></h2>
    </r:feed:header>

    <li><r:feed:link /></li>

  </r:feed:items>

</ul>

You can sort items and group headers by date, title, content, creator, or link (i.e. the URL of the item). There are more things you can do, which are documented in rss_reader.rb.

CONTRIBUTORS

Original Author:

Port to Extension:

Modifications:

License - Creative Commons Attribution-Share Alike 2.5 License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.