metanorma / metanorma-cli

CLI (Command Line Interface) for Metanorma
BSD 2-Clause "Simplified" License
5 stars 5 forks source link

Create a GUI-based fully featured Metanorma distribution #83

Open strogonoff opened 5 years ago

strogonoff commented 5 years ago

To simplify end-user experience (not everyone is even familiar with a terminal), we could bundle a cross-platform GUI app that provides a visual editor for AsciiDoc-based markup languages used in Metanorma and is capable of outputting deliverables.

I believe, now there exist the key components that make the most tricky aspects of this doable with reasonable amount of effort:

Branded versions of the app can be bundled for different enterprise users of Metanorma, incorporating the appropriate customizations for editor controls and (if the app works locally) output deliverable formatting.

strogonoff commented 5 years ago

Concerns:

ronaldtse commented 5 years ago

@strogonoff this is a good idea (which we've all discussed to death), but with solid research here!

The best bet may be Electron. Technically we can compile Metanorma into JS via Opal (given that we abstract the XML and PDF printing dependencies).

strogonoff commented 5 years ago

Thank you @ronaldtse! I did not imagine this idea would be new at all😅 just had to document one way of achieving this that occurred to me.

(Until today I did’t make the connection that Draft.js could help us make it a fully self-contained GUI, even though I’ve used Draft.js on another project not long ago)

References:

ronaldtse commented 5 years ago

@strogonoff this is certainly not a new idea, and we've discussed this issue for the longest time (since this is what people really want, a UI). But we haven't made efforts towards it yet for the obvious reasons...

ronaldtse commented 5 years ago

It seems to me that with Electron we can also utilize Draft.js?

strogonoff commented 5 years ago

Note that Draft.js is React-based, though I have successfully bundled it into an Angular app before (and created a lib for that, though this one specifically works with HTML format).

strogonoff commented 5 years ago

@ronaldtse absolutely, can’t see why we wouldn’t be able to use it. Even if we don’t build the whole app in React, we can still use it in the editor UI.

strogonoff commented 5 years ago

I’ll need to research some more what kinds of controls we might need for writing Metanorma’s Ascii{flavor} formats. Looks like one of the trickiest aspects might be wiring up editor controls, such as the aforementioned bibliographic reference insertion, in a way that ensures the result is compliant with the Ascii{flavor} format requirements.

strogonoff commented 5 years ago

Here’s an interesting example, possibly source of inspiration or implementation avenue as alternative to DraftJS & Electron.

https://html-notepad.com/

It’s a cross-platform GUI app that allows to visually author HTML. (The author plans to add more markup languages as output, such as Markdown.) It opens folders, treating them as projects.

It doesn’t use Electron, but some other cross-platform GUI framework. It doesn’t look extremely fancy and fully native on macOS, but it feels much faster than an average Electron-based app (not that speed is a number one concern though, honestly).

I imagine a GUI for the Metanorma app in a somewhat similar way.