Skip to content

Add Muse support to GitHub and GitLab #55

Description

@link2xt

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.pl with 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.

Activity

  1. melmothx commented on Oct 5, 2019

    @melmothx
    Owner

    @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?

  2. link2xt commented on Oct 5, 2019

    @link2xt
    ContributorAuthor

    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.

  3. melmothx commented on Oct 5, 2019

    @melmothx
    Owner
  4. link2xt commented on Oct 5, 2019

    @link2xt
    ContributorAuthor

    I have created a branch here: https://github.com/link2xt/markup/tree/muse

    @melmothx

    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.

    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.

    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.

  5. link2xt commented on Oct 5, 2019

    @link2xt
    ContributorAuthor
  6. melmothx commented on Oct 5, 2019

    @melmothx
    Owner
  7. link2xt commented on Oct 5, 2019

    @link2xt
    ContributorAuthor

    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.

  8. melmothx commented on Oct 5, 2019

    @melmothx
    Owner

    Doesn't seem like a trivial task though...

  9. link2xt commented on Oct 5, 2019

    @link2xt
    ContributorAuthor

    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.

  10. link2xt commented on Oct 5, 2019

    @link2xt
    ContributorAuthor

    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.

  11. link2xt commented on Oct 11, 2019

    @link2xt
    ContributorAuthor

    Muse is added to GitHub linguist without any TextMate grammar. Waiting for release now, then will try to make CI for markup pass again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions