From 37620fb0e5ae5eaa54446bb39afba0211929183e Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 12 Jun 2010 00:30:51 +0200 Subject: [PATCH] Script for parsing the official ISO639-2 text into code for iso639.cpp Script by Kazuo Teramoto --- contrib/parse_iso.awk | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 contrib/parse_iso.awk diff --git a/contrib/parse_iso.awk b/contrib/parse_iso.awk new file mode 100755 index 000000000..0d1d7767f --- /dev/null +++ b/contrib/parse_iso.awk @@ -0,0 +1,13 @@ +#!/bin/awk -f + +BEGIN { + FS = "|"; +} + +!/qaa-qtz/ { + printf(" { %-83s \"%s\", %s, %s },\n", "\""$4"\",", $1, $3 ? "\""$3"\"" : "NULL", $2 ? "\""$2"\"" : "NULL "); +} + +END { + printf(" { %-83s %s, %s, %s },\n", "NULL,", "NULL", "NULL", "NULL"); +}