Commit graph

23 commits

Author SHA1 Message Date
Matthias Endler
2272ad1a48 Show progress bar by default (can be disabled with --no-progress) 2021-02-21 17:19:32 +01:00
Matthias Endler
e00cdbf1ae example.com -> example.org 2021-02-21 16:33:33 +01:00
Matthias Endler
678dc4f18e Add support for colored output 2021-02-19 00:41:49 +01:00
Matthias Endler
a4b1609424 Improve progress visualization 2021-02-19 00:23:35 +01:00
Matthias Endler
1a95aa4a44 Format 2021-02-19 00:05:14 +01:00
Matthias Endler
69e3b2cffc Formatting 2021-02-18 23:33:26 +01:00
Matthias Endler
59c6093c8a Formatting 2021-02-18 23:33:14 +01:00
Matthias Endler
16cd67331a Add simple, standalone client
Adds a new function `lychee::check()`, which removes
a lot of boilerplate for simple cases. Adjusted the code,
tests, and documentation.
The downside is that `check` now returns a Result, so
we have to use `?` to get to the response. That's because
we have to account for the case where the given string is
not a valid URI.
2021-02-18 01:32:48 +01:00
Matthias Endler
867a9ac31a Collapse output conditions 2021-02-17 12:32:17 +01:00
Matthias Endler
8e5799a041 Always display output in the expected format
Even on stdout we print JSON now if `--format json` is set.
The reason is that not outputting any JSON when the format
is requested can be unintuitive. It is also great for debugging
purposes before sending the output to a file
with the `--output` argument.
2021-02-17 12:22:31 +01:00
Matthias Endler
0872604f18 Clean up program output
Use response.to_string instead of custom status_message function
2021-02-17 12:20:51 +01:00
Matthias Endler
751deeb9b9 Show failure reason in status output
Use HashSet<Response> instead of Vec<Uri> for status output
2021-02-17 12:18:56 +01:00
Matthias Endler
8173e9927f Be more explicit about supported output formats 2021-02-17 12:17:45 +01:00
Matthias Endler
d6b960368a Adjust tests 2021-02-17 12:10:57 +01:00
Matthias Endler
e859f1290e Correct matches for fail_map and add test 2021-02-16 01:21:45 +01:00
Matthias Endler
428df23c1c Fix lints and test on Linux 2021-02-16 00:53:01 +01:00
Matthias Endler
4bec47904e Show input source in status output
If an error occurs during link checking,
it is important to know where the error occured.
Therefore the request and response objects now contain a the input
source as a field. This makes error tracking easier.
2021-02-16 00:15:14 +01:00
Matthias
0b148bf5e6
Exclude e-mails from being checked (#137)
This can be useful in CI environments where SMTP is not allowed.
2021-02-10 11:58:04 +01:00
Paweł Romanowski
836f557829
Ensure destructors are ran before std::process::exit (#134)
See comments in code for more details.
2021-02-08 11:04:01 +01:00
Matthias
a50c04fffe
Add hint about separating inputs from options with -- (fixes #113) (#119) 2021-01-17 17:01:06 +01:00
dependabot-preview[bot]
a3ad492c0b
Update dependencies (reqwest 0.11 and tokio 1.0) (#51)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Matthias Endler <matthias-endler@gmx.net>
2021-01-07 00:10:58 +01:00
Matthias
a78e8318cd
Add (machine-readable) output file support (fixes #53)
For now we only support JSON.
I honestly don't know if it makes sense to include other formats.
For example, MD and HTML are not really
machine-readable. YAML is not
a great standard format for this use-case. Open for discussions, though.
2020-12-14 01:15:14 +01:00
Matthias
b7ab4abb0d
Make lychee usable as a library #13 (#46)
This splits up the code into a `lib` and a `bin`
to make the runtime usable from other crates.

Co-authored-by: Paweł Romanowski <pawroman@pawroman.dev>
2020-12-04 10:44:31 +01:00