#cwrap-(py)thon
# ____ _ _ _ ____ ____ ___ ___ _ _
# | | | | |__/ |__| |__] __ |__] \_/
# |___ |_|_| | \ | | | | |
# Version: 0.2.7
cwrap(py), written in (py)thon. Nothing more than a handy file comment header utility that helps easily me see (with my old eyes) what file I am working on.
Clone the repo:
git clone https://github.com/TylerDurham/cwrap-pythonI like to use uv to build and install:
uv builduv tool install dist/cwrap*.whl Note: Shell completions can be added by running cwrap --install-completion
To remove, run uv tool uninstall cwrap. You can also force delete with:
rm -rf ~/.local/cwrwap
rm -rf ~/.local/share/uv/tools/cwrap-pyGet help:
cwrap --helpList supported languages:
cwrap list-languagesGenerate a simple comment wrapped figlet header:
cwrap figlet "Hello World"This will output:
# _ _ ____ _ _ ____ _ _ _ ____ ____ _ ___
# |__| |___ | | | | | | | | | |__/ | | \
# | | |___ |___ |___ |__| |_|_| |__| | \ |___ |__/
# Note: The default figlet font is cybermedium. The default language is python.
To generate a simple comment wrapped figlet header with a specific figlet font, use the -f or --font option:
cwrap figlet -f avatar "Hello World"This will output:
# _ _____ _ _ ____ _ ____ ____ _ ____
# / \ /|/ __// \ / \ / _ \ / \ /|/ _ \/ __\/ \ / _ \
# | |_||| \ | | | | | / \| | | ||| / \|| \/|| | | | \|
# | | ||| /_ | |_/\| |_/\| \_/| | |/\||| \_/|| /| |_/\| |_/|
# \_/ \|\____\\____/\____/\____/ \_/ \|\____/\_/\_\\____/\____/
# You can also wrap with different programming languages:
cwrap figlet -l lua "UPDATE TABLE"This will output:
-- _ _ ___ ___ ____ ___ ____ ___ ____ ___ _ ____
-- | | |__] | \ |__| | |___ | |__| |__] | |___
-- |__| | |__/ | | | |___ | | | |__] |___ |___
-- Note: You can run cwrap list-languages to get a list of supported programming languages.
If the programming language supports it, you can specify the -m or --multiline option to wrap the figlet text in a multiline comment:
cwrap figlet -f avatar -l javascript -m "Hello World"This will output:
/*
_ _____ _ _ ____ _ ____ ____ _ ____
/ \ /|/ __// \ / \ / _ \ / \ /|/ _ \/ __\/ \ / _ \
| |_||| \ | | | | | / \| | | ||| / \|| \/|| | | | \|
| | ||| /_ | |_/\| |_/\| \_/| | |/\||| \_/|| /| |_/\| |_/|
\_/ \|\____\\____/\____/\____/ \_/ \|\____/\_/\_\\____/\____/
*/You can add a horizontal rule at the top and bottom of the comment by specifying the --hr-width option:
cwrap figlet "Hello, HR" -l javascript --hr-widthThis will output:
/*
======================================
_ _ ____ _ _ ____ _ _ ____
|__| |___ | | | | |__| |__/
| | |___ |___ |___ |__| | | | \
======================================
*/You can place the generated text on the clipboard by specifying the -c option:
cwrap figlet "Hello, Clipboard" -c