1. 10

I am gradually transitioning to OpenBSD, but I use pandoc to convert between text file formats on MacOS, Linux, and Windows. However, pandoc hasn’t been ported to OpenBSD. What tools or workflows will accomplish similar tasks on OpenBSD? The workflow I use most often is batch processing Markdown files with very basic YAML metadata to HTML5. lowdown looks promising, except that it won’t (I think) work in CMDER on Windows 7 (my work environment).


  2. 4

    i’ve installed pandoc into my homedir on an openbsd box using cabal.

    1. 2

      So you installed haskell-platform using pkg_add and then installed pandoc via cabal without having to build from source? Do you have any specific recommendations, or does this guide match what you did?

      1. 11

        If you are using the standard OpenBSD disk layout (with wxallowed only on /usr/local) you will have to take a few extra steps.

        1. Set the TEMPDIR environment variable to a direct inside of /usr/local.
        2. Make a cable for in /usr/local and symlink it to ~/.cabal

        Once that is done, you can use cabal to install pandoc.

    2. 3

      FWIW Stack should be getting an official OpenBSD release soon, https://github.com/commercialhaskell/stack/issues/3313 which should reduce the amount of faffing about required.

      1. 3

        lowdown author here. I use lowdown on Mac OS (has a homebrew) and Linux, and of course on OpenBSD. I don’t know how to distribute on Windows. (The source uses a very straightforward Makefile and C without dependencies, if that helps?)

        The next release (currently on the GitHub, but not stabilised for release) features almost-totally-completely re-written internals to support nicer PDF output.

        1. 1

          Does lowdown support linking a CSS file when generating the standalone HTML? When I run it with the -s flag, it includes the title and author, but not the other MMD metadata.

          1. 2

            As noted here, you mean? I’ll include that in the next release. Thanks!

            1. 1

              Yes, thanks!

        2. 1

          You should try install using cabal or stack, (I have not tried either on OpenBSD).

          You may also want to checkout commonmark by the same developer as pandoc - jgm

          1. 1

            I like the simplicity of the cmark tool, but I wish it supported page metadata, such as linking the output to a stylesheet and setting the page title, which is one reason I’ve settled on pandoc.