https://github.com/marifervl/md-links
A CLI tool to analyze and validate links in Markdown files. Extract link information and ensure their validity effortlessly. JavaScript-based. Easy installation with `npm install @marifervl/md-links`. Enhance analysis with `--validate` and `--stats` options. Examples: `md-links file.md`, `md-links directory/`. Efficient and reliable.
https://github.com/marifervl/md-links
chalk javascript nodejs unit-testing
Last synced: 7 months ago
JSON representation
A CLI tool to analyze and validate links in Markdown files. Extract link information and ensure their validity effortlessly. JavaScript-based. Easy installation with `npm install @marifervl/md-links`. Enhance analysis with `--validate` and `--stats` options. Examples: `md-links file.md`, `md-links directory/`. Efficient and reliable.
- Host: GitHub
- URL: https://github.com/marifervl/md-links
- Owner: MariferVL
- Created: 2023-04-15T00:43:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-06T03:11:08.000Z (over 2 years ago)
- Last Synced: 2025-02-06T23:31:43.214Z (9 months ago)
- Topics: chalk, javascript, nodejs, unit-testing
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@marifervl/md-links
- Size: 1.11 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Author
[María-Fernanda Villalobos](https://github.com/MariferVL)
Access Documents »
Access Deployment »
## Index
* [1. About the project](#1-about-the-project)
* [2. Installation](#2-installation)
* [3. Usage](#3-usage)
* [4. Demo](#4-demo)
* [5. Contribution](#5-contribution)
* [6. License](#6-license)
* [7. References](#7-references)
***
## 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
- [Javascript](https://www.javascript.com/)
## 2. Installation
To install the package, use the following command:
``` npm install @marifervl/md-links ```
## 3. Usage
El paquete ofrece la siguiente interfaz:
``` md-links [options] ```
Where ``` ``` 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.
## 4. Demo
https://user-images.githubusercontent.com/99364311/235831788-c529e3a2-a2df-4d7d-86e9-ad411cbb323a.mp4
## 5. Contribution
If you would like to contribute to the package, please follow these steps:
-
Fork the repository.
-
Create a new branch for your changes (git checkout -b my-branch).
-
Make your changes and commit them ( git commit -am "Add new functionality" ).
-
Push the changes to your fork ( git push origin my-branch ).
-
Create a pull request from your fork to the main branch of the original repository.
-
Wait for your pull request to be reviewed and accepted.
## 6. License
This package is licensed under the ISC license.
## 7. References
- [Node - Docs](https://nodejs.org/es/docs)
- [npm](https://www.npmjs.com/)
- [Jest - Getting Started](https://jestjs.io/docs/getting-started)
- [StackOverflow](https://stackoverflow.com/)
- [MDN WebDocs](https://developer.mozilla.org/en-US/)