"Today I learned" Markdown authoring command-line tool written in C++
This is a command-line tool that processes .txt files into .html files
After cloning the repository, open the repository directory using your preferred terminal (Windows PowerShell is used in this example):
Verify you have g++ installed on your machine using the command g++ --version
:
Once you have verified g++ is on your system, run the following command to compile the source code files (ctil.cpp, source.cpp) into an executable called "ctil":
g++ -Wall -std=c++17 -g -o ctil ctil.cpp Process.cpp source.cpp
You can now run ctil as a command-line tool calling the program with a text file as an argument:
On PowerShell
: .\ctil.exe test.txt
After cloning the repository, open ctil.sln
This program takes files as command-line arguments. To convert text files to HTML from the project, you must add them as command-line arguments. To do so, first right-click the solution in the Solution Explorer, then left-click Properties to open the project's Property Pages:
From the Property Pages, left-click the "Debugging" submenu under "Configuration Properties":
Under "Command Arguments", enter the name of the text file you would like to convert to HTML. The repository contains test.txt to be used for example purposes, feel free to enter that. When you have entered your desired text file, left-click "OK" to save your changes.
You can now run the program by left-clicking the green "Play" button in Visual Studio or by entering "Ctrl + F5" on your keyboard:
Converting one text file:
.\ctil.exe test.txt
Convert all text files in a directory
.\ctil.exe testDirectory
Version Flag
.\ctil.exe -v
, .\ctil.exe --version
Help Flag
.\ctil.exe -h
, .\ctil.exe --help
Output Flag (specifies destination folder for HTML files)
.\ctil.exe -o destination test.txt
, .\ctil.exe --output destination test.txt