<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"
>

<channel>
	<title>LiquidFoot &#187; General</title>
	<atom:link href="http://www.liquidfoot.com/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.liquidfoot.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 17 Apr 2010 16:36:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Deploying Omeka</title>
		<link>http://www.liquidfoot.com/2009/11/11/deploying-omeka/</link>
		<comments>http://www.liquidfoot.com/2009/11/11/deploying-omeka/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 00:10:40 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=312</guid>
		<description><![CDATA[At work, we've been doing a lot of development using the Omeka framework. We've implemented plugins to enable the software to interact with our Fedora repository, work with geo-rectified images, build in a search interface with Solr, and another one (Adam's not quite ready to announce this one yet). However, as good as the project is, one thing I've noticed is that the ways to deploy the software are a bit heavy on the user knowing what they're doing. They've done a good job of guiding users through the setup after all the pieces are in place, but I'm a big fan of having automated ways of deploying software.]]></description>
			<content:encoded><![CDATA[<p>At work, we&#8217;ve been doing a lot of development using the Omeka framework. We&#8217;ve implemented plugins to enable the software to interact with our Fedora repository, work with geo-rectified images, build in a search interface with Solr, and another one (Adam&#8217;s not quite ready to announce this one yet). However, as good as the project is, one thing I&#8217;ve noticed is that the ways to deploy the software are a bit heavy on the user knowing what they&#8217;re doing. They&#8217;ve done a good job of guiding users through the setup after all the pieces are in place, but I&#8217;m a big fan of having automated ways of deploying software.</p>
<p>One of my favorite deployment tools is Capistrano. I love being able to check changes to the software to our Subversion server, and from my local machine type a simple command and update the remote source. We actually have been using this for several of our instances on our staging servers. The secret for deploying a PHP project with Capistrano is with <a href="http://github.com/leehambley/railsless-deploy">Lee Hambley&#8217;s railsless-deploy gem</a>. The first time you set one of these up, it&#8217;s a real pain, but you can quickly develop a template for deploying these.</p>
<p>I&#8217;ve been paying attention to some of the musings on Twitter regarding setting Omeka up. One of the big stumbling blocks is with MySQL. I wrote a quick helper script, and in one of my &#8220;how can I make this more beneficial&#8221; moments, I wrote a spec file for generating an rpm to install it.</p>
<p>I hadn&#8217;t worked on packaging in Linux for a while and forgot how painful it could be. Compounding my efforts was the fact that I was running Fedora Core to build it from VirtualBox. Normally this runs fine, but the fact that I was using rpmbuild was causing VirtualBox to eat up most of my available memory (I only have 4GB). It was just slow going because the rpmlint was taking so long.</p>
<p>Anyway, I have a functional rpm that can how be installed. I haven&#8217;t tested it much (read that at all), but I believe I&#8217;ve worked the bugs out of the build process. The idea here is to deploy it in a slightly different manner than you get out of the box. The RPM version creates /etc/omeka where it stores its database configuration and then defaults to placing the directory tree in /var/www/omeka. This helps in separating the configuration from the actual web application, but I&#8217;m debating with myself if everything but the archive folder should go into /usr/local/omeka.</p>
<p>Anyway, we&#8217;ll have an update soon, along with more code!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2009/11/11/deploying-omeka/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capistrano Deployment for Omeka</title>
		<link>http://www.liquidfoot.com/2009/08/28/capistrano-deployment-for-omeka/</link>
		<comments>http://www.liquidfoot.com/2009/08/28/capistrano-deployment-for-omeka/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 15:44:09 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=297</guid>
		<description><![CDATA[We&#8217;re currently starting a project at the Scholars&#8217; Lab in which we&#8217;re going to use Omeka. We&#8217;re a Rails shop and use Capistrano to deploy projects to our staging and production servers all the time. Since I had read that Capistrano didn&#8217;t need to be for Rails, I thought it would help out in deploying [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re currently starting a project at the Scholars&#8217; Lab in which we&#8217;re going to use <a href="http://www.omeka.org">Omeka</a>. We&#8217;re a Rails shop and use <a href="http://www.capify.org/index.php/Capistrano">Capistrano</a> to deploy projects to our staging and production servers all the time. Since I had read that Capistrano didn&#8217;t need to be for Rails, I thought it would help out in deploying the PHP for our Omeka work.</p>
<p>It took a little work, but I finally stumbled across Lee Hambley&#8217;s <a href="http://github.com/leehambley/railsless-deploy/tree/master">railsless-deploy</a> project over on Github.</p>
<p>The install is pretty easy (assuming you have rubygems installed).</p>
<pre class="brush: ruby;">
gem sources -a http://gems.github.com/ # make sure you have github sources installed
gem install leehambley-railsless-deploy
</pre>
<p>After this, for rails apps, you just capify the project, but this command didn&#8217;t seem to work, so I just manually added the Capfile in the root of the project directory with the snip provided on the project page:</p>
<pre class="brush: ruby;">
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
# Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }

require 'rubygems'
require 'railsless-deploy'
load    'config/deploy'
</pre>
<p>After that, it was just a matter of using the recipes we typically use. Now, after we get the plugins we&#8217;re developing ready to be deployed, all we have to do is</p>
<pre class="brush: ruby;">
cap deploy
</pre>
<p>Capistrano makes life so much easier!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2009/08/28/capistrano-deployment-for-omeka/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Because I&#8217;m a Geek</title>
		<link>http://www.liquidfoot.com/2009/01/25/because-im-a-geek/</link>
		<comments>http://www.liquidfoot.com/2009/01/25/because-im-a-geek/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 00:01:51 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[geeky]]></category>
		<category><![CDATA[math]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=285</guid>
		<description><![CDATA[Saw this shirt and it made me laugh. Then I got out a pencil (because I&#8217;m a geek) and solved it Who say&#8217;s math majors can&#8217;t be funny!]]></description>
			<content:encoded><![CDATA[<p>Saw this shirt and it made me laugh. Then I got out a pencil (because I&#8217;m a geek) and solved it <img src='http://www.liquidfoot.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><m><br />
<img src="http://www.liquidfoot.com/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_976.5_e368f9431a8728293481e2d3457ce16e.png" style="vertical-align:-23.5px; display: inline-block ;" alt="y = int{10}{13}{dx}(2x)" title="y = int{10}{13}{dx}(2x)"/><br />
</m></p>
<p>Who say&#8217;s math majors can&#8217;t be funny!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2009/01/25/because-im-a-geek/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>rdesktop and Tcl/tk</title>
		<link>http://www.liquidfoot.com/2009/01/16/rdesktop-and-tcltk/</link>
		<comments>http://www.liquidfoot.com/2009/01/16/rdesktop-and-tcltk/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 16:36:17 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Systems Admin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[systems administration]]></category>
		<category><![CDATA[tcl]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=242</guid>
		<description><![CDATA[This is something I did a few years ago and has been very useful. I’m a *nix admin that occasionally needs to log on to a Windows server. I used rdesktop for a long time to do this. I wanted, though, a nice GUI that would allow me to pick which server I wanted (and an excuse to play a bit with Tcl). ]]></description>
			<content:encoded><![CDATA[<p>This is something I did a few years ago and has been very useful. I&#8217;m a *nix admin that occasionally needs to log on to a Windows server. I used rdesktop for a long time to do this. I wanted, though, a nice GUI that would allow me to pick which server I wanted (and an excuse to play a bit with Tcl). This is the script I came up with to do just this:</p>
<pre name="code" class="ruby">#! /usr/bin/wish

wm title . "Remote Desktop Launcher"

frame .top -borderwidth 10
pack .top -side top -fill x

button .top.quit -text Quit -command exit
set but [button .top.run -text "Launch" -command Run]
pack .top.quit .top.run -side right

label .top.l -text Server: -padx 0
entry .top.cmd -width 20 -relief sunken -textvariable server
pack .top.l -side left
pack .top.cmd -side left -fill x -expand true

bind .top.cmd &amp;lt;Return&amp;gt; Run
focus .top.cmd

menubutton .mb -text Server -menu .mb.menu
pack .mb -padx 10 -pady 10

set m [menu .mb.menu -tearoff 1]
$m add radio -label server1 -variable server -value server1.address.edu -command Run
$m add radio -label server2 -variable server -value server2.address.edu -command Run
$m add radio -label server3 -variable server -value server3.address.edu -command Run
$m add radio -label server4 -variable server -value server4.address.edu -command Run
$m add radio -label server5 -variable server -value server5.address.edu -command Run

proc Run { } {
	global server
	exec rdesktop -u &amp;lt;user_name&amp;gt; -p &amp;lt;password&amp;gt; -g 1280x800 -x b $server
}</pre>
<p>All you need to do is plugin &#8220;real&#8221; values for the server and addresses. You can also auto-login by giving values for the username and password (may also want to change the geometry of the window unless you have a big screen).</p>
<p><a href="http://www.liquidfoot.com/wp-content/uploads/2009/01/rdesktop.png"><img class="alignnone size-medium wp-image-246" title="rdesktop" src="http://www.liquidfoot.com/wp-content/uploads/2009/01/rdesktop-300x202.png" alt="rdesktop" width="300" height="202" /></a></p>
<p>I also have bash aliases for these, but that&#8217;s a different post&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2009/01/16/rdesktop-and-tcltk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Is a Database?</title>
		<link>http://www.liquidfoot.com/2009/01/06/what-is-a-database/</link>
		<comments>http://www.liquidfoot.com/2009/01/06/what-is-a-database/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 20:13:01 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=146</guid>
		<description><![CDATA[After working on a couple of different projects over the years that lent themselves to using a database, it seems a lot of people have some misconceptions of what exactly a database is&#8230;or what it does. Many have confused data stores and databases (when they really mean a database management system &#8212; but not necessarily [...]]]></description>
			<content:encoded><![CDATA[<p>After working on a couple of different projects over the years that lent themselves to using a database, it seems a lot of people have some misconceptions of what exactly a database is&#8230;or what it does. Many have confused data stores and databases (when they really mean a database management system &#8212; but not necessarily in a relational model flavor). When they want to build a database, I&#8217;ve found many using the wrong tools (e.g. spreadsheets) and find themselves heading down a road full of headaches that can be time consuming to deal with.</p>
<p>Most of the people I&#8217;ve worked with have a basic understanding of the fact that a database is a store of information. While Excel (and other spreadsheet programs) can do really useful things like crunch numbers and even filter information and do basic lookups (like a database system), there are a few other things they can&#8217;t do that makes this perhaps not the best way to proceed in a project that needs to collect a lot of information. I&#8217;ll start this as a first installment on using database management systems for research.</p>
<p>If you can believe it, database systems still adhere to the 13 rules outlined in E. F. Codd&#8217;s paper &#8220;<a href="http://dx.doi.org/10.1145%2F362384.362685"><em>A Relational Model of Data for Large Shared Data Banks</em></a>&#8221; written in 1969 while Codd was at IBM (and republished in 1970 in <a href="http://dx.doi.org/10.1145%2F362384.362685">Communications of the ACM</a>). These rules are commonly referred to as Codd&#8217;s 12 rules (numbered 0 &#8211; 12). So, here are the rules (I&#8217;ll explain them in a bit more detail later).</p>
<ul>
<li>Rule 0: The system must qualify as relational, as a database, and as a management system.</li>
<li>Rule 1: All information in the database is to be represented in one and only one way, namely by values in column positions within rows of tables.</li>
<li>Rule 2: All data must be accessible with no ambiguity.</li>
<li>Rule 3: The database management system must allow each field to remain null (or empty). Specifically, it must support a representation of &#8220;missing information and inapplicable information&#8221; that is systematic, distinct from all regular values, and independent of data type.</li>
<li>Rule 4: The system must support an online, inline, relational catalog that is accessible to authorized users by means of their regular query language.</li>
<li>Rule 5: The system must support at least one relational language that
<ol>
<li>Has a linear syntax</li>
<li>Can be used both interactively and without application programs</li>
<li>Supports data definition operations (including view definitions), data manipulation operations (update and retrieve), security and data integrity constraints, and transaction management operations.</li>
</ol>
</li>
<li>Rule 6: All views that are theoretically updateable must be updateable by the system.</li>
<li>Rule 7: The system must support set-at-a-time insert, update, and delete operators.</li>
<li>Rule 8: Changes to how the data is stored (its physical level) must not require a change to an application based on the structure.</li>
<li>Rule 9: Changes to the logical level (tables, columns, rows, etc) must not require a change to an application based on the structure.</li>
<li>Rule 10: Integrity constraints must be specified separately from application programs and stored in the catalog.</li>
<li>Rule 11: The distribution of portions of the database to various locations should be invisible to users of the database.</li>
<li>Rule 12: If the system provides a low-level (record-at-a-time) interface, then that interface cannot be used to subvert the system.</li>
</ul>
<p>There are a bunch of different database managers out there. Most likely you even have at least one already on your computer (Firefox uses <a title="SQLite" href="http://www.sqlite.org/">SQLite</a>). Depending on what you need to do, and how much money you&#8217;re willing to invest, and the scope of your project, there are an amazing array of products of there. This is a brief list of some of the most popular:</p>
<ul>
<li><a href="http://www.mysql.com/">MySQL</a> (free): Very popular with web developers; was initially developed for speed over features, but has become very feature rich, though it does require programming to develop an interface</li>
<li><a href="http://www.postgresql.org/">PostgreSQL</a> (free): Feature-rich database system great for large-scale projects that will handle millions of connections easily; usually overkill for small projects</li>
<li><a href="http://db.apache.org/derby/">Apache Derby</a>/<a href="http://developers.sun.com/javadb/">Java DB</a> (free): Pure Java relational database management system;</li>
<li><a href="http://office.microsoft.com/en-us/access/default.aspx">Microsoft Access</a>: In a lot of corporate Office deployments; not good for projects with multiple users though</li>
<li><a href="http://dba.openoffice.org/">OpenOffice Base</a> (free): Comes bundled with <a href="http://hsqldb.org/">HSQLDB</a>, but also allows you to use MySQL and PostgreSQL.</li>
<li><a href="http://couchdb.apache.org/">CouchDB</a> (free): Kind of different than the rest in that it is a document-oriented database; it doesn&#8217;t contain a specific schema, but allows you to create ad-hoc, distributed, RESTful access to information. It&#8217;s not a relational database management system, but does provide some extra flexability to add &#8220;stuff&#8221; to a data store quickly.</li>
</ul>
<p>Next up, designing tables so you can get stuff back out easily&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2009/01/06/what-is-a-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It Works!</title>
		<link>http://www.liquidfoot.com/2008/12/17/it-works/</link>
		<comments>http://www.liquidfoot.com/2008/12/17/it-works/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 03:39:13 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=143</guid>
		<description><![CDATA[With my departure from W&#38;M we talked about the deployment of the second Sun X4500 for the library. My original plan was to wait until the 10/08 system came out (which had the SAMBA stuff in the kernel) and then deploy the hardware with ZFS and Z-RAID. However, no one else really has any experience [...]]]></description>
			<content:encoded><![CDATA[<p>With my departure from W&amp;M we talked about the deployment of the second Sun X4500 for the library. My original plan was to wait until the 10/08 system came out (which had the SAMBA stuff in the kernel) and then deploy the hardware with ZFS and Z-RAID. However, no one else really has any experience with either administering SAMBA or Solaris. I had read that Windows could be installed on these servers. It&#8217;s a bit of a sacrilege, but it should help out until they find a replacement.</p>
<p>The Sun Installation Assistant CD really took all the work out of setting the thing up&#8230;it includes all the required drivers for the hard drives and NIC. Took a while since I was redirecting the KVM through the ILOM and sharing my ROM drive. Everything went very well, but I did notice that the OS I installed (Windows 2003 R2 Standard) has a limit of 4GB. I couldn&#8217;t for the life of me figure out what happend to the other 12GB. Been in *nix too long and forgot that Microsoft puts limits on the amount of RAM a server can support. I just need to reinstall with Enterprise edition. Not a huge deal, but it&#8217;s one of those things I wish I would have known/remembered.</p>
<p>I did set up a &#8220;test&#8221; share (it&#8217;s primarily to give our media center access to a lot of storage), but I ran into an issue(s) with OS X. Seems the mount would take, but you can&#8217;t see any of the files. You can move files to the server, but they don&#8217;t show up.</p>
<p>I think the bandwidth should be ok coming from the media center. There&#8217;s full gigE from the desktop to the server and I ganged the NICs.</p>
<p>I wished I could have used the Z-RAID, and I&#8217;m not sure that the Windows Dynamic RAID-5 will do quite the same job, but it&#8217;s a step forward in getting some storage (and not attached hard drives) for media production.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2008/12/17/it-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GMail Ninjas</title>
		<link>http://www.liquidfoot.com/2008/11/20/gmail-ninjas/</link>
		<comments>http://www.liquidfoot.com/2008/11/20/gmail-ninjas/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 03:23:43 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[ninjas]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=136</guid>
		<description><![CDATA[I really dig the new themes in Google&#8230;I finally have ninjas]]></description>
			<content:encoded><![CDATA[<p>I really dig the new themes in Google&#8230;I finally have ninjas <img src='http://www.liquidfoot.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.liquidfoot.com/wp-content/uploads/2008/11/ninjas.png"><img class="alignnone size-full wp-image-137" title="ninjas" src="http://www.liquidfoot.com/wp-content/uploads/2008/11/ninjas.png" alt="" width="163" height="276" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2008/11/20/gmail-ninjas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EndNote Migration</title>
		<link>http://www.liquidfoot.com/2008/11/19/endnote-migration/</link>
		<comments>http://www.liquidfoot.com/2008/11/19/endnote-migration/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 20:03:24 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=121</guid>
		<description><![CDATA[I&#8217;ve been working with the folks over at the Center for Archaeological Research with a bibliography of their research reports. It&#8217;s a bit of an offshoot of the NEH Slave Quarters research I&#8217;ve been working on, but I wanted to have a way to work through their research reports, just to have an idea of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working with the folks over at the <a href="http://web.wm.edu/wmcar/">Center for Archaeological Research</a> with a bibliography of their research reports. It&#8217;s a bit of an offshoot of the NEH Slave Quarters research I&#8217;ve been working on, but I wanted to have a way to work through their research reports, just to have an idea of what they have available.</p>
<p>The first thing I did is get them to give me the file in the crappy EndNote XML format. I was having issues bringing it into Zotero, so I installed the bibutils package (sudo apt-get install bibutils) and then ran the endx2xml program on it. This created a nice MODS file for me to start crunching on. What I wanted to do is make a tag cloud using some of the categories they created. I created a database with two tables to store the citation and author information. I&#8217;m on my development box, so this is MySQL</p>
<pre class="brush: sql;">&lt;/p&gt;
&lt;p&gt;--&lt;br&gt;
-- Create schema archaeology&lt;br&gt;
--&lt;/p&gt;
&lt;p&gt;CREATE DATABASE IF NOT EXISTS archaeology;&lt;br&gt;
USE archaeology;&lt;/p&gt;
&lt;p&gt;--&lt;br&gt;
-- Definition of table `archaeology`.`authors`&lt;br&gt;
--&lt;/p&gt;
&lt;p&gt;DROP TABLE IF EXISTS `archaeology`.`authors`;&lt;br&gt;
CREATE TABLE&amp;amp;nbsp; `archaeology`.`authors` (&lt;br&gt;
`id` char(36) NOT NULL,&lt;br&gt;
`citation_id` char(36) NOT NULL,&lt;br&gt;
`given` varchar(50) NOT NULL,&lt;br&gt;
`family` varchar(50) NOT NULL,&lt;br&gt;
`role` varchar(50) NOT NULL,&lt;br&gt;
PRIMARY KEY&amp;amp;nbsp; (`id`)&lt;br&gt;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;&lt;/p&gt;
&lt;p&gt;--&lt;br&gt;
-- Definition of table `archaeology`.`citations`&lt;br&gt;
--&lt;/p&gt;
&lt;p&gt;DROP TABLE IF EXISTS `archaeology`.`citations`;&lt;br&gt;
CREATE TABLE&amp;amp;nbsp; `archaeology`.`citations` (&lt;br&gt;
`id` char(36) NOT NULL,&lt;br&gt;
`ref_id` varchar(25) NOT NULL,&lt;br&gt;
`title` varchar(500) NOT NULL,&lt;br&gt;
`year` int(11) NOT NULL,&lt;br&gt;
`publisher` varchar(500) NOT NULL,&lt;br&gt;
`added` timestamp NOT NULL default CURRENT_TIMESTAMP,&lt;br&gt;
`genre` varchar(50) NOT NULL,&lt;br&gt;
`subject` varchar(500) NOT NULL,&lt;br&gt;
PRIMARY KEY&amp;amp;nbsp; (`id`)&lt;br&gt;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;&lt;/p&gt;
&lt;p&gt;</pre>
<p>I next needed to write the XSLT to actually transform the modsCollection into the schema. I haven&#8217;t worked with XSLT in a while and was (very) rusty <img src='http://www.liquidfoot.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Here&#8217;s a sampling of the output of converting the EndNote XML to MODS</p>
<pre class="brush: xml;">&lt;/p&gt;
&lt;p&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;br&gt;
&lt;modsCollection&gt;&lt;br&gt;
&lt;mods ID=&quot;Andre2007a&quot;&gt;&lt;br&gt;
&lt;titleInfo&gt;&lt;br&gt;
&lt;title&gt;Heritage Education and Interpretive Plan for the Smith River Blueway and Pedestrian Trails, Henry County, Virginia&lt;/title&gt;&lt;br&gt;
&lt;/titleInfo&gt;&lt;br&gt;
&lt;name type=&quot;personal&quot;&gt;&lt;br&gt;
&lt;namePart type=&quot;given&quot;&gt;Elizabeth&lt;/namePart&gt;&lt;br&gt;
&lt;namePart type=&quot;family&quot;&gt;Andre&lt;/namePart&gt;&lt;br&gt;
&lt;role&gt;&lt;br&gt;
&lt;roleTerm authority=&quot;marcrelator&quot; type=&quot;text&quot;&gt;author&lt;/roleTerm&gt;&lt;br&gt;
&lt;/role&gt;&lt;br&gt;
&lt;/name&gt;&lt;br&gt;
&lt;name type=&quot;personal&quot;&gt;&lt;br&gt;
&lt;namePart type=&quot;given&quot;&gt;Stephanie&lt;/namePart&gt;&lt;br&gt;
&lt;namePart type=&quot;family&quot;&gt;Sapp&lt;/namePart&gt;&lt;br&gt;
&lt;role&gt;&lt;br&gt;
&lt;roleTerm authority=&quot;marcrelator&quot; type=&quot;text&quot;&gt;author&lt;/roleTerm&gt;&lt;br&gt;
&lt;/role&gt;&lt;br&gt;
&lt;/name&gt;&lt;br&gt;
&lt;originInfo&gt;&lt;br&gt;
&lt;dateIssued&gt;2007&lt;/dateIssued&gt;&lt;br&gt;
&lt;publisher&gt;William and Mary Center for Archaeological Research, Williamsburg, Virginia. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Submitted to Virginia Department of Historic Resources, Roanoke&lt;/publisher&gt;&lt;br&gt;
&lt;/originInfo&gt;&lt;br&gt;
&lt;typeOfResource&gt;text&lt;/typeOfResource&gt;&lt;br&gt;
&lt;genre&gt;report&lt;/genre&gt;&lt;br&gt;
&lt;subject&gt;&lt;br&gt;
&lt;topic&gt;06-25/L-WMCAR Reports/Henry Co/Interp/18th/19th/20th/&lt;/topic&gt;&lt;br&gt;
&lt;/subject&gt;&lt;br&gt;
&lt;identifier type=&quot;citekey&quot;&gt;Andre2007a&lt;/identifier&gt;&lt;br&gt;
&lt;/mods&gt;&lt;br&gt;
&lt;mods ID=&quot;Andre2007b&quot;&gt;&lt;br&gt;
&lt;titleInfo&gt;&lt;br&gt;
&lt;title&gt;Architectural Evaluation of the Anderson Farm (047-0034-0010) for the Proposed Anderson-Hughes Development Project in Norge, Virginia&lt;/title&gt;&lt;br&gt;
&lt;/titleInfo&gt;&lt;br&gt;
&lt;name type=&quot;personal&quot;&gt;&lt;br&gt;
&lt;namePart type=&quot;given&quot;&gt;Elizabeth&lt;/namePart&gt;&lt;br&gt;
&lt;namePart type=&quot;given&quot;&gt;M&lt;/namePart&gt;&lt;br&gt;
&lt;namePart type=&quot;family&quot;&gt;Andre&lt;/namePart&gt;&lt;br&gt;
&lt;role&gt;&lt;br&gt;
&lt;roleTerm authority=&quot;marcrelator&quot; type=&quot;text&quot;&gt;author&lt;/roleTerm&gt;&lt;br&gt;
&lt;/role&gt;&lt;br&gt;
&lt;/name&gt;&lt;br&gt;
&lt;originInfo&gt;&lt;br&gt;
&lt;dateIssued&gt;2007&lt;/dateIssued&gt;&lt;br&gt;
&lt;publisher&gt;William and Mary Center for Archaeological Research, Williamsburg, Virginia. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Submitted to Anderson-Hughes, LLC, Newport News, Virginia&lt;/publisher&gt;&lt;br&gt;
&lt;/originInfo&gt;&lt;br&gt;
&lt;typeOfResource&gt;text&lt;/typeOfResource&gt;&lt;br&gt;
&lt;genre&gt;report&lt;/genre&gt;&lt;br&gt;
&lt;subject&gt;&lt;br&gt;
&lt;topic&gt;07-22/L-WMCAR Reports/ARCeval/19th/20th/James City Co/&lt;/topic&gt;&lt;br&gt;
&lt;/subject&gt;&lt;br&gt;
&lt;identifier type=&quot;citekey&quot;&gt;Andre2007b&lt;/identifier&gt;&lt;br&gt;
&lt;/mods&gt;&lt;br&gt;
&lt;modsCollection&gt;&lt;/p&gt;
&lt;p&gt;</pre>
<p>What I wanted to do is take each citation and insert it into the database, then relate the last-entered citation with its authors. At first I thought I could use MySQL&#8217;s last_insert_id() function&#8230;turns out those are only for auto-increment fields and I always use UUIDs for primary keys. What I ended up doing is adding in the added field with a timestamp (with a default value of CURRENT_TIMESTAMP). Then, I just went through the nodes and put the data where it needed to go.</p>
<pre class="brush: xml;">&lt;/p&gt;
&lt;p&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;br&gt;
&lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; version=&quot;1.0&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;xsl:output method=&quot;text&quot; /&gt;&lt;br&gt;
&lt;xsl:strip-space elements=&quot;*&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;xsl:template match=&quot;/&quot;&gt;&lt;/p&gt;
&lt;p&gt;DELETE FROM citations;&lt;br&gt;
DELETE FROM authors;&lt;/p&gt;
&lt;p&gt;&lt;xsl:for-each select=&quot;modsCollection/mods&quot;&gt;&lt;/p&gt;
&lt;p&gt;INSERT INTO citations ( id, ref_id, title, year, publisher, genre, subject)&lt;br&gt;
VALUES (&lt;br&gt;
UUID(),&lt;br&gt;
'&lt;xsl:value-of select=&quot;@ID&quot; /&gt;',&lt;br&gt;
'&lt;xsl:call-template name=&quot;escapesinglequotes&quot;&gt;&lt;br&gt;
&lt;xsl:with-param name=&quot;arg1&quot;&gt;&lt;br&gt;
&lt;xsl:value-of select=&quot;titleInfo/title&quot;/&gt;&lt;br&gt;
&lt;/xsl:with-param&gt;&lt;br&gt;
&lt;/xsl:call-template&gt;',&lt;br&gt;
'&lt;xsl:value-of select=&quot;originInfo/dateIssued&quot;/&gt;',&lt;br&gt;
'&lt;xsl:call-template name=&quot;escapesinglequotes&quot;&gt;&lt;br&gt;
&lt;xsl:with-param name=&quot;arg1&quot;&gt;&lt;br&gt;
&lt;xsl:value-of select=&quot;originInfo/publisher&quot;/&gt;&lt;br&gt;
&lt;/xsl:with-param&gt;&lt;br&gt;
&lt;/xsl:call-template&gt;',&lt;br&gt;
'&lt;xsl:value-of select=&quot;genre&quot;/&gt;',&lt;br&gt;
'&lt;xsl:call-template name=&quot;escapesinglequotes&quot;&gt;&lt;br&gt;
&lt;xsl:with-param name=&quot;arg1&quot;&gt;&lt;br&gt;
&lt;xsl:value-of select=&quot;subject/topic&quot;/&gt;&lt;br&gt;
&lt;/xsl:with-param&gt;&lt;br&gt;
&lt;/xsl:call-template&gt;'&lt;br&gt;
);&lt;/p&gt;
&lt;p&gt;&lt;xsl:for-each select=&quot;name&quot;&gt;&lt;br&gt;
INSERT INTO authors (id, citation_id, given, family, role)&lt;br&gt;
VALUES(&lt;br&gt;
UUID(),&lt;br&gt;
(SELECT id FROM citations ORDER BY added desc limit 1),&lt;br&gt;
&lt;xsl:for-each select=&quot;.&quot;&gt;&lt;br&gt;
'&lt;xsl:value-of select=&quot;namePart[@type='given']&quot;/&gt; ',&lt;br&gt;
'&lt;xsl:value-of select=&quot;namePart[@type='family']&quot;/&gt;',&lt;br&gt;
'&lt;xsl:value-of select=&quot;role/roleTerm&quot;/&gt;'&lt;br&gt;
&lt;/xsl:for-each&gt;&lt;br&gt;
);&lt;br&gt;
&lt;/xsl:for-each&gt;&lt;br&gt;
&lt;/xsl:for-each&gt;&lt;br&gt;
&lt;/xsl:template&gt;&lt;/p&gt;
&lt;p&gt;&lt;xsl:template name=&quot;escapesinglequotes&quot;&gt;&lt;br&gt;
&lt;xsl:param name=&quot;arg1&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;xsl:variable name=&quot;apostrophe&quot;&gt;'&lt;/xsl:variable&gt;&lt;/p&gt;
&lt;p&gt;&lt;xsl:choose&gt;&lt;br&gt;
&lt;xsl:when test=&quot;contains($arg1, $apostrophe)&quot;&gt;&lt;br&gt;
&lt;xsl:if test=&quot;string-length(normalize-space(substring-before($arg1, $apostrophe))) &gt; 0&quot;&gt;&lt;xsl:value-of select=&quot;substring-before($arg1, $apostrophe)&quot; disable-output-escaping=&quot;yes&quot;/&gt;''&lt;/xsl:if&gt;&lt;br&gt;
&lt;xsl:call-template name=&quot;escapesinglequotes&quot;&gt;&lt;br&gt;
&lt;xsl:with-param name=&quot;arg1&quot;&gt;&lt;xsl:value-of select=&quot;substring-after($arg1, $apostrophe)&quot; disable-output-escaping=&quot;yes&quot;/&gt;&lt;/xsl:with-param&gt;&lt;br&gt;
&lt;/xsl:call-template&gt;&lt;/p&gt;
&lt;p&gt;&lt;/xsl:when&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- No quotes found in string, just print it --&gt;&lt;br&gt;
&lt;xsl:when test=&quot;string-length(normalize-space($arg1)) &gt; 0&quot;&gt;&lt;xsl:value-of select=&quot;normalize-space($arg1)&quot;/&gt;&lt;/xsl:when&gt;&lt;/p&gt;
&lt;p&gt;&lt;/xsl:choose&gt;&lt;br&gt;
&lt;/xsl:template&gt;&lt;/p&gt;
&lt;p&gt;&lt;/xsl:stylesheet&gt;&lt;/p&gt;
&lt;p&gt;</pre>
<p>I noticed that I also had to write a template to escape single quotes in the title, publisher, and topic because of some possesive language in those fields. It took the longest time to actually write the code for that (like I said, I was really rusty and forgot all about XSL branching).</p>
<p>In the end, what gets generated is a nice SQL script (this one pushes 30,000 lines) like this</p>
<pre class="brush: sql;">&lt;/p&gt;
&lt;p&gt;DELETE FROM citations;&lt;br&gt;
DELETE FROM authors;&lt;/p&gt;
&lt;p&gt;INSERT INTO citations ( id, ref_id, title, year, publisher, genre, subject)&lt;br&gt;
VALUES (&lt;br&gt;
UUID(),&lt;br&gt;
'Andre2007a',&lt;br&gt;
'Heritage Education and Interpretive Plan for the Smith River Blueway and Pedestrian Trails, Henry County, Virginia',&lt;br&gt;
'2007',&lt;br&gt;
'William and Mary Center for Archaeological Research, Williamsburg, Virginia. Submitted to Virginia Department of Historic Resources, Roanoke',&lt;br&gt;
'report',&lt;br&gt;
'06-25/L-WMCAR Reports/Henry Co/Interp/18th/19th/20th/'&lt;br&gt;
);&lt;/p&gt;
&lt;p&gt;INSERT INTO authors (id, citation_id, given, family, role)&lt;br&gt;
VALUES(&lt;br&gt;
UUID(),&lt;br&gt;
(SELECT id FROM citations ORDER BY added desc limit 1),&lt;br&gt;
'Elizabeth ',&lt;br&gt;
'Andre',&lt;br&gt;
'author'&lt;br&gt;
);&lt;/p&gt;
&lt;p&gt;INSERT INTO authors (id, citation_id, given, family, role)&lt;br&gt;
VALUES(&lt;br&gt;
UUID(),&lt;br&gt;
(SELECT id FROM citations ORDER BY added desc limit 1),&lt;br&gt;
'Stephanie ',&lt;br&gt;
'Sapp',&lt;br&gt;
'author'&lt;br&gt;
);&lt;/p&gt;
&lt;p&gt;INSERT INTO citations ( id, ref_id, title, year, publisher, genre, subject)&lt;br&gt;
VALUES (&lt;br&gt;
UUID(),&lt;br&gt;
'Andre2007b',&lt;br&gt;
'Architectural Evaluation of the Anderson Farm (047-0034-0010) for the Proposed Anderson-Hughes Development Project in Norge, Virginia',&lt;br&gt;
'2007',&lt;br&gt;
'William and Mary Center for Archaeological Research, Williamsburg, Virginia. Submitted to Anderson-Hughes, LLC, Newport News, Virginia',&lt;br&gt;
'report',&lt;br&gt;
'07-22/L-WMCAR Reports/ARCeval/19th/20th/James City Co/'&lt;br&gt;
);&lt;/p&gt;
&lt;p&gt;INSERT INTO authors (id, citation_id, given, family, role)&lt;br&gt;
VALUES(&lt;br&gt;
UUID(),&lt;br&gt;
(SELECT id FROM citations ORDER BY added desc limit 1),&lt;br&gt;
'Elizabeth ',&lt;br&gt;
'Andre',&lt;br&gt;
'author'&lt;br&gt;
);&lt;/p&gt;
&lt;p&gt;</pre>
<p>There&#8217;s still a lot of cleaning up to do (normalizing the authors table, exploding the subjects, generating the tags), but it did give me pause to remember how beautifully maddening XSLT can be.</p>
<p>I&#8217;ll post some screenshots when this gets a bit further along, but I thought this may save someone some time at some point.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2008/11/19/endnote-migration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Box</title>
		<link>http://www.liquidfoot.com/2008/07/21/virtual-box/</link>
		<comments>http://www.liquidfoot.com/2008/07/21/virtual-box/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 13:22:19 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[virtual box]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=26</guid>
		<description><![CDATA[On several of the projects I work on, it&#8217;s very handy to have multiple operating systems installed to test out my code. For a while I&#8217;ve been using VMWare. It&#8217;s been working pretty nicely and I didn&#8217;t have many complaints. I did experience some headaches when I upgraded to Ubuntu 8.04 because of the kernel [...]]]></description>
			<content:encoded><![CDATA[<p>On several of the projects I work on, it&#8217;s very handy to have multiple operating systems installed to test out my code. For a while I&#8217;ve been using VMWare. It&#8217;s been working pretty nicely and I didn&#8217;t have many complaints. I did experience some headaches when I upgraded to Ubuntu 8.04 because of the kernel packages, but after a couple of bug fixes, recompiling, and reconfiguring, everything was happy.</p>
<p>I&#8217;ve got a Mac Pro on the desk next to me that we&#8217;ve been running Parallels on to run some of our Windows-only software (e.g. the client for our library catalog). Phil saw that there was support for Windows on OS X 10.5, so we threw Virtual Box on it to try it out. Here are my observations thus far running the software on Ubuntu and Leopard:</p>
<ol>
<li>Virtual Box seems to be a bit faster. I have no tests to back this up, it just <em>seems</em> faster.</li>
<li>The VDIs are nice (here&#8217;s a <a href="http://veedee-eyes.com/veedeeeyes/vdi/index">longer list</a> of VDIs)</li>
<li>Permissions for the kernel driver can cause a small headache (be sure to add your user account to the vboxusers group).</li>
<li>Virtual Box doesn&#8217;t require me to go get keys when I rebuild a computer and forget to write down the key <img src='http://www.liquidfoot.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<p>So far, I really am liking Virtual Box&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2008/07/21/virtual-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rotten Luck</title>
		<link>http://www.liquidfoot.com/2008/06/13/rotten-luck/</link>
		<comments>http://www.liquidfoot.com/2008/06/13/rotten-luck/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 13:23:15 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=158</guid>
		<description><![CDATA[I&#8217;m currently at a conference at Lehigh University, and it&#8217;s given me pause to really reconsider air travel. Every time I travel, seems something goes awry. Coming back from a conference in California about a month ago, the last leg of my flight was canceled because the plane needed a new tire, and all of [...]]]></description>
			<content:encoded><![CDATA[<div class="body">
<p>I&#8217;m currently at a conference at Lehigh University, and it&#8217;s given me pause to really reconsider air travel. Every time I travel, seems something goes awry. Coming back from a conference in California about a month ago, the last leg of my flight was canceled because the plane needed a new tire, and all of Charlotte didn&#8217;t have a tire for that particular aircraft. I could swallow that since the aircraft wasn&#8217;t safe to fly, but the line to actually reschedule my flight took about 2 hours, and they couldn&#8217;t get me back to Newport News (where my car was) until almost midnight the next day. Fortunately, my wife came to get me in Norfolk. I was significantly peeved to not choose US Airways for my next flight to Vegas that I was going on in the next couple of weeks.</p>
<p>Coming back from Las Vegas (on United), the company had issued some &#8220;cost saving measures&#8221; that meant that the pilots couldn&#8217;t have the engines on before we boarded on the flight from Dulles to Richmond. It was hot that day, so they turned the fans on for us, which drained the auxiliary power, which meant the engines couldn&#8217;t be started. Well, they brought some field units on, but after the first three didn&#8217;t work, we disembarked the aircraft to wait for maintenance to bring a fourth unit from another unit to get the aircraft started.</p>
<p>In my latest trip (unfortunately back on US Airways), I got to Lehigh yesterday afternoon, but my bags only made it as far as Boston. I was first told my bags would be on the 4:00pm flight, but when I called at 6:30 to check, they told me they&#8217;d be arriving at 7:00pm. I called at 9:00 to check, and they told me my bag would be delivered by midnight last night. Since I wasn&#8217;t woken up by my phone last night, I called again this morning. I was informed that the delivery service began at 8:00am, and they had a 4 &#8211; 6 hour window for delivery.</p>
<p>I&#8217;m thinking that the next time I need to travel, Amtrak is looking a lot better&#8230;</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2008/06/13/rotten-luck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
