mirror of
https://github.com/NotAShelf/mdlinkt.git
synced 2025-10-02 15:03:40 +00:00
docs: clean up README
This commit is contained in:
parent
f056717a36
commit
013de9960d
1 changed files with 26 additions and 14 deletions
40
README.md
40
README.md
|
@ -1,47 +1,59 @@
|
|||
# 🚨 mdlinkt
|
||||
|
||||
A CLI tool for detecting dead or inaccessible links in markdown files.
|
||||
Practical CLI tool for detecting dead or inaccessible links in markdown files.
|
||||
|
||||
## Usage
|
||||
|
||||
To check a markdown file for dead or inaccessible links
|
||||
|
||||
```console
|
||||
mdlinkt -file your-file.md
|
||||
```bash
|
||||
$ mdlinkt -file your-file.md
|
||||
<some output here>
|
||||
```
|
||||
|
||||
This will return each tested link and a summary message in an example markdown file containing 1 valid and 1 invalid file.
|
||||
This will return each tested link and a summary message in an example markdown
|
||||
file containing 1 valid and 1 invalid file. For example, for a `test.md`
|
||||
containing `https://probablynotvalid.com`:
|
||||
|
||||
```console
|
||||
mdlinkt -file test.md
|
||||
```bash
|
||||
$ mdlinkt -file test.md
|
||||
2023/12/12 12:00:00 ERROR Invalid link: https://probablynotvalid.com
|
||||
2023/12/12 12:00:00 INFO Summary: 1 valid links, 1 invalid links
|
||||
```
|
||||
|
||||
Should you want more details on the links that are scanned, you may pass the `-verbose` flag.
|
||||
Should you want more details on the links that are scanned, you may pass the
|
||||
`-verbose` flag.
|
||||
|
||||
```console
|
||||
```bash
|
||||
2023/12/12 12:00:00 INFO https://github.com: 200
|
||||
2023/12/12 12:00:00 ERROR Invalid link: https://probablynotvalid.com
|
||||
2023/12/12 12:00:00 INFO Summary: 1 valid links, 1 invalid links
|
||||
```
|
||||
|
||||
In case of invalid links, the program will exit with exit code 1, making it perfect for usage in
|
||||
GitHub actions or other pipelines.
|
||||
> [!TIP]
|
||||
> In case of invalid links, the program will exit with exit `code 1`, making it
|
||||
> perfect for usage in GitHub actions or other pipelines.
|
||||
|
||||
### Performance
|
||||
|
||||
For a file containing **10,000 invalid links**, the **Hyperfine** benchmark is as follows.
|
||||
For a file containing **10,000 invalid links**, the **Hyperfine** benchmark is
|
||||
as follows.
|
||||
|
||||
<!-- markdownlint-disable line-length -->
|
||||
|
||||
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|
||||
| :-------------------------------- | -----------: | -------: | -------: | -------: |
|
||||
| `mdlinkt -verbose -file links.md` | 822.2 ± 22.6 | 787.4 | 959.8 | 1.00 |
|
||||
|
||||
The test has been conducted on a **Ryzen 5 3600X**, at a **95 ± 5 MB/s** bandwitdh speed.
|
||||
<!-- markdownlint-enable line-length -->
|
||||
|
||||
The test has been conducted on a **Ryzen 5 3600X**, at a **95 ± 5 MB/s**
|
||||
bandwitdh speed.
|
||||
|
||||
## Hacking
|
||||
|
||||
A nix flake is provided. Use `direnv allow` or `nix develop` to enter the development shell.
|
||||
A nix flake is provided. Use `direnv allow` or `nix develop` to enter the
|
||||
development shell.
|
||||
|
||||
### Contributing
|
||||
|
||||
|
@ -49,4 +61,4 @@ PRs are always welcome.
|
|||
|
||||
## License
|
||||
|
||||
**mdlinkt** is licensed under the GPLv3. See [LICENSE](LICENSE) for more details.
|
||||
Available under the GPLv3. See [LICENSE](LICENSE) for more details.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue