aleray / annotator-couchapp

[Experimental] Apache CouchDB-based Annotator Store

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Annotator CouchApp

AnnotatorJS provides a Store plugin which inturn uses a simple Storage API that (thankfully!) maps quite nicely to Apache CouchDB's.

So...I built a CouchApp to fill in the missing bits.

Install

  1. npm i to install dependencies
  2. npm run anno to build annotator
  3. npm run dev to build the annotator-pouchdb add-on
  4. Download couchapp.py (or something that supports the CouchApp File System Mapping)
  5. couchapp push . http://localhost:5984/annotator
  6. Add this (or similar) code to an HTML page hosted form that database (or that can write to it ...see CORS)
var annotator = $('#content').annotator();
annotator.annotator('addPlugin', 'Store', {
  prefix: 'http://localhost:5984/annotator/_design/annotator/_rewrite'
});

Early days, yet.

AnnotatorJS has plugins for Auth, Permissions, and a few other Storage-facing things. It'd be super to add support for them here.

Patches welcome!

License

Apache License 2.0

About

[Experimental] Apache CouchDB-based Annotator Store


Languages

Language:JavaScript 94.0%Language:CSS 4.9%Language:HTML 1.1%