Script for parsing the official ISO639-2 text into code for iso639.cpp

Script by Kazuo Teramoto
This commit is contained in:
Moritz Bunkus 2010-06-12 00:30:51 +02:00
parent 26e409c3d3
commit 37620fb0e5

13
contrib/parse_iso.awk Executable file
View File

@ -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");
}