Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: provide miette-powered error diagnostics #30

Merged
merged 2 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 116 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ clap-verbosity-flag = "2.0.1"
html-escape = "0.2.13"
indicatif = { version = "0.17.6", features = ["rayon"] }
log = "0.4.19"
miette = { version = "5.10.0", features = ["fancy"] }
rayon = "1.7.0"
serde = { version = "1.0.183", features = ["derive"] }
serde_json = "1.0.104"
Expand Down
4 changes: 4 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ _default:
check:
cargo clippy --locked -- -D warnings

# Check links in markdown files
link-check:
-lychee -E '**/*.md'

# Runs nextest
test:
cargo nextest run
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@
</div>
<br>

`openring-rs` is a tool for generating a webring from RSS feeds, so you can populate a template with
articles from those feeds and embed them in your own blog. An example template is provided in
`in.html`.

This is a rust-port of Drew DeVault's [openring](https://git.sr.ht/~sircmpwn/openring), with the
primary differences being:
- the template is provided as a argument, not read from stdin
- we show a little progress bar
- we fetch all feeds concurrently
- we allow filtering feeds with `--before`.

`openring-rs` is a tool for generating a webring from RSS feeds, so you can populate a template with
articles from those feeds and embed them in your own blog. An example template is provided in
`in.html`.
- we allow filtering feeds with `--before`
- we provide better error messages (via [miette](https://github.com/zkat/miette))

## Install

Expand All @@ -43,14 +44,14 @@ Usage: openring [OPTIONS] --template-file <FILE>
Options:
-n, --num-articles <NUM_ARTICLES> Total number of articles to fetch [default: 3]
-p, --per-source <PER_SOURCE> Number of most recent articles to get from each feed [default: 1]
-S, --url-file <FILE> File with URLs of RSS feeds to read (one URL per line)
-S, --url-file <FILE> File with URLs of RSS feeds to read (one URL per line, lines starting with '#' or "//" ignored)
-t, --template-file <FILE> Tera template file
-s, --urls <URLS> A specific URL to consider (can be repeated)
-s, --urls <URLS> A single URL to consider (can be repeated to specify multiple)
-b, --before <BEFORE> Only include articles before this date (in YYYY-MM-DD format)
-v, --verbose... More output per occurrence
-q, --quiet... Less output per occurrence
-h, --help Print help information (use `--help` for more detail)
-V, --version Print version information
-h, --help Print help (see more with '--help')
-V, --version Print version
```

## Using Tera Templates
Expand Down
Loading