Giter VIP home page Giter VIP logo

mariurss's Introduction

mariurss

A UNIX toolchain to aggregate RSS feeds into a static website. A customized live example with non-default translations into German can be found here.

Usage

To run this program you will need a bash-compatible shell, GNU coreutils, curl and golang.
Build by running:

git clone https://github.com/gecero/mariurss
cd mariurss/aggregate
go build .
cd ../htmled
go build .
cd ..

The tools follow unix philosophy and are bundled together via pipes. For example:

cat my-feed-urls.txt | update/update | aggregate/aggregate | htmled/htmled index.html "#rss-feed"

For testing and reference, you can also see mariurss-sample.sh which will compile a basic sample feed HTML file with all data being stored inside of /tmp/.

update [store path]

This tool downloads feeds to disk.
Give feed URLs to stdin. These will then be downloaded by this tool. The feed URLs may contain comments in the form of non-special-character texts (allowed characters: 'a-zA-z0-9,.- ') behind a #. You may optionally specify a path as first parameter, to which the feeds will be downloaded, if you don't, they will be stored in /tmp/mariurss-store/. Download errors come from stderr. On a successful download, the path of the downloaded feed will be given to stdout. Exit codes are not used.

aggregate

This tool aggregates RSS feeds and creates an HTML table respectively.
Give file paths of RSS/Atom files via stdin. On success, stdout will output the HTML code of a table containing the the news feeds entries. The first line is boilerplate (eg <table>), followed by one news entry per line, follwed by a final boilerplate line. On failure, an error log is written to stderr. Exit codes are not used.
The table will be in chronological order (newest at the top). It uses some CSS classes so you can stylize it to your liking: .mariurss-content-main (left table column), .mariurss-content-description (right table column), .mariurss-content-feed (left column, news feed title), .mariurss-content-date (left column, news entry date), .mariurss-content-title (left column, news entry title).

htmled [html file] [query selector]

This tool manipulates HTML files.
The given HTML file must be in UTF-8 format. If more than one element that fits the query selector is found, all of them will be replaced. What you input via stdin will replace the contents of all HTML elements that fit the given query selector. Exit code is zero on success, non-zero on failure.
Also, this is the only tool from this toolchain that can be used sensibly outside of this toolchain. For instance, you can also use it to write a timestamp into the HTML file after updating the RSS feed (date | htmled/htmled index.html "#rss-timestamp").

mariurss's People

Contributors

gecero avatar

Watchers

 avatar

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.