Git Product home page Git Product logo

lim014-mdlinks's Introduction

Fuente Laboratoria

ExtLink


Índice

1. About ExtLink markdown library

ExtLink is a free, open source JavaScript library that allows you to read, parse, and validate links to files in Markdown (.md) formats, using HTTP requests (http.get) in node.js.

In addition, this library allows access to the statistics of these links.

2. Installing

Using CLI (Command Line Interface)

You can use this module installing it in your package json as follows in your terminal:

$ npm install --save-dev https://github.com/meryvera/LIM014-mdlinks

3. Usage

Interface:

You can use this module under the following structure:

mdLinks 'path-to-file' --options

IMPORTANT. In the interface, 'path-to-file' is the path of your Markdown file or folder with markdown files and other files, and where:

--options

It can take the following values:

no options

Just with a path and without any option, the module will return a list of all links found in all markdown files. This list shows the entered path to be analyzed, the links found in each markdown file and the text of each link. Example: ExtLink

--validate

With this option, the module makes an HTTP request to find out if the link works or not. If the link results in a redirect to a URL that responds ok, then we will treat the link as ok. Example: ExtLink

--stats

With this option, the output will be a text with basic statistics about the links. Example: ExtLink

--stats --validate

With the combination of both values you will obtain the statistics that you need from the validation results. Example: ExtLink

--help

With --help option, you can access to the information above in your terminal .

4. Importing

Interface:

mdLinks(path, options)

Using Import

You can import the module in your scripts:

import mdLinks from 'md-links-mv';
const mdLinks = require('md-links-mv');

Using Api

You can also use the module´s api in your proyect, using the interface above, where 'path' is your file path and 'options' can take true value if you want to use the api with http states of each link found in markdown files, and false value or null value if you just want to get a list with the details .

Example 1: ExtLink

Example 2: ExtLink

5. Version

1.0.1

6. Licence

Licencia MIT ©️ 2021

7. Action Plan

Project mdlinks

Flowchart-API

Flowchart-CLI

lim014-mdlinks's People

Contributors

meryvera avatar fakel avatar

lim014-mdlinks's Issues

HU 4 - Función de JavaScript API - mdLinks(path, options)

INPUT: Esta función recibe 2 parámetros. Path y Options.
INTRUCCIONES: Esta función debe resolver todas la funciones pequeñas, de recursividad y de análisis de estatus.
OUTPUT: Esta función debe retornar 1 PROMESA, que resuelva un Array de objetos, donde cada objeto represente un link y contiene las siguientes propiedades:

  • href: URL encontrada
  • text: Texto que aparecía dentro del link ()
  • file: Ruta del archivo donde se encontró el link.

HU 9 - Testeo de función CLI

Se realizará el testeo con Mocha y Jest de:

  • Testeo de funciones pequeñas
  • Testeo de función de recursividad
  • Testeo de función de análisis de Estados HTTP
  • Testeo de función CLI

FLOWCHART 2 - CLI

Mediante un diagrama de flujo se identificará el recorrido de la petición de la librería mediante CLI.

FLOWCHART 1 - JavaScript 1

Mediante un diagrama de flujo se identificará el recorrido de la petición de la librería mediante JavaScript API.

HU 5 - Testeo de función JavaScript API

Se realizará el testeo con Mocha y Jest de:

  • Testeo de funciones pequeñas
  • Testeo de función de recursividad
  • Testeo de función de análisis de Estados HTTP
  • Testeo de función JavaScript API

Documentación del READ.md

Todo lo relevante para que cualquier developer que quiera usar mi librería pueda hacerlo sin inconvenientes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.