You're viewing a single post. I have much more to say! The main blog page is a good starting point.
Monday, October 1, 2007 ★ 09:22 ★ Category Programming
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
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
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:
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-celementtree (included in Python 2.5) if you run into programs.
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.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).
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.