Coder Social home page Coder Social logo

lab1-mtrpz's Introduction

Markdown to HTML converter (lab1-mtrpz)

A console application that takes as input a path to a text file with Markdown markup and generates a fragment of HTML markup from it. The application outputs the generated HTML markup either to the standard output (stdout), or if there is an argument with the output file to the output file. If the markup in the input file is incorrect, the application outputs the error to standard error (stderr) and terminates with a non-zero exit code

Installation of the project

To be able to use the project, you can clone the repository to the desired folder:

git clone https://github.com/yatsenkoM/lab1-mtrpz.git /path/to/the/folder

or you can go to the desired folder and write there:

git clone https://github.com/yatsenkoM/lab1-mtrpz.git

or you can download the zip archive of this repository and extract it to the desired folder

Note

For further use of the application, node.js must be installed on your device

Using the application

before starting use, you should go to the folder containing the "index.js" file, in this case it is the "lab1-mtrpz" folder

There are two ways to use it:

  • If you need to output the text directly to the console, you can use the following command:
node index.js /path/to/input.md
  • If you need to write text to a file, use this command:
node index.js /path/to/input.md --out /path/to/output.html

Example:

Input text:

**Жовта сова** _на_ `старому дереві` відправилася на подорож. Під час **своєї_мандрівки** вона зустріла _маленького_ їжачка, який `блукав у пошуках` свого дому.

Жовта сова **вирішила допомогти** їжачкові. Вона підказала йому _найкращий_ шлях та _привела_ його до _затишної нори_ під великим дубом.
```
Після того, як їжачок знайшов **свій** дім, вони разом провели **чудовий** день, ділячись _історіями_ та пригодами.
```
Коли настав час прощання, **жовта сова** й **маленький їжачок** побажали один одному _безпечної подорожі_ та _зустрічі_ в майбутньому.

Output text:

<p><b>Жовта сова</b> <i>на</i> <tt>старому дереві</tt> відправилася на подорож. Під час <b>своєї_мандрівки</b> вона зустріла <i>маленького</i> їжачка, який <tt>блукав у пошуках</tt> свого дому.</p>
<p>Жовта сова <b>вирішила допомогти</b> їжачкові. Вона підказала йому <i>найкращий</i> шлях та <i>привела</i> його до <i>затишної нори</i> під великим дубом.
<pre>
Після того, як їжачок знайшов **свій** дім, вони разом провели **чудовий** день, ділячись _історіями_ та пригодами.
</pre>
Коли настав час прощання, <b>жовта сова</b> й <b>маленький їжачок</b> побажали один одному <i>безпечної подорожі</i> та <i>зустрічі</i> в майбутньому.</p>

Revert commit

lab1-mtrpz's People

Contributors

mksyats 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.