Skip to content

Latest commit

 

History

History
38 lines (23 loc) · 1.33 KB

readme.md

File metadata and controls

38 lines (23 loc) · 1.33 KB

Couch2RDF

Export CouchDB documents as triples, using the following conventions:

  • Subject = doc._id
  • Predicate = attribute
  • Object = doc.attribute
  • Default namespace = database name

Installation

Requires CouchDB and your data.

Option 1

Replicate from iriscouch into your DB.

Option 2

Make a local clone of this repository and couchapp push http://username:pass@localhost:5984/somedb. Needless to say, this option requires CouchApp.

Usage

Use the nice HTML export interface at http://localhost:5984/somedb/_design/couch2rdf/index.html

OR do things the manual way:

  1. Visit http://localhost:5984/somedb/_design/couch2rdf/_list/triples/spo
  2. OR for N3: curl -H "Accept: text/n3" http://localhost:5984/somedb/_design/couch2rdf/_list/triples/spo
  3. OR for RDF: curl -H "Accept: application/rdf+xml" http://localhost:5984/somedb/_design/couch2rdf/_list/triples/spo

Where somedb is your database name, and spo can be replaced with osp or pos.

Credits