DEV Community

WangGithub0
WangGithub0

Posted on

convertTxtToHtml - A new command-line tool can process .txt files into .html

In today's digital age, creating web content is more accessible than ever. Whether you're a blogger, a developer, or simply someone looking to share information online, converting text to HTML is a common task. To simplify this process, I'm thrilled to introduce our new tool, "convertTxtToHtml."

Installation

  1. Download and Install Java Development Kit according to the Oracle JDK Installation Guide.

  2. Clone this repository to your local machine

git clone git@github.com:WangGithub0/ConvertTxtToHtml.git
cd ConvertTxtToHtml

  1. Add executable permission to the ConvertTxtToHtml.java file chmod +x src/ConvertTxtToHtml.java

Examples

java src/ConvertTxtToHtml.java ./examples

Command Options:

  • --help or -h: Display help information.
  • --version or -v: Display the tool's version.
  • path: Specify the path to a .txt file or a directory containing multiple .txt files. If a directory is provided, tml will recursively process all .txt files within.
  • --output or -o: Specify a custom output directory. The tool will create the directory if it does not exist.

Features

  • Converts single or multiple .txt files to .html.
  • Same directory structure in output directory.
  • Allow to specify a different output directory.
  • Automatically parsing title from .txt file.

Github

https://github.com/WangGithub0/ConvertTxtToHtml

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay