bannerforge
Colorful terminal banners. One line, one print, done.
██╗ ██╗███████╗██╗ ██╗ ██████╗
██║ ██║██╔════╝██║ ██║ ██╔═══██╗
███████║█████╗ ██║ ██║ ██║ ██║
██╔══██║██╔══╝ ██║ ██║ ██║ ██║
██║ ██║███████╗███████╗███████╗╚██████╔╝
╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ ╚═════╝
World
install
pip install bannerforge
usage
from bannerforge import banner
banner("HELLO", "World")
That's it. No print(), no assignment, no ceremony. The banner renders on
its own.
alignment
banner("HELLO", "World").left()
banner("HELLO", "World").right()
banner("HELLO", "World").center()
Only the subtitle moves. The main text is always centered.
no subtitle
banner("HELLO")
how it works
The banner object renders itself in __del__. When you don't bind the
return value, Python drops the reference immediately and the banner
prints. If you do bind it, the banner waits until the variable goes
out of scope.
# prints immediately
banner("HELLO", "World")
# prints when x goes out of scope / program ends
x = banner("HELLO", "World")
license
Custom Attribution License — see LICENSE.
You can use, modify, and redistribute this code freely. If you do, you must credit Himanta Bhuyan and link back to this repository.
author
Himanta Bhuyan — @realximanta
Metadata
Release files for bannerforge 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bannerforge-0.1.0.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bannerforge-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.3 kB