Repository navigation
Add Muse support to GitHub and GitLab #55
Description
Activity
@link2xt did you look at their code? do the need an executable for rendering? Converting the muse-quick.pl to a stripped down HTML output sounds trivial to do, but what exactly should produce?
All that is needed it seems is to add a wrapper to
lib/github/commandsand a line that calls it to the end of the https://github.com/github/markup/blob/master/lib/github/markups.rb, which already contains examples forpod6,podand ReST.A command
pod2htmlis very simple and is located here:
https://github.com/github/markup/blob/master/lib/github/commands/pod2htmlHere is how it works:
./pod2html <<EOF =pod =head1 Title Foo bar =cut EOF <h1 id="Title">Title</h1> <p>Foo bar</p>I'll try to produce similar
muse2html, if it is small enough maybe it can just be placed directly into the markup repo and there is no need to modify Text::Amuse.- Alexander Krotov <notifications@github.com> writes:All that is needed it seems is to add a wrapper to `lib/github/commands` and a line that calls it to the end of the https://github.com/github/markup/blob/master/lib/github/markups.rb, which already contains examples for `pod6`, `pod` and ReST. A command `pod2html` is very simple and is located here: https://github.com/github/markup/blob/master/lib/github/commands/pod2html Here is how it works: ``` ./pod2html <<EOF =pod =head1 Title Foo bar =cut EOF <h1 id="Title">Title</h1> <p>Foo bar</p> ``` I'll try to produce similar `muse2html`, if it is small enough maybe it can just be placed directly into the markup repo and there is no need to modify Text::Amuse.So it should read the standard input and output to the standard output, without any templating. I have no problems refactoring muse-quick.pl to do that. Please let me know if you want to try yourself or you want me to do that. I'm happy to review your work or do it myself anyway. It's a very nice idea, indeed, and deserves all support.…-- Marco
I have created a branch here: https://github.com/link2xt/markup/tree/muse
I have no problems refactoring muse-quick.pl to do that. Please let me know if you want to try yourself or you want me to do that. I'm happy to review your work or do it myself anyway.
muse2htmlwrapper is there, I have added it tomusebranch. Also need to modifyDockerfileand maybe something else likescript/bootstrap. Review is welcome.In commit message I tried to make it clear that Muse is a markup with history and multiple implementations.
I am going to check what is needed to make CI pass and submit a draft PR to upstream.
CI fails now: https://travis-ci.org/link2xt/markup/jobs/593929253
Need to add Muse to GitHub linguist first.
- Alexander Krotov <notifications@github.com> writes:`muse2html` wrapper is there, I have added it to `muse` branch. Also need to modify `Dockerfile` and maybe something else like `script/bootstrap`. Review is welcome.I've modified it a bit to handle the encoding properly (instead of silence the warning) and subnmitted https://github.com/link2xt/markup/pull/1In commit message I tried to make it clear that Muse is a markup with history and multiple implementations.Yeah, you did a good job at thatI am going to check what is needed to make CI pass and submit a draft PR to upstream.Great!…-- Marco
And to add Muse to Linguist, we need a TextMate grammar. Good thing is that it can be used by Atom, so we'll automatically fix melmothx/amusewiki#176
Going to try to make some basic TextMate Muse grammar then.
Reacted by MarcoDoesn't seem like a trivial task though...
On the other hand it seems like there are many markups that don't have a TM grammar even though contributing guide says there should be one.
I'll see how hard it is to do some basic highlighting, like directives, headings and emphasis anyway.
I have created an Atom package, see my comment for AmuseWiki issue. The grammar is far from finished though, it does not even highlight nested inline markup properly, so I am going to try to add Muse to linguist without the grammar.
Muse is added to GitHub linguist without any TextMate grammar. Waiting for release now, then will try to make CI for markup pass again.
GitHub and GitLab support various markups via their libraries:
The parser is not required to be in Ruby. reStructuredText is supported with Python and Pod is supported with Perl.
Since their Dockerfile already uses cpanm, there is a chance that addition of Text::Amuse will be accepted. Maybe it makes sense to revive currently deprecated
muse-quick.plwith some basic HTML output support so we don't have to install the whole Text::Amuse::Compile.Amusewiki is git-based, so adding Muse support will make it possible to preview site repositories, such as https://github.com/melmothx/amusewiki-site, directly on GitHub.