Skip to main content

Tool for finding broken references and links in Markdown files.

Project description

RefCheck

RefCheck is a simple tool for finding broken references and links in Markdown files.

usage: refcheck [OPTIONS] [PATH ...]

positional arguments:
  PATH                  Markdown files or directories to check

options:
  -h, --help            show this help message and exit
  -e, --exclude [ ...]  Files or directories to exclude
  -cm, --check-remote   Check remote references (HTTP/HTTPS links)
  -nc, --no-color        Turn off colored output
  -v, --verbose         Enable verbose output
  --allow-absolute      Allow absolute path references like [ref](/path/to/file.md)

:construction: RefCheck is still in its early development. If you encounter any issues or have suggestions, please feel free to open an issue or pull request. :construction:

Installation

RefCheck is available on PyPI:

pip install refcheck

Examples

$ refcheck README.md

[+] 1 Markdown files to check.
- README.md

[+] FILE: README.md...
README.md:3: #introduction - OK
README.md:5: #installation - OK
README.md:6: #getting-started - OK

Reference check complete.

============================| Summary |=============================
🎉 No broken references.
====================================================================
$ refcheck . --check-remote

[+] Searching for markdown files in C:\Users\flumi3\github\refcheck ...

[+] 2 Markdown files to check.
- tests\sample_markdown.md
- docs\Understanding-Markdown-References.md

[+] FILE: tests\sample_markdown.md...
tests\sample_markdown.md:39: /img/image.png - BROKEN
tests\sample_markdown.md:52: https://www.openai.com/logo.png - BROKEN

[+] FILE: docs\Understanding-Markdown-References.md...
docs\Understanding-Markdown-References.md:42: #local-file-references - OK

Reference check complete.

============================| Summary |=============================
[!] 2 broken references found:
tests\sample_markdown.md:39: /img/image.png
tests\sample_markdown.md:52: https://www.openai.com/logo.png
====================================================================

Features

  • Find and check various reference patterns in Markdown files
  • Highlight broken references
  • Validate absolute and relative file paths to any file type
  • Support for checking remote references, such as [Google](https://www.google.com)
  • User friendly CLI
  • Easy CI pipeline integration - perfect for ensuring the quality of your Wiki

Contributing

Getting Started

  1. Install Poetry

    pipx install poetry
    
  2. Make Poetry install virtual environments in project root

    poetry config virtualenvs.in-project true
    
  3. Install dependencies

    poetry install
    
  4. Run refcheck

    poetry run refcheck
    

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

refcheck-0.2.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

refcheck-0.2.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file refcheck-0.2.0.tar.gz.

File metadata

  • Download URL: refcheck-0.2.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.9 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for refcheck-0.2.0.tar.gz
Algorithm Hash digest
SHA256 744d50839a53e35e4ff1a25d92cc88a4f29afae59fe596ec3314cc182513724d
MD5 6b420336f5f9cd74699a1d3935bbe0fe
BLAKE2b-256 aa14ffee654f5616e46decb5a87d4346bd641f98aff54ae40fc1ec3ab1675ae0

See more details on using hashes here.

File details

Details for the file refcheck-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: refcheck-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.9 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for refcheck-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b5161bcf9fcbe7911f5c4efb854bfef3e56d8bf4522b50e230a6b6877ff673d
MD5 373474755f29296547fd6d4c97b08aa2
BLAKE2b-256 65e5b4aeb60a3791b0e60030e41ebe80e1118f9b22d2e4154db20886dceb39d5

See more details on using hashes here.

Supported by

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