Skip to content

mingming-ma/ctil

 
 

Repository files navigation

ctil

"Today I learned" Markdown authoring command-line tool written in C++

This is a command-line tool that processes .txt files into .html files

How to run (using g++)

After cloning the repository, open the repository directory using your preferred terminal (Windows PowerShell is used in this example): image

Verify you have g++ installed on your machine using the command g++ --version: image

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

image

How to run (using Visual Studio 2019)

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: image

From the Property Pages, left-click the "Debugging" submenu under "Configuration Properties": image

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

You can now run the program by left-clicking the green "Play" button in Visual Studio or by entering "Ctrl + F5" on your keyboard: image

Usage Examples

Converting one text file: .\ctil.exe test.txt

Convert all text files in a directory .\ctil.exe testDirectory

Planned Features

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.6%
  • HTML 3.4%