Banner is a command-line application designed to manage and display beautiful ASCII art and rich-text banners for your terminal. Inspired by the eye-catching banners and ASCII art found in various CLI applications, this tool allows you to easily add, delete, edit, show, and export your collection of banners.
For regular users, you can install Banner using pip
by fetching the latest release's wheel file URL from GitHub.
Run the following command in your terminal:
curl -s https://api.github.com/repos/blackmonk13/banner/releases/latest | jq -r '.assets[] | select(.name | endswith(".whl")) | .browser_download_url' | xargs pip install
Open PowerShell and run the following command:
(Invoke-WebRequest -Uri "https://api.github.com/repos/blackmonk13/banner/releases/latest" -UseBasicParsing | ConvertFrom-Json).assets | Where-Object { $_.name -like "*whl" } | ForEach-Object { pip install $_.browser_download_url }
This command will install Banner and its dependencies, allowing you to run the banner
command directly from your terminal or Command Prompt without any hassle.
To set up a random banner to display every time you open a new terminal on Unix-based systems (such as Linux or macOS), follow these steps:
-
Open your preferred text editor.
-
Create a new file named
.bashrc
in your home directory if it doesn't already exist. If you're using macOS with the default zsh shell, create or edit the.zshrc
file instead. -
Add the following line at the end of the file:
banner show random
-
Save the file and close the text editor.
-
To apply the changes, run the following command in your terminal:
source ~/.bashrc
Or, if you're using macOS with the default zsh shell:
source ~/.zshrc
Now, every time you open a new terminal window or tab, a random banner will be displayed. Enjoy!
For developers or those who want to contribute to the project, follow the instructions in the Contributing section.
To use Banner, run the following command:
banner [command] [options]
Here are some examples of available commands:
-
Add a new banner:
banner add "Hello, World!"
You can also add banners from files or URLs:
banner add /path/to/banner.txt banner add http://example.com/banner.txt
To generate ASCII art from the input text, use the
--ascii
flag:banner add "Hello, World!" --ascii
You can choose a specific font for ASCII art using the
--font
option:banner add "Hello, World!" --ascii --font "standard"
To print the generated ASCII text to the console instead of adding it as a banner, use the
--dry-run
flag:banner add "Hello, World!" --ascii --dry-run
-
Delete a banner:
banner delete 1
-
Edit a banner:
banner edit 1
-
Reset the markup of a banner:
banner reset 1
-
Show a banner:
banner show 1
To show a random banner:
banner show random
To print the content of the banner rather than the markup, use the
--content-only
flag:banner show 1 --content-only
-
Export banners to a file or multiple files:
banner export --single-file output.txt
This will export all banners to a single file named
output.txt
. You can also specify a separator between banners:banner export --single-file --separator "\n===\n" output.txt
To export banners to multiple files, use the
--base-name
and--extension
options:banner export --base-name "my_banner" --extension "md"
This will create files with names like
my_banner_1.md
,my_banner_2.md
, etc.
For more information on available commands and options, run:
banner --help
With Banner, you can easily manage and enjoy your collection of ASCII art and rich-text banners, making your terminal experience more enjoyable and creative.
We welcome contributions from the community! If you'd like to contribute to Banner, please follow these steps:
- Fork the repository and create a new branch for your changes.
- Commit your changes and push them to your fork.
- Open a pull request against the main branch of the original repository.
Please make sure that your contributions adhere to the project's coding style and guidelines.
Before submitting a pull request, please make sure that:
- Your changes do not introduce any new bugs or regressions.
- Your code is well-documented and easy to understand.
We appreciate your help in making Banner even better!