Skip to content

Instantly share code, notes, and snippets.

@anarchivist
Created August 1, 2009 01:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anarchivist/159529 to your computer and use it in GitHub Desktop.
Save anarchivist/159529 to your computer and use it in GitHub Desktop.
mjgiarlo's OAI-ORE validator using foresite-python
# from mjgiarlo's OAI-ORE validator code:
# http://lackoftalent.org/michael/blog/2009/07/31/validating-ore-from-the-command-line/
# to use: python validate.py {URL}
import sys
from foresite import *
rem = RdfLibParser().parse(ReMDocument(sys.argv[1]))
aggr = rem.aggregation
n3 = RdfLibSerializer('n3')
rem2 = aggr.register_serialization(n3)
print rem2.get_serialization(n3).data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment