Pandoc - anyone made it run? alternatives?

Has anyone made Pandoc run on Haiku?

Is there any other way to convert Markdown to HTML on Haiku?
Without using web services.

Cheers!

You’d have to port the Haskell language first.

Yes, install discount or multimarkdown.

GHC is available on the Depot for 32bit only

Interesting. Is there a reason why it won’t compile on 64-bit or is it just a question of no-one having gotten around to it?

I use the md4c package (that provides /bin/md2html), with the following little helper:

# Markdown Viewer
function mdview() {
	md2html --github -f --fpermissive-autolinks --fstrikethrough --ftables --ftasklists --funderline --fwiki-links $1 --output=/var/shared_memory/$1.html
	open /var/shared_memory/$1.html
}

so then I can call: mdview some_file.md.

Thank you, will play with those!

Cheers

If you have Rust installed, try comrak.

There is also CuteMarkedEd in the depot which can use to convert *.md files to HTML. (and you can use it as the editor)

Thank you, I am looking for a Pandoc specific feature which is basic “templating” [1].

I’ll see if any of the mentioned tools have it.

1: Pandoc - Pandoc User’s Guide

GHC needs to be compiled using an older version of GHC. We have a 3é bit version thanks to Jessicah’s hard work to cross-compile a first version of it from Linux, then that was used to compile more up to date versions.

No one has made the first cross-compilation step for the 64 bit version yet, and so, the recipes to provide natively compiled versions from that can’t be used.

Besides that, GHC is just the compiler, on its own it is not very useful. You will likely also need Cabal (Haskell package manager) and port various dependencies before getting Pandoc to run. I had somewhat started working on this but I moved to full 64bit now, so these efforts stopped for now.

1 Like

I struggled with x86_64 GHC for a bit, and it was kind of the last straw for me with Haskell. It was years ago and I remember only vaguely, but their compiler issues some instructions involving relocatable addresses or something that our loader found objectionable, and GHC central didn’t have a clue what to do about it and couldn’t have cared less.

I could probably dig up the emails for more details, if anyone really cares. (This way lies only madness - I urge you to not care.) This was native 64 bit ghc, I got that far, but it couldn’t build itself.