Skip to main content

Check and fix URLs in text files

Project description

deadlink

PyPi Version PyPI pyversions GitHub stars Downloads

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

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:

Similar projects:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deadlink-0.5.0.tar.gz (13.3 kB view hashes)

Uploaded Source

Built Distribution

deadlink-0.5.0-py3-none-any.whl (10.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page