User:SN/Untitled

From XPUB & Lens-Based wiki

Setup.png

About the project

Kenneth Goldsmith starts Uncreative Writing: Managing Language in the Digital Age by altering Douglas Humbler’s quote: “The world is full of texts, more or less interesting; I do not wish to add any more,” stating the new role of the author, a manager who rephrases and reorganizes the words of others. “The problem is not needing to write more of it; instead, we must learn to negotiate the vast quantity that exists. How I make my way through this thicket of information—how I manage it, how I parse it, how I organize and distribute it—is what distinguishes my writing from yours.” Due to the development of modern technologies and new medias the ‘art of Copy-Past’ in literature has become the major trend that generates many works “proclaiming that context is the new content.” The new gender has its charm and evokes emotions and connotations as the reaction on the writing process itself.


Being invigorated by the experiments done by Oulipo, I decided to give administrative functions to the machine. Untitled originally was a performance made by Pleun Gremmen and me during the thematic seminar “Chain reaction.” Pleun and I played on the field of combinatory literature and chain reactions. We looked at the way Youtube autoplay and Google method of crawling the internet works and took it as a starting point. My role was to establish the rules for the process, define the amount of freedom and randomness in the code that would create situations in which error could emerge. The process is based on the loops of chain reactions, where the error plays a role of 'a decision maker' where to stop poem. The result is a list of words with or within a connection among them. The project states the role of the reader and its subjective interpretation. He is the one who creates connections between words.


During the performance, I was operating the computer and played the role of a coupler between audience, computer, and Pleun. Pleun was operating the printer.

  • The performance starts with providing the link to the Python script.
  • Script follows the link, extracts all the text and links that are on this page.
  • I ask a random person to feed me a number.
  • The number determines which word to extract.
  • I ask Pleun to print this word.
  • After she finishes, I ask one more time a random person to feed me a number.
  • The number determines which link to follow.
  • Process repeats.
  • The failure to follow a link or extract a word causes the system to finish "the poem."


The second version of code uses the random function to generate numbers. I ran the code several times, using different sites as a starting point. Here are some results.


LEARN
APPLE
LAST
SPIES

TIMES
2016/06/02


LEARN
TO
NOTE
APPLICABLE
PROGRAMS
FAIR
OR
LOVE
ONLINE
OWNERS
ALL
NEGOTIATE
PRESS

TIMES
2016/05/31


RULES
LIFE
INFO
WITH
SUOMI
OR
NETHERLANDS
OR
BELOW
AMERICANS
HELP
STORITELLING

FOX NEWS
2016/05/31


EDITORIAL
KELLY
FOX
EVEN
DINOSAURS
MUSIC
USE

FOX NEWS
2016/05/31


PRIVACY
AVAILABLE
AND
ETHNICITY
MENU
INCLUSION
IT
CORPORATION
PROGRESS

TIMES
2016/05/31


GUNMAN
END

TIMES
2016/06/12

Process

The main part of the project is a Python script

import urllib, urlparse
import sys
from bs4 import BeautifulSoup
import string
import re
import itertools
import time

def visit(x):
	page = x
	list_links = []
	url = urllib.urlopen(page).read()
	html = BeautifulSoup(url, 'html.parser')
	for link in html.find_all('a'):
		link = link.get('href')
		if link:
			link = urlparse.urljoin(x, link)
			list_links.append(link)

	for script in html(["script", "style"]):
		script.extract()

	text = html.get_text()
	words = re.findall(r"\w+", text)
	print words, len(words)
	number_word = raw_input('Feed me a number: ')
	number_link = raw_input('Feed me a number: ')
	random_word = words[int(number_word)]
	random_link = list_links[int(number_link)]
	return random_word, random_link
ww = []

try:
	link = raw_input("Feed me a link: ")
	while True:
		print "Visiting", link
		word, link = visit(link)
		print "WORD:", word
		ww.append(word)
		time.sleep(5)
for wrd in ww:
		if len(ww) > 2:
			print wrd
	print "The End"
	sys.exit()

except IOError:
	for wrd in ww:
		print wrd
	print "The End"
	sys.exit()
except IndexError:
	for wrd in ww:
		print wrd
	print "the End"
	sys.exit()
except ValueError:
	for wrd in ww:
		print wrd
	print "the End"
	sys.exit()

A mistake in the first version of code caused script to run an infinite loop. The Code was running for half an hour until my computer ran out of memory. I made a short screen recording of this prosses. There is something hypnotizing in it.

http://vimeo.com/172365632