AT2k Design BBS Message Area
Casually read the BBS message area using an easy to use interface. Messages are categorized exactly like they are on the BBS. You may post new messages or reply to existing messages!

You are not logged in. Login here for full access privileges.

Previous Message | Next Message | Back to BBS Support/Help/Discussion  <--  <--- Return to Home Page
   Networked Database  BBS Support/Help/Discussion   [1318 / 1491] RSS
 From   To   Subject   Date/Time 
Message   digimaus    All   Dad jokes   August 10, 2024
 8:17 PM *  

Hi everyone,

I was stumbling around the Internet and I discovered that
ICanHasCheeseburger now has the largest "dad joke" collection on the
Internet.  I was looking at adding a command to Nightbot (a bot used on
Twitch) and discovered that the API allows the joke to be returned as plain
text, not JSON.  So I now have a dad joke "door" I wrote in bash using curl.

Note that you can mod this to work on any OS that supports curl!  Just write
the script in your favorite scripting language.

The website asks that you send a user header so I use my BBS' website.

===
#!/bin/sh
#
# The following line is wrapped for this message...
curl -s -H "User-Agent: Outpost BBS (https://outpostbbs.net)" 
-H "Accept: text/plain"  https://icanhazdadjoke.com
echo -e "\n"
===

That will return a single-line joke with a CR to display.

Thee cURL options:

-s : suppress curl's output
-H : send header to the website

echo -e : displays escaped chars (also good for showing ANSI colors)

Note that there were some codepage issues noted with the received text: it was
obvious they used Windows encodings to input the data.

I am working on a script for MBSE that will run after a caller has
disconnected to create a new display file with a fresh (okay, dad jokes
might not be "fresh" LOL) joke for the next caller...

-- Sean
 
--- MultiMail/Linux
 * Origin: Outpost BBS * Johnson City, TN (618:618/1)
  Show ANSI Codes | Hide BBCodes | Show Color Codes | Hide Encoding | Hide HTML Tags | Show Routing
Previous Message | Next Message | Back to BBS Support/Help/Discussion  <--  <--- Return to Home Page

VADV-PHP
Execution Time: 0.0144 seconds

If you experience any problems with this website or need help, contact the webmaster.
VADV-PHP Copyright © 2002-2024 Steve Winn, Aspect Technologies. All Rights Reserved.
Virtual Advanced Copyright © 1995-1997 Roland De Graaf.
v2.1.241108