Library day in the life - 5 - Day 3

Day three started off with a Go Train that decided to arrive 20 minutes late. Three cheers for mass transit. The delay was a good thing, it gave me 20 extra minutes and I was able to finish Calvino's, "Six Memos for the Next Millennium."

Morning

Morning soundtrack: BBC World Service podcast, Search Engine - Trolling 101, Funkstörung - Appendix

In the trenches of morning emails. ILL requests for theses to be made open access, therefore said theses are made open access. Hooray open access! In the background queued up a few merges. Wait. Wait. Wait. Called Bepress support to work through some workflow issues with electronic submissions of theses and dissertations with graduate studies. Very, Very close to moving toward complete electronic submission of theses and dissertations!!! Lunch in my office, at my desk, as per usual.

Afternoon

Afternoon soundtrack: Funkstörung - Appetite For Discstruction, Plaid - Spokes, Quinoline Yellow - Cyriack Parasol, Telefon Tel Aviv - Map of What is Effortless

More hacking at the Dublin Core html headers. Error. No output. OMG, Output! Not the right output. *FACEPALM* $creators != $creator. Pay attention to your variable names and sometimes you have to explicitly iterate through your arrays kids! (Thanks Matt!) Sloppy code below. Checked server logs, ran server updates, and downloaded and installed drupal module updates on the dev server to round out the afternoon. Chaos Tools had quite a bit of new svn adds. No commits since the svn repository disappeared for a bit with an office move :( ADVERTISEMENT: Check out my significant other's blog if you are interested in what library day in the life is for a public children's librarian.

global $base_url;

// The path of the node

$node_path=$node->nid;
if($node->path) $node_path=$node->path;

// HEADER PROLOG

$dc[] = '';
$dc[] = '';

//DC TERM - Creator
foreach(element_children($node->field_creator) as $key) {
$creators[]= $node->field_creator[$key]['value'];
foreach($creators as $creator) {
$dc[] = '';
}
}

//DC TERM - subject
foreach(element_children($node->field_subject) as $key) {
$subjects[]= $node->field_subject[$key]['value'];
foreach($subjects as $subject) {
$dc[] = '';
}
}

//DC TERM - description
foreach(element_children($node->field_description) as $key) {
$descriptions[]= $node->field_description[$key]['value'];
foreach($descriptions as $description) {
$dc[] = '';
}
}

//DC TERM - publisher
foreach(element_children($node->field_publisher) as $key) {
$publishers[]= $node->field_publisher[$key]['value'];
foreach($publishers as $publisher) {
$dc[] = '';
}
}

//DC TERM - contributor
foreach(element_children($node->field_contributor) as $key) {
$contributors[]= $node->field_contributor[$key]['value'];
foreach($contributors as $contributor) {
$dc[] = '';
}
}

//DC TERM - Date
foreach(element_children($node->field_date) as $key) {
$dates[]= $node->field_date[$key]['value'];
foreach($dates as $date) {
$dc[] = '';
}
}

//DC TERM - Date
foreach(element_children($node->field_date2) as $key) {
$date2s[]= $node->field_date2[$key]['value'];
foreach($date2s as $date2) {
$dc[] = '';
}
}

//DC TERM - type
foreach(element_children($node->field_type) as $key) {
$types[]= $node->field_type[$key]['value'];
foreach($types as $type) {
$dc[] = '';
}
}

//DC TERM - format
foreach(element_children($node->field_format) as $key) {
$formats[]= $node->field_format[$key]['value'];
foreach($formats as $format) {
$dc[] = '';
}
}

//DC TERM - Identifier
foreach(element_children($node->field_identifier) as $key) {
$identifiers[]= $node->field_identifier[$key]['value'];
foreach($identifiers as $identifier) {
$dc[] = '';
}
}

//DC TERM - Language
foreach(element_children($node->field_language) as $key) {
$languages[]= $node->field_language[$key]['value'];
foreach($languages as $language) {
$dc[] = '';
}
}

//DC TERM - Relation
foreach(element_children($node->field_relation) as $key) {
$relations[]= $node->field_relation[$key]['value'];
foreach($relations as $relation) {
$dc[] = '';
}
}

//DC TERM - Source
foreach(element_children($node->field_source) as $key) {
$sources[]= $node->field_source[$key]['value'];
foreach($sources as $source) {
$dc[] = '';
}
}

//DC TERM - Coverage
foreach(element_children($node->field_coverage) as $key) {
$coverages[]= $node->field_coverage[$key]['value'];
foreach($coverages as $coverage) {
$dc[] = '';
}
}

//DC TERM - Rights
foreach(element_children($node->field_right) as $key) {
$rights[]= $node->field_right[$key]['value'];
foreach($rights as $right) {
$dc[] = '';
}
}

$created = strftime("%Y-%m-%d %H:%M:%S +01:00", $node->created);
$changed = strftime("%Y-%m-%d %H:%M:%S +01:00", $node->changed);
$dc_created = strftime("%Y-%m-%d", $node->created);
$dc_changed = strftime("%Y-%m-%d", $node->changed);

if($created) {
$dc[] = '';
$meta[] = '';
}
if($changed) {
$dc[] = '';
$dc[] = '';
$meta[] = '';
}

$node_field[0]['value'] = implode("\n", $meta) . "\n" . implode("\n", $dc) . "\n";

Library Day in the Life - 5 - Day 1 - ORIGINAL TITLE!

So here we are again. Library Day in the Life number five! Monday is a work from home day. No audacious commute from Toronto to Hamilton today!

Morning:

Morning soundtrack: BBC World Service podcast, TWiT - It's The New Sex Talk, CBC Spark Daniel Pink on Motivation 3.0, The Protomen - The Protomen

Catch up a bunch of email from last week, and finally got around to setting up Drush. Don't know why I never got around to it before, but it definitely worth the time of checking out if you manage a few Drupal sites. Watched a couple of screencasts on Drush by CivicActions to quickly immerse myself, then got around to updating modules for our dev site. Once everything was up to snuff, I started working on the a cuple of our final functional requirements for the new version of our digital collections site before we start theming it; allowing each record to have its own Dublin Core XML output and adding some Dublin Core meta information to each record's header html output. Mind you, I am a horrible programmer.

The header output code was pulled mostly from this Computed Field php snippet example. I managed to get DC.title, DC.date.created and DC.Date.X-MetadataLastModified working correctly, but the rest of the elements (descriptions, source, format, etc) were another beast entirely. I put off the Dublin Core XML until later in the day when I could rely one of our programmers for assistance, because mind you, I am a horrible programmer.







Afternoon:

Afternoon soundtrack: Squarepusher - Hello Everything, Squarepusher - Just a Souvenir, Daft Punk - Discovery, Film Junk - Inception (spoilers portion of the podcast), BBC World Service podcast

Thought out the spec a lot more for the Dublin Core XML. Decided not to use CCK Computed Fields to make it happened. Don't know why I was thinking it would work, but one of those square peg in a round hold things. Contrary self - I could just make the peg round. Brainstormed a lot more with Matt (one our dynamic duo of programmers) on the Dublin Core XML idea. We agreed we just create a quick module to handle creating the XML. This will be our first custom work with the new version of the site. Due to many problems with the last iteration, while current production version, I wanted to move as far away from custom code as possible and we have been doing very well. But, this makes sense... maybe. There is always a million ways to solve something like this. Maybe tomorrow it will just be a View with a php snippet.

In the background of all wretched coding on my part, I was again working with my favourite module - Views Bulk Operations (VBO)!!! With the first iteration of the site, we made a couple of decisions that I have come to regret. They are not earth shattering or anything, just didn't setup some of the metadata fields how I would have liked them to be setup. For quite sometime I've been trying to thing about an easy way to merge some of them together. Epic mysql query dreams! JOIN, JOIN, INSERT, UPDATE, WHERE, BLERG! Anyway, some wonderful soul wrote a merge fields action for VBO! So, in the background all of today's work, I updated 14559 rows, a couple of times. It only took an average of 12153468ms each time!

Oh yeah, email was answered. Spheroidally.

Research Help Desk...

Day three...

Morning:

Yes, email.

Got into work early to cover on Research Help Desk for a colleague. I always find my shift on the help desk quite comical. I get the feeling that students and faculty don't know how the approach the guy covered in tattoos sitting at the help desk with a laptop. Once they find out that I am actually a librarian, and not a student, or some weirdo sitting there, they seem quite surprised. Anyhoo, helped some people out during my desk shift, and amazing event took place. Somebody wanted to know the LC call numbers for a specific area so they could BROWSE BOOKS! To quote myself, "I feel like a real librarian when I work the reference desk!"

Did some trouble shooting from the code I pasted yesterday. The code runs fine on the test server, but doesn't play nice on the production server. Grr!

Decided to wholly abandon Tweetdeck, and move back to Twitterfox. Tweetdeck has been buggy lately, and every time I fire it up and let it run for awhile, my laptop almost melts a hole through the desk.

Thought about bacon.

Afternoon:

Surprise, Surprise, EMAIL!

Listened to the new Search Engine podcast, File Sharing IS Fair Use and listened to a few JISC podcasts while working on the new digital collections server. Updated a couple bash scripts - RSYNC and mysqldump backups on a cron. Let's see if UTS shuts me down again!?

Spent some time consulting on another digital project. In the future we may have the handwritten manuscripts of somebody that I will not name yet. Working on getting the documents OCR'd, and output as txt files, and METS/ALTO.

Are you thinking about bacon? You should be!

Decided to listen to a bunch of Dead Kennedy's in order to make it through the afternoon. Did some more consulting with the Northrop Frye journal.

Spent the rest of the day reading faculty handbooks, and prepping for a meeting tomorrow. Oh yeah, entered in the phase 3 of operation: TELL EVERYBODY ABOUT VIKINGKITTENS.COM!

blog image