In this project, it was created a library that can be accessed by a command line interface (CLI). The module can be imported in Node.js, and it offers an interface where you can follow an .md file to print an array with objects containing:
a. a text: text inside the Markdown;
b. an href: the found URL.
One of the requisites to use this library is to previously install Node.js on your computer. It can be acessed by https://nodejs.org/en/.
Then, the installation can be made by acessing the link npm install -g vhcaldas/SAP003-md-links
.
This module can also be imported by require
, as on this example:
> const mdlinks = require('mdlinks');
> mdlinks('path/mdfile.md')
.then((link) => {
console.log(`${text}: ${href}`)
})
//returns 'title: link'
This application can be executed by terminal as the following example:
md-links <path-to-file>
$ md-Links ./some/example.md