Code Monkey home page Code Monkey logo

annotator-pouchdb's Introduction

Annotator PouchDB Storage Plugin

npm version license

PouchDB provides a fabulous offline-first storage option with the power to replicate between Apache CouchDB , IBM Cloudant, and others.

Annotator + 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. Or...if you want to help make it awesome!...keep reading. ๐Ÿ˜บ

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!! ๐Ÿ˜บ

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() method to keep your offline-first copy in sync with a remote Apache CouchDB or IBM Cloudant database.

License

Apache 2.0

annotator-pouchdb's People

Contributors

bigbluehat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

yiqideren aleray

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.