Commit Briefs

c1999c4e72 Thomas Böhler

chore: bump version to v0.6.0 (main, tags/v0.6.0)

Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


ba47af3af2 Thomas Böhler

ci: replace arch linux build with alpine linux

Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


f24e78ff3e Thomas Böhler

build: remove email on failure

Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


9dd9af108f Thomas Böhler

chore: remove cog.toml

Not a big fan of cocogitto due to some shortcomings. I'm also not a fan of conventional commits anymore so I might stop using it for rss-email. Conventional commits is nice in theory but I found it to be unnecessary and not really helpful in practice. Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


d6c4d11e50 Thomas Böhler

feat: send oldest feed items from db first

Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


274c1d64ae Thomas Böhler

refactor: make function order more predictable

Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


42b9afc737 Thomas Böhler

chore: allow multiple crate versions

Hunting down multiple crate versions is a pain. Just keep them. Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


62f59f2d25 Thomas Böhler

chore: don't use ` in shell scripts

Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


771900b156 Thomas Böhler

fix: handle errors from tasks in JoinSet

Check all task errors instead of whether joining them was successful. Previously the actual errors were ignored because it was only checked whether joining all tasks in the JoinSet was successful. Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


6f8eb27101 Thomas Böhler

fix: drain mpsc when running with --dry-run

The --dry-run option should fetch all feeds, store them in the database, mark them as sent, but not actually send any emails. The previous implementation only fetched all feeds and fed them to the mpsc that is shared by the accumulator and the sender, but as the sender wasn't running, nothing received the feed items from the channel, which made the accumulator block, as the channel only fits 10 items. Move the dry run logic as deep into the sender as possible so all the logic still runs and just the emails aren't sent. Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


Branches

Tags

Tree

.builds/
.gitignorecommits | blame
.mailmapcommits | blame
.sqlx/
Cargo.lockcommits | blame
Cargo.tomlcommits | blame
LICENSEcommits | blame
Makefilecommits | blame
README.mdcommits | blame
config.example.tomlcommits | blame
contrib/
docs/
migrations/
sqlx-data.jsoncommits | blame
src/

README.md

# rss-email

Fetch new RSS (and Atom) feed items and send them via E-Mail.

## Installation

### Alpine Linux

A package for Alpine Linux exists in the `testing` repository:
[rss-email](https://pkgs.alpinelinux.org/package/edge/testing/x86_64/rss-email)

### Arch Linux

There are 2 packages available in the AUR:

- [rss-email](https://aur.archlinux.org/packages/rss-email)
- [rss-email-git](https://aur.archlinux.org/packages/rss-email-git)

## Compiling

Install the dependencies:

- Rust
- sqlite
- [sqlx-cli](https://github.com/launchbadge/sqlx/tree/main/sqlx-cli#install)
  (optional, only for development)
- scdoc

First specify the `DATABASE_URL` environment variable and set up the database
with `cargo-sqlx`:

```
export DATABASE_URL='sqlite://./dev.db'
cargo sqlx database setup
```

Then compile `rss-email`:

```
cargo build
```

To build the man pages, use `scdoc`:

```
scdoc < docs/rss-email.1.scd > docs/rss-email.1
scdoc < docs/rss-email.5.scd > docs/rss-email.5
```

## Usage

- Copy the `config.example.toml` to `~/.config/rss-email/config.toml` and adjust
  the values
- Create a `urls` file at `~/.config/rss-email/urls` with one RSS url per line

The database used with `rss-email` is generated automatically if it doesn't exist
yet

See the man page or `-h` for more info. You can view the man page after
generating it with `scdoc` with `man -l docs/rss-email.1`.  
A man page for the configuration exists, too, which you can view after building
with `scdoc`: `man -l doc/rss-email.5`.

## Resources

Send patches and questions to
[~witcher/rss-email-devel@lists.sr.ht](https://lists.sr.ht/~witcher/rss-email-devel).

Instructions for preparing a patch are available at
[git-send-email.io](https://git-send-email.io/).

Bugs and todo can be found at
[~witcher/rss-email](https://todo.sr.ht/~witcher/rss-email).

# Contributing

## git hooks

A `pre-commit` hook is available in `contrib/githooks/pre-commit` that catches
most errors that the CI fail on. I recommend installing it in
`.git/hooks/pre-commit` to catch errors before the CI can since building Rust in
the CI is quite expensive.

## Making changes on the database

When making changes on the database, make sure that:

- a migration is created in the `migrations` folder with `cargo sqlx migrate add
  -r $MIGRATION_DESCRIPTION`
- `sqlx-data.json` is up to date by issuing `cargo sqlx prepare`

# Making a release

- Make sure the pre-commit hook `contrib/githooks/pre-commit` runs successfully
- Bump version in Cargo.toml
- Generate new Cargo.lock
- Make release commit