This is the archive for October 2007. Recent posts can be found at the main blog page.
Monday, October 1, 2007 ★ 18:10 ★ Category Gnome ★ Permanent url
What is this USA thingy doing in my gnome-screensaver unlock dialog?

I am not in any sense related to the USA… actually, I feel a bit offended by this (well not quite, but I can imagine situations where it would).
Update: several people have pointed out that this is a keyboard layout indicator. I really think this is unacceptable as a default setting. I use only one layout, so it shouldn’t show up in the first place anyway. What about a drop down button with a keyboard icon on it? That would definitely not offend me.
Monday, October 1, 2007 ★ 09:22 ★ Category Programming ★ Permanent url
I’m happy to announce the first (and perhaps even last) version of text-to-freemind, a simple text to FreeMind conversion program, licensed under the GPL.
This program converts tab-indented text files into an XML format suitable for display by FreeMind. It was written out of annoyance with the FreeMind user interface, and the lack of ‘merging’ capabilities when collaborating with other people.
Input like this (indentation should be done using tabs)...
uws
superhero
hacker
gnome
web
...results in:

Usage is like most command line programs. Proceed as below. To convert a single text file into a Freemind file, use:
text-to-freemind input-file.txt.mm > output-file.mm
You can use it as a filter (using shell pipes) as well:
cat some-text-data.mm.txt | text-to-freemind > output-file.mm
A Makefile snippet is also included to convert all *.mm.txt files into their *.mm counterparts. First copy or symlink the makefile, than run make.
cp /path/to/text-to-freemind/text-to-freemind.make Makefile make
Alternatively:
ln -s /path/to/text-to-freemind/text-to-freemind.make Makefile make
Or execute the Makefile directly if you don’t want to copy files around:
/path/to/text-to-freemind/text-to-freemind.make
Of course you have to chmod +x text-to-freemind.make first.
The conversion program is written in Python (tested with 2.4 and 2.5) and requires an ElementTree implementation. Install python-elementtree or python-celementtree (included in Python 2.5) if you run into programs.
The Makefile snippet obviously depends on the make utility. GNU/Make is known to work.
Code is available from the Text-to-Freemind bazaar branch (use bzr branch on that url to get it).
If you don’t feel like messing with version control systems, just copy the text-to-freemind and text-to-freemind.make files somewhere in your $PATH (make sure you set the executable bit on both).
This program is a quick hack, so don’t expect too much of it. If you feel like contacting me with problems or suggestions, please mail me. Thanks.
Update: I’ve improved the error message syntax and the input encoding assumptions (always UTF-8 now).
Random photo from Ireland (February, 2006)
Wouter Bolsterlee, also known as uws, a postmodern geek living in the Netherlands. Read more about me…
Unless stated otherwise, all material on this site is available under a Creative Commons Share-Alike license.