kilaulena / doingnotes

Outliner for the web and offline use

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

This is my diploma thesis. Enjoy. Forgive the bugs, this is just a prototype.

Read more about the thesis in my blog.

If the following instructions aren't detailed enough, make sure to check out chapter 9 in my thesis.

You can try out the outliner here. The whole fun only starts though when you also "install" it on your local CouchDB instance, and open that and the program on the server in two different browser windows. Then you can see how updates on the server (or on other peoples CouchDB instances) are automatically replicated to your computer.

To see this, make sure you have the right server URL set in /_attachments/config/config.js.

Outliner usage

Create a new outline and start to write.

  • Enter: create and jump to a new line
  • Up/down: jump one line up/down
  • Tab: Indent a line
  • Shift+Tab: Unindent a line

When solving a write conflict:

  • Tab or Shift+Tab: Jump between versions

You can also delete outlines and change their titles.

Installation

  • Install CouchDB.
  • Install Couchapp
  • Get Firefox >= 3.5. That's the only browser all features are guaranteed to work with. Use other browsers at own risk.
  • Start CouchDB as instructed. If you installed from source, you can amend the Rakefile with your CouchDB location and use the raketask "rake couch:start_host"
  • Git clone this repository. Rename .couchapprc_example to .couchapprc.
  • Do 'couchapp push' in the doingnotes project folder to deploy/"install" doingnotes into your local CouchDB.
  • In case your CouchDB is running on port 5984 on localhost, visit http://localhost:5984/doingnotes/_design/doingnotes/index.html

Running the tests

Integration tests

  • $ cd features
  • $ cucumber/*.feature

Unit tests

Open the file _attachments/app/spec/index.html and uncomment the specs you want to run.

Replication notifications from remote

Replication notifications on your local machine

  • You need to set up two CouchDB instances on your machine first.
  • Make sure the server URL constant is set to http://localhost:5985 in /_attachments/app/config/config.js
  • Start the second couch instance (on port 5985) in another Browser window.
  • Open the same outline with both browser windows and type in the window where it says "you won't see any changes here".
  • See a notification in the client window (port 5984)

Conflict resolution

You need to open the same outline on two couch instances in two windows. Then:

  • stop the first couch instance,
  • write something in the second window,
  • stop the second couch instance,
  • start the first couch instance,
  • write something in the same line in the first window,
  • start the second couch instance.

Then you have a write conflict. For creating an append conflict, add a new line to the same line instead of writing in it. You can also create both conflicts for the same line, or multiple (different) conflicts in one outline, or conflicts between more than two instances. But don't expect the outliner to handle all these cases gracefully!

As a shortcut for this lengthy procedure, there are a couple of rake tasks to help you bring your DB into certain states:

  • rake:writeconflict or rake:twowriteconflicts or rake:nicewriteconflict
  • rake:appendconflict
  • rake:appendandwriteconflict

Contact

Written 2009/10 by Lena Herrmann, lena[at]zeromail.org or http://github.com/lenalena. Released under the MIT license.

About

Outliner for the web and offline use


Languages

Language:JavaScript 94.1%Language:Ruby 5.9%