This script allows the users to display the INSA logo in a console (e.g. when you launch a new terminal).
This script was originally written in Bash but I also translated it in Python for those who use other shells (like fish). It is intended as a best-effort script, therefore it will (should) never print an error message in the console. If a parameter is invalid, the default value will be used instead.
I was bored lol
not@pancake:~$ ./bannerINSA.sh -h
bannerINSA.sh [--<insa>] [-t text] [-s subtitle] [--center | --left | --right] [-c colour] [--fill | --corner] [--bar | --sep]
--<insa>
: replace<insa>
with the name of the desired school. Options arelyon
,rennes
,rouen
,toulouse
,strasbourg
,cvl
,hdf
andeuromed
, default isrennes
.
-t text
: displays a given text at the right of the logo, under the name of the school. This is not meant for displaying big texts or mutiline text.
-s subtitle
: displays the subtitle under the INSA logo. The subtitle has to be shorter than the length of the logo and should not contain any line return (may be changed in the future).
--center | --left | --right
: determines the alignement of the subtitle with regards to the INSA logo, default is--center
-c colour
: determines the colour of the logo, options arewhite
,red
,yellow
,green
,blue
,magenta
,cyan
,black
and8bit-<col>
where<col>
is a number between 0 and 255 representing a colour in the 256-colour palette of your terminal. The default value isred
. Note that rendering of the the colour may depend on the colour theme of your terminal, hence you may obtain a colour that doesn't match the name of the option. For example, if you use a light theme theblack
colour probably be light grey and thewhite
colour will most likely be black. This should not affect 8-bit colours greater than or equal to 16.
--fill
: with this option, the colour is applied to the background and the logo is displayed in white. The effect is nice because it uses special characters that may not be rendered as intended on certain terminals (like Alacritty for example).
--corner
: displays the corner of the logo in gray. This option is mutually exclusive with--fill
.
--bar
: displays a thin bar between the logo and the subtitle if there is one.
--sep
: displays a separator between the name of the school and the text. This option is mutually exclusive with--bar
.
The main thing you'll need is a terminal that is able to display 8/16-colour palettes (which is the case most of the time). If you use a 8bit-sth
colour, you'll need a terminal that handles 256-colour palettes.
For the Python script, you will need Python 3.6 or above because I just love f-strings and tend to put them everywhere.
For the Bash script, any recent version of Bash will do the trick but older versions should work as well (tested with bash 5.0.3 and 5.0.17).
The terminal I use in the screenshots is gnome-terminal (the default terminal in Ubuntu). My colour profile is Blood Moon, this theme has a pink-ish red which is why screenshots with the --fill
option may look like they are pink/magenta.
The ASCII art text was generated using the font Colossal in a generator like this one (which is basically an interface running FIGlet), I then modified the 'A' just a bit to mimic the INSA logo.
🥞