#!/usr/bin/perl # # Random tasting notes generator 1.1 # # Version History: # 1.1 Added WML (cell phone) support. # Use flag "pagetype=wml" to output a WAP-compatible page. # # By Greg Sumner # Latest version is available from # http://www.gmon.com/tech/stng.shtml ####################################################################### # COPYRIGHT NOTICE: # Copyright (c)2000 Gregory S. Sumner. All Rights Reserved. # # This program may be used and modified free of charge by anyone, so # long as this copyright notice and the header above remain intact. By # using this program you agree to indemnify Gregory S. Sumner from any # liability. # # Selling the code for this program without prior written consent is # expressly forbidden. In all cases copyright and header must remain # intact. # ####################################################################### # INSTRUCTIONS: # This script draws words from an array into the schema listed # below. # # Requirements: cgi-lib # Tested on 5.005_03 (Linux) # # Options: # silly=yes will activate extra-silly taste array. # pagetype=webpage will format output as a regular web page so you # can link to it as a CGI. # pagetype=wml will output a WAP-compatible page. # # Schema: # $Intro $IntModify$Adjective $Varietal. # $Adverb $Adjective $Flavor1, $Adjective $Flavor2, and $Strength $Flavor3 flavors. # Drink $When through $EndDate. # srand; @Intro = ("Remarkable","Juicy","Desperate","Wholly obtuse","Generous","Glassy","Pretty","Sturdy","Somewhat","Evenly proportioned","Elegant","Lean","Chewy","Powerful","Soft","Ripe in flavor","Ready to drink","Well focused","Medium-weight","Heavy-weight","Light-weight","Tightly woven","Austere","Light, simple","Grossly overweight","Cedary","Modest","Markedly improved","Nearly matured","Almost matured","Somewhat matured","Overaged","Finely balanced","Chunky","Premature","A firm,full textured","Fully refined","Unnatural","Shows some rustic","Historic","Classic","Crisp","Neo-classic","Modern","Overdone","Tightly wound","Hopped-up","Rich and thick","Meaty","Unrefined","Frank","Rich and smokey","Dark and mysterious","Good","Evil","Impressive","Unimpressive","Big and strong","Wicked","Raw","Wimpy","Overdressed","Sweet","Rude","Creepy","Open-ended","Rounded","Corpulent","Overbearing","Twisted","Clean","Fun","Intense","Egocentric","Intelligently done","Serious","Flourished","Fancy"); @IntModifier = ("but","and","almost","but equally"); @Varietal = ("red","white","Barbera","Cabernet Franc","Cabernet","Gamay","Merlot","Syrah","Pinot Noir","Rhone","Zinfandel","Chardonnay","Chenin Blanc","Gewurztraminer","Marsanne","Pinot Gris","Voignier","Sauvingnon Blanc","Semillon","Rose","Sparkler","Port","Dessert wine"); @Adjective = ("sassy","desperate","longingly elegant","sad","hopeless","intense","focused","meandering","melancholy","putrid","yellowed","arcane","acidic monster","graceful","open-ended","freakishly evil","plump","spiney, brackish","ripe","closed","supple","broad-shouldered","big and plump","attractive","complex and stunning","sturdy","elegant","structured","hedonistic","aggressive","limp","lacking in character","morally superior","over-ripe","middle-aged","unripe","overdone","sweet","smoked","lackluster","hoppy","acidic","overcooked","understated","fleshy","extra-ripe","zelous","underdone","oaky","over-oaked","american-oaked","french-oaked","musty","soggy","fat","wicked","whimsical","oily","astounding","corpulent","second-rate","boggling","unripe","overcooked","sugary","over-the-top"); @Adverb = ("Contains","Shows","Detecable","Hints of","Forces","A mouthfull of","Strong","Spews","Resembles","Aromas of","Whispers of","Drops","Essenses of","Kicks you with","Throws out","Hits you with","Displays","Opens with","Reminecent of","Attacks with","Begins with","Starts with","Forcefully bites you with","Reminds one of"); @Flavors = ("roast pork","apple","pear","peach-pit","strawberry candy","anise","blackberry","black-cherry","lemon","citrus","citron","toasty oak","cardboard","american oak","french oak","licorace","salted beef","beef","ginger","tobacco","cigar box","fruit punch","acid","blueberry","mint","spice","currant","cedar","loganberry","coffee","herbs","dirt","cassis","earth","lime","raspberry","plum","toast","rye","tea notes","green tea","sun-dried tomato","caramel","dried berry","vanilla","bing-cherry","herbs","juniper","sage","wild berry","orange peel","lemon rind","banana","mocha","smoked bacon","clay","thyme","pepper","salt","buttered scones","onion","shallot","fois gras","kalamata olive","celery","fig","pineapple","salad","tomato","pappaya","mango","chutney","mint julip","bourbon","marmalade","strawberry jam","barley","carrot","roasted vegetables","roasted meat","prune","prune juice","stewed prune","raisin","seedless watermelon","tangerine","peach","nectarine","honey","garlic","melon","cocoa","maple syrup","spruce","cedar","fir","yew bark"); @SillyFlavors = ("opium","melted chocolate","milk chocolate","fungus","hair-spray","sweatsock","wart ointment","tootsie-roll","toothpaste","pork rind","yellow taffy","buttered popcorn","cherry cola","smoked oyster","mustard","ketchup","skittle","dishwater","bagel dough","steamed vegetable","pesto","chicken","frosted pop-tart","whole-wheat bread","teriyaki","rancid pork","quail egg casserole","pungent spore","C-ration","smokey liverwurst","french onion soup","lamb shank","fig newton","saltine","extra-virgin olive oil","pulpy orange juice","pixie stick","poi","seawater","bongwater","smoked ham","orange jello","oysters","clam chowder","Mars bar","Baby Ruth bar","cactus","lemonaide","grog","coconut suntan oil","burnt rubber","lime zest","cottage cheese","jack cheese","string cheese","buttermilk pancakes","eggos","cheap gin","screaming yellow zonkers","fruity pebbles","taco sauce","fruit rollups","ganja","hot dog water","melted crayon","super-glue","skim milk","cheddar","root beer","cheetos","doritos","baked alaska","hair gel","raw egg","beef jerkey","slim jims","gasoline","varnish","poi"); @Strength = ("lingering","forward","strong","weak","bashful","corpulent","light","aggressive","hopeful","semi-weak","traces of","forceful","total absence of","perceptable","dainty","strong-willed","atomic traces of","scant","a modicum of"); @EndDate = ("2001","2002","2003","2004","2005","2006","2007","2008","2009","2010","2011","2012","eternity","never","April","May","June","graduation","Christmas","Tuesday","Friday","whenever the cows come home"); # Test for any user input. require "cgi-lib.pl"; %in=(); &ReadParse(*in); if ($in{"silly"} eq "yes" ) { $Flavor1 = $SillyFlavors[rand(@SillyFlavors)]; $Flavor2 = $SillyFlavors[rand(@SillyFlavors)]; $Flavor3 = $SillyFlavors[rand(@SillyFlavors)]; $SillyString = "(Extra-Silly Mode active)
"; } if ($in{"silly"} ne "yes" ) { $Flavor1 = $Flavors[rand(@Flavors)]; $Flavor2 = $Flavors[rand(@Flavors)]; $Flavor3 = $Flavors[rand(@Flavors)]; } if ($in{"pagetype"} eq "webpage" ) { $Header = "Content-type:\ttext/html\n\n"; $Header .= "Tasing Notes Genrator 1.0"; $Header .= $SillyString; $Header .= ""; $Footer = "
"; $Footer .= "Extra-silly
"; $Footer .= ""; $Footer .= ""; $Footer .= "
"; $Footer .= "back to Gmon"; $Footer .= ""; } if ($in{"pagetype"} eq "wml" ) { $Header = "Content-type: text/vnd.wap.wml\n"; $Header .= "Expires: Mon, 26 Jul 1997 05:00:00 GMT\n"; $Header .= "Last-Modified: 05 December 2000 14:11:32 GMT\n"; $Header .= "Cache-Control: no-cache, must-revalidate\n"; $Header .= "Pragma: no-cache\n\n"; $Header .= ""; $Header .= ""; $Header .= ""; $Header .= " "; $Header .= " "; $Header .= " "; $Header .= "

\n"; $Header .= $SillyString; $Header .= "\n

"; $Header .= "

"; $Footer = "

\n

Back"; $Footer .= "

\n
"; $Footer .= "
"; } print $Header; $RandIntro = rand(@Intro); print qq! $Intro[$RandIntro] $IntModifier[rand(@IntModifier)] $Adjective[(rand@Adjective)] $Varietal[rand@Varietal]. $Adverb[rand(@Adverb)] $Flavor1, $Adjective[rand(@Adjective)] $Flavor2 and $Strength[rand(@Strength)] $Flavor3. Drink now through $EndDate[rand(@EndDate)].\n\n!; print $Footer; exit;