<?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/"
	>

<channel>
	<title>discontents &#187; metadata</title>
	<atom:link href="http://discontents.com.au/tag/metadata/feed" rel="self" type="application/rss+xml" />
	<link>http://discontents.com.au</link>
	<description>working for the triumph of content over form, ideas over control, people over systems</description>
	<lastBuildDate>Mon, 21 May 2012 13:27:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Some archives hacking</title>
		<link>http://discontents.com.au/shoebox/archives-shoebox/some-archives-hacking</link>
		<comments>http://discontents.com.au/shoebox/archives-shoebox/some-archives-hacking#comments</comments>
		<pubDate>Thu, 05 Nov 2009 00:31:07 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[archives]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[govhack]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[recordsearch]]></category>

		<guid isPermaLink="false">http://discontents.com.au/?p=727</guid>
		<description><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Some+archives+hacking&amp;rft.aulast=Sherratt&amp;rft.aufirst=Tim&amp;rft.subject=archives&amp;rft.subject=hacks&amp;rft.source=discontents&amp;rft.date=2009-11-05&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://discontents.com.au/shoebox/archives-shoebox/some-archives-hacking&amp;rft.language=English"></span>
It&#8217;s great to see that the National Archives of Australia has released a large swag of data through the new data.australia.gov.au site. In the Commonwealth Agencies zip file you can find xml dumps of all the publicly accessible agency and series data in RecordSearch, as well as item data for series A1. This is the [...]]]></description>
			<content:encoded><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Some+archives+hacking&amp;rft.aulast=Sherratt&amp;rft.aufirst=Tim&amp;rft.subject=archives&amp;rft.subject=hacks&amp;rft.source=discontents&amp;rft.date=2009-11-05&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://discontents.com.au/shoebox/archives-shoebox/some-archives-hacking&amp;rft.language=English"></span>
<abbr class="unapi-id" title="http://discontents.com.au/?p=727"><!-- &nbsp; --></abbr>
<p>It&#8217;s great to see that the National Archives of Australia has released a large swag of data through the new <a href="http://data.australia.gov.au/">data.australia.gov.au</a> site. In the <a href="http://data.australia.gov.au/84">Commonwealth Agencies</a> zip file you can find xml dumps of all the publicly accessible agency and series data in RecordSearch, as well as item data for series A1. This is the same data that Mitchell Whitelaw visualised so brilliantly in his <a href="http://visiblearchive.blogspot.com/">Visible Archive</a> project. There&#8217;s also item data and images from series A3560 – the <a href="http://data.australia.gov.au/77">Mildenhall photographs of early Canberra</a>.</p>
<p>What&#8217;s even more exciting is that people are already using this data. At the recent GovHack event in Canberra the <a href="http://catherinestyles.com/2009/11/02/wtfgd-first-steps/">What The Federal Government Does</a> team worked on visualising the activities of government by using functions data pulled from the agencies file. Another group has generated a really nice <a href="http://mildenhall.creativepossums.net/">tag cloud and photo gallery</a> from the Mildenhall data. With further GovHack sessions to follow and the <a href="http://mashupaustralia.org/">MashupAustralia</a> contest open until 13 November, let&#8217;s hope for some more inspired archives hacking.</p>
<p>Seeing RecordSearch data out in the world like this reminded me of a little project I started a while back and then set aside. It was a simple PHP script that scraped data from RecordSearch and spat it out either as XML or JSON. Mitchell used a version of this script in his <a href="http://visiblearchive.blogspot.com/2009/08/exploring-a1-items-to-documents.html">A1 Explorer</a> in order to find out the number of pages in each digitised file.</p>
<p>I&#8217;ve now expanded and improved the script so that it provides data on items, series, agencies and persons. The output includes all the basic fields as well as links between entities – such as related series, controlling agencies etc. As an added bonus you also get some useful totals (where they&#8217;re available): items include the number of pages, series include the number of items described on RecordSearch, and agencies include the number of series recorded. I&#8217;ve also fiddled with mod_rewrite to provide a more rest-ful interface.</p>
<p>For XML output use the url <strong>http://discontents.com.au/shed/rs/xml/ </strong>followed by the appropriate identifier – a barcode for an item, a CA number for an agency, a CP number for a person or a series number.</p>
<p>Some examples:</p>
<ul>
<li> Series A1 – <a href="http://discontents.com.au/shed/rs/xml/a1">http://discontents.com.au/shed/rs/xml/a1</a></li>
<li>Item B2455, WRAGGE C L E – <a href="http://discontents.com.au/shed/rs/xml/3445411">http://discontents.com.au/shed/rs/xml/3445411</a></li>
<li>CSIR Head Office – <a href="http://discontents.com.au/shed/rs/xml/CA+486">http://discontents.com.au/shed/rs/xml/CA+486</a></li>
<li>Alfred Deakin – <a href="http://discontents.com.au/shed/rs/xml/CP+9">http://discontents.com.au/shed/rs/xml/CP+9</a></li>
</ul>
<p>As you might have guessed, to get JSON output you just substitute &#8216;json&#8217; for &#8216;xml&#8217; in the url.</p>
<p>Being dependent on screen scraping, it&#8217;s inherently a bit fragile, but I&#8217;m hoping it might be of some use. My intention was to use it to start exploring some new ways of using and interacting with the data. The code itself is <a href="http://bitbucket.org/wragge/rswrapper/">available at BitBucket</a>. It&#8217;s not very elegant, but I don&#8217;t want to spend much time cleaning it up at the moment. If it seems like it might be useful, I&#8217;ll probably rewrite the whole thing in python and publish it through Google&#8217;s AppEngine.</p>
]]></content:encoded>
			<wfw:commentRss>http://discontents.com.au/shoebox/archives-shoebox/some-archives-hacking/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Harvesting context #1: Flickr comments</title>
		<link>http://discontents.com.au/shoebox/archives-shoebox/harvesting-context-1</link>
		<comments>http://discontents.com.au/shoebox/archives-shoebox/harvesting-context-1#comments</comments>
		<pubDate>Sun, 23 Aug 2009 23:57:52 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[archives]]></category>
		<category><![CDATA[experiments]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[finding aids]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[userscript]]></category>

		<guid isPermaLink="false">http://discontents.com.au/?p=670</guid>
		<description><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Harvesting+context+%231%3A+Flickr+comments&amp;rft.aulast=Sherratt&amp;rft.aufirst=Tim&amp;rft.subject=archives&amp;rft.subject=experiments&amp;rft.source=discontents&amp;rft.date=2009-08-24&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://discontents.com.au/shoebox/archives-shoebox/harvesting-context-1&amp;rft.language=English"></span>
Instead of idly waiting for visitors to stumble over their holdings on some lonely information by-way,  archives are starting to push their content out into the bustling metropolis of the social web. They are going where the people are. Photographic collections, in particular, are gaining new lives and new audiences thanks to Flickr. But that&#8217;s [...]]]></description>
			<content:encoded><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Harvesting+context+%231%3A+Flickr+comments&amp;rft.aulast=Sherratt&amp;rft.aufirst=Tim&amp;rft.subject=archives&amp;rft.subject=experiments&amp;rft.source=discontents&amp;rft.date=2009-08-24&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://discontents.com.au/shoebox/archives-shoebox/harvesting-context-1&amp;rft.language=English"></span>
<abbr class="unapi-id" title="http://discontents.com.au/?p=670"><!-- &nbsp; --></abbr>
<p>Instead of idly waiting for visitors to stumble over their holdings on some lonely information by-way,  archives are starting to push their content out into the bustling metropolis of the social web. They are going where the people are. Photographic collections, in particular, are gaining new lives and new audiences thanks to Flickr.</p>
<p>But that&#8217;s only part of the story. Released into the wild, these photos are slowly picking up the habits of the locals. They are making friends, building connections, even speaking with new accents and dialects. Commented, tagged, organised, linked – they are building new contexts for themselves outside of the cloying control of archival descriptive systems.</p>
<p>Unfortunately it seems there is often a chasm between the old lives of the photos, documented in databases and finding aids, and their new post-institutional careers. This is a pity because the new contexts they are gathering can help us both understand and find them. What can we do to overcome this divide? How could finding aids harvest and display the user-generated content that aggregates around collection items living in the outside world?</p>
<p>The good news is that the tools to start doing this already exist – Flickr has a <a href="http://www.flickr.com/services/api/">powerful API</a> that makes it easy to extract photo metadata. Time for a bit of experimenting&#8230;<span id="more-670"></span></p>
<p>The first result is a <a href="http://userscripts.org/scripts/show/56135">userscript that displays Flickr comments</a> in a number of collection databases. Just <a href="http://userscripts.org/about/installing">install it</a> and then try it out:</p>
<ul>
<li>National Archives of Australia Photosearch &#8211; <a href="http://naa12.naa.gov.au/scripts/SearchOld.asp?O=PSI&amp;Number=7802286">try it!</a></li>
<li>State Records NSW Photo Investigator &#8211; <a href="http://investigator.records.nsw.gov.au/asp/photosearch/photo.asp?4481_a026_000090">try it!</a></li>
<li>National Archives and Records Administration ARC &#8211; <a href="http://arcweb.archives.gov/arc/action/ExternalIdSearch?id=522882">try it!</a></li>
</ul>
<div id="attachment_697" class="wp-caption aligncenter" style="width: 310px"><a href="http://discontents.com.au/wp-content/uploads/2009/08/photosearch.png"><img class="size-medium wp-image-697" title="Flickr comments in PhotoSearch" src="http://discontents.com.au/wp-content/uploads/2009/08/photosearch-300x199.png" alt="Flickr comments in PhotoSearch" width="300" height="199" /></a><p class="wp-caption-text">Flickr comments in PhotoSearch</p></div>
<p>Gory details follow&#8230;</p>
<p>So to begin with I thought I&#8217;d just harvest comments from Flickr and display them within existing collection interfaces. As before (<a href="http://discontents.com.au/shoebox/archives-shoebox/archives-in-3d">here</a> and <a href="http://discontents.com.au/shoebox/archives-shoebox/moa-buttons-galore">here</a>), <a href="https://addons.mozilla.org/firefox/addon/748">Greasemonkey</a> was my tool of choice for hacking finding aids. The plan was to trigger a Greasemonkey script when you arrive at a photo in a collection database, the script would then:</p>
<ul>
<li>extract a unique identifier for the photo that could be used to find it in Flickr</li>
<li>send off a request through the Flickr API to see if the photo was there</li>
<li>if so, then fire off another request to retrieve any comments</li>
<li>format the comments and insert them at a suitable point in the DOM of the database page</li>
</ul>
<p>Easy! Obviously for the script to work there needed to be a way of connecting entries in the database with photos on Flickr. In practice this means that the photos need to be described at item level, and that a unique identifier needs to be used somewhere in the description of the photo both on Flickr and in the collection database.</p>
<p>Any archive that meets these criteria is a candidate for inclusion. Only three pieces of information are necessary:</p>
<ul>
<li>the institution&#8217;s Flickr id</li>
<li>an expression to extract the identifier from the database page</li>
<li>an expression to identify the point on the database page at which the comments should be inserted</li>
</ul>
<p>The expressions could use XPath or regular expressions – whatever it takes to find the desired elements. I&#8217;m using <a href="http://jquery.com/">JQuery</a>, so that makes selecting elements a lot easier. For example, NARA ARC includes the item identifier in a div with the class &#8216;arcID&#8217;, so I just select that element using JQuery and then use regex matching to pull out the number:</p>
<pre class="brush: javascript">this.identifier = $(&#039;.arcID&#039;).text().match(/ARC Identifier (\d+)/i)[1];</pre>
<p>To start with I&#8217;ve included the databases of three institutions:</p>
<ul>
<li>the National Archives of Australia&#8217;s <a href="http://naa.gov.au/collection/photosearch/index.aspx">PhotoSearch</a> database</li>
<li>State Records of NSW&#8217;s <a href="http://investigator.records.nsw.gov.au/asp/photosearch/introduction.htm">Photo Investigator</a></li>
<li>the US National Archives and Records Administration&#8217;s <a href="http://www.archives.gov/research/arc/">Archival Research Catalog</a></li>
</ul>
<p>This is the code to save the settings for each institution:</p>
<pre class="brush: javascript">
if (document.location.href.match(/naa.gov.au\/scripts\/PhotoSearchItemDetail.asp/i)) {
this.name = &#039;NAA&#039;;
this.identifier = document.location.href.match(/M=0&amp;B=(\d+)/)[1];
this.flickrId = &#039;24849862@N08&#039;;
this.position = &#039;table:last&#039;;
} else if (document.location.href.match(/records.nsw.gov.au\/asp\/photosearch\/photo\.asp\?/i)) {
this.name = &#039;StateRecordsNSW&#039;;
this.identifier = document.location.href.match(/photo\.asp\?([\d\w_]+)/i)[1];
this.flickrId = &#039;27331537@N06&#039;;
this.position = &#039;table:first&#039;;
} else if (document.location.href.match(/arcweb.archives.gov\/arc\/action\/ShowFullRecord|arcweb.archives.gov\/arc\/action\/ExternalIdSearch/i)) {
this.name = &#039;NARA&#039;;
this.identifier = $(&#039;.arcID&#039;).text().match(/ARC Identifier (\d+)/i)[1];
this.flickrId = &#039;35740357@N03&#039;;
this.position = &#039;.genPad:first&#039;;
}
</pre>
<p>From there it&#8217;s just a matter of building the calls to the API using Greasemonkey&#8217;s built-in  GM_xmlhttpRequest method. Once the comments are retrieved, they&#8217;re given some basic formatting and inserted at the point in the DOM identified by the siteDetails.position property. Once again, JQuery greatly simplifies all the DOM manipulation. If there are no comments then a suitable message is inserted together with a link to the photo in Flickr. Finally some CSS is added to prettify it all a little bit.</p>
<p>You can <a href="http://userscripts.org/scripts/review/56135">view the full code</a> on the Userscripts site.</p>
<p>Of course, it would be good to have this sort of stuff happening on the server side. In fact, with a few small modifications, this script could just be dropped into the code of any of the collection databases I&#8217;ve used. But in the meantime, Greasemonkey gives us a chance to play around with some of the possibilities – to start thinking about what finding aids might be like.</p>
<p>So what&#8217;s next? I&#8217;d like to do some playing around with tags and locations, perhaps using them to suggest related photos. I&#8217;ve also just realised that Flickr machine tags allow semantic markup&#8230; hmmm&#8230;</p>
<p>If you have any suggestions for databases to add to this script – let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://discontents.com.au/shoebox/archives-shoebox/harvesting-context-1/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

