1.0.5 • Published 2 years ago
@mismathh/tilerator v1.0.5
TILerator 
A CL tool that will be able to generate TIL posts. It will be able to convert text, snippets of code, and images to HTML format
Install TILerator
Make sure you have node and npm installed.
// Install TILerator globally
npm i -g @mismathh/tileratorFeatures
Mandatory Features
- Provide
--versionor-vflag to view version - Provide
--helpor-hflag to view help/usage message - Provide a path for a file to generate an html file
- Provide a path for a directory to generate html files for each text file within folder
- Adds HTML markup tags such as
<p>...</p>to text - Outputs files to
./tilfolder by default - Handle markdown files
Optional Features
- Parses title from text file to enhance HTML with
<h1>...</h1>markup tags - Converts bold text in Markdown syntax to
<b>...</b>tags - Converts code blocks in Markdown syntax to
<pre...</pre>and<code>...</code>tags - Allows a custom output folder path to be passed using
--outputor-oflag - TOML Configuration Support: Custom output directory can be set within a TOML configuration file instead of repeatedly passing it in within the command-line arguments. The
-cor--configflag followed by the path of the TOML configuration file can be used.
Usage/Examples
tilerator [flag] <filePath | directoryPath>Pass in a flag
tilerator <flag>
--> tilerator -vPass in a file path or directory path
tilerator <filePath | directoryPath>
--> tilerator ./examples/example1.txtUse the -o or --output flag to generate html files in a custom folder
---> tilerator ./examples/til_Sample.txt -o ./htmlFilesUse the -c or --config flag to specify all options in a TOML config file
// Sample config.toml file
// Output directory for generated files
output = "./build"---> tilerator -c config.toml ./examples/til_Sample.txtFlags
| Flag | Description |
|---|---|
| -v, --version | Displays version of tool |
| -h, --help | Display help/usage menu |
| -o, --output | Allows for custom output folder |
| -c, --config | Specify all options in a TOML config file |
Custom output folder path must be placed right after
-o/--outputflag