cats icon indicating copy to clipboard operation
cats copied to clipboard

Small ASCII 'CATS' text banner for start of STDOUT

Open sadielbartholomew opened this issue 1 year ago • 2 comments

Obviously not a critical-path priority piece of work, but I think it is really nice (striking, unique, dare I say fun), when terminal programs have a logo/banner which displays the library name at the start of the terminal output, e.g. as for or . I think we should add one for CATS, but this may be a controversial opinion, so let's treat this as a suggestion for now! (Though if there is agreement to go ahead, I can easily set this up.)

The exact ASCII art text can be chosen at a later stage, with ASCII generator sites like this one creating the art for one to choose from, but the idea is something like this which will be seen when someone runs cats (though perhaps we can enable it to now be shown if someone specifies via come CLI or config file option):

$ cats -d 90 --loc RG2                                                                      ─╯
 __     __   _____  __  
/ /`   / /\   | |  ( (` 
\_\_, /_/--\  |_|  _)_) 

WARNING:root:config file not found
WARNING:root:Unspecified carbon intensity forecast service, using carbonintensity.org.uk
Best job start time 2024-07-21 11:27:36.231307+01:00
Carbon intensity if job started now       = 85.47 gCO2eq/kWh
Carbon intensity at optimal time          = 55.16 gCO2eq/kWh

Use --format=json to get this in machine readable format

or some other stylistic text choice e.g:

  __   _  ___ __ 
 / _| / \|_ _/ _|
( (_ | o || |\_ \
 \__||_n_||_||__/
                 

or:

             __         
.----.---.-.|  |_.-----.
|  __|  _  ||   _|__ --|
|____|___._||____|_____|

etc. (showing examples on the smaller side since we don't want anything to overhwhelm/dominate the output).

Colours can also be set for standard-supported terminal colours, but we don't have to go crazy with it (not that I would mind adding a little colour, as long as it doesn't in any significant way ramp up the carbon required to run, of course). :smile:

sadielbartholomew avatar Jul 19 '24 17:07 sadielbartholomew

Love the idea.

andreww avatar Aug 07 '24 13:08 andreww

Glad to hear! I'll wait until the next team meeting to check everyone's happy, and then I can include some examples for the banner itself and get it all coded up and put up the corresponding PR.

sadielbartholomew avatar Aug 07 '24 15:08 sadielbartholomew