1.0.0 • Published 1 year ago

adamantine-links v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

✦ Adamantine Links Library ✦

GitHub package.json version

Index


1. About the Library

Markdown is a lightweight markup language very popular among developers. It is used in many platforms that handle plain text (GitHub, forums, blogs, ...) and it's very common to find several files in that format in any kind of repository (starting with the traditional README.md).

These Markdown files usually contain links (links) which are often broken or no longer or no longer valid and this greatly impairs the value of the information to be shared.

Within an open source community, we have been proposed to create a tool using Node.js, that reads and parses files in the Markdown format to verify the links they contain and report some statistics.

2. Install and Quick Start

Install

You can execute the commands on your favorite terminal. After typing the name of the package adamantine-links you put the relative path of your markdown file including the md extension as a first parameter to get the basic statistics: href, text and file (url, the clickeable text of that url and the file you're executing). The outcome will be an array of objects.

Installing the package via npm

npm install adamantine-links -g

Install the package via GitHub

https://github.com/Adamantine-art/markdown-links.git

Quick Start

After you have installed the package you can just execute adamantine-links to see the welcome message where you will be shown the commands you can use.

adamantine-links

You can parse any .md file following this structure:

$ adamantine-links your-file.md --CLIoptions

Then the output will be an array of objects with all the links and their properties.

adamantine-links

3. Some Extra Stats

You can get more specific stats by using the following commands:

--validate

You get the additional properties of "status" and "ok".

adamantine-links

--stats

You get the number of total and unique links inside the markdown file.

adamantine-links

--validate --stats

You can get the total number of links, unique and broken links inside the markdown file.

adamantine-links