FinalsClub / karmaworld

KarmaNotes.org v3.0
GNU Affero General Public License v3.0
7 stars 6 forks source link

Edit Notes #272

Closed AndrewMagliozzi closed 9 years ago

AndrewMagliozzi commented 10 years ago

Allow users to collaboratively edit each others' notes and study guides.

We must find an open source option for doing this easily. It should ideally use markdown. Questions:

Some potential open source options for us to consider:

One closed source option might also be:

AndrewMagliozzi commented 10 years ago

StackEdit seems awesome for these reasons:

btbonval commented 10 years ago

Need to determine if StackEdit has a history or revision control.

If not, we'd want to pair this with something like Mercurial, Google's Diff-Match-Patch, or some other document-level change revision system.

AndrewMagliozzi commented 10 years ago

Let's also check on google drive diffs in that API. I know there is something about drive sync in the StackEdit docs.

I actually think that may suffice for doc, docx, et al. We probably shouldn't edit PDF HTML anyway as it's intended to be static.

On Jan 20, 2014, at 4:20 PM, Bryan Bonvallet notifications@github.com wrote:

Need to determine if StackEdit has a history or revision control.

If not, we'd want to pair this with something like Mercurial, Google's Diff-Match-Patch, or some other document-level change revision system.

— Reply to this email directly or view it on GitHub.

btbonval commented 9 years ago

Public Lab recently had a discussion about Markdown being unfriendly to new users, so there's a discussion of alternative software which is inherently markdown but has nice editors. https://github.com/publiclab/plots2/issues/151

btbonval commented 9 years ago

From that thread, I found VueJS which looked like a good FOSS solution. http://vuejs.org/examples/

btbonval commented 9 years ago

Not that typing markdown in a browser would ever be easy on a phone, but I just looked at the VueJS example site on my mobile phone. Looks alright.

AndrewMagliozzi commented 9 years ago

If we go with Etherpad (as I think I'm inclined), here is a repo that adds Markdown support:

https://github.com/JohnMcLear/ep_markdown

btbonval commented 9 years ago

That looks handy. I'll cross post to other list as Public Lab already uses etherpad.

The only problem I see with that is we'd have to run etherpad on a node.js stack with access to the same database as the python stack.

That shouldn't be a huge issue. I think we can run a node Heroku app which points at the same internet-accessible database with no additional cost.

btbonval commented 9 years ago

Oh, that project is basically dead and there is no clear licensing :(

AndrewMagliozzi commented 9 years ago

Which project is dead?

AndrewMagliozzi commented 9 years ago

here's a list of all existing etherpad plugins:

https://github.com/ether/etherpad-lite/wiki/Plugin,-a-list

btbonval commented 9 years ago

ep_markdown specifically hasn't been touched in over a year and has no license in the source code or the package.json file. It is not MIT license, GPL, or anything. We'd need to contact the author and request a license be included or special permission to use.

If there are other, better maintained, more clearly licensed markdown plugins for etherpad, that would be handy.

btbonval commented 9 years ago

I can't find source code or licensing for the only other markdown plugin, which is called ep_markdownify.

From the package description, it disables the GUI buttons in favor of supporting markdown formatting. If we could get license information and it allows us to fork development of ep_markdown, I suspect that would be the better choice to ep_markdownify.

btbonval commented 9 years ago

Posted an issue to ep_markdown requesting license information be included.

btbonval commented 9 years ago

Author asked me to add Apache 2 license, I'm guessing as a pull request. ep_markdown looks much better with an Apache 2 license.

btbonval commented 9 years ago

PR created and accepted. ep_markdown is now forkable with an Apache 2 license. Sweet. We can go this route now if desired.

btbonval commented 9 years ago

@yourcelf suggests we move to HTML as our primary storage format instead of markdown.

We could add a markdown-HTML conversion step to sanitize/cleanup the HTML with a markdown engine, but store that HTML output as the primary note content for editing.

The suggestion is because there are more rich text editors that operate on HTML.

btbonval commented 9 years ago

@yourcelf made a good argument against Etherpad because

  1. its storage system is separate and would not integrate into our existing database, so we'd either have to import/export or store all notes directly in Etherpad
  2. there's a strong latency and Etherpad does not scale well to large numbers
btbonval commented 9 years ago

Possible workflow for migration to HTML:

  1. add a field to store HTML
  2. migrate existing markdown into the HTML field
  3. update rendering to drop notes into the HTML field and not markdown
  4. add a step to the note import process which converts the markdown to HTML before saving it to the database (near https://github.com/FinalsClub/karmaworld/blob/master/karmaworld/apps/notes/management/commands/convert_notes_to_markdown.py#L34)
  5. remove markdown field
  6. rename all markdown references in the code (e.g. NoteMarkdown class) to be more generalized concepts of Note editing.
btbonval commented 9 years ago

@AndrewMagliozzi I think we have successfully implemented this ticket for Edit Notes, as we can edit certain notes in production. Good to close?

AndrewMagliozzi commented 9 years ago

yes, good to close. It may need some tweaking for the permissions on who gets to edit, but it's definitely good for now.

On Tue, Apr 21, 2015 at 11:50 AM, Bryan Bonvallet notifications@github.com wrote:

@AndrewMagliozzi https://github.com/AndrewMagliozzi I think we have successfully implemented this ticket for Edit Notes, as we can edit certain notes in production. Good to close?

— Reply to this email directly or view it on GitHub https://github.com/FinalsClub/karmaworld/issues/272#issuecomment-94849732 .