mdurlcheck

command
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: MIT Imports: 8 Imported by: 0

README

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

It takes single .md file as an argument, then finds relative links
(including image links) to other files in it and checks whether such files
exist on the filesystem.

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.

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

If you need to check large directory with markdown files for broken
cross-references, use xargs:

    find . -name \*.md -print0 | xargs -0 -P4 -n1 mdurlcheck

Documentation

Overview

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

It takes single .md file as an argument, then finds relative links (including image links) to other files in it and checks whether such files exist on the filesystem.

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.

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

If you need to check large directory with markdown files for broken cross-references, use xargs:

find . -name \*.md -print0 | xargs -0 -P4 -n1 mdurlcheck

Jump to

Keyboard shortcuts

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