Commit graph

388 commits

Author SHA1 Message Date
dblock
dcee4a1058 Added support for --exclude-file. 2021-09-03 16:29:57 +02:00
dblock
739a3d6e41 Fix: remove URL that is currently returning a 503. 2021-09-03 16:29:57 +02:00
Matthias
ef65067625
Use HTTPS links 2021-09-03 02:03:39 +02:00
Matthias
d36548417e
Make configuration file easier to find 2021-09-01 14:30:34 +02:00
Matthias
5a26917ba9
Add trigger for manually pushing Docker image 2021-08-20 11:15:32 +02:00
Matthias
a72f2f6ace
Mention epub checking 2021-07-14 16:03:48 +02:00
YAKSH BARIYA
6ef121d3eb
docs: lychee is also available on Termux (#274) 2021-07-05 01:45:32 +02:00
dependabot[bot]
7e497723cb
Bump linkify from 0.6.0 to 0.7.0 (#249)
Bumps [linkify](https://github.com/robinst/linkify) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/robinst/linkify/releases)
- [Changelog](https://github.com/robinst/linkify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/robinst/linkify/compare/0.6.0...0.7.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-19 09:19:51 +02:00
dependabot[bot]
2b21e3b122
Bump url from 2.2.1 to 2.2.2 (#245)
Bumps [url](https://github.com/servo/rust-url) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.2.1...v2.2.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 15:25:24 +02:00
dependabot[bot]
19ae5fecc0
Bump tokio from 1.5.0 to 1.6.0 (#248)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.5.0...tokio-1.6.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 10:38:33 +02:00
dependabot[bot]
e1a6f6688d
Bump assert_cmd from 1.0.3 to 1.0.4 (#247)
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases)
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v1.0.3...v1.0.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-14 12:24:07 +02:00
dependabot[bot]
524583f5e7
Bump openssl-sys from 0.9.62 to 0.9.63 (#244)
Bumps [openssl-sys](https://github.com/sfackler/rust-openssl) from 0.9.62 to 0.9.63.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.62...openssl-sys-v0.9.63)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 10:04:46 +02:00
Matthias
fe399c0a8c
Simple URI cache (#243) 2021-05-04 13:28:39 +02:00
Matthias
434ffacd30
Mention examples folder 2021-04-30 16:33:37 +02:00
Matthias
9f75f28d3d
Add example folder (#241) 2021-04-30 13:33:24 +02:00
dependabot[bot]
bbc763e854
Bump openssl-sys from 0.9.61 to 0.9.62 (#240)
Bumps [openssl-sys](https://github.com/sfackler/rust-openssl) from 0.9.61 to 0.9.62.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.61...openssl-sys-v0.9.62)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-29 10:31:45 +02:00
dependabot[bot]
26875c8fba
Bump predicates from 1.0.7 to 1.0.8 (#239)
Bumps [predicates](https://github.com/assert-rs/predicates-rs) from 1.0.7 to 1.0.8.
- [Release notes](https://github.com/assert-rs/predicates-rs/releases)
- [Changelog](https://github.com/assert-rs/predicates-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/predicates-rs/compare/v1.0.7...v1.0.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-29 10:31:30 +02:00
dependabot-preview[bot]
4f5a9f060f
Upgrade to GitHub-native Dependabot (#238)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-29 00:45:29 +02:00
Matthias
12c6f0496c
fix line break 2021-04-26 18:28:29 +02:00
Matthias
164e1aea7e
Add support for multiple schemes (#237) 2021-04-26 18:24:54 +02:00
Matthias
f8426bafbf
Skip unsupported schemes (#236) 2021-04-26 17:16:58 +02:00
Matthias
2a80760f58
Fix crates.io 404 with quirk (#235) 2021-04-26 14:20:54 +02:00
Matthias
7a8bac9ac5
Update README.md 2021-04-24 19:08:57 +02:00
Matthias
952dc6a04c
Reorder sections 2021-04-24 16:23:36 +02:00
Matthias
38d162e238
Fix syntax 2021-04-24 16:04:56 +02:00
Matthias
5621a2946a
Add Arch installation instructions 2021-04-24 16:04:17 +02:00
Matthias
dfc0c16a2e
Add NixOS 2021-04-24 15:53:51 +02:00
Matthias
d3e6abed90
Extend installation instructions and move them up 2021-04-24 15:33:25 +02:00
dependabot-preview[bot]
d651b1ef7b Bump regex from 1.4.5 to 1.4.6
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.5 to 1.4.6.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.4.5...1.4.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-23 06:38:34 +00:00
Matthias
1865f7a309
Use thumbnail endpoint for YouTube links (#232) 2021-04-23 01:23:15 +02:00
Matthias
1926c73b6b
Add missing docs (#231)
This enables `#![deny(missing_docs)`) and adds all missing doc strings
2021-04-23 00:27:12 +02:00
Matthias
4980cb1ed1
Add year and owner to MIT license text 2021-04-17 19:54:01 +02:00
Matthias
f7f9485be0
Bump version to 0.7 (#229) 2021-04-17 13:41:00 +02:00
Lucius Hu
f64213d58c
More refactor (#225)
- Major changes in `lychee-lib::filter` module:
  - Fields in `Excludes` except the `RegexSet` is now moved to `Filter`.
  - `Filter` contains `Option<Excludes>` and `Option<Includes>`, which are
    wrapper struct of `RegexSet` instead of `Option<RegexSet>`. As a result
    the code now looks cleaner.
  - Factored out some filtering logics to dedicated functions.
    - It's possible to write tests for those functions in addition to tests
      for the `Filter` struct.
  - Added docs to `Filter::is_excluded` and reorgnized the code.
- placed `derive_builder` by `typed_builder`:
  - The internal interface very ugly, as admitted by the author, but we no
    longer have nested `Option`s like before.
  - As a result, the `Client` building is much easier to read.
  - Main benefit of `typed_builder` is, the arguments feeded to builder is
    checked at compile time instead of run-time.
- Fixed a bug in `lychee::tests::usage` and `lychee-lib::stats::test`.
  - Now it will clear environment variable which would otherwise cause an
    issue if `GITHUB_TOKEN` is set.
- Updated dependencies.

Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
2021-04-16 20:25:22 +02:00
dependabot-preview[bot]
63774c9ce2 Bump pretty_assertions from 0.7.1 to 0.7.2
Bumps [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases)
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/compare/v0.7.1...v0.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-16 06:48:39 +00:00
Matthias
cb512dbf2e
Fix link to ClientBuilder documentation after refactor 2021-04-16 00:53:06 +02:00
Matthias
3ed06da829
Update link to docs 2021-04-15 12:42:37 +02:00
Matthias Endler
970d978657 Fix Dockerfile after refactor 2021-04-15 02:36:01 +02:00
Lucius Hu
228e5df6a3
Major refactor of codebase (#208)
- The binary component and library component are separated as two
  packages in the same workspace.
  - `lychee` is the binary component, in `lychee-bin/*`.
  - `lychee-lib` is the library component, in `lychee-lib/*`.
  - Users can now install only the `lychee-lib`, instead of both
    components, that would require fewer dependencies and faster
    compilation.
  - Dependencies for each component are adjusted and updated. E.g.,
    no CLI dependencies for `lychee-lib`.
  - CLI tests are only moved to `lychee`, as it has nothing to do
    with the library component.
- `Status::Error` is refactored to contain dedicated error enum,
  `ErrorKind`.
  - The motivation is to delay the formatting of errors to strings.
    Note that `e.to_string()` is not necessarily cheap (though
    trivial in many cases). The formatting is no delayed until the
    error is needed to be displayed to users. So in some cases, if
    the error is never used, it means that it won't be formatted at
    all.
- Replaced `regex` based matching with one of the following:
  - Simple string equality test in the case of 'false positivie'.
  - URL parsing based test, in the case of extracting repository and
    user name for GitHub links.
  - Either cases would be much more efficient than `regex` based
    matching. First, there's no need to construct a state machine for
    regex. Second, URL is already verified and parsed on its creation,
    and extracting its components is fairly cheap. Also, this removes
    the dependency on `lazy-static` in `lychee-lib`.
- `types` module now has a sub-directory, and its components are now
  separated into their own modules (in that sub-directory).
- `lychee-lib::test_utils` module is only compiled for tests.
- `wiremock` is moved to `dev-dependency` as it's only needed for
  `test` modules.
- Dependencies are listed in alphabetical order.
- Imports are organized in the following fashion:
  - Imports from `std`
  - Imports from 3rd-party crates, and `lychee-lib`.
  - Imports from `crate::*` or `super::*`.
- No glob import.
- I followed suggestion from `cargo clippy`, with `clippy::all` and
  `clippy:pedantic`.

Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
2021-04-15 01:24:11 +02:00
dependabot-preview[bot]
a3f62fc558 Bump tokio from 1.4.0 to 1.5.0
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.4.0...tokio-1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 07:15:51 +00:00
dependabot-preview[bot]
6278964536 Bump reqwest from 0.11.2 to 0.11.3
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.2 to 0.11.3.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.2...v0.11.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 07:07:45 +00:00
Matthias
2d2009ffe0
Assume HTML in case there is no extension (e.g. for URLs) (#217)
This is not entirely correct, but covers more use-cases
than previously. Eventually we have to revisit this
and implement a proper solution
2021-04-12 16:46:37 +02:00
Matthias
f66aaecf0f
Assume HTML in case there is no extension (e.g. for URLs) (#197) 2021-04-12 14:40:39 +02:00
dependabot-preview[bot]
c62a44aa30 Bump futures from 0.3.13 to 0.3.14
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.13 to 0.3.14.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.13...0.3.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-12 07:23:45 +00:00
dependabot-preview[bot]
45b40a3e06
Bump linkify from 0.5.0 to 0.6.0 (#212)
Bumps [linkify](https://github.com/robinst/linkify) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/robinst/linkify/releases)
- [Changelog](https://github.com/robinst/linkify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/robinst/linkify/compare/0.5.0...0.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-09 10:56:09 +02:00
dependabot-preview[bot]
840e1c753d Bump http from 0.2.3 to 0.2.4
Bumps [http](https://github.com/hyperium/http) from 0.2.3 to 0.2.4.
- [Release notes](https://github.com/hyperium/http/releases)
- [Changelog](https://github.com/hyperium/http/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/http/compare/v0.2.3...v0.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-08 07:44:45 +00:00
dependabot-preview[bot]
5aeea1d3f7
Bump derive_builder from 0.9.0 to 0.10.0 (#205)
Bumps [derive_builder](https://github.com/colin-kiegel/rust-derive-builder) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/colin-kiegel/rust-derive-builder/releases)
- [Commits](https://github.com/colin-kiegel/rust-derive-builder/compare/v0.9.0...v0.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-05 18:38:41 +02:00
Yiyao Wei
43860b329d
Improve example configuration file (#206)
* no need of double quote here

* update example configuration file
2021-04-04 16:59:22 +02:00
Matthias
33e952b428
Only use oembed on YT video links (fixes #198) (#204) 2021-04-01 16:12:26 +02:00
Paweł Romanowski
e6f11c381b
Bump check-if-email-exists to latest (#203) 2021-04-01 10:43:50 +02:00