User:Lieven Van Speybroeck/thematic/Indian Camp

From XPUB & Lens-Based wiki

Indian camp4.jpg
(photo: Nataša Sienčnik)

Description

Indian Camp by Ernest Hemingway is an installation consisting of 4 synchronized inkjet printers that re-enacts‘ the eponymous short story. The story is about a trip to a so-called „Indian Camp“ by a medical doctor, his son, and his uncle, in order to help an indigenous woman to give birth to her child. During the process - a Caesarian incision has to be made in order to save the mother and her child - the husband commits suicide. Three printers represent the individual characters and perform (i.e. print) the dialogues between father, son, and uncle, while one takes on the role of the narrator. The story is thus not only ,spatialized‘ but also transformed and performed in ,real-time‘, as the print performance includes the time gaps contained in the original story. The installation 'performs' the story once per day, over a span of 4 hours.

Code

Creating the page files

In order to create pdf-files from a text-file (the story cut up as a movie script, with characters and timestamps) on the fly, I use a python script that fills in a template (made in Inkscape) with new content and a page number.

  • the story (story.script):
11:15:00|narrator|Indian Camp
11:15:05|narrator|by Ernest Hemingway
11:45:00|narrator|At the lake shore there was another rowboat drawn up. The two Indians stood waiting.
11:48:00|narrator|Nick and his father got in the stern of the boat and the Indians shoved it off and one of them got in to row.
11:48:35|narrator|Uncle George sat in the stern of the camp rowboat. The young Indian shoved the camp boat off and got in to row Uncle George.
11:48:40|narrator|The two boats started off in the dark.
11:53:00|narrator|Nick heard the oarlocks of the other boat quite a way ahead of them in the mist.
11:56:00|narrator|The Indians rowed with quick choppy strokes.
11:58:00|narrator|Nick lay back with his father's arm around him. It was cold on the water. The Indian who was rowing them was working very hard, but the other boat moved further ahead in the mist all the time.
11:59:00|son|"Where are we going, Dad?"
11:59:02|narrator|Nick asked.
11:59:04|father|"Over to the Indian camp. There is an Indian lady very sick."
11:59:08|son|"Oh,"
11:59:10|narrator|said Nick.
12:05:00|narrator|Across the bay they found the other boat beached. Uncle George was smoking a cigar in the dark. 
12:06:00|narrator|The young Indian pulled the boat way up on the beach.
12:06:15|narrator|Uncle George gave both the Indians cigars.
12:06:25|narrator|They walked up from the beach through a meadow that was soaking wet with dew, following the young Indian who carried a lantern.
12:16:00|narrator|Then they went into the woods and followed a trail that led to the logging road that ran back into the hills. It was much lighter on the logging road as the timber was cut away on both sides.
12:16:05|narrator|The young Indian stopped and blew out his lantern and they all walled on along the road.
12:21:00|narrator|They came around a bend and a dog came out barking. Ahead were the lights of the shanties where the Indian bark-peelers lived.
12:21:20|narrator|More dogs rushed out at them.
12:21:25|narrator|The two Indians sent them back to the shanties.
12:22:00|narrator|In the shanty nearest the road there was a light in the window. An old woman stood in the doorway holding a lamp.
12:22:05|narrator|Inside on a wooden bunk lay a young Indian woman. She had been trying to have her baby for two days. All the old women in the camp had been helping her. The men had moved off up the road to sit in the dark and smoke cut of range of the noise she made.
12:22:25|narrator|She screamed just as Nick and the two Indians followed his father and Uncle George into the shanty.
12:22:30|narrator|She lay in the lower bunk, very big under a quilt. Her head was turned to one side.
12:22:35|narrator|In the upper bunk was her husband. He had cut his foot very badly with an ax three days before. He was smoking a pipe.
12:22:50|narrator|The room smelled very bad.
12:23:00|narrator|Nick's father ordered some water to be put on the stove, and while it was heating he spoke to Nick.
12:23:05|father|"This lady is going to have a baby, Nick,"
12:23:07|narrator|he said.
12:23:09|son|"I know,"
12:23:11|narrator|said Nick.
12:23:13|father|"You don't know,"
12:23:15|narrator|said his father.
12:23:25|father|"Listen to me. What she is going through is called being in labor. The baby wants to be born and she wants it to be born. All her muscles are trying to get the baby born. That is what is happening when she screams."
12:23:33|son|"I see,"
12:23:35|narrator|Nick said.
12:23:36|narrator|Just then the woman cried out.
12:23:55|son|"Oh, Daddy, can't you give her something to make her stop screaming?"
12:23:57|narrator|asked Nick.
12:23:59|father|"No. I haven't any anaesthetic,"
12:24:01|narrator|his father said.
12:24:05|father|"But her screams are not important. I don't hear them because they are not important."
12:26:00|narrator|The husband in the upper bunk rolled over against the wall.
12:33:00|narrator|The woman in the kitchen motioned to the doctor that the water was hot.
12:33:03|narrator|Nick's father went into the kitchen and poured about half of the water out of the big kettle into a basin.
12:33:15|narrator|Into the water left in the kettle he put several things he unwrapped from a handkerchief.
12:33:25|father|"Those must boil,"
12:33:27|narrator|he said, and began to scrub his hands in the basin of hot water with a cake of soap he had brought from the camp.
12:33:31|narrator|Nick watched his father's hands scrubbing each other with the soap.
12:33:38|narrator|While his father washed his hands very carefully and thoroughly, he talked.
12:33:40|father|"You see, Nick, babies are supposed to be born head first but sometimes they're not. When they're not they make a lot of trouble for everybody. Maybe I'll have to operate on this lady. We'll know in a little while."
12:34:30|narrator|When he was satisfied with his hands he went in and went to work.
12:35:00|father|"Pull back that quilt, will you, George?"
12:35:02|narrator|he said.
12:35:04|father|"I'd rather not touch it."
12:45:00|narrator|Later when he started to operate Uncle George and three Indian men held the woman still.
12:52:00|narrator|She bit Uncle George on the arm and Uncle George said,
12:52:02|uncle|"Damn squaw bitch!"
12:52:04|narrator|and the young Indian who had rowed Uncle George over laughed at him.
12:52:10|narrator|Nick held the basin for his father.
13:25:00|narrator|It all took a long time.
14:00:00|narrator|His father picked the baby up and slapped it to make it breathe and handed it to the old woman.
14:00:15|father|"See, it's a boy, Nick,"
14:00:17|narrator|he said.
14:00:27|father|"How do you like being an interne?"
14:00:28|narrator|Nick said.
14:00:29|son|"All right."
14:00:34|narrator|He was looking away so as not to see what his father was doing.
14:01:00|father|"There. That gets it,"
14:01:02|narrator|said his father and put something into the basin.
14:01:03|narrator|Nick didn't look at it.
14:02:00|father|"Now,"
14:02:02|narrator|his father said,
14:02:04|father|"there's some stitches to put in. You can watch this or not, Nick, just as you like. I'm going to sew up the incision I made."
14:02:15|narrator|Nick did not watch. His curiosity had been gone for a long time.
14:12:00|narrator|His father finished and stood up.
14:12:05|narrator|Uncle George and the three Indian men stood up.
14:12:15|narrator|Nick put the basin out in the kitchen.
14:12:21|narrator|Uncle George looked at his arm. The young Indian smiled reminiscently.
14:12:22|father|"I'll put some peroxide on that, George,"
14:12:24|narrator|the doctor said.
14:12:35|narrator|He bent over the Indian woman. She was quiet now and her eyes were closed. She looked very pale. She did not know what had become of the baby or anything.
14:12:40|father|"I'll be back in the morning."
14:12:42|narrator|the doctor said, standing up.
14:12:44|father|"The nurse should be here from St. Ignace by noon and she'll bring everything we need."
14:12:46|narrator|He was feeling exalted and talkative as football players are in the dressing room after a game.
14:12:55|father|"That's one for the medical journal, George,"
14:12:57|narrator|he said.
14:12:59|father|"Doing a Caesarian with a jack-knife and sewing it up with nine-foot, tapered gut leaders."
14:13:01|narrator|Uncle George was standing against the wall, looking at his arm.
14:13:03|uncle|"Oh, you're a great man, all right,"
14:13:05|narrator|he said.
14:16:00|father|"Ought to have a look at the proud father. They're usually the worst sufferers in these little affairs,"
14:16:02|narrator|the doctor said.
14:16:04|father|"I must say he took it all pretty quietly."
14:16:20|narrator|He pulled back the blanket from the Indian's head. His hand came away wet. 
14:16:25|narrator|He mounted on the edge of the lower bunk with the lamp in one hand and looked in.
14:16:27|narrator|The Indian lay with his face toward the wall. His throat had been cut from ear to ear. The blood had flowed down into a pool where his body sagged the bunk. His head rested on his left arm. The open razor lay, edge up, in the blankets.
14:16:32|father|"Take Nick out of the shanty, George,"
14:16:34|narrator|the doctor said.
14:16:36|narrator|There was no need of that. Nick, standing in the door of the kitchen, had a good view of the upper bunk when his father, the lamp in one hand, tipped the Indian's head back.
15:20:00|narrator|It was just beginning to be daylight when they walked along the logging road back toward the lake.
15:30:00|father|"I'm terribly sorry I brought you along, Nickie,"
15:30:02|narrator|said his father, all his post-operative exhilaration gone.
15:30:08|father|"It was an awful mess to put you through."
15:30:20|son|"Do ladies always have such a hard time having babies?"
15:30:22|narrator|Nick asked.
15:30:25|father|"No, that was very, very exceptional."
15:32:45|son|"Why did he kill himself, Daddy?"
15:32:48|father|"I don't know, Nick. He couldn't stand things, I guess."
15:32:52|son|"Do many men kill themselves, Daddy?"
15:32:54|father|"Not very many, Nick."
15:32:58|son|"Do many women?"
15:33:00|father|"Hardly ever."
15:33:03|son|"Don't they ever?"
15:33:05|father|"Oh, yes. They do sometimes."
15:35:00|son|"Daddy?"
15:35:02|father|"Yes."
15:35:04|son|"Where did Uncle George go?"
15:35:06|father|"He'll turn up all right."
15:38:00|son|"Is dying hard, Daddy?"
15:38:04|father|"No, I think it's pretty easy, Nick. It all depends."
15:45:00|narrator|They were seated in the boat. Nick in the stern, his father rowing.
15:45:30|narrator|The sun was coming up over the hills.
15:47:00|narrator|A bass jumped, making a circle in the water.
15:55:00|narrator|Nick trailed his hand in the water. It felt warm in the sharp chill of the morning.
16:00:00|narrator|In the early morning on the lake sitting in the stern of the boat with his father rowing, he felt quite sure that he would never die.
  • The template code (page.py):
def dump (f, text, page):
	f.write("""<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="744.09448"
   height="1052.3622"
   id="svg2"
   version="1.1"
   inkscape:version="0.47 r22583"
   sodipodi:docname="template.svg">
  <defs
     id="defs4">
    <inkscape:perspective
       sodipodi:type="inkscape:persp3d"
       inkscape:vp_x="0 : 526.18109 : 1"
       inkscape:vp_y="0 : 1000 : 0"
       inkscape:vp_z="744.09448 : 526.18109 : 1"
       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
       id="perspective10" />
  </defs>
  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="0.61742627"
     inkscape:cx="-122.0495"
     inkscape:cy="541.49805"
     inkscape:document-units="px"
     inkscape:current-layer="layer1"
     showgrid="false"
     inkscape:window-width="1511"
     inkscape:window-height="910"
     inkscape:window-x="0"
     inkscape:window-y="25"
     inkscape:window-maximized="0" />
  <metadata
     id="metadata7">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title />
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(0,3.2302534e-5)">
    <flowRoot
       xml:space="preserve"
       id="flowRoot2816"
       style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
       transform="translate(0,308.26769)"><flowRegion
         id="flowRegion2818"><rect
           id="rect2820"
           width="445.39731"
           height="553.91229"
           x="34.012157"
           y="83.286842" /></flowRegion><flowPara
         id="flowPara2822" /></flowRoot>    <flowRoot
       xml:space="preserve"
       id="flowRoot2824"
       style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
       transform="translate(67.597046,205.12677)"><flowRegion
         id="flowRegion2826"><rect
           id="rect2828"
           width="540.95526"
           height="717.49457"
           x="34.012157"
           y="62.231693" /></flowRegion><flowPara
         id="flowPara2830"
         style="font-size:35px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Georgia;-inkscape-font-specification:Georgia">""")
	f.write(text)
	f.write("""</flowPara></flowRoot>    <flowRoot
       xml:space="preserve"
       id="flowRoot2832"
       style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
       transform="translate(130.7738,308.26769)"><flowRegion
         id="flowRegion2834"><rect
           id="rect2836"
           width="119.85236"
           height="69.643944"
           x="181.39818"
           y="651.77576" /></flowRegion><flowPara
         id="flowPara2838"
         style="font-size:28;text-align:center;text-anchor:middle;font-family:Georgia;-inkscape-font-specification:Georgia">""")
	f.write(str(page))
	f.write("""</flowPara></flowRoot>  </g>
</svg>""")

The next script is the 'publishing' part, using pdftk and inkscape commands.

  • The publishing code (publish.py):
import codecs, page, os, sys
 
f = codecs.open('story.script', 'r', 'utf-8')
p = 0
 
# go through each line of the script
for line in f:
	line = line.strip()
	if not line:
		continue

	# split the text in parts, assigning time, speaker (printer) and text each to a different variable.
	(time, speaker, text) = line.split('|', 2)

	# generate a page number for the line
	p += 1

	# the name of the svg and pdf is based on the page number
	svgname = 'page%04d.svg' % p
	pdfname = 'page%04d.pdf' % p

	# create a new svg-file, use the svg template, dump in text and page number, close
	out = codecs.open('svg/'+svgname, 'w', 'utf-8')
	page.dump(out, text, p)
	out.close()

	# export the svg as a pdf. Rotate the pdf 180 degrees (so it comes out of the printer as a readable print)
	os.system(' inkscape svg/%s --export-pdf=svg/%s' % (svgname, pdfname))
	os.system(' pdftk svg/%s cat 1-endS output final/%s' % (pdfname, pdfname))

This script allows me to generate new page files in a fast way, whenever the script would have changed.

Real-time printing

Now the pages have been generated, the next goal is send off the right pages to the right printer on the right time. This is done by a python script that constantly checks time, matches it with the timestamps in the story.script file and if it finds a match, it sends it off to the printer assigned to that timestamp. First, I needed a dictionary that contains all the timestamps and their corresponding printers (or speakers). I use the same sourcefile, and most of the code I used for the publishing part is actually reusable:

  • Store timestamps and printers in a dictionary (read.py):
import codecs, page, os, sys, cPickle

f = codecs.open('story.script', 'r', 'utf-8')
p = 0
prevTime = " "

timeline = {}

for line in f:
	line = line.strip()
	if not line:
		continue
	(time, speaker, text) = line.split('|', 2)
	p += 1
	svgname = 'page%04d.svg' % p
	pdfname = 'page%04d.pdf' % p
	timeline[time] = (speaker, pdfname)
	
f.close()

f = open("timeline_db.pickle", "w")
cPickle.dump(timeline, f, cPickle.HIGHEST_PROTOCOL)
f.close()

Now it's just a matter of checking the time, matching it with the keys in the dictionary and sending of the files at the right time using basic LPR commands:

  • Timecheck + printing (play.py):
import cPickle, os, sys, time
from datetime import datetime, timedelta

f = open('timeline_db.pickle', 'r')
timeline = cPickle.load(f)
f.close()

days = ['29','01','02','03','06','07','08','09','10','13','14','15']
weekend = ['02','03','09','10']
offset = timedelta(hours=-1)

prevTime = ""

while True:
	currentDay = datetime.now().strftime("%d")
	
	# check if the exhibition is open today
	if currentDay in days:
		# check if it's weekend
		if currentDay in weekend:
			# if so, start 1 hour later
			currentTime = (datetime.now() + offset).strftime("%H:%M:%S")
		else:
			currentTime = datetime.now().strftime("%H:%M:%S")
		
		if currentTime == prevTime:
			time.sleep(0.5)
			continue

		prevTime = currentTime	

		# If there's a match with a timestamp in the dictionary, send off the according file to the according printer
		if currentTime in timeline.keys():
			(speaker, pdfname) = timeline[currentTime]
			os.system('lpr -P %s final/%s' % (speaker, pdfname))
			print("printing %s to %s for %s" % (pdfname, speaker, currentTime)) 

		else:
	 		print("no text for " + currentTime)
	
 	# Exhibition not open today, so don't do timechecks	
	else:
	 	print 'Exhibition closed - not running today!'
	 	time.sleep(5)
	 	continue

The physical installation

consists of:

  • 4 inkjet printers (canon, hint hint)
  • 1 nettop (thank you Evo!!!)
  • 4 pedestals
  • 130 sheets of paper per day.

Thanks to Michael and Nataša for making these wonderful pictures:

Indian camp2.jpg
Indian camp1.jpg
Indian camp3.jpg
Indian camp4.jpg