Home

Awesome

<p align="center"> <a href="https://github.com/nschloe/deadlink"><img alt="deadlink" src="https://nschloe.github.io/deadlink/logo-with-text.svg" width="60%"></a> </p>

PyPi Version PyPI pyversions GitHub stars Downloads

<!--[![PyPi downloads](https://img.shields.io/pypi/dm/deadlink.svg?style=flat-square)](https://pypistats.org/packages/deadlink)-->

gh-actions codecov LGTM Code style: black

Parses text files for HTTP URLs and checks if they are still valid. Install with

pip install deadlink

and use as

<!--TODO activate--> <!--pytest.mark.skip-->
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.,

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

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:

<!--screenshot created with https://carbon.now.sh/-->

Similar projects: