Johannes Willkomm - Weblog
18.10.2017 20:50
orgmode : publishing : www

Website relaunch take two

I am relaunching my personal website again, again from org-mode files, but this time using my own tool which I built on top of org-to-xml.

27.09.2017 20:39
adimat : ad

New version of ADiMat released

The new version 0.6.2 of ADiMat has been released. Some new functions are now supported, for example "legendre", but primarily this is a maintenance release. Several of the outstanding bugs have been fixed.

The server has been updated to use TLS but a problem with the SHA1 signature of the certificate remains. To access the transformation server website with Firefox, for example, click "Advanced" and then "Add Exception...".

Have fun differentiating.

02.06.2015 19:40

New job at fionec GmbH

I have taken up a new position at fionec GmbH, a company which produces high-precision fiber optic distances sensors. These allow for contactless scanning of almost any kind of surface with a precision of a couple of nm.

19.02.2015 14:44
parser : xml : p2x

New version of P2X released

I have just released a new version 0.4.0 of the P2X light-weight parser with XML output. The main improvement is that there now is complete support for the UTF-8 encoding. In particular, identifiers can now have arbitrary charachters. For example, if you execute

echo "øłð ñ€W" | p2x

you now get in the output two identifiers, as expected:

<op line='1' col='6' code='71' type='JUXTA'> <id line='1' col='0' code='31' repr='øłð' type='IDENTIFIER'> <ca:text>øłð</ca:text> </id> <op line='1' col='6' code='70' type='SPACE'> <ca:text> </ca:text> </op> </op> <id line='1' col='7' code='31' repr='ñ€W' type='IDENTIFIER'> <ca:text>ñ€W</ca:text> </id>

The other major change is the license, P2X is now distributed under the GPLv3 license.

08.12.2014 10:26
www : orgmode : publishing

Relaunching my website

I have recreated my website using, as you can see very tinily at the bottom of the page, o-blog. Now I can edit the content of this entire site in a single file, including both the fixed pages and my blog articles. A single Emacs function converts it all to a bunch of static files which I can push on the server. I did not change much of the design because I don't have the time to spare right now.

04.12.2014 15:06
xml : xmlsh : xslt : xpath : java


I recently found xmlsh and decided to give it a try in spite of it not being available as a Debian package. I like the approach to make the whole thing look like a Unix shell. Here is an example what you can do with it: I run a system command, here echo -n "a+b" | p2x -bPLUS, and get the result in an XML variable, and then extract some subtree from it with XPath.

xmlsh <<EOF x=$<(echo -n "a+b" | p2x -bPLUS) declare namespace cx= xecho \$x | xpath "/*/cx:root" EOF
$ x=$<(echo -n "a+b" | p2x -bPLUS) $ declare namespace cx= $ xecho $x | xpath "/*/cx:root" <root xmlns="" line="0" col="0" code="27" type="ROOT"> <null/> <op line="1" col="1" code="47" type="PLUS"> <id line="1" col="0" code="31" repr="a" type="IDENTIFIER"> <ca:text xmlns:ca="">a</ca:text> </id> <ca:text xmlns:ca="">+</ca:text> <id line="1" col="2" code="31" repr="b" type="IDENTIFIER"> <ca:text xmlns:ca="">b</ca:text> </id> </op> </root> $

However, I miss many of my zsh hotkeys, so I will not make xmlsh my default command shell. But I will certainly use it for scripting XML pipelines.

28.11.2014 12:16
xml : emacs : orgmode : publishing

org-to-xml and org-letter

I created two extremely tiny software projects on githup: org-to-xml and org-letter. One of which is a rip-off, and that is the first: the code of org-to-xml, specifically the code in the org-to-xml.el file, was initially posted on stackexchange, in an answer by user harpo to the question "emacs-org mode and html publishing: how to change structure of generated HTML" by user David Belohrad. I grabbed it from there and changed one or two things so that it works with my Emacs 24.

The second is what I actually wanted to do: generate letters from an org-mode file, using HTML as style or template. To this end i export the content of the org-mode buffer to XML and then process it and the HTML template with XSLT to produce the HTML result. This lets me design my template as is, by editing the plain HTML, with some demo texts and style it with CSS. I give certain elements special meanings, basically the will be replaced by some content from the org-mode file. Obvious candidates are keywords

#+keyword: value 1 2 3

and drawers

:drawer: text a text b :end:

In my setup, and in the example i use a drawer for the address and otherwise keywords. By expending even two stylesheets, i can specify the name of the template to use in the org buffer with a keyword. The first stylesheet simply spits out the value of the keyword and the second then run the actual stylesheet against the HTML template thus selected and the org-to-xml result. Thus i can easily switch between official and personal templates, which are the two i mainly need.

The "main" XSLT stylesheet then treats the "main" content of the buffer and converts it to HTML, using simple rules, though basically only paragraphs, sections and lists are handled currently. Many other features are still lacking. That will be a work in progress.

04.11.2014 15:06
emacs : website

Mastering Emacs

I'm using Emacs for a long time now, but I noticed one problem: I tend to stick with the things I know and only rarely discover any new functionality.

Now I found this site with lots of articles about Emacs' special features:

24.10.2014 11:20
music : home_entertainment

Goodbye XBMC/Kodi/Yatse, Hello mpd/mpc

While the recent rename of XBMC to Kodi did really not raise any of my eyebrowse, the question was resolved for me another way: Before the rename reached the package name of my preferred OS, Debian testing, it stopped working altogether. Reason: My cupboard laptop does not have a graphics card that is supported. Which is a pity, as it did work just before the update. My usage scenario is as follows: start XBMC and close the Laptop, then listen music via the home stereo and remote control XBMC with Yatse. So I'm not interested in graphics at all. But, searching the web quickly made the ugly truth appearent, it will not work without a nice graphics adapter. The minimum requirements are shown here. Which shows us once more that monolithic systems are bad, if not outright evil. Why should the machine that must just decode the files and sent the audio to the jack have a graphics card?

Replacements, any?

Then started the look for a replacement. Google for XBMC alternatives. Found this list of music players, home media centers, etc. with the usual nice little icons indicating support for Linux, Windows, and Mac. But the main question for me is: Does it exist as a package in Debian testing? The usual suspects. Some new faces. For example Enna. Looks nice but not quite what I want.

Then I found it: mpd. How? Well, I typed into Google the search term linux music player remote control and the top result was this page: Another example how good Google can work sometimes. In the last few years I started using DuckDuckGo as often as possible. This means, whenever I feel there is a good chance that the Duck will find what I am looking for. Which is the case for example when I look for something on stackoverflow. However, whenever I have a really complicated search task, or maybe semantically challenging, I tend to go to Google directly. Of course you sometimes need good intuition to ask the right question, which in this case I luckily did.

Setting up mpd

On my work laptop mpd was set up very easily:

  • install mpd and mpc

    sudo aptitude install mpd mpc

    mpd is the daemon and mpc is a console client program

  • Edit file:///etc/mpd.conf and change the setting for the music directory

    music_directory "/home/user/Music"
  • Restart mpd

    sudo service mpd restart
  • To update the library, you can use mpc

    mpc update
  • For remote access, you must also change the TCP listen address in file:///etc/mpd.conf, for example:

    bind_to_address ""

    This allows anyone to connect to the MPD, so this is for a home network only

On my cupboard laptop I needed to figure out the correct setting for the device setting in the audio_output section for ALSA before I could hear anything. It now looks like this:

audio_output { type "alsa" name "My ALSA Device" device "hw:1,0" }

I had to more or less guess and piece together this setting from other examples I saw on the net and by looking at the output of the command aplay -l on my computer. Is there any command that prints the available ALSA devices in the form as in the MPD config?

Using mpd

With mpc

Using mpd with mpc is as easy as

mpc search artist garret album vs | mpc add

which adds the tracks of David Garrett's Garrett Vs. Paganini album, but not the Devil's Violinist soundtrack to the playlist, followed by

mpc play

which starts playback.

With GUI programs

There is a whole series of GUI programs for managing an MPD server, music playlists, etc. I did not have the time to try them all. Have a look at

From a remote computer

On another computer, just set MPD_HOST to the server name where mpd is running:

export MPD_HOST=family_server

and then mpc can be used exactly as on the server.

As a streaming service

In file:///etc/mpd.conf (on the server) just uncomment and edit the audio_output section for the builtin streaming server, for example like this

audio_output { type "httpd" name "My HTTP Stream" port "8987" bind_to_address "" bitrate "128" format "44100:16:2" }

Then you can open the URL http://family_server:8987 with an audio player such as Audacious.

With MPDroid

MPDroid is an app which allows remote control of and streaming from an mpd server, though there seem to be several others. It works just great as a remote control and with the streaming feature I can also hear the music on the phone.

There are many other MPD-related apps in the stores, however. Have a look at



Copyright © 2014-2017 Johannes Willkomm.