Skip to content

BogdanPri/header-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

header-cli

GitHub top language

A simple CLI utility for generating formatted text headers.

πŸ“¦ Requirements

  • Python >= 3.9

πŸ›  Usage

Run with a positional argument:

$ header "project title"
################################## project title ###################################

Run with flags:

$ header --head "build complete" --style multi --char "=" --width 60 --upper --align left
============================================================
= BUILD COMPLETE 
============================================================
$ header --border-only --width 50
##################################################

Run with box mode:

$ header --title --width auto --box double "welcome back"
╔══════════════╗
β•‘ Welcome Back β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

βš™οΈ Options

header-cli supports the following value flags:

Flag Description Default
head (positional) Header text β€”
-H, --head Header text (alternative flag form) β€”
-s, --style Border style (single, multi) single
-c, --char Character to use for the border #
-w, --width Width of the rows 84 or auto
-a, --align Header justification center or left
-b, --box Surround header by a box (overrides other flags) none

header-cli supports the following value toggles:

Toggle Description
-U, --upper Converts header to "UPPER_CASE"
-L, --lower Converts header to "lower_case"
-T, --title Converts header to "Title_Case"
-S, --swapcase Converts header to "sWAP_cASE"
--border-only Returns only a border of characters with no header

πŸš€ Installation

Clone the repository:

git clone https://github.com/your-username/utils.git
cd utils/header

Unix

Make files executable:

chmod u+x header

Additionally, you can copy any app to a location in your PATH:

cp header ~/.local/bin/header

Windows

Copy header to a location of your choice. Then, create a batch file to call it from the terminal:

e.g. header.bat:

@echo off
python C:\path\to\header %*

Then, copy header.bat to a location in your PATH.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages