https://github.com/sdthaker/node-tilify
"Today I Learned" tool that converts text file or a directory of text files to HTML files and beyond
https://github.com/sdthaker/node-tilify
open-source-software
Last synced: 8 months ago
JSON representation
"Today I Learned" tool that converts text file or a directory of text files to HTML files and beyond
- Host: GitHub
- URL: https://github.com/sdthaker/node-tilify
- Owner: sdthaker
- License: mit
- Created: 2023-09-01T02:08:47.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-20T18:29:09.000Z (over 2 years ago)
- Last Synced: 2025-01-26T14:26:35.421Z (about 1 year ago)
- Topics: open-source-software
- Language: JavaScript
- Homepage:
- Size: 1.66 MB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Node-TILify
Welcome to Node-TILify. An open source CLI software that helps you convert a text file or a directory of text file(s) into html file(s) blazingly fast 🏃♂️ 💨 ⚡️. The name of the project was chosen to showcase which language/framework was used to build this tool -- _`Node`.js_, what the tool is all about -- _`TIL` - Today I Learned_, & the value that it adds to your workflow -- _Ampl`ify`ing Knowledge_.
# How to install
Make sure you have latest [node](https://nodejs.org/en/download) installed on your computer.
To install this program globally on your machine, run the command:
```bash
npm i -g node-tilify
```
You can now run the program to see how to use this tool:
```bash
node-tilify -h
```
# Features
- Pass in a txt file and it'll generate an html file.
- Pass in a directory and it'll search through all the txt files in that directory and generate html files which are then stored in `./til` directory.
- Every paragraph is enclosed with `
# Usages / Examples
- `node-tilify -h` / `node-tilify --help` - To print help menu
- `node-tilify -v` / `node-tilify --version` - To print version and name of the tool
- `node-tilify input.txt` - To read txt file and generate html from it to be stored in `./til` directory
- `node-tilify ./examples` - To read txt files from a directory and generate html from it to be stored in `./til` directory
- `node-tilify input.txt -o collection` / `node-tilify input.txt -output collection` - To read a txt file and generate html from it to be stored in `./collection` directory
- `node-tilify ./examples -o collection` / `node-tilify ./examples --output collection` - To read txt files from a directory and generate html from it to be stored in `./collection` directory
- `node-tilify --config path_to_your_config.toml` / `node-tilify -c path_to_your_config.toml`- To utilize your configuration file settings for conversion.
# Usages / Examples (with Output)
To generate multiple HTML files from a directory with your preferred output directory:
Command Line:
```bash
sohamthaker@Sohams-MacBook-Pro Node-TILify % node-tilify examples -o output
HTML files generated successfully stored at output!
```
partial output of `examples/Kubernetes101.txt`
```bash
Kubernetes 101
TIL about Kubernetes, Google’s open source container orchestration system.
I spent a half-day at Google’s office space today learning about Kubernetes from the folks at Apprenda. Going in to the session, I thought I had a grasp on what Kubernetes was, but quickly realized I had many misconceptions.
We worked through the following repository, provided by Apprenda, for learning some of the basics of Kubernetes: https://github.com/apprenda/hands-on-with-kubernetes-gke.
Here are some things that I learned from the session:
Kubernettes !== Docker^
I thought Kubernetes was just a different way to build container images like you can with Docker… not so!
Kubernetes is a container orchestration system: in other words, it provides the necessary components for configuring, deploying and scaling images that are built with Docker.
```
partial output of `output/Kubernetes101.html`
```bash
Kubernetes 101
Kubernetes 101
TIL about Kubernetes, Google’s open source container orchestration system.
I spent a half-day at Google’s office space today learning about Kubernetes from the folks at Apprenda. Going in to the session, I thought I had a grasp on what Kubernetes was, but quickly realized I had many misconceptions.
We worked through the following repository, provided by Apprenda, for learning some of the basics of Kubernetes: https://github.com/apprenda/hands-on-with-kubernetes-gke.
Here are some things that I learned from the session:
Kubernettes !== Docker
I thought Kubernetes was just a different way to build container images like you can with Docker… not so!
Kubernetes is a container orchestration system: in other words, it provides the necessary components for configuring, deploying and scaling images that are built with Docker.
```
## Configuration Using TOML
Now with TOML configuration support, streamline your repetitive tasks by setting your configurations just once!
### How to Use
1. Create a `.toml` file with your desired configuration. Here's an example format:
> ```toml
> # This is a sample TOML configuration file
> input = "./src"
>
> # Output directory where generated files will be saved
> output = "./build"
>
> # Stylesheet URL
> stylesheet = "https://cdn.jsdelivr.net/npm/water.css@2/out/water.css"
>
> # Language setting
> lang = "fr"
> ```
2. Run the following command:
> ```bash
> node-tilify -c path_to_your_config.toml
> ```
3. That's it! Your files will be generated in the output directory you specified in your configuration file.