//modification by Ed Purver of Dan Shiffman's king lear code, to crudely parse an online database of civilian deaths in iraq PFont f; // A variable to hold onto a font String[] bodycount; // The array to hold all of the text int counter = 3040; String delimiters = " ,./?<>;=&-"; // delimiters void setup() { size(800,600); // Load font f = loadFont("AppleGothic-48.vlw"); // Load database into an array of strings String proxy = "http://itp.nyu.edu/icm/proxy/proxy.php?url=http://www.iraqbodycount.net/database/"; String[] rawtext = loadStrings(proxy); String everything = join(rawtext," "); // join the big array together as one long string bodycount = split(everything,delimiters); // split the array into words using any delimiter framerate(3); } void draw() { background(0); textFont(f); fill(255); //sorry Dan! lazy code! String theword = bodycount[counter]; String ident = "class"; String td = "td"; String br = "br"; String tr = "tr"; String cnt = "\"cnt\""; String srcs = "\"srcs\""; String a = "a"; String name = "name"; String database = "database"; float x = random(50,680); float y = random(70,500); textSize(random(14,30)); //sorry Dan, I know I should have made some kind of array here, but i'm too lazy! if (theword.equals(ident) == false) { if (theword.equals(td) == false){ if (theword.equals(br) == false){ if (theword.equals(tr) == false){ if(theword.equals(cnt) == false){ if(theword.equals(srcs) == false) { if(theword.equals(a) == false) { if(theword.equals(name) == false) { if(theword.equals(database) == false) { text(theword,x,y); } } } } } } } } } delay(500); // Move onto the next word counter = (counter + 1) % bodycount.length; //println(counter); }