Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nschloe/deadlink
:skull: Checks and fixes URLs in code and documentation.
https://github.com/nschloe/deadlink
command-line python tool url
Last synced: 6 days ago
JSON representation
:skull: Checks and fixes URLs in code and documentation.
- Host: GitHub
- URL: https://github.com/nschloe/deadlink
- Owner: nschloe
- License: mit
- Created: 2021-04-20T08:51:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-19T16:53:37.000Z (about 2 years ago)
- Last Synced: 2024-09-26T01:28:28.954Z (14 days ago)
- Topics: command-line, python, tool, url
- Language: Python
- Homepage:
- Size: 1.72 MB
- Stars: 161
- Watchers: 4
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-cli-apps - deadlink - Find dead links in files. (Utilities / Calendars)
- fucking-awesome-cli-apps - deadlink - Find dead links in files. (Utilities / Calendars)
- project-awesome - nschloe/deadlink - :skull: Checks and fixes URLs in code and documentation. (Python)
README
[![PyPi Version](https://img.shields.io/pypi/v/deadlink.svg?style=flat-square)](https://pypi.org/project/deadlink/)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/deadlink.svg?style=flat-square)](https://pypi.org/project/deadlink/)
[![GitHub stars](https://img.shields.io/github/stars/nschloe/deadlink.svg?style=flat-square&logo=github&label=Stars&logoColor=white)](https://github.com/nschloe/deadlink/)
[![Downloads](https://pepy.tech/badge/deadlink/month?style=flat-square)](https://pepy.tech/project/deadlink)[![gh-actions](https://img.shields.io/github/workflow/status/nschloe/deadlink/ci?style=flat-square)](https://github.com/nschloe/deadlink/actions?query=workflow%3Aci)
[![codecov](https://img.shields.io/codecov/c/github/nschloe/deadlink.svg?style=flat-square)](https://app.codecov.io/gh/nschloe/deadlink)
[![LGTM](https://img.shields.io/lgtm/grade/python/github/nschloe/deadlink.svg?style=flat-square)](https://lgtm.com/projects/g/nschloe/deadlink)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)Parses text files for HTTP URLs and checks if they are still valid. Install with
```
pip install deadlink
```and use as
```sh
deadlink check README.md # or multiple files/directories
# or deadlink c README.md
```To explicitly allow or ignore certain URLs, use
```
deadlink check README.md -a http: -i stackoverflow.com github
```This only considers URLs containing `http:` and _not_ containing `stackoverflow.com` or
`github`. You can also place allow and ignore lists in the config file
`~/.config/deadlink/config.toml`, e.g.,```toml
allow_urls = [
"https:"
]
ignore_urls = [
"stackoverflow.com",
"math.stackexchange.com",
"discord.gg",
"doi.org"
]
igonore_files = [
".svg"
]
```See
```
deadlink check -h
```for all options.
Use```sh
deadlink replace-redirects paths-or-files
# or deadlink rr paths-or-files
```to replace redirects in the given files. The same filters as for `deadlink check` apply.
Example output:
![](https://nschloe.github.io/deadlink/example-output-carbon.png)
#### Similar projects:
- [awesome_bot](https://github.com/dkhamsing/awesome_bot)
- [brök](https://github.com/smallhadroncollider/brok)
- [link-verifier](https://github.com/bmuschko/link-verifier)