Code Monkey home page Code Monkey logo

rss-fulltext-proxy's Introduction

CircleCI License Docker Pulls Greenkeeper badge

RSS Fulltext Proxy ๐Ÿ“ƒ

Can "proxy"/mirror any RSS Feed to fetch full-text Content. Allows integration into any feed reader, without plugins or further configuration required.

Deployment

Using Docker (recommended)

  1. Download and modify the docker-compose.yml file to your liking.
  2. Run docker-compose up -d

Manually

  1. Clone the repository: git clone https://github.com/Kombustor/rss-fulltext-proxy.git
  2. Change working path: cd rss-fulltext-proxy
  3. Install dependencies: npm install
  4. Compile: npm run build
  5. Run: node dist/server.js

Note: You have to set the environment variables described in Configuration yourself, and you have to start a local redis server.

Configuration

The application is easily configurable with environment variables.

Name Type Default Description
PORT number 3000 The port the webserver listens on.
REDIS_URL string redis://127.0.0.1 The redis connection URL for caching.
CACHE_EXPIRY_SECONDS number 900 The number of seconds for cache entries to expire.

Usage

We have to define two query parameters:

Identifier Description
feed The original feed URL to proxy.
selectors URL-encoded string[] of CSS-selectors.

Example:

  • Feed URL: http://rss.sueddeutsche.de/rss/Topthemen
  • Query Selectors of relevant HTML elements: ["figure.asset-image", "section.body > p, section.body > h3"]
  • URL-encoded selectors using this website: %5B%22figure.asset-image%22%2C%20%22section.body%20%3E%20p%2C%20section.body%20%3E%20h3%22%5D
  • The URL we are adding to our feed reader is: http://host:post/?feed=http://rss.sueddeutsche.de/rss/Topthemen&selectors=%5B%22figure.asset-image%22%2C%20%22section.body%20%3E%20p%2C%20section.body%20%3E%20h3%22%5D
  • We are getting full-text RSS content for this feed. ๐Ÿ”ฅ

A collection of selectors can be found on the wiki page. If you create or improve a selector, feel free to open a pull request to add it to the wiki page.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

TODO

  • Make redis optional.
  • Add common templates for easier usage.
  • Unit tests.
  • Linting.
  • Add option to clear cache.
  • Tutorial on how to choose selectors.
  • Webinterface to visually select elements that should be included/removed.
  • Support websites which don't provide a RSS feed.

License

MIT

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.