#!/usr/bin/perl -w ############################### # 'Ono Generator' (description: generates Ono-esque instructions) # Copyright (C) 2004 Wayne Clements # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # See . # # # The program is presented as it is on my website. # The html and links are as per in-vacua.com. You can change this as necessary. # # Words and phrases below quote Yoko Ono's (1995) 'Instruction Paintings', New York, Weatherhill, Inc. # # Wayne Clements, www.in-vacua.com. email: invacua_at__btinternet[Do T]com # ############################### use strict; use CGI ':standard'; use CGI::Carp qw(fatalsToBrowser); print "Content-type: text/html\n\n"; my (@s10, @s20, @s30, @s40, @s50, @s60, @s70, @s80, @s90, @keywords, @select); my ($s10, $s20, $s30, $s40, $s50, $s60, $s70, $s80, $s90); my ($s1, $s2, $s3, $s4, $s5, $s6, $s7, $s8, $s9); my ($rand1, $rand2); my ($line1, $line2, $line3, $line4, $line5, $line5a, $line6, $line7, $line8, $line9, $line10, $line11); srand; #array holds lines to make a random select from @s10 = ("when a hole is drilled ", "where there is wind ", "where you can see the sky ", "where the west light comes in ", "once a year ", "in a glass tank ", "on a snowy evening ", "in the town square ", "from the beginning to the end ", "when a hole is drilled ", "at any time ", "for any length of time ", "every morning ", "at an address arbitrarily chosen ", "at twenty addresses ", "at an arbitrary point ", "in the garden ", "on the night of the full moon ", "at dawn ", "from 1AM "); @s20 = ("a space ", "a fictional name ", "a shadow ", "the whole thing ", "a design ", "a numeral ", "a roman letter ", "a circle ", "a number ", "a hole ", "the morning light ", "a marker "); @s30 = ("a bag ", "a broken sowing machine ", "a microscope ", "a stone ", "a hair ", "a piece of glass ", "a piece of wood ", "a piece of metal ", "the sky ", "a canvas ", "a vine ", "your hand ", "the garbage "); @s40 = ("telephone numbers ", "grasshoppers ", "ants ", "singing insects ", "figures ", "shapes ", "old paintings ", "photographs ", "blank canvases ", "two holes "); @s50 = ("until ", "till ", "where ", "when ", "to see if "); @s60 = ("try ", "shake " , "receive ", "converse with ", "enlarge ", "change ", "list ", "see ", "use ", "sell ", "send ", "collect ", "select ", "mix in your head ", "write on ", "hang ", "drill ", "bury ", "place ", "cut ", "cut out ", "dismember "); @s70 =("a shadow ", "cracked ", "red ", "black ", "almost invisible ", "finished ", "covered with nails ", "dyed thoroughly in rose ", "different ", "gone "); @s80 = ("observe ", "imagine ", "remember ", "see "); @s90 = ("the size you prefer ", "until the whole thing is gone ", "that you associate with it ", "to see if the skies are different ", "that come to mind ", "the size you prefer ", "chosen arbitrarily ", "to let the light go through ", "to your taste ", "to paint black ", "printed or otherwise ", "that you like ", "that you remember "); $s1 = $s10[int(rand(@s10))]; $s2 = $s20[int(rand(@s20))]; $s3 = $s30[int(rand(@s30))]; $s4 = $s40[int(rand(@s40))]; $s5 = $s50[int(rand(@s50))]; $s6 = $s60[int(rand(@s60))]; $s7 = $s70[int(rand(@s70))]; $s8 = $s80[int(rand(@s80))]; $s9 = $s90[int(rand(@s90))]; $line1 = join '', ($s6, $s3, "\n"); $line2 = join '', ($s3, "is ", $s2, $s1, " - ", $s8, "\n"); $line3 = join '', ($s3, $s1, "is to be ", $s2, "\n"); $line4 = join '', ($s1, "there is ", $s2, "\n"); $line5 = join '', ("if ", $s1, $s2, "is ", $s7, ' - ', $s8, $s3, "\n"); $line5a = join '', ($s1, $s8, $s4, "\n"); $line6 = join '', ($s6, $s2, "for a visitor to ", $s8, "\n"); $line7 = join '', ($s8, $s3, "that is ", $s7, "\n"); $line8 = join '', ($s1, "there is ", $s2, " - ", $s8, $s3, "\n"); $line9 = join '', ("for a visitor: ", $s4, "that are ", $s7,', ', $s1, "\n"); $line10 = join '', ($s6, $s4, $s5, $s4, "are ", $s7, "\n"); $line11 = join '', ($s6, $s4, $s9, "\n"); $rand2 = int(rand 2) + 1; #creates random no. for if else. if ($rand2 == 1) { push @keywords, $line1, $line2, $line3, $line4, $line5, $line5a #selects a line group as no. == 1 or 2 } else { push @keywords, $line6, $line7, $line8, $line9, $line10, $line11 } $rand1 = int(rand 4) + 1; #a random number is chosen...not 0...size adjustable my %seen = (); $seen{int(rand(@keywords))}++ while scalar keys %seen<$rand1; #a random group of lines will be chosen #AND of a random size @select = @keywords[keys %seen]; ## main program complete ## @select is the text. What follows is the html + @select print "ONO GENERATOR

                   Home    About    Contact     Links     Work    CV                    



ONO GENERATOR












press the GREY BUTTON ABOVE to make the Ono Generator write

";