Converting GitHub markdown to MediaWiki articles

Is there a preferred tool & workflow for converting add-on development README.md files in a GitHub repository to make a preliminary MediaWiki webpage for a new add-on?

(I accept that we’re still limited by our MediaWiki backend failing to properly update. So we shouldn’t risk installing add-ons like a bulk image uploader.)

It is unfortunate that GitHub markdown is a foreign format for the desktop OSes. Otherwise, the development documentation files that get ZIPped up with the add-on could simply become the initial fallback documentation. The Help (or a Python Markdown Viewer tool made into a Gramplet) would just look for the local README.md file.


The following tool was found on an unfamiliar domain: AllDocs.app – Convert Markdown (GitHub) Input format to MediaWiki

A few years ago, we built a “How do I?” template that inserted a skeletal framework for writing tutorial articles on the wiki.

All a WikiContributor had to do was paste the following line into a new blank page, save it, and the skeleton (with cut&paste ready example elements) would be flowed into the article.
{{subst:Template:How_do_I}}

I wanted to build a similar template for Addons. (Technically, the templates are straight-forward.) But never was able to put together a nice standard layout for the content… suffering from writer’s block.

You can use Pandoc for that.

2 Likes

A quick search on Google reveals that there are Markdown plugins for Chrome and Firefox.

That’s true and a good thing.

But reading intro documentation should not be reliant on an optional prerequisite. It should either be a standard in all the supported OSes or a built-in for Gramps.

The GitHub server automatically renders READMD.md files as basic HTML. So pre-processing is how they get away with a non-universal format.

True. An alternative path would be to let our help point to Add-On documentation on GitHub instead, because in that case, it will be presented in the right format right away.

1 Like

Here are a couple of tools I found, maybe you can find use of one of them…
Not Python.

Here are an article:

and this is a gist with how to do it with pandoc:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.