I’m still a geek!

First, check out this comic from the as-ever excellent xkcd.

Are you back?

The problem I faced today – marking a load of 75 question, multiple choice papers.  I usually do this by using photo booth to record a movie of me saying the answers – ‘question 1, C, question 2, D’ etc.  Tedious, and for some reason photo booth on my macbook wasn’t playing today (I find this the least stable of all the OS 10.5 applications, a real shame.

Then this ‘say’ command popped back in my head… why do I need to do all the ‘hard’ work.

First thing was to strip out the answers from the word document.  They were in this format.

Q1    Which document describes a failing of a product to meet the customer’s requirements?

A)    Exception Report
B)    Off-Specification
C)     Follow-On Action Recommendations
D)    Issue Log

ANSWER – B

Load the file in Open Office, copy and paste to text edit, click on Format, make plain text, and I had a file I could manipulate.

Into the terminal prompt, some navigation and I’m at the directory.  First extract the answers –

grep ANSWER “prince2 answers.txt” > “prince2 speech.txt”

The last time I used grep in anger was about six years ago.

That gave me a file that looked like this

ANSWER – B

ANSWER – C

ANSWER – A

What happens if I lose my place though?  Back to openoffice, open the text file, and simply use the ‘numbers’ button of bullets and numbers.  I then have a file that says

1. ANSWER – B

2. ANSWER – C

The next bit’s a cheat.  I tested this though the Services menu, and it came out too rushed.  So I added a double new-line, and the speech was well measured. Make sure this is saved as a text file now!

Finally, the say command.

say < “prince2 speech.txt” -o “answers spoken.aiff”

and I’ve got a .aiff file I can play in quicktime, or iTunes.  A shame I can’t upload it here.  OK, was this quicker than me recording it.  Probably not, but it is more accurate (it has to be, it’s from the file itself so no transcription errors, though like any good geek I did double check that the question numbers and answers correlated).  More than that though, it got my geek muscle flexing a little, which can only be a good thing I guess.

As my friend said in an iChat – “Cartoons can be educational”

Advertisements

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: