{"id":19392169,"url":"https://github.com/hlibpavlyk/markdown-parser","last_synced_at":"2026-05-03T22:33:15.126Z","repository":{"id":239460244,"uuid":"768862470","full_name":"HlibPavlyk/markdown-parser","owner":"HlibPavlyk","description":"This console application enables the parsing of Markdown into HTML and escaped ANSI","archived":false,"fork":false,"pushed_at":"2024-11-06T10:34:15.000Z","size":86565,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-12T06:52:45.517Z","etag":null,"topics":["ansi","ci","console-application","dotnet","html","markdown","parser","xunit-tests"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HlibPavlyk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-07T21:49:10.000Z","updated_at":"2024-11-06T10:34:20.000Z","dependencies_parsed_at":"2024-11-06T11:50:35.593Z","dependency_job_id":null,"html_url":"https://github.com/HlibPavlyk/markdown-parser","commit_stats":null,"previous_names":["hlibpavlyk/markdownparser","hlibpavlyk/markdown-parser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HlibPavlyk/markdown-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HlibPavlyk%2Fmarkdown-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HlibPavlyk%2Fmarkdown-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HlibPavlyk%2Fmarkdown-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HlibPavlyk%2Fmarkdown-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HlibPavlyk","download_url":"https://codeload.github.com/HlibPavlyk/markdown-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HlibPavlyk%2Fmarkdown-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32587819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansi","ci","console-application","dotnet","html","markdown","parser","xunit-tests"],"created_at":"2024-11-10T10:30:58.510Z","updated_at":"2026-05-03T22:33:15.112Z","avatar_url":"https://github.com/HlibPavlyk.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Markdown Parser\n\nMarkdown Parser is a console application that enables you to parse Markdown into HTML and Escape ANSI. The resulting output can be either displayed in the console or saved to a file.\n\nThis application supports both Windows and Linux operating systems.\n\n## Features:\n\n- **Parse Markdown to HTML:** Convert Markdown-formatted text into HTML.\n- **Flexible Output Formats:** Choose between different output formats such as HTML and escaped ANSI.\n  \n### Supported Operating Systems:\n\n- **Windows:** The application can be run on Windows operating systems using the Windows Command Prompt.\n- **Linux:** Similarly, it can be executed on Linux systems using the terminal.\n\n## How to set it up locally?\n\n### Windows\n\nThis instruction utilizes Windows CMD.\n\n#### Cloning the Repository\n\nFirstly, clone this repository using either the web URL:\n\n```cmd\ngit clone https://github.com/HlibPavlyk/markdown-parser.git\n```\n\nor via SSH certificate:\n\n```cmd\ngit clone git@github.com:HlibPavlyk/markdown-parser.git\n```\n\n#### Moving to the Repository\n\nThen navigate to the cloned repository:\n\n```cmd\ncd markdown-parser\n```\n\n#### Running the Application\n\nRun the application using the following command:\n\n```cmd\nMarkdownParser-win.exe --input \u003cpath\u003e --output \u003cpath\u003e --format \u003ctype\u003e\n```\n\n### Linux\n\n#### Cloning the Repository\n\nFirstly, clone this repository using either the web URL:\n\n```bash\ngit clone https://github.com/HlibPavlyk/markdown-parser.git\n```\n\nor via SSH certificate:\n\n```bash\ngit clone git@github.com:HlibPavlyk/markdown-parser.git\n```\n\n#### Moving to the Repository\n\nThen navigate to the cloned repository:\n\n```bash\ncd markdown-parser/\n```\n\n#### Changing Accessibility Mode\n\nChange the accessibility mode for the application:\n\n```bash\nchmod +x MarkdownParser-linux\n```\n\n#### Running the Application\n\nRun the application using the following command:\n\n```bash\n./MarkdownParser-linux --input \u003cpath\u003e --output \u003cpath\u003e --format \u003ctype\u003e\n```\n\n## Running Tests\n\nThe application includes a comprehensive suite of unit tests to ensure its functionality and reliability. Currently, there are 62 unit tests implemented within the program.\n\nTo run tests in this project, you need to have the .NET SDK installed. If you don't have it yet, you can download it from the [official .NET website](https://dotnet.microsoft.com/download) or via console in linux.\n\nAfter installing the .NET SDK, you can follow these steps to run the tests:\n\n1. **Open the terminal**:\n\n   Open the command prompt (on Windows) or terminal (on macOS or Linux).\n\n2. **Navigate to the project directory**:\n\n   Use the `cd` command to navigate to the `markdown-parser` directory, as we did in the previous paragraph.\n\n3. **Run the `dotnet test` command**:\n\n   Once you're in the root directory of your project, enter the following command to run the tests:\n\n   ```bash\n   dotnet test\n   ```\n\n   This will execute all tests in your project and display the results in your terminal.\n\n   If you are using Linux, ensure that you have appropriate permissions to execute the `dotnet` command and that your project is compatible with the Linux environment.\n\n## Explore all commands\n\nTo see all options use argument ```--help```\n\n```cmd\nMarkdownParser 1.0.0\nCopyright (C) 2024 MarkdownParser\n\n  -i, --input     Required. Input file .txt path.\n\n  -o, --output    Output file .html path.\n\n  -f, --format    Output format (escape/html)\n\n  --help          Display this help screen.\n\n  --version       Display version information.\n```\n\n## Example\n\nLets parse text file with Markdown markup test.txt and test 2 different scenarios using Windows version:\n- save result to test_html.html using HTML;\n- save result to test_escape.html using Escape ANSI;\n\n### text.txt\n\n```markdown\nВовки загнали собаку, `_` оточили, **хочуть зжерти**. Собака просить не вбивати її, натомість обіцяє допомагати заганяти овець та іншу худобу.\n\nВовки ** подумали і залишили собаку в зграї. Два роки вона їм допомагала, всьому вчила, показувала місця, полювала разом з ними...\nНастала особливо _голодна_зима_, `полювання*нев_далі`, _вовки_ голодні, зневірені. Що робити? Вирішили все-таки зжерти собаку. Зжерли. Кісточки поховали.\n\n\n\n\n\n'''\nПоставили надгробок. `Думають`, як підписати, від кого? **Від друзів?** Так начебто які ж вони друзі, раз зжерли... _Від_ворогів?_ Так 2 роки разом пліч-о-пліч\n'''\nжили, полювали, ніхто в образі не був... Подумали і написали `Від колег`.\n```\n\n### First scenario:\n\n```cmd\nMarkdownParser-win.exe -i test.txt -o test_html.html \n```\n\n### test_html.html:\n\n```html\n\u003cp\u003eВовки загнали собаку, \u003ctt\u003e_\u003c/tt\u003e оточили, \u003cb\u003eхочуть зжерти\u003c/b\u003e. Собака просить не вбивати її, натомість обіцяє допомагати заганяти овець та іншу худобу.\u003c/p\u003e\n\u003cp\u003eВовки ** подумали і залишили собаку в зграї. Два роки вона їм допомагала, всьому вчила, показувала місця, полювала разом з ними...\nНастала особливо \u003ci\u003eголодна_зима\u003c/i\u003e, \u003ctt\u003eполювання*нев_далі\u003c/tt\u003e, \u003ci\u003eвовки\u003c/i\u003e голодні, зневірені. Що робити? Вирішили все-таки зжерти собаку. Зжерли. Кісточки поховали.\u003c/p\u003e\n\u003cp\u003e\u003cpre\u003e\nПоставили надгробок. `Думають`, як підписати, від кого? **Від друзів?** Так начебто які ж вони друзі, раз зжерли... _Від_ворогів?_ Так 2 роки разом пліч-о-пліч\n\u003c/pre\u003e\nжили, полювали, ніхто в образі не був... Подумали і написали \u003ctt\u003eВід колег\u003c/tt\u003e.\u003c/p\u003e\n```\n\n### Second scenario:\n\n```cmd\nMarkdownParser-win.exe -i test.txt -o test_escape.html -f escape\n```\n\n### test_escape.html:\n\n```html\nВовки загнали собаку, \u001b[7m_\u001b[0m оточили, \u001b[1mхочуть зжерти\u001b[0m. Собака просить не вбивати її, натомість обіцяє допомагати заганяти овець та іншу худобу.\n\nВовки ** подумали і залишили собаку в зграї. Два роки вона їм допомагала, всьому вчила, показувала місця, полювала разом з ними...\nНастала особливо \u001b[3mголодна_зима\u001b[0m, \u001b[7mполювання*нев_далі\u001b[0m, \u001b[3mвовки\u001b[0m голодні, зневірені. Що робити? Вирішили все-таки зжерти собаку. Зжерли. Кісточки поховали.\n\n\u001b[7mПоставили надгробок. `Думають`, як підписати, від кого? **Від друзів?** Так начебто які ж вони друзі, раз зжерли... _Від_ворогів?_ Так 2 роки разом пліч-о-пліч\u001b[0m\nжили, полювали, ніхто в образі не був... Подумали і написали \u001b[7mВід колег\u001b[0m.\n```\n\n## Revert Commit\n\n[Link](https://github.com/HlibPavlyk/MarkdownParser/commit/6e47e0ac087f7d7d18733909c18696cd5cfe9777)\n\n## Commit with failed GitHub Action\n\n[Link](https://github.com/HlibPavlyk/MarkdownParser/commit/3ac2a340deb3d1a4ecc0e1a1695e44904ef71048)\n\n## Conclusion\n\nEven when working solo, unit tests can be immensely valuable. They act as a safety net, catching potential issues early on and ensuring the reliability of your codebase. In my experience, having a suite of unit tests provides peace of mind and confidence in the correctness of my code, allowing me to focus on implementing new features or making changes without fear of inadvertently introducing bugs. Additionally, unit tests serve as documentation for the expected behavior of your code, making it easier to understand and maintain over time. So, even if you're working alone, investing time in writing unit tests can ultimately save you time and effort by preventing future headaches and debugging sessions.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlibpavlyk%2Fmarkdown-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhlibpavlyk%2Fmarkdown-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlibpavlyk%2Fmarkdown-parser/lists"}