User:Inge Hoonte/captain tweet: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 1: Line 1:
[[File:aye_aye.png]]
[[File:aye_aye.png]]


After much circling around new ideas, while focusing on finishing Captain Tweet, I decided to let a few new kernels and smaller works wait for some other time. Aymeric has helped me steadily progress. And I'm starting to understand dictionaries and strings better.  
After much circling around new ideas, while focusing on finishing Captain Tweet, I decided to let a few new kernels and smaller works wait for some other time. Aymeric has helped me steadily progress with the code. And I'm starting to understand dictionaries and strings better.  


Some important things to note: <br/>
Some important things to note: <br/>
* I changed the original dates. ideally I'd have this air on December 16, the first entry of the original log. But for the sake of the show now, I've changed it to June/July. So... in case you're wondering, that's why it's snowing in July. But I guess this could be the case, had the ship been sailing via the Arctic or Greenland.  
* I changed the original dates to fit the format of the final show. Ideally I'd have this start on December 16, which is the first entry of the original log. But for the sake of the show now, I've changed it to June/July. So... in case you're wondering, that's why it's snowing in July. But I guess this could be the case, had the ship been sailing via the Arctic or Greenland.
* The log used is a combination of Captain Turner's log, and the Muster's Roll, both have been transcribed by Sue Mackay, of Cardiff.
* The Weymouth, the ship that's tweeted from, was used to transport 11 parties of 1820 settlers from Portsmouth, England, to Algoa Bay (Port Elizabeth), South-East Africa.
* The Weymouth, the ship that's tweeted from, was used to transport 11 parties of 1820 settlers from Portsmouth, England, to Algoa Bay (Port Elizabeth), South-East Africa.
* A big undertone of this project is of course migration, sailing the seas, colonialism, which isn't further explored. I needed to focus on advancing in my programming skills.  
* A big undertone of this project is of course migration, sailing the seas, colonialism, which isn't further explored. I needed to focus on advancing in my programming skills.  

Revision as of 11:18, 16 June 2011

Aye aye.png

After much circling around new ideas, while focusing on finishing Captain Tweet, I decided to let a few new kernels and smaller works wait for some other time. Aymeric has helped me steadily progress with the code. And I'm starting to understand dictionaries and strings better.

Some important things to note:

  • I changed the original dates to fit the format of the final show. Ideally I'd have this start on December 16, which is the first entry of the original log. But for the sake of the show now, I've changed it to June/July. So... in case you're wondering, that's why it's snowing in July. But I guess this could be the case, had the ship been sailing via the Arctic or Greenland.
  • The log used is a combination of Captain Turner's log, and the Muster's Roll, both have been transcribed by Sue Mackay, of Cardiff.
  • The Weymouth, the ship that's tweeted from, was used to transport 11 parties of 1820 settlers from Portsmouth, England, to Algoa Bay (Port Elizabeth), South-East Africa.
  • A big undertone of this project is of course migration, sailing the seas, colonialism, which isn't further explored. I needed to focus on advancing in my programming skills.


Source Code

CAPTAIN COOK'S TRAVEL LOG
Capt cook.jpg


ORIGINAL LOG BY CAPTAIN TURNER, 1819/1820
Weymouth.gif

Thurs 16 December 1819 – Portsmouth Harbour
Am: Light breezes and clear
8: Do weather. Employed hoisting in provisions and other necessary duties.
The settlers came on board at noon. Do weather. Employed stowing the hold.
Mustered for Checques, discharged several of the crew. Employed stowing the holds.
Midnight: Strong winds

Fri 17 December
Am: Strong breezes with rain
8: Do weather. Employed cleaning decks and stowing chain cables.
Do weather. Employed as before.
Midnight: Do weather

Sat 18 December
Am: Strong breezes and rain. Employed clearing lighter of provisions.
Pm: More moderate employed cleaning decks.
Midnight: Fine weather

Captain Tweet, 2011

Aye aye.png

06/16
01:00: Light breezes and clear
08:00: Ditto weather. Employed hoisting in provisions and other necessary duties.
15:00: The settlers came on board at noon. Ditto weather. Employed stowing the hold.
17:00: Mustered for Checques, discharged several of the crew. Employed stowing the holds.
23:59: Strong winds

06/17
01:00: Strong breezes with rain
08:00: Ditto weather. Employed cleaning decks and stowing chain cables.
15:00: Ditto weather. Employed as before.
23:59: Ditto weather

06/18
01:00: Strong breezes and rain. Employed clearing lighter of provisions.
15:00: More moderate employed cleaning decks.
23:59: Fine weather


CODE

#!/usr/bin/python
#from datetime import datetime

log = {}
journal = open("log.txt","r")
days = journal.read().split("\n\n")

for day in days:
	daylog = day.split("\n")
	day = daylog.pop(0)
 
	entries = {}
	
	for entry in daylog:
	  event = entry.split(" ")
	  daytime = event.pop(0)
	  entries[daytime] = " ".join(event)
	  
	log[day] = entries
	
#datetime.now()


print log['07/10']['06:00:']

Anomalies
Born on Board, not mentioned in the Cpt Log, but present in the Master's Roll:

Jan 13 ___ Pedlar
Jan 28 ___ Green
Feb 07 ___ Reed
Feb 20 ___ Biggar
Feb 29 ___ Epsey
Mar 08 ___ Godfrey
Mar 10 ___ Usher
Mar 22 ___ Hobbs DD 13 Apr
Apr 07 ___ Sweetman
Apr 26 ___ Bowker
Apr 29 ___ Sanders DD 7 May
May 18 ___ Cronk


References
http://www.theshipslist.com/ships/passengerlists/weymouth.htm >> this is the source log by Captain Turner

http://www.galapagos.to/TEXTS/BEAGLELOG.HTM

http://www.wielingen1991.org/en/mission_/log_book.htm >> ship employed in war

http://www.dailymail.co.uk/sciencetech/article-1218474/How-Captain-Cooks-ship-logs-helping-scientists-chart-global-climate-change.html


To Do:

  • update time in log to standardized 06:00 etc hours that Python can read
  • create new twitter account for the captain
  • make friends for the captain
  • put code and log on the server, run it from there
  • add to code: #check for date continuously and time, when there's a match, push message from log to captain's tweet feed


OLD CODE

#!/usr/bin/python

import twitter
import time
api = twitter.Api(username='...', password='...')

print('Starting...')

while 1 == 1:
       api.PostUpdate(getoutput('uptime'))
       print(getoutput('uptime'))
       time.sleep(3600)