~jack/msrss

5c9ed6d65fd2d8054169a60f27c5950f79f49fe7 — Jack Kelly 2 years ago dab90f2
Add proper README and nix files
3 files changed, 112 insertions(+), 0 deletions(-)

A README.md
A default.nix
A msrss.nix
A README.md => README.md +83 -0
@@ 0,0 1,83 @@
# `msrss`, Merge/Scrub RSS feeds

[![builds.sr.ht status](https://builds.sr.ht/~jack/msrss.svg)](https://builds.sr.ht/~jack/msrss?)

`msrss` is a command-line tool to clean and merge several RSS feeds
into one.

It is inspired by tools such as feedsanitizer (
https://github.com/HBehrens/feedsanitizer ), but runs from a terminal
so you're not depending on a web service. This readme used to include
a link to a version of feedsanitizer running on Google App Engine, but
that's vanished from the internet. Ironic.

**NOTE:** `msrss` is not under active development. I consider it
feature-complete for my needs.


## Examples

Clean up one feed:
```
$ msrss -o clean_feed.xml http://example.com/dodgy_feed.xml
```

Download my favourite webcomics feeds and label the titles:
```
$ msrss -o webcomics.xml -t Webcomics -k '' \
    -l 'Darths & Droids' http://www.darthsanddroids.net/rss.xml \
    -l 'Irregular Webcomic!' http://irregularwebcomic.net/rss4.xml \
    -l 'xkcd' http://xkcd.com/rss.xml \
    -l 'Dr. McNinja' http://drmcninja.com/feed/
```

## Building `msrss`

### Nix

The easiest way to build `msrss` is with
[Nix](https://nixos.org/nix/). If you have Nix installed, run `nix
build`; the binary will appear at `./result/bin/msrss`.

If you want to install `msrss` into your environment, run `nix-env -f
. -i`.

### Other Systems

#### Prerequisites

Beyond fundamental build tools (like you'd get with debian's
`build-essential`), you will need:

* [`feedparser`](https://pypi.org/project/feedparser/). (debian:
  `python3-feedparser`)
* [`PyRSS2Gen`](https://pypi.org/project/PyRSS2Gen/) (debian:
  `python3-pyrss2gen`)

If you are building from git, you will also need:

* autoconf
* autoconf-archive
* automake

#### Building

If you are building from git, first run `autoreconf -i`.

Building from source is the usual `./configure && make && sudo make
install` dance. `msrss` runs just fine without being installed by
`make install`, if you don't want to install it.


## Documentation

The full documentation for `msrss` is mantained as a man page. If you
have installed `msrss`, you can read `man msrss`, otherwise you can
run `man ./msrss.1` in the git repo.


## Hacking on `msrss`

The easiest way to get a development environment is to run
`nix-shell`, otherwise you can install dependencies by hand. To build
a tarball for a release, run `make distcheck`.

A default.nix => default.nix +11 -0
@@ 0,0 1,11 @@
{ nixpkgs ? import <nixpkgs> {} }:

with nixpkgs;
let
  commit = lib.substring 0 7 (lib.commitIdFromGitRepo ./.git);
  msrss = callPackage (import ./msrss.nix {
    name = "msrss-git-${commit}";
    src = ./.;
  }) {};
in
  msrss

A msrss.nix => msrss.nix +18 -0
@@ 0,0 1,18 @@
{ name, src }:
{ autoconf-archive, autoreconfHook, python3Packages, stdenv }:

python3Packages.buildPythonApplication {
  inherit name src;

  format = "other";
  nativeBuildInputs = [ autoconf-archive autoreconfHook ];
  propagatedBuildInputs = with python3Packages; [ feedparser PyRSS2Gen ];

  meta = with stdenv.lib; {
    homepage = https://git.sr.ht/~jack/msrss;
    description = "Merge/Scrub RSS feeds";
    license = licenses.gpl3Plus;
    maintainers = [ maintainers.endgame ];
    platforms = platforms.all;
  };
}