Page MenuHomePhorge

Add Documentation about Figlet and Cowsay
Open, WishlistPublic

Description

Interestingly there are cute things not mentioned at all in the Remarkup page (https://we.phorge.it/book/phorge/article/remarkup/).

Let's try to figure out what we know, and then what we should communicate to end-users.

Fiflet

Standard:

figlet {{{
 hello
}}}
_ _ _ | |__ ___| | | ___ | '_ \ / _ \ | |/ _ \ | | | | __/ | | (_) | |_| |_|\___|_|_|\___/

Custom font small:

figlet (font=small) {{{
 hello
}}}
_ _ _ | |_ ___| | |___ | ' \/ -_) | / _ \ |_||_\___|_|_\___/

Custom font banner:

# # ###### # # #### # # # # # # # ###### ##### # # # # # # # # # # # # # # # # # # # # ###### ###### ###### ####

Custom font big:

_ _ _ | | | | | | |__ ___| | | ___ | '_ \ / _ \ | |/ _ \ | | | | __/ | | (_) | |_| |_|\___|_|_|\___/

Custom font bubble:

_ _ _ _ _ / \ / \ / \ / \ / \ ( h ) e ) l ) l ) o ) \_/ \_/ \_/ \_/ \_/

Custom font digital:

+-+-+-+-+-+ |h|e|l|l|o| +-+-+-+-+-+

Custom font ivrit:

_ _ _ ___ | | | ___| |__ / _ \| | |/ _ \ '_ \ | (_) | | | __/ | | | \___/|_|_|\___|_| |_|

Custom font lean:

_/ _/ _/ _/_/_/ _/_/ _/ _/ _/_/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/ _/ _/ _/_/

Custom font mini:

|_ _ | | _ | | (/_ | | (_)

Custom font mnemonic:

&SPhello

Custom font script:

_ _ _ | | | | | | | | _ | | | | __ |/ \ |/ |/ |/ / \_ | |_/|__/|__/|__/\__/

Custom font smscript:

|) _ |\ |\ _ |/\ |/ |/ |/ / \_ | |/|_/|_/|_/\_/

Custom font shadow:

| | | __ \ _ \ | | _ \ | | | __/ | | ( | _| |_| \___| _| _| \___/

Custom font smshadow:

| | | \ -_) | | _ \ _| _| \___| _| _| \___/

Custom font slant:

__ ____ / /_ ___ / / /___ / __ \/ _ \/ / / __ \ / / / / __/ / / /_/ / /_/ /_/\___/_/_/\____/

Custom font smsslant:

__ ____ / / ___ / / /__ / _ \ -_) / / _ \ /_//_\__/_/_/\___/

Custom font standard:

_ _ _ | |__ ___| | | ___ | '_ \ / _ \ | |/ _ \ | | | | __/ | | (_) | |_| |_|\___|_|_|\___/

Custom font term:

hello

Figlet Builtin fonts:

https://we.phorge.it/source/phorge/browse/master/externals/figlet/fonts

Figlet Code Implementation:

https://we.phorge.it/source/phorge/browse/master/src/infrastructure/markup/interpreter/PhabricatorRemarkupFigletBlockInterpreter.php

Cowsay

cowsay {{{
 hello
}}}
________ < hello > -------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||

Custom eyes, custom think, custom tongue:

cowsay (think=yes,eyes=XX,tongue=^^) {{{
 hello
}}}
________ ( hello ) -------- o ^__^ o (XX)\_______ (__)\ )\/\ ^^ ||----w | || ||

Other things from the original Cowsay in Perl as supported as-well:

cowsay (cow=stegosaurus) {{{
 hello
}}}
________ < hello > -------- \ . . \ / `. .' " \ .---. < > < > .---. \ | \ \ - ~ ~ - / / | _____ ..-~ ~-..-~ | | \~~~\.' `./~~~/ --------- \__/ \__/ .' O \ / / \ " (_____, `._.' | } \/~~~/ `----. / } | / \__/ `-. | / | / `. ,~~| ~-.__| /_ - ~ ^| /- _ `..-' | / | / ~-. `-. _ _ _ |_____| |_____| ~ - . _ _ _ _ _>

It seems we support also "companion", from Portal:

cowsay (cow=companion) {{{
 hello
}}}
________ < hello > -------- \ \ /---\__/---\\ | / .... \ || \ ..--.. // |..(oo). || / ..--.. \\ | \ .... / || \---/--\---//

Cowsay builtin cows:

https://we.phorge.it/source/phorge/browse/master/externals/cowsay/cows/

https://we.phorge.it/source/phorge/browse/master/resources/cows/builtin/

Cowsay custom cows could be placed here:

phorge/resources/cows/custom

Cowsay Code Implementation:

https://we.phorge.it/source/phorge/browse/master/src/infrastructure/markup/interpreter/PhabricatorRemarkupCowsayBlockInterpreter.php


I think it is quite important that these things are mentioned in the documentation. Sometimes people think that Remarkup is a lame version of Markdown, but right now it is pretty obvious that they are two separate worlds and both interesting. I wish I had lived longer knowing these features instead of discovering them by accident.

Event Timeline

valerio.bozzolan created this task.
valerio.bozzolan created this object in space S1 Public.

Historically the reason why these aren’t documented is that they originally required installing 3rd party tools on the server. They were documented in tasks upstream but there was a security issue found with using graphviz so at that time out of caution they reimplemented figlet and cowsay in php rather than passing arguments to a 3rd party executable. After the implementation change documentation was never updated.

There’s possibly other reasons why they left it undocumented but it was a while back and I haven’t gone digging in the upstream for details.

I think a more generic solution here is "Make the Remarkup Help Page Extensible", so that Remarkup rules can add their own sections (Possibly under the Guides application, if it still exists?)

_____________________________________ ( I think having Remarkup rules being ) ( able to spawn their documentation ) ( section would be great, yup ) ------------------------------------- o . . o / `. .' " o .---. < > < > .---. o | \ \ - ~ ~ - / / | _____ ..-~ ~-..-~ | | \~~~\.' `./~~~/ --------- \__/ \__/ .' O \ / / \ " (_____, `._.' | } \/~~~/ `----. / } | / \__/ `-. | / | / `. ,~~| ~-.__| /_ - ~ ^| /- _ `..-' | / | / ~-. `-. _ _ _ |_____| |_____| ~ - . _ _ _ _ _>