Skip to content

Instantly share code, notes, and snippets.

View aschweer's full-sized avatar

Andrea Schweer aschweer

  • Hamilton, New Zealand
View GitHub Profile
@tdonohue
tdonohue / gist:7815940
Created December 5, 2013 23:22
My Apache mod_shib sample setup for DSpaceDirect (using mod_proxy to redirect to Tomcat via port 8009).
## WARNING THIS IS NOT YET IN PRODUCTION. IT SEEMS TO WORK IN TESTING THOUGH
<VirtualHost *:80>
ServerName test.dspacedirect.org
## Logging Settings ##
ErrorLog ${APACHE_LOG_DIR}/test.dspacedirect.org-error.log
CustomLog ${APACHE_LOG_DIR}/test.dspacedirect.org-access.log combined
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
@aschweer
aschweer / waikato_get_record_ids.py
Created September 22, 2011 01:56
Example python script to get record IDs from an OAI harvest
#!/usr/bin/env python
# uses http://www.infrae.com/download/OAI/pyoai
from oaipmh.client import Client
from oaipmh.metadata import MetadataRegistry, oai_dc_reader
URL = 'http://researchcommons.waikato.ac.nz/dspace-oai/request'
registry = MetadataRegistry()
registry.registerReader('oai_dc', oai_dc_reader)
client = Client(URL, registry)