box.matto.nl
Enjoying Open Source Software

Awkiawki: a light weight wiki as your personal wiki

awkiawki is written in awk

2015 and still talking about wiki?

Wiki seems to be something of the dark ages. They were popular about 10 years ago. So why bother talking about a wiki, let alone installing a wiki?

It seems the entire internet has become reduced to only a few vectors, like Facebook, GooglePlus and Evernote. So why bother setting up a wiki?

When you start using a personal wiki it will quickly become a real treasure. A wiki gives you the opportunity to quickly add a new page and link from one to the other. You can make as many links and back- links as you like. All your stuff is in it, and you can switch quickly from one item to another. Make sure your wiki saves its data as plain text files, so you can use powertools like grep on it.

Hierarchies can get in the way

Most wikis are unstructured, this means all your wiki files are in one big pool without any subdirectories. On first glance this seems to be a bad thing. However, the data is not on paper but in files so you can use things like grep to find what you need. Also unstructured actually helps in assosiative thinking. A wiki does not commit you to any hierarchical structure at any point, though you can introduce it through a ordered system of categories with category backlinks, see http://c2.com/cgi/wiki?CategoryCategory.

Some people use their wiki as Zettelkasten (see http://takingnotenow.blogspot.nl/2007/12/luhmanns-zettelkasten.htm). Every thought and every idea will be a small wiki note, interconnected to one or more other notes. While your knowledge-base and idea-base grows the interlinks grow exponential, giving you much opportunity to get inspired with new insights and new ideas. Even Jules Verne worked like this, leaving a collection of 25000 fact cards (see http://www.spiegel.de/spiegel/print/d-46407320.html,German ) after his death. See also this pdf (English) at Bristol reads:. http://www.bristolreads.com/around_the_world/download_files/jules_verne.pdf.

Read more on Wikipedia page on Zettelkasten, https://de.wikipedia.org/wiki/Zettelkasten (German).

But perhaps your usage could be more modest, with just a few notes how to use your bash-shell or when your car has it last maintenance service. No matter what your kind of use is, a wiki should be fast, easy and must make it very easy to add new pages. Some people have a few issues with the use of CamelCase to add new pages, but this is something you will grow into without much trouble.

Light weight personal wiki

When you are a vi-user (or better: a vi-lover) then you sure want to use Vimwiki. However, sometimes you want a a wiki that is available over the internet and can be used from within a browser. Vimwiki let you export your wiki to html, but does not give a solution for interaction over the internet like editing or adding pages.

A personal wiki is great for keeping all your notes together.

There are many wikis available. My personal requirements are:

  • Must be light weight
  • Wiki data in flat files with plain Markdown-like syntax

Light weight wiki

In most use cases, a light weight wiki is just as good as a not-so- light wiki. You almost never need the extra options of the more heavier wiki products. Perhaps if you want to use attachments or a lot of images a more feature-loaded wiki could be a better option. But if you want a personal wiki for mostly note taking, a light weight wiki will do fine.

I like small boards like the Raspberry Pi and the BeagleBone Black. When you want to deploy a wiki on such small boards, then light weight is really important.

I run my awkiawki on a Raspberry Pi with the data on the SD-card, and this setup up turns out to be fast enough for real daily usage.

Plain text files

It is important that your wiki saves the wiki files as plain text files.

  • First, we all love the power of plain text, see http://c2.com/cgi/wiki?PowerOfPlainText.
  • You can all use all the text power tools on plain text files, see http://www.ibm.com/developerworks/linux/tutorials/l-gnutex/
  • Plain text is great for revision control systems.
  • Future-proof: A wiki in plain text markdown-like files is easy to port to another wiki.
  • Ease of use: Plain text files are easy to edit, so you can edit your wiki both from your browser as well as from your editor

awkiawki

Awkiawki is a wiki that uses awk. It is very light (about 300 lines of code) and is very fast. See http://awkiawki.bogosoft.com/.

Awk is available on all the Unix like operating systems, like FreeBSD, OpenBSD and Linux so you can run awkiawki anywhere. Just add a webserver like lighttpd or apache.

Awkiawki saves the wiki files just as plain flat files.

Revisions and page history

Awkiawki can put your wiki files on revison control. Simply put a line with the following contents in your conf file:

rcs=true

Also a sub-directory named RCS in your data directory, and make sure you have rcs installed.

When you have enabled rcs like this then Awkiawki will put a link PageHistory under each page, which give you a list with the revison versions and some options to view different versions and diffs.

Search in the contents of your wiki

As light weight as it is, awkiawki comes with a powerful search feature. On the right hand side of the bottom of your wiki pages is a small input field with a search button. Type something in the input field, hit the search button and you will be prompted with a list of wiki pages containing the string you typed in the input box.

Syntax

It seems like every wiki must invent its own syntax.

Fortunately, Awkiawki uses a classic wiki syntax. If you don't like that, the code of awkiawki is easy to read so you can do some changes to make it more to your liking.

I made some changes to match the syntax to some other wiki systems that I use or have used.

Also, adding support for tables is not very complicated, see the page of JW Stumpel http://jw-stumpel.nl/a-wiki-on-a-home-gateway He shows a lot more changes to awkiawki, but you don't have to do all of this, Awkiawki is a great wiki right out of the box (a.k.a. tab-ball).

Commit to git

I like the PageHistory option and have enabled RCS. However, I still run a small shell script that automatically commits any changes to my central git repository. That way I know that the information in my wiki will be in my backup :)

Coexistence with vimwiki

I still use vimwiki as my main solution for my notes. Vimwiki uses the power of Vim, and the diary option is a great solution for connecting notes to dates.

The use of awkiawki allows my to have a wiki that can be used over the internet with a browser on a laptop, tablet or even a smartphone.

So I am thinking about a solution to integrate both wikis. Vimwiki has its own syntax and adds an extension to the filenames. So running vimwiki on the same files as the awkiawki is not possible.

Just start

Remember to Do The Simplest Thing That Could Possibly Work. keep it small, keep it simple. And just start!

Install a light weight wiki with flat plain text files and start using it. Soon you wonder how you ever lived without your wiki ...

Tags:

⇽ $HOME in ramdisk on FreeBSD The almost forgotten art of procmail with fetchmail ⇾