htmgenie

command module
v0.0.0-...-3fd4d17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 1 Imported by: 0

README

htmgenie

htmgenie is a command-line interface (CLI) tool designed to convert Markdown files to their HTML equivalents.

Getting Started

Prerequisites

Before you begin, make sure you have the following prerequisites installed:

Go

You'll need Go version 1.22 or higher for compiling the CLI and managing other dependencies.

Install Make
  • Windows: Download and install make. Alternatively, if you have Chocolatey installed, you can run the following command in an admin command prompt:

    choco install make
    
  • Mac: Use Homebrew to install make by running the following command in the terminal:

    brew install make
    
Set Environment Variables

Make sure you set the following environment variable to customize the output path for generated html file:

  • HTMGENIE_OPATH: Override the default path set to current directory .
Installation

To install the CLI, follow these steps:

  1. Clone this repository to your local machine.
  2. Navigate to the project directory.
  3. Run the following commands:
make build
make install
Using the CLI

Once the CLI is installed, you can use the following syntax to generate HTML from Markdown files:

htmgenie generate -f <filename_with_path>

This command converts a Markdown file to its HTML equivalent and saves the result to a new file. The tool supports a subset of Markdown syntax and generates HTML tags accordingly.

Command Options

The generate command supports the following flags:

  • -f, --file: Specifies the input Markdown file to be converted to HTML. Only .md files are accepted.

For more information, you can use the --help flag with the generate command:

htmgenie generate --help

Design

A detailed design is available here

References

  • Cobra - Interface used to create CLI interface
  • Cobra CLI - To generate scaffolded framework with cobra layout
  • gomponents - Potential library that provides a rich library to create html structs to build the response. It provides better readability model.

Documentation

Overview

Copyright © 2024 ani4learning@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL