#!/bin/sh

DIRNAME=`dirname $0`

BASEDIR="$DIRNAME/../.."
PROFILE="$BASEDIR/imipweb/profile.py"

# Match the prefs_table and swap the columns for a table.

echo "|| '''Label''' || '''Setting''' ||"

  grep '^ \+("' "$PROFILE" \
| sed 's/^ \+("\(.*\)".*, \+_("\(.*\)")),$/|| \2 || [[..\/Preferences#\1|\1]] ||/'

# Convert    from...                    to...
#            ("setting" ,   _("label")),
#                                       || label || [[../Preferences#setting|setting]] ||
