electronic brain surgery since 2001

Some DokuWiki Plugin Updates

So in the last weeks (or is it months) I worked on a few DokuWiki plugins. All of them took much more time than I originally planned to spend on them and each would deserve their own elaborate blog posts. But I am just too lazy for that. So here are some shortish summaries of what I did. Check the links to learn more.

ditaa Plugin

I like ditaa. It's a cool way to create nice diagrams from ASCII. Unfortunately it needs Java. If you want to run the ditaa plugin for DokuWiki you need to have Java on your server which you probably haven't. At least not on cheap web space.

Some years ago there was an online service that could render ditaa diagrams for you. The ditaa plugin used that if you hadn't configured a local Java install. Unfortunately that service has been down for years now.

However there popped up an alternative ditaa implementation on github written in go. The nice thing about go is that you can easily cross compile. The bad thing is there were no binaries available and people would need to compile their own version.

I opened a ticket. Then created a pull request. Then learned a bit of go and made a better pull request.

The ditaa plugin now automatically downloads the correct binary for your server's platform and uses that if Java is not available. Thus it now works out of the box again.

letsencrypt Plugin

At work I worked on the farmer plugin. It's awesome and basically means there's a really simple solution to run a DokuWiki farm. However if you want your animals secured via HTTPS it's complicated. Well at least if you don't want to shell out serious money for a wildcard certificate.

So I needed a way to request letsencrypt certificates for all the (sub)domain known to the farm. I looked for a simple PHP letsencrypt library and found LeScript.

I generally liked it, but I thought it was lacking some polishing. So again I spent much more time than I should and created a Pull Request. It isn't merged yet but I'm optimistic.

The letsencrypt plugin is available, too.

mathpublish Plugin

I'm not a math buff. But the need to embed mathematical formulas seems to be common. There are many plugins that do it. I'm fond of the mathpublish plugin. It creates PNGs for each formula which makes it easy to have the results in PDF exports as well.

Unfortunately the underlying PhpMathPublisher library hasn't seen any updates for years and wasn't PHP7 compatible. On github I found a repository where someone started to convert the old script to a modern PSR compatible library. But there where still some bugs in it and lots of duplicated code.

So there's another Pull Request open now. We'll see if there's still someone paying attention or if I need to adopt that thing completely.

However the mathpublish plugin got updated and also supports ODT export now (thanks for that PR).

dokuwiki, plugin, development, github, php
Similar posts: