I just thought it was funny. Don’t spray them
Let’s take a look at an illustration:
If you find it interesting, keep reading. It’s easy!
Let’s say it in two steps:
- 1, the character
- 2, asymptotic realization
FIGlet
FIGlet “is a character drawing based on ASCII characters, which can generate different effects according to different character types. Currently, it should support 314 kinds
Several effects:
_ _ _ _ _ / _____ _____ | | | | | | | | | | | | ___ __ | | ___ | | __ | | | _ _ __ ___ | | | | / _ \ / _ ` | / _ \ | (|'_ ` _ \ | | | | ___ | | (_) (_ | | __ / | | | | _ | | | | | | | \ \ _____ _____ / \ __, _ | \ ___ _ - | | | _ | \ __ _ - | | | _ | | _ _ - | |Copy the code
▄ █ █ █ █ ▄ ▒ █ █ █ █ █ ▓ █ █ █ █ █ ▄ ▓ █ █ █ █ █ █ █ ░ █ █ ▄ ▄ ▄ █ █ █ █ █ ▓ █ █ █ ▄ ▄ █ █ █ ▓ █ █ ▓ ▒ █ █ ▀ ▀ █ ▒ █ █ ▒ █ █ ▒ ▒ █ █ ▀ █ █ ▌ ▓ █ ▀ ▓ █ █ ░ █ █ ▒ ▓ █ █ ▒ ▓ ▒ ▓ █ █ ▒ ▀ █ ▀ █ █ ▒ ▓ █ █ ▒ ▒ ▓ █ ▄ ▒ █ █ ░ █ █ ▒ ░ █ █ █ ▌ ▒ █ █ █ ▒ █ █ ▀ ▀ █ █ ░ ▒ ▓ █ █ ░ ▒ ░ ▓ █ █ ▓ █ █ ░ ▒ █ █ ░ ▒ ▓ ▓ ▄ ▄ █ █ ▒ ▒ █ █ █ █ ░ ░ ▓ █ ▄ ▌ ▒ ▓ █ ▄ ░ ▓ █ ░ █ █ ░ ▓ █ █ ▓ ░ ▒ █ █ ▒ █ █ ▒ █ █ ░ ▒ ▓ █ █ █ ▀ ░ ░ █ █ █ █ ▓ ▒ ░ ░ ▒ █ █ █ █ ▓ ░ ▒ █ █ █ █ ▒ ░ ▓ █ ▒ ░ █ █ ▓ ▒ █ █ ▒ ░ ▒ █ █ ▒ ░ █ █ ▒ ░ █ █ █ █ █ █ ▒ ░ ░ ▒ ▒ ░ ░ ▒ ░ ▒ ░ ▒ ░ ▒ ▒ ▓ ▒ ░ ░ ▒ ░ ░ ▒ ░ ░ ▒ ░ ▒ ▒ ░ ░ ░ ▒ ░ ░ ░ ░ ▒ ░ ▓ ░ ░ ▒ ░ ▒ ▒ ░ ░ ▒ ▒ ░ ░ ░ ▒ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░Copy the code
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ (c).-.(c) (c).-.(c) (c).-.(c) (c).-.(c) (c).-.(c) (c).-.(c) (c).-.(c) (c).-.(c) / ._. \ / ._. \ / ._. \ / ._. \ / ._. \ / ._. \ / ._. \ / ._. \ __\( Y )/__ __\( Y )/__ __\( Y )/__ __\( Y )/__ __\( Y )/__ __\( Y )/__ __\( Y )/__ __\( Y )/__ (_.-/The '-'\ - _) (_. - /The '-'\ - _) (_. - /The '-'\ - _) (_. - /The '-'\ - _) (_. - /The '-'\ - _) (_. - /The '-'\ - _) (_. - /The '-'\ - _) (_. - /The '-'\-._)
|| C || || O || || D || || E || || H || || T || || M || || L ||
_.' `-' '. _ _.` -' '_ _.' `-' '. _ _.` -' '_ _.' `-' '. _ _.` -' '_ _.' `-' '. _ _.` -' '. _ (. -. / ` -'\. -.) (. - / ` - '\. -. (. -. / ` -'\. -.) (. - / ` - '\. -. (. -. / ` -'\. -.) (. - / ` - '\. -. (. -. / ` -'\. -.) (. - / ` - '\. -. ` -'` -'` -'` -'` -'` -'` -'` -'` -'` -'` -'` -'` -'` -'` -'` -'
Copy the code
How do you use it?
1. Search figlet by NPM to find the NPM package
www.npmjs.com/package/fig…
2. Install NPM package
NPM install -g figlet-cliCopy the code
Please refer to the official documentation for specific usage
3. Use document parameters (for console operations)
font
Character Type Default value: Standard
horizontalLayout
Horizontal layout Default value: default
verticalLayout
Default value for vertical layout: default
4. Use of the console (please see the official document for project use and browser use)
- Basic commands:
-l, --list List all the available fonts
-f, --font A string value that indicates the FIGlet font to use
--horizontal-layout A string value that indicates the horizontal layout to use
--vertical-layout A string value that indicates the vertical layout to use
Copy the code
- Simple to perform
figlet "codehtml"
Copy the code
Output result:
_ _ _ _ ___ ___ __ | | ___ | | __ | | _ _ __ ___ | | / __ / _ \ / _ ` | / _ \'_ \ | __ |'(_ _ ` _ \ | | | | | (_) (_ | | __ / | | | | _ | | | | | | | \ ___ / ___ / / __, _ | \ ___ _ - | | | _ | \ __ _ - | | | _ | | _ _ - | |Copy the code
- Use the font
figlet -f "Def Leppard" "codehtml"
Copy the code
;
: ED.
., t#, E#Wi ,;
,Wt ;##W. E###G. f#i . . i
i#D. :#L:WE E#fD#W; .E#t Di Dt GEEEEEEEL .. : LE
f#f .KG ,#D E#t t##L i#W, E#i E#i ,;; L#K;; . ,W, .Et L#E
.D#i EE ; #f E#t .E#K, L#D. E#t E#t t#E t##, ,W#t G#W.
:KW, f#. t#i E#t j##f :K#Wfff; E#t E#t t#E L###, j###t D#K.
t#f :#G GK E#t :E#K: i##WLLLLt E########f. t#E .E#j##, G#fE#t E#K.
;#G ; #L LW. E#t t##L .E#L E#j.. K#j... t#E ; WW; ##,:K#i E#t .E#E.
:KE. t#f f#: E#t .D#W; f#E: E#t E#t t#E j#E. ##f#W, E#t .K#E
.DW: f#D#; E#tiW#G. ,WW; E#t E#t t#E .D#L ###K: E#t .K#D
L#, G#t E#K##i .D#; f#t f#t t#E :K#t ##D. E#t .W#G
jt t E##D. tt ii ii fE ... #G .. :W##########Wt
E#t : j :,,,,,,,,,,,,,.
L:
Copy the code
Quick links:
FIGlet website
FIGlet Wikipedia
FIGlet generates character sets online
Lolcat gradients
Lolcat is a Ruby package available from the official Ruby Gems hosting. We used Lolcat in conjunction with figlet to achieve the desired effect
gem install lolcat
Copy the code
Play:
lolcat --help
Copy the code
Quick links:
Ruby Gem Lolcat
Github lolcat
Console play for yourself! Here’s how to combine, which is easy, because I’m setting up the ZSH startup greeting
Figlet and Lolcat
Complete command:
figlet -f "Delta Corps Priest 1" "codehtml"| lolcat / / is easy to understandCopy the code
How to configure in the console startup greeting?
- Modifying a Configuration File
vim ~/.zshrc
Copy the code
- Add a command
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh
Character set configuration command
figlet -f "Delta Corps Priest 1" "codehtml" | lolcat
Copy the code
- Restart the terminal.
Effect:
Remarks: purely share fun, if you have any questions please contact correction