Skip to content
/ mle Public

Extracts links from markup files. Currently `html` and `markdown` files are supported.

License

Notifications You must be signed in to change notification settings

hoijui/mle

Repository files navigation

Markup Link Extractor

License: AGPL-3.0-or-later REUSE status Repo Package Releases Documentation Releases downloads Dependency Status Build Status

In cooperation with FabCity Hamburg In cooperation with Open Source Ecology Germany

Extracts links in markup files. Currently html and markdown files are supported. The main intended purpose of the Markup Link Extractor, is to extract links fro ma set of files, and then check them for validity using a separate tool, e.g. the Markdown Link Checker. Together, two such tools could be integrated in your CI pipeline to warn about broken links in your markup docs.

Features

  • Find links in markdown and html files
  • Support HTML links and plain URLs in markdown files
  • User friendly command line interface
  • Easy CI pipeline integration
  • Very fast execution using async

Install Locally

There are different ways to install and use mle.

Cargo

Use rust's package manager cargo to install mle from crates.io:

cargo install mle

Download Binaries

To download a compiled binary version of mle go to github releases and download the binaries compiled for x86_64-unknown-linux-gnu or x86_64-apple-darwin.

CI Pipeline Integration

GitHub Actions

Use mle in GitHub using the GitHub-Action from the Marketplace.

- name: Markup Link Extractor (mle)
  uses: hoijui/mle@v0.14.3

Use mle command line arguments using the with argument:

- name: Markup Link Extractor (mle)
  uses: hoijui/mle@v0.14.3
  with:
    args: ./README.md

Binary

To integrate mle in your CI pipeline running in a linux x86_64 environment, you can add the following commands to download the tool:

curl -L https://github.com/hoijui/mle/releases/download/v0.14.3/mle -o mle
chmod +x mle

For example take a look at the ntest repo which uses mle in the CI pipeline.

Docker

Use the mle docker image from the docker hub, which includes mle.

Usage

Once you have mle installed, it can be called from the command line. The following call will extract all links in markup files found in the current folder and all subdirectories:

mle

Another example is to call mle on a certain directory or file:

mle ./docs

Call mle with the --help flag to display all available cli arguments:

mle -h

See the reference for all available command line arguments.

Funding

This project was funded by the European Regional Development Fund (ERDF) in the context of the INTERFACER Project, from July 2022 (fork from mlc/project start) until March 2023.

Logo of the EU ERDF program

About

Extracts links from markup files. Currently `html` and `markdown` files are supported.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages