A simple CLI utility for generating formatted text headers.
- Python >= 3.9
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 β
ββββββββββββββββ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 |
Clone the repository:
git clone https://github.com/your-username/utils.git
cd utils/headerMake files executable:
chmod u+x headerAdditionally, you can copy any app to a location in your PATH:
cp header ~/.local/bin/headerCopy 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.