@marifervl/md-links

1.0.1 • Public • Published



Index


1. About the project


This package is a command-line interface (CLI) tool that allows you to analyze Markdown files to extract and validate information about the links they contain.

Programming language


2. Installation


To install the package, use the following command:

npm install @marifervl/md-links


Back


3. Usage


El paquete ofrece la siguiente interfaz:

md-links <path> [options]


Where <path> is the absolute or relative path to the file or directory to analyze, and [options] are additional options that can be used to customize the output.

Options:


--validate

If this option is included, the package will make an HTTP request to verify if each link works correctly. If the link redirects to a URL that responds "ok", then it will be considered as a valid link. The output will include the status of the HTTP response received.


--stats

If this option is included, the output will include basic statistics about the links found in the file. The total number of links found and the number of unique links will be displayed.


--validate --stats

If both options are included, the output will include statistics about the links found, including how many links are broken (i.e., do not respond "ok" when making an HTTP request).


Usage examples


md-links file.md

Prints to the console the links found in the file file.md, along with the file path where each link was found and the text that appears within the link.

md-links directory/

Analyzes all Markdown files within the directory directory/ and its subdirectories, and prints to the console the links found.

md-links file.md --validate

Prints to the console the links found in the file file.md, along with the file path where each link was found, the text that appears within the link, and the status of the HTTP response received when making an HTTP request.

md-links file.md --stats

Prints to the console basic statistics about the links found in the file file.md, including the total number of links found and the number of unique links.

md-links file.md --validate --stats

Prints to the console statistics about the links found in the file file.md, including the total number of links found, the number of unique links, and the number of broken links.


Back


4. Demo



https://user-images.githubusercontent.com/99364311/235831788-c529e3a2-a2df-4d7d-86e9-ad411cbb323a.mp4



Back


5. Contribution


If you would like to contribute to the package, please follow these steps:
  1. Fork the repository.
  2. Create a new branch for your changes (git checkout -b my-branch).
  3. Make your changes and commit them ( git commit -am "Add new functionality" ).
  4. Push the changes to your fork ( git push origin my-branch ).
  5. Create a pull request from your fork to the main branch of the original repository.
  6. Wait for your pull request to be reviewed and accepted.


6. License


This package is licensed under the ISC license.

7. References



Back

Package Sidebar

Install

npm i @marifervl/md-links

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

24.2 kB

Total Files

11

Last publish

Collaborators

  • marifervl