#!/bin/sh
# Copyright (C) 2009 Osamu Aoki <osamu@debian.org>
#
# This is free software with ABSOLUTELY NO WARRANTY.
#
# You can redistribute it and/or modify it under the terms of
# the GNU General Public License version 2 or later.
#
#
set -e
#set -x
echo "sed \\"
while read X 
  do
    Y=$(echo $X | tr "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" "abcdefghijklmnopqrstuvwxyzabcdefghij"| tr -d " \!#\$%()=\-~^|\\/+*,.?;:@\`\"'&><")
    Z=$(echo $Y | sed "s/\(................\).*\(................\)/\1\2/")
    W=$(echo "_$X" | tr "ABCDEFGHIJKLMNOPQRSTUVWXYZ -" "abcdefghijklmnopqrstuvwxyz_"|tr -d " \!#\$%()=\-~^|\\/+*,.?;:@\`\"'&><")
    echo "-e 's/@{@$Y@}@/<<$W>>/' \\"
    if [ $Y != $Z ]; then
      echo "-e 's/@{@$Z@}@/<<$W>>/' \\"
    fi
done
#
#
# vim: set sts=2 ai expandtab:
