Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/BigBlueHat/annotator-pouchdb
Annotator PouchDB Storage Plugin
https://github.com/BigBlueHat/annotator-pouchdb
Last synced: 5 days ago
JSON representation
Annotator PouchDB Storage Plugin
- Host: GitHub
- URL: https://github.com/BigBlueHat/annotator-pouchdb
- Owner: BigBlueHat
- License: apache-2.0
- Created: 2015-05-30T18:48:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-08T13:29:23.000Z (over 8 years ago)
- Last Synced: 2024-11-01T09:01:50.422Z (8 days ago)
- Language: JavaScript
- Homepage: http://bigbluehat.github.io/annotator-pouchdb/
- Size: 495 KB
- Stars: 11
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - BigBlueHat/annotator-pouchdb - Annotator PouchDB Storage Plugin (others)
README
# Annotator PouchDB Storage Plugin
[![npm version](https://img.shields.io/npm/v/annotator-pouchdb.svg)](https://www.npmjs.com/package/annotator-pouchdb)
[![license](https://img.shields.io/github/license/bigbluehat/annotator-pouchdb.svg)](http://www.apache.org/licenses/LICENSE-2.0)[PouchDB](http://pouchdb.com/) provides a fabulous offline-first storage option
with the power to replicate between [Apache CouchDB](http://couchdb.apache.org)
, [IBM Cloudant](http://cloudant.com/), and others.## [Annotator](http://annotatorjs.org/) + PouchDB
Annotations are often personal things that you *may* want to share later. This
plugin allows you to add offline-first storage into your Annotator-based
extension, app, or UI.## Usage
```
$ npm install -g browserify # if you don't already have it
$ npm install
$ npm run dev # builds annotator.js and annotator-pouchdb.js
```You can then open the included `index.html` file and annotate it, or run it
inside a local web server (try `python -m SimpleHTTPServer` if you have python
handy and are in a hurry).Use `index.html` as a reference for your project.
## Firefox Extension
[Install it from the XPI in the repo](https://github.com/BigBlueHat/annotator-pouchdb/raw/master/offline-annotator.xpi).
Or...if you want to help make it awesome!...keep reading. :smiley_cat:There are bundled assets in the `firefox/data` and `firefox/lib` folders that
you will need to update if you change anything, but...if you haven't...```
$ npm run firefox # copies annotator*.js files to firefox/data/
$ cd firefox
$ mkdir temp-profile # so you can see annotations post-reload
$ cfx run --profile# rashly assuming you have the Mozilla Add-on SDK installed
```Then, visit a web page, and Annotate!!!
Close the browser, follow those steps again, annotate some more!! :smiley_cat:
## Replication
Obviously, there comes a time where you might want these annotations to live
in at least one other place. PouchDB supports the Apache CouchDB Replication
Protocol and you can use the [`.sync()`](http://pouchdb.com/api.html#sync)
method to keep your offline-first copy in sync with a remote Apache CouchDB
or IBM Cloudant database.## License
Apache 2.0