Silly Tasting Notes Generator
A Perl script to generate silly random tasting notes - by Greg Sumner.
Back to Tech
The script has moved to here.
About the idea.
The note format here is based on the actual tasting notes you can find at the Wine Spectator web site (obligarory link here.)
Now WAP enabled.
The swng now works on mobile devices. Why would you want to do this? I don't know. But you can. Here's how.
How it works.
It's very simple. I put word types into arrays, then chose a word at random out of the array. The tasting note comes out in the following structure:
(Intro) (Modifier) (Adjective) (Varietal).
(Adverb) (Adjective) (Flavor) flavors, (Adjective) (Flavor), and (Strength-word) (Flavor).
Drink (When) through (EndWhen).
If you give it the paramater "silly=yes" it'll use the SillyFlavors array instead of the Flavors array. Rather than make sure it doesn't repeat any adjectives, I just put enough in there so the odds of the same one coming up again are pretty low. It will still happen about 1 in 30 times though. Honestly I think the "regular" ones are funnier than the Extra-Silly ones because they actually spit out something you might see in a magazine.
It defaults output as a server-side include so you can embed the TN on a page. It will also act as a stand-alone CGI, but without any pretty markup. You would call it as a CGI with the paramater "pagetype=webpage" if you want it to print a legal HTML page.
You can try that with the button here:
You can see the source code here.
Back to Tech
Back to Home.