ethertoff.js
clone your own copy | download snapshot

About

Ethertoff.js

Ethertoff is a simple collaborative web platform, much resembling a wiki but featuring realtime editing (à la Etherpad). Its output is constructed with equal love for print and web.

Just a question: I thought it was ethertopff and not ethertoff but I don't remember why. What is the actual name?

Well someone misspelled ethertopdf as ethertopf which sounds like römertopf and than somebody else understood ethertoff like chokotoff and chokotoff being Bruxellois I thought it might be the best of all these references

Ethertoff has been initially developed for the OSP 2013 Summerschool ‘Relearn’. The original version is a mash up of two software systems, Django and Etherpad, and is complicated to install. This new version is built upon Derby.js which promises an easier set-up and a smaller technological foot-print.

How to use

This first version of Ethertoff.js provides a bare-bones wiki experience.

A pad is created by typing a link to a non-existing page in the url-bar:

http://localhost:3000/w/name_of_new_pad.html

a read-only version of the pad is then available at:

http://localhost:3000/r/name_of_new_pad.html

One can see the page get updated in real-time.

Road-map

For now the write interfaces is a bare-bones text editor (codemirror, with no additional options or themes). The read interface can interpret the text as markdown, or as raw html.

The idea is that the wiki can handle multiple kinds of resources, and that dependent on the mime-type of the resource the wiki offers a different kind of edit and read view. The easiest way to to recognise a mime-type is using file extension: so a page called documentation.md will be interpreted as markdown, whereas documentation.html will be recognised as plain html.

To take the file-paradigm further, integration might be offered with the file-system or git repositories. An inconvenience to Etherpad-like realtime writing environments is that they force one kind of editing environment. Not only does this limit the way the content can be edited and back-upped, some writers also like to combine such moments of real-time collaboration with more solitary writing experiences.

A possible scenario is to run Ethertoff on one’s own computer, opening up real-time collaboration to the persons on the same wifi-network. The changes will be synched to the file-system, and once this collaboration session is over, the person who brought the Ethertoff can return to a solitary writing experience, choosing the tools of their liking.

License

(c) Eric Schrijver, 2014 for OSP Open Source Publishing

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Snapshots | iceberg

No images in this repository’s iceberg at this time

Inside this repository

Log

 

Eric Schrijverpublished

— A functioning read/write wiki with to the left the names of the pads

A pad is created by typing a link to a non-existing page in the url-bar:

http://localhost:3000/w/name_of_new_pad

a read-only version of the pad is then available at:

http://localhost:3000/r/name_of_new_pad

Ethertoff.js is based on this django/etherpad application,
by OSP Open Source Publishing:

http://osp.kitchen/tools/ethertoff/

Ethertoff is a simple collaborative web platform, much resembling a wiki
but featuring realtime editing (à la Etherpad). Its output is
constructed with equal love for print and web.

This is the first step for creating a node.js based version,
using the derby.js framework. This promises easier set-up and a smaller
technological foot-print.

This first step possible through the help of these resources:

- https://github.com/derbyjs/derby-examples (especially the code-mirror
example)
- https://github.com/dmapper/derby-tutorials
- https://github.com/derbyparty/generator-derby

Tuesday, 19th August 2014 - 11:09

 

Eric Schrijverbrought out

— Allow dots in id’s by working around derby’s path notation

Before, passing a slug like: `foo.html` produced errors such as:
Error: Cannot subscribe to a path within a document: documents.foo.html

Thanks to Artur Zayats to help find a workaround:
https://groups.google.com/forum/#!topic/derbyjs/2eyBuDYCBw4

Tuesday, 19th August 2014 - 11:09

 

Eric Schrijverlet the cat out of the bag

— Read in a folder from the file system and store its contents in ethertoff’s share.js/livedb/mongo-db storage

Usage: node init.js path_to_folder_to_use_as_wiki_content

Binary files are not actually stored:

{
"_id" : "geo.pyc",
"absPath" : "/Users/e/Documents/Titanium_Studio_Workspace/raduga-server/geo.pyc",
"path" : "geo.pyc",
"mime" : "application/octet-stream",
"binary" : true
}

Text-based files get the data stored in the mongo database directly:

{
"_id" : "alerts.py",
"absPath" : "/Users/e/Documents/Titanium_Studio_Workspace/raduga-server/alerts.py",
"path" : "alerts.py",
"mime" : "text/x-python",
"binary" : false,
"data" : "# -*- coding: utf-8 -*-\n\nimport json\nimport sys\nimport urllib2\n\nimport pymongo\n\nfrom utils import logger\nfrom settings import *\nfrom users import synch_users, delayed_synch_users\n\nclient = pymongo.MongoClient()\n(…)"
}

Tuesday, 19th August 2014 - 11:09

 

Eric Schrijverclaimed

— Allow for slashes in url: /w/bla/foo-three.txt

Tuesday, 19th August 2014 - 11:17

 

Eric Schrijverlet out

— The wiki has a conception of mime-type

Based on the extension of the wiki page, it can present its content in different ways.

For now, markdown documents (*.md) get processed through markdown,
other plain text formats are shown as-is within a <pre>block</pre>

Tuesday, 19th August 2014 - 11:17

 

Eric Schrijverblabbed

— Fix print button

(it always pointed to index.html)

Tuesday, 19th August 2014 - 13:01

 

Eric Schrijverrevealed

— With /raw/ route, server can provide the raw resource in its most recent form

In the case of a text-based resource this is from the database, otherwise it is from disk.

Friday, 22nd August 2014 - 16:26

 

Eric Schrijverdeclared

— Display preview or download link for binary files

For now there is just a preview for image files. In the future these previews could be handled
by tailored derby components, and a dedicated function that chooses the right component
based on mime type. In case no preview is found, a download link is presented.

BTW, in the derby.js template I couldn’t use a regex à la .match(/image\/(jpeg|gif|png)/i)

Friday, 22nd August 2014 - 16:51

 

Eric Schrijverinterpreted

— Try to find a document that can function as the home-page: index.something, readme.something

n.b. Derby doesn’t like regexes in the query, we should use the $regex operator

Monday, 25th August 2014 - 16:51

 

Eric Schrijvercomitted

— Normally < > characters are escaped, when embedding html we want them as they are!

Monday, 25th August 2014 - 17:00

 

Stéphanie Vilayphiouspilled the beans

— readme instruction

Friday, 28th November 2014 - 17:55

 

Eric Schrijverspoke

— On the homepage, the slug wasn’t set, so you couldn’t reach the `write` or `raw` buttons

Sunday, 23rd November 2014 - 22:11

 

Eric Schrijvertalked

— Line-wrapping in the editor

Monday, 24th November 2014 - 00:02

 

Eric Schrijververbalized

— Update README.txt: Ethertoff’s ability to discern HTML from Markdown

Monday, 24th November 2014 - 00:07

 

Eric Schrijvertweeted

— Initialise with example content by running `node init.js` without arguments

Monday, 24th November 2014 - 01:31

 

Eric Schrijverblabbed

— The CSS is editable by users

A favourite from the Django version

Monday, 24th November 2014 - 01:32

 

Eric Schrijverblabbed

— Update README with instructions to load example content

Monday, 24th November 2014 - 01:34

 

Eric Schrijvertweeted

— Fix error when starting up with an empty DB

( accessing the slug of the 1st document when the document didn’t exist )

Tuesday, 25th November 2014 - 23:41

 

Eric Schrijverlet loose

— Be precise about dependencies

Tuesday, 25th November 2014 - 23:41

 

Eric Schrijverdiscovered

— Trying out hosting through AppFog

Based on the CloudFoundry platform

Seems to work OK, although they are missing web sockets

Tuesday, 25th November 2014 - 23:41

 

Eric Schrijverbrought out

— Error handling was broken (Ha!)

Wednesday, 26th November 2014 - 00:36

 

Eric Schrijversaid

— Latest Derby version

Wednesday, 26th November 2014 - 01:35

 

Eric Schrijversaid

— Add more metadata (license, repository) to package.json

Wednesday, 26th November 2014 - 01:35

 

Eric Schrijverargued

— Accomodate another cloud hosting service, Heroku

Part of this is to make sure the public/derby folder
gets created through GIT, because on Heroku derby.js seems to
have trouble creating it.

Wednesday, 26th November 2014 - 02:23

 

Stéphanie Vilayphioutalked

— merge

Friday, 28th November 2014 - 17:57

 

Eric Schrijverpublished

— Upload webfonts

Wednesday, 26th November 2014 - 02:36

 

Eric Schrijverbabbled out

— Add web fonts to CSS by defaults—we have a welcoming home-page now

Friday, 5th December 2014 - 00:15

 

Eric Schrijverbabbled out

— Renaming some variable names to be more transparent

Friday, 5th December 2014 - 00:31

 

Eric Schrijverpeached

— OOPS Forgot 2 rename these variables

Saturday, 6th December 2014 - 12:55

 

Eric Schrijverrevealed

— Start with putting useful info on the right side: path, mime-type

Sunday, 7th December 2014 - 00:25

 

Stéphanie Vilayphioutold

— Merge branch 'master' of git://git.constantvzw.org/osp.tools.ethertoff.js

Monday, 8th December 2014 - 22:20

 

Stéphanie Vilayphioutweeted

— Changed the mimetype of the style.css file to stylesheet/less.
Added a link to the CDN less compiler.
I don't understand how to precompile the less into css directly with
node.js...

Monday, 8th December 2014 - 22:45

 

Stéphanie Vilayphiousaid

— Link to Meyer's reset.css. Couldn't manage to link to the one hosted on
the Git repo.

Monday, 8th December 2014 - 22:57

 

Stéphanie Vilayphioucomplained

— List of pads: changed the <dl> into <ul> as the mimetype was not
displayed and was outputting only a series of <dd>.

Monday, 8th December 2014 - 23:12

 

Stéphanie Vilayphioubrought out

— Oops, wrong place. Undo the change and correct the <dl>/<ul> in the nav.

Monday, 8th December 2014 - 23:15

 

Eric Schrijvertold

— Do not use file-paths as id values in the database

Derby likes to use dot notation for many things, and file paths have dots—
hence we need to switch to alphanumeric id without dots.

When loading files from disk, we use the same function (from the uuid module)
as is used by derby.js itself, to generate unique id’s.

In all places where the app needs to search by file path, we now rely on the
path attribute instead of the _id attribute

Tuesday, 9th December 2014 - 01:27

 

Eric Schrijvertweeted

— The latest commit needed an extra dependency: this package to generate unique ID’s

Saturday, 13th December 2014 - 16:02

 

Eric Schrijverpeached

— Automatically switch CodeMirror modes depending on the Document’s mime type

Syntax highlighting for all the files it understands!

Uses an updated version of d-codemirror (pull request made)

Saturday, 13th December 2014 - 16:10

 

Eric Schrijverlet on

— Make CSS reset work

Following up on @latsami in cac03ff77a25bcb4011d4dc28793663e506e77c6

Apparently one needs to give the style the same name as the view

Sunday, 14th December 2014 - 13:47

 

Eric Schrijvercried

— Add 404 for Read pages that don’t exist

Sunday, 14th December 2014 - 17:42

 

Eric Schrijverpeached

— Trying to make it a bit more readable

Sunday, 14th December 2014 - 18:22

 

Eric Schrijvertalked

— Don’t subscribe to all document texts, just the paths

cf. https://groups.google.com/d/msg/derbyjs/4DWls2HvWyw/ahZBdlYxNGcJ
Thanks again Artur Zayats!

Friday, 20th February 2015 - 13:07

 

Eric Schrijvercomplained

— Title tags!

Saturday, 21st February 2015 - 14:11

 

Eric Schrijverrevealed

— Use <base> tag to make relative file paths work both in read and in raw mode

like <img src="final.gif"/>

Monday, 23rd February 2015 - 00:27

 

Eric Schrijversaid

— Rename README.txt to README.md

Pain in the heart!

Friday, 6th February 2015 - 20:46

 

Eric Schrijverunwrapped

— Merge branch 'master' of github.com:osp/osp.tools.ethertoff.js

Monday, 23rd February 2015 - 15:50

 

Eric Schrijvercomplained

— The changes to d-codemirror were merged upstream

Tuesday, 24th February 2015 - 17:53