Skip to content

Instantly share code, notes, and snippets.

View mromanello's full-sized avatar

Matteo Romanello mromanello

View GitHub Profile
@mromanello
mromanello / gist:5168335
Created March 15, 2013 08:32
And this is the output you should get by running the script contained in [this Gist](https://gist.github.com/mromanello/5168303).
<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<ExtendedData xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:description>
This dataset contains data about publications related to the Limes grouped by the place in the Limes they relate to.
The main purpose is the display within the DARIAH Geo-browser, a tool to visualize data in time and space.
</dc:description>
<dc:subject>Archaeology, geo-date, Limes</dc:subject>
<dc:identifier>http://de.digitalclassicist.org/berlin/files/output.kml</dc:identifier>
@mromanello
mromanello / gist:5168303
Created March 15, 2013 08:25
Python script to create an example of data that can be displyaed in DARIAH geo-browser <http://dev2.dariah.eu/e4d/>, a tool to visualize data in time and space. Data are drawn from the Gazetteer and the Opac (library catalogue) of the German Archaeological Institute (DAI). This dataset contains data about publications related to the Limes groupe…
import json
import urllib
import urllib2
import sys
import codecs
"""
Author: Matteo Romanello, <[email protected]>
"""
@mromanello
mromanello / test_oai-pmh.py
Created October 18, 2011 14:43
Poking around with the Infrae OAI-PMH client module
from oaipmh.client import Client
from oaipmh.metadata import MetadataRegistry, oai_dc_reader
zenon_URL = "http://opac.dainst.org/OAI"
dai_URL = "http://arachne.uni-koeln.de:8080/OAI-PMH/oai-pmh.xml"
oc_URL="http://opencontext.org/oai/request"
registry = MetadataRegistry()
registry.registerReader('oai_dc', oai_dc_reader)
client = Client(oc_URL, registry)