lychee/README.md

63 lines
1.8 KiB
Markdown
Raw Normal View History

2020-08-04 23:06:27 +00:00
![lychee](assets/banner.png)
2020-08-07 22:10:30 +00:00
![Rust](https://github.com/hello-rust/lychee/workflows/Rust/badge.svg)
2020-08-04 23:06:27 +00:00
...because who says I can't write yet another link checker.
## What?
This thing was created from [Hello Rust Episode
10](https://hello-rust.show/10/). It's a link checker that treats Github links
2020-08-11 20:49:54 +00:00
specially by using a `GITHUB_TOKEN` to avoid getting blocked less by the rate limiter.
2020-08-04 23:06:27 +00:00
2020-08-09 20:43:18 +00:00
## Why?
The existing link checkers were not flexible enough for my use-case.
lychee can...
2020-08-13 13:41:27 +00:00
- run requests concurrently (fully async Rust)
2020-08-12 22:17:16 +00:00
- handle links inside Markdown, HTML, and other documents
2020-08-09 21:13:52 +00:00
- handle chunked encodings
- handle gzip compression
- fake user agents (required for some firewalls)
- skip non-links like anchors or relative URLs
2020-08-11 20:48:50 +00:00
- exclude some websites with regular expressions
2020-08-12 10:59:15 +00:00
- handle a configurable number of redirects
2020-08-12 11:10:15 +00:00
- disguise as a different user agent (like curl)
- optionally ignore SSL certificate errors
2020-08-13 13:41:27 +00:00
- run with a low memory/CPU footprint
SOON:
- automatically retry and backoff
- check relative and absolute paths
- limit schema
- check multiple files
- support input files using wildcards
- set timeout for HTTP requests in seconds. Disabled by default.
2020-08-13 15:11:14 +00:00
- support checking links from any website URL
2020-08-13 13:41:27 +00:00
- accept custom headers (see https://github.com/rust-lang/crates.io/issues/788)
2020-08-13 15:11:14 +00:00
- use `HEAD` requests instead of `GET` to avoid network I/O
- show the progress
- show final status
2020-08-09 20:43:18 +00:00
2020-08-04 23:06:27 +00:00
## How?
```
cargo install lychee
```
Set an environment variable with your token like so `GITHUB_TOKEN=xxxx`.
Run it inside a repository with a `README.md` or specify a different Markdown
file with
```
lychee --input <yourfile.md>
```
2020-08-04 23:06:27 +00:00
## Thanks
...to my Github sponsors and Patreon sponsors for supporting these projects. If
you want to help out as well, [go here](https://github.com/sponsors/mre/).