https://github.com/BrettVerney/bannerMaker
Create tidy text based banners for CLI based systems, servers and appliances.
https://github.com/BrettVerney/bannerMaker
aruba banner banner-generator cisco cli
Last synced: 3 months ago
JSON representation
Create tidy text based banners for CLI based systems, servers and appliances.
- Host: GitHub
- URL: https://github.com/BrettVerney/bannerMaker
- Owner: BrettVerney
- License: mit
- Created: 2021-04-27T23:22:54.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-22T06:30:24.000Z (over 1 year ago)
- Last Synced: 2024-08-13T07:08:17.000Z (6 months ago)
- Topics: aruba, banner, banner-generator, cisco, cli
- Language: Python
- Homepage:
- Size: 55.7 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - BrettVerney/bannerMaker - Create tidy text based banners for CLI based systems, servers and appliances. (Python)
README
[](https://developer.cisco.com/codeexchange/github/repo/wifiwizardofoz/bannerMaker)
# bannerMaker
Create tidy text based banners for CLI based systems, servers and appliances.**Author:** Brett Verney
**Version:** v1.1 | 22-09-2023As a Network Engineer I feel I have wasted far too many hours trying to centre text while creating Message of the Day and Authentication Failure banners for CLI based network infrastructure i.e. Cisco and Aruba.
This tool takes away that pain.
Really though, it takes one or more paragraphs of text and centres it between a box depicted by asterisks. Nothing more, nothing less.
It also preserves blank lines which other tools don't without great difficulty.
## Requirements
- Python 3+
- Python Libraries
- parawrap## Basic Script Usage
```python bannerMaker.py ```
Where **** is a text file containing one or more paragraphs of text.The resulting banner will be output to **banner.txt**
## Example
A file named **input.txt** contains the following text:

Executing the script and specifying the **input.txt** file as an argument:
```python bannerMaker.py input.txt```
Creates a file named **banner.txt** containing the following:

Another example:

The whitespace is preserved by utilising 'space' characters instead of tabs so that the output can copied and pasted directly to the CLI or config file as is.
## Customisation
The script uses box width and text padding values that are considered safe for most terminal CLI appliances by default. These can be modified within the script itself. It is best to use even integers:
```
box_width = int(76)
padding = int(4)
```
You can also modify the heading at the top of the banner:
```
heading = ('WARNING')
```