An API to lolcat (and figlet, cowsay etc. coming soon!) your text.
Source code | Hoster | Example request |
---|
Backstory: A friend and I were talking about how a lot of older stuff is re-sold as an EaaS and how ridiculous it is that M$ says that Windows 365 (basically a Windows PC in M$'s cloud) "enables a variety of new scenarios for the new world of work", even though VM's in the Cloud for personal usage have been around for a while. I jokingly said that we need Lolcat-as-a-service, and then I said, "screw it, I'm making this a thing". And here we are.
Note for cURL users: Use https://laas.cf instead of https://LaaS.cf when using cURL because Deta, the provider that hosts this service for free doesn't recognize uppercase URL's and cURL sends the domain in uppercase if you type it in uppercase, unlike browsers like Chrome.
Query parameters: (?)
Parameter | Required | Type | Effect | Default |
---|---|---|---|---|
spread | No | float | Inclination of the rainbow stripes (character widths per line height. High values (>1000) give almost horizontal stripes, low values (0.1) almost vertical ones) | 8.0 |
freq | No | float | Frequency of the rainbow (low values around 0.0001 give almost monochrome screens) | 0.3 |
html | No | boolean | Use HTML tags instead of ANSI escape codes | false |
text | GET only | string | Text to lolcat | POST body |
You can request GET /lolcat?[text]
with no other query params to emulate a POST request with the body set to [text]
.
Alias for /lolcat
. Use this endpoint with a text post body to lolcat the text. Example:
curl -d "$(fortune)" https://laas.cf
Use this endpoint with a text post body or the text
parameter to lolcat the text. Example:
curl -d "$(fortune)" https://laas.cf/lolcat # or
curl "https://laas.cf/lolcat/\?text=$(fortune | urlencode)"
Query parameters: (?)
Parameter | Required | Type | Effect | Default |
---|---|---|---|---|
font | No | string | The FIGlet font to use (see Fonts) | Standard |
horizontalLayout, verticalLayout | No | string | The horizontal / vertical layout to use. Possible values:
|
default |
width | No | number | Limit the width of the output. For example, if you want your output to be a max of 80 characters wide, you would set this option to 80. | - |
whitespaceBreak | No | boolean | Works in conjunction with width , will attempt to break text up on whitespace when limiting the width. |
false |
You can request GET /figlet?[text]
with no other query params to emulate a POST request with the body set to [text]
.
You can use every font from FIGlet.org. You can go to the Font examples or to the Font database.
Use this endpoint with a text post body or the text
parameter to lolcat the text. Example:
curl -d "$(fortune)" https://laas.cf/figlet # or
curl "https://laas.cf/figlet/\?text=$(fortune | urlencode)"
- Query parameters are how you send key-value pairs in a URL. They are structured like this:
?key=value
or?key=value&second_key=second_value
. - You just append them after the path like this:
https://laas.cf/lolcat/?text=Hello
. - You might have to escape
?
and&
when using your command-line like this:?key=value&second_key=second_value
. - You need to encode special characters that aren't
@
,*
,_
,+
,-
,.
or/
. Most browsers do that automatically, but you need a tool to encode it in the command likeurlencode
, but you can use a POST with cURL if you don't want to encode stuff.