Skip to content


Subversion checkout URL

You can clone with
Download ZIP
it's evolving, but we needed to be able to track who's covering what topics in various drafts of "The" Occupy statement. Hence can tag selected text within documents and find documents by tags
Ruby JavaScript CoffeeScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


This software has moving-target requirements, which is kinda fun for the developer.

This arose out of a conversation between someone at Occupy Boston, in which he was exhausted and grumbled about the difficulties inherent in tracking the various drafts of "The" statement of Occupy Boston (a concept not too rooted in reality, the reality being that Occupy Boston is a non-hierarchical autonomous collective which can, at best, only pretend to have a single voice).

He was splashing water on his face, looking tired, and I said "You know I'm a web developer and can make you some custom software if that helps."  He stopped, stunned, and said "of all the things in the world you could have said at this moment, that was the perfect thing".

He and I sat and talked about ways the software could work - he showed me some interesting and promising software online (can't remember the name or url at the moment but I'll link later).  The conversation grew and we bounced around and both agreed we didn't know exactly what the software should do, but had a basic idea that people would browse through the software reading other people's writing and then comparing and contrasting the versions different authors had written.

The drafts of the statement cover different topics, so we needed to compare "apples to apples" as it were and compare, say, paragraph 5 of document X with paragraphs 7 - 12 of document Y because both of those talked about the Federal Reserve.

So I said "okay, how about I just bust out some basic functionality and then we can play with it.  I'll give you a form where you can drop in a document and then while you're reading you'll be able to highlight some text and tag that specific subset of text - can be anything from one letter up to a sentence or the entire document.  Then you can see a list of tags and then see the various document subsections tagged with any given tag.  And we'll play with that for a while and go from there."

And so here it is.  I've just notified this guy that the software is live (at for him to play around with and that I'm ready for more feature requests.

Note there's a major limitation of the current implementation.  Because of the specific strategy I'm using with javascript to detect which text has been highlighted, a strategy which is really simplistic and sort of a proof-of-concept prototype for me, this thing bugs out if there are paragraph breaks within the document.  It can't handle the whitespace correctly, and so what gets saved as the chunk of text you highlighted isn't what you actually highlighted.

Sucks, and I'm working on it.  At this point I'm thinking in terms of figuring out how many extra characters various whitespace-preservation strategies use and then figuring those into the document-slice marker integers (see Chunk#text method for the end of the read cycle and documents.js for the beginning of the write cycle).

You should be able to run this software with just `git clone foo`, `bundle`, then `rake db:migrate`.  If not, please let me know in a message or github issue and I'll give some attention to that.
Something went wrong with that request. Please try again.