mdurlcheck

command
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 14 Imported by: 0

README

Program mdurlcheck checks whether given markdown files have any broken
relative links to other files.

It takes one or more .md files or directories as its arguments, then finds
relative links (including image links) to other files/directories in them
and checks whether such files/directories exist on the filesystem. If
argument is directory, it recursively traverses this directory in search of
.md files, while skipping directories with names starting with dot.

Provided with the following file:

    [Document 1](doc1.md), [document 2](doc2.md), and [another
    one](dir/doc.md)

    ![program illustration](img/screenshot.jpg "Screenshot")

The program will check whether files doc1.md, doc2.md, dir/doc.md, and
img/screenshot.jpg exist on disk, relative to the location of provided file.

If markdown file has any embedded html, this tool also parses such html
taking into account all name or id attributes on html tags.

Program reports any errors on stderr and exits with non-zero exit code.

Documentation

Overview

Program mdurlcheck checks whether given markdown files have any broken relative links to other files.

It takes one or more .md files or directories as its arguments, then finds relative links (including image links) to other files/directories in them and checks whether such files/directories exist on the filesystem. If argument is directory, it recursively traverses this directory in search of .md files, while skipping directories with names starting with dot.

Provided with the following file:

[Document 1](doc1.md), [document 2](doc2.md), and [another
one](dir/doc.md)

![program illustration](img/screenshot.jpg "Screenshot")

The program will check whether files doc1.md, doc2.md, dir/doc.md, and img/screenshot.jpg exist on disk, relative to the location of provided file.

If markdown file has any embedded html, this tool also parses such html taking into account all name or id attributes on html tags.

Program reports any errors on stderr and exits with non-zero exit code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL