Giter Club home page Giter Club logo

mlab2's Introduction

Upgraded Markdown to HTML/ANSI Converter

This application converts Markdown files into HTML or ANSI format. It uses Node.js to read Markdown files and generates the corresponding HTML or ANSI, which can then be written to a file or outputted to the console.

Installation

Ensure that you have Node.js installed for proper functioning.

Clone the repository and install dependencies:

git clone https://github.com/KobbAsa/mlab2
cd mlab2
npm install

Application Usage

To convert a Markdown file to HTML and specify an output file, use the following command:

 node src/main.js input.md --out output.html --format=html

or

 node src/main.js input.md --out output.html

To convert a Markdown file to ANSI and specify an output file, use the following command:

  node src/main.js input.md --out output.txt --format=ansi

Here input.md is the path to your Markdown file, and output.html or output.txt is the path where you wish to save the HTML or ANSI file.

If you do not specify an output file, the ANSI will be outputted to the console.

 node src/main.js input.md

Tests Usage

Just go to tests directory and run whatever test you want.

For example:

cd test
node ansiConverterTests.js    

The results of tests will be shown in console with marks and explanation.

User Instructions

  • The input file must be in Markdown format.
  • Ensure that all Markdown markers are correctly opened and closed.
  • In case of detection of unclosed markers or nesting errors, the program will throw an error and halt the conversion.

Revert commit here.

Failed CI tests here

Summary

To be honest, I wrote such tests for the first time, so I can't compare with anything from my experience. The tests themselves are written "on snot" and are very simple (like the converter itself tbf). However, even these tests are very useful for pushes and pr`s, in order to be sure and test every function in project and every other case automatically, instead of doing it manually through command prompt before commit.

mlab2's People

Contributors

kobbasa avatar

Watchers

 avatar

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.