Skip to content
Arshil Hapani edited this page Nov 17, 2024 · 1 revision

Headers Remake Wiki

Welcome to the Headers Remake Wiki! This page provides detailed information about the project, including features, installation instructions, usage, and contributing guidelines.


Overview

Headers Remake is a CLI tool inspired by headers by transmission11. It helps developers generate customizable, visually appealing comment headers for their programming files. This refactored version includes additional features for more flexibility and user convenience.


Features

  • Custom Symbols: Use symbols like #, /, or any character of your choice to style headers.
  • Adjustable Length: Set the length of your headers for consistent formatting.
  • Single-Line or Boxed Headers: Choose between single-line or boxed, multi-line headers.
  • Clipboard Integration: Automatically copies the generated header to your clipboard.
  • Error Handling: Provides helpful error messages for unsupported inputs or clipboard access issues.

Installation

Clone the Repository

  1. Clone the repository:
    git clone https://github.com/ArshilHapani/Header-remake
    cd Header-remake
  2. Build the project:
    cargo build --release

Download Binary

  1. Visit the Releases Page.
  2. Download the latest binary for your platform.

Usage

Run the headers command with the following format:

headers [OPTIONS] [TITLE]

Options

Option Description
-s, --symbol Specify the symbol for the header (default: /).
-l, --length Specify the total length of the header line (default: 50).
-sl, --single-line Generate a single-line header instead of a boxed header.
-h, --help Display the help menu.

Examples

  1. Basic Header:

    headers "My Project"

    Creates a 50-character header centered with the title "MY PROJECT."

  2. Custom Symbol and Length:

    headers -s "#" -l 60 "Custom Header"

    Generates a 60-character header using # symbols.

  3. Single-Line Header:

    headers -sl -s "//" "Single Line"

    Creates a single-line header with // symbols.

  4. Default Header:

    headers

    Creates a default 50-character header with the title "TITLE."


Error Messages

  • Length Too Short: Displays if the specified length is insufficient to fit the title.
  • Clipboard Access Issue: Notifies the user if the header fails to copy to the clipboard.

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or fix.
  3. Submit a pull request for review.

License

This project is licensed under the MIT License.
Acknowledgment to headers by transmission11.