2020-08-04 23:06:27 +00:00
|
|
|

|
|
|
|
|
|
2020-08-07 22:10:30 +00:00
|
|
|

|
|
|
|
|
|
2020-08-04 23:06:27 +00:00
|
|
|
...because who says I can't write yet another link checker.
|
|
|
|
|
|
|
|
|
|
## What?
|
|
|
|
|
|
2020-08-04 23:44:16 +00:00
|
|
|
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-11 14:13:10 +00:00
|
|
|
- run fully asynchronously
|
2020-08-09 21:13:52 +00:00
|
|
|
- handle links inside unstructured (e.g. non-Markdown) documents
|
|
|
|
|
- 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-11 14:13:10 +00:00
|
|
|
- SOON: automatically retry and backoff
|
2020-08-11 20:06:12 +00:00
|
|
|
- SOON: optionally ignore SSL certificate errors
|
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`.
|
|
|
|
|
|
2020-08-04 23:44:16 +00:00
|
|
|
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
|
|
|
|
|
|
2020-08-04 23:44:16 +00:00
|
|
|
...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/).
|