Giter Club home page Giter Club logo

mtrpz-lab-1's Introduction

Simplified Markdown to HTML converter

This command-line tool takes as input a path to a text file containing simplified Markdown markup and converts it to a fragment of HTML.

The resulting HTML markup is either printed to standard output (stdout) or written to the output file if the path to it is specified using the --out flag.

The tool also validates Markdown markup for correctness. If errors are encountered, it prints the appropriate message to standard error (stderr) and exits with a non-zero status code.

Caution

The current version of the tool can only handle files with UNIX line endings (LF or '\n')

Prerequisites

To use this tool, you must have Node.js installed on your system.

Note

You can install the current long-term support version of Node.js on the platform's official download page

Installation

Clone this repository to the desired location on your system:

git clone --depth 1 https://github.com/kushnirko/mtrpz-lab-1.git /path/to/desired/location/ 

Note

Alternatively, you can download the source code archive of the latest release

Usage

  1. Navigate to the directory where the repository was cloned:
cd /path/to/repository/
  1. Go to the lib/ directory:
cd lib/
  1. Run one of the following commands (you can use *.md or *.txt as input files):
node app.js /path/to/input.md
node app.js /path/to/input.txt --out /path/to/output.html

Example

This example shows exactly how the tool converts Markdown markup to HTML

Input:

```
Лабці з _МТРПЗ_ присвячується:
```
Якщо зараз **совість тебе гризе**,
сядь і зроби лабку з `МТРПЗ`!

_В дружбі чи в коханні_ може не везе?
Сядь і зроби **лабку з МТРПЗ!**

```
Від **злості чи від страху** тебе трясе?

Сядь і зроби лабку з `МТРПЗ!`
```

Ніщо _більшого_щастя_ тобі не принесе,
_`_ ніж `виконана лабка з МТРПЗ`! `_`

Output:

<p>
<pre>
Лабці з _МТРПЗ_ присвячується:
</pre>
Якщо зараз <b>совість тебе гризе</b>,
сядь і зроби лабку з <tt>МТРПЗ</tt>!</p>
<p><i>В дружбі чи в коханні</i> може не везе?
Сядь і зроби <b>лабку з МТРПЗ!</b></p>
<p>
<pre>
Від **злості чи від страху** тебе трясе?

Сядь і зроби лабку з `МТРПЗ!`
</pre>
</p>
<p>Ніщо <i>більшого_щастя</i> тобі не принесе,
<i>`</i> ніж <tt>виконана лабка з МТРПЗ</tt>! <tt>_</tt></p>

Links

mtrpz-lab-1's People

Watchers

Mykola Kushnir 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.