# Pandoc integration

**URL:** https://meta.discourse.org/t/pandoc-integration/149265
**Category:** Development
**Created:** [April 25, 2020, 4:00pm UTC](https://meta.discourse.org/t/pandoc-integration/149265 "2020-04-25T16:00:03Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)
#### Post date: [April 25, 2020, 4:00pm UTC](https://meta.discourse.org/t/pandoc-integration/149265/1 "2020-04-25T16:00:04Z")

</div>

Continuing the discussion from [Converting links from raw markdown to HTML](https://meta.discourse.org/t/converting-links-from-raw-markdown-to-html/102422/3):

I’m for Pandoc integration. I see there is this [web app available with a REST API](https://github.com/alphakevin/pandoc-api). Looking for a way to automate drafting out mediawiki documentation from Discourse.

Currently I’ll drag and drop markdown into [Try pandoc!](https://pandoc.org/try/)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [April 25, 2020, 4:28pm UTC](https://meta.discourse.org/t/pandoc-integration/149265/2 "2020-04-25T16:28:36Z")

</div>

Could you describe the workflow in more detail?

---

<div class="post-metadata">

### Author: ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)
#### Post date: [April 25, 2020, 4:34pm UTC](https://meta.discourse.org/t/pandoc-integration/149265/3 "2020-04-25T16:34:35Z")

</div>

Yes, we have a longstanding mediawiki installation: [Making sure you're not a bot!](https://www.noisebridge.net/wiki/Noisebridge)  
our Discourse forum: [Discuss](https://discuss.noisebridge.info)  
And this [hosted version](https://pandoc.org/try/) of Pandoc [we’ve encouraged users to use](https://discuss.noisebridge.info/t/pandoc-helps-create-wiki-pages-faster-or-translate-anything-to-mediawiki-format-noisebridge-net/1643) for quickly turning Markdown into the more esoteric mediawiki markup.

I’m hoping there is a way to turn this into a more automated workflow, as we want mediawiki pages from non-technical types who have enough trouble just registering an account.

Obviously we could do this within Discourse, but our mediawiki has been online since ~2007 and has a longstanding following, so no one wants to mess with it. But, it is a bit difficult / long in the tooth for drafting documentation in 2020. 🙂

I’m not fully sure on next steps. But, this would be a big help to our pool of volunteers! So far I’ve discovered this [restful api version](https://github.com/alphakevin/pandoc-api) of Pandoc, or the hosted demo linked above.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [April 25, 2020, 4:40pm UTC](https://meta.discourse.org/t/pandoc-integration/149265/4 "2020-04-25T16:40:49Z")

</div>

I’m still not clear where the data is coming from, but it’s going to your wiki?

What screens and controls might be involved? What discretion does the user have about where it is going?

---

<div class="post-metadata">

### Author: ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)
#### Post date: [April 25, 2020, 4:48pm UTC](https://meta.discourse.org/t/pandoc-integration/149265/5 "2020-04-25T16:48:32Z")

</div>

Hmm, excellent questions. I’m not totally sure. Perhaps the process of drafting out mediawiki pages could be best served through the [Custom Wizard](https://meta.discourse.org/t/custom-wizard-plugin/73345) plugin.

The issue is volunnteers are having too tough a time writing mediawiki pages in 2020. It is something people master 100% or are terrible at. Hope this makes sense as a problem I hope to address. If not, don’t want to waste your time. 🙂

I’ve been very interested in integrating Discourse with our Mediawiki installation to add user friendliness, but [I notice a couple attempts](https://www.mediawiki.org/wiki/Discourse) to use Discourse for _Discussions_ in mediawiki, have not worked out.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [April 25, 2020, 4:56pm UTC](https://meta.discourse.org/t/pandoc-integration/149265/6 "2020-04-25T16:56:08Z")

</div>

If I were you I would mock up the screens, controls and process before pursuing further. Don’t worry about the solution for now.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [April 25, 2020, 6:22pm UTC](https://meta.discourse.org/t/pandoc-integration/149265/7 "2020-04-25T18:22:03Z")

</div>

If you don’t like the old software, How about migrating the wiki to discourse?

---

<div class="post-metadata">

### Author: ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)
#### Post date: [April 25, 2020, 6:55pm UTC](https://meta.discourse.org/t/pandoc-integration/149265/8 "2020-04-25T18:55:48Z")

</div>

It doesn’t matter if I like it. The wiki has lived for 12 years and is beloved. Just needs some love. 💟

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [April 25, 2020, 7:39pm UTC](https://meta.discourse.org/t/pandoc-integration/149265/9 "2020-04-25T19:39:26Z")

</div>

So you want a way of publishing a Post from Discourse to your Wikimedia instance via a Pandoc translation of Markdown into HTML, is that right?

Sounds very interesting. But also sounds like something Zapier might solve?

PS I get why you might want to stay on the Wiki software. It’s a robust standard that’s designed for that use case.

---

<div class="post-metadata">

### Author: ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)
#### Post date: [July 31, 2020, 3:19pm UTC](https://meta.discourse.org/t/pandoc-integration/149265/10 "2020-07-31T15:19:44Z")

</div>

> [@merefield](#):
>
> So you want a way of publishing a Post from Discourse to your Wikimedia instance via a Pandoc translation of Markdown into HTML, is that right?

Right now I’m just copying the mediawiki text into Pandoc, then posting the converted Markdown into a Discourse post by hand. It is tedious, but works.

---

<div class="post-metadata">

### Author: ![pacharanero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pacharanero/32/500583_2.png) [@pacharanero](https://meta.discourse.org/u/pacharanero)
#### Post date: [August 1, 2020, 10:04am UTC](https://meta.discourse.org/t/pandoc-integration/149265/11 "2020-08-01T10:04:05Z")

</div>

> [@sunjam](#):
>
> copying the mediawiki text into Pandoc, then posting the converted Markdown into a Discourse

Are you drafting in Discourse and publishing to Mediawiki?

Or are you taking content from Mediawiki to publish it in Discourse?

Some kind of Mediawiki Sync plugin might be a nice way to please everyone here. I have had similar wiki/Discourse discussions in the past (not least at Leigh Hackspace, which is something I founded back in 2015, and where we once hosted Mitch Altman, one of Noisebridge’s founding team) and a bidirectional sync might work.

---

<div class="post-metadata">

### Author: ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)
#### Post date: [August 1, 2020, 4:41pm UTC](https://meta.discourse.org/t/pandoc-integration/149265/12 "2020-08-01T16:41:54Z")

</div>

> [@pacharanero](#):
>
> Are you drafting in Discourse and publishing to Mediawiki?

Yes, which is why I’m thinking it would be ideal to add in Pandoc to simplify conversion. We are held back by:

- [Discourse Event plugin](https://meta.discourse.org/t/discourse-event/149964/51) cannot yet schedule repeat events (weekly meetings).

> [@pacharanero](#):
>
> Or are you taking content from Mediawiki to publish it in Discourse?

Yes, just doing everything by hand.

- [Mediawiki format template as plain text](https://www.noisebridge.net/wiki/Meeting_Notes_Template) is collaborated on in etherpad.
  - Completed text posted to our mediawiki

- Text also copied over to Pandoc
- Pandoc converts to Markdown
- Markdown pasted to DIscourse with specific category and tags.

Hoping to streamline this process. 👍

> [@pacharanero](#):
>
> Mitch Altman

❤

> [@pacharanero](#):
>
> Or are you taking content from Mediawiki to publish it in Discourse?

If possible, this would be awesome. Both mediawiki and Discourse and useful tools. It is great to have important information in the wiki, plus discussion in the forum. Obviously, it is ideal to drop url links so people can easily page between both tools.

> [@pacharanero](#):
>
> Some kind of Mediawiki Sync plugin might be a nice way to please everyone here.

I know there have been attempts by the [wikimedia foundation to integrate](https://www.mediawiki.org/wiki/Discourse) both of these tools together. You can find details on the forum. I was also hopeful to allow [login to our Discourse from Mediawiki SSO](https://github.com/paviliondev/discourse-wikimedia-auth), but [that plugin breaks account creation on our forum](https://github.com/paviliondev/discourse-wikimedia-auth/issues/2).

> [@Use Discourse SSO with Mediawiki](https://meta.discourse.org/t/using-discourse-sso-with-mediawiki/69218/15):
>
> I made a version of this that uses PostgreSQL and has functionality for logging out: [GitHub - hhyyrylainen/singlefile-discourse-sso-php: Ugly, but working single-file SSO implementation in PHP · GitHub](https://github.com/hhyyrylainen/singlefile-discourse-sso-php) I hopefully didn’t make any security related mistakes.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 2, 2020, 2:22pm UTC](https://meta.discourse.org/t/pandoc-integration/149265/13 "2020-08-02T14:22:44Z")

</div>

Why not just leave the stuff on MediaWiki and have discussion on discourse with [Embedding Discourse Comments via Javascript](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963)?
