[Pkg-isocodes-devel] r770 - trunk/iso-codes/iso_639

Alastair McKinstry mckinstry at alioth.debian.org
Sat Jan 13 14:56:20 CET 2007


Author: mckinstry
Date: 2007-01-13 14:56:20 +0100 (Sat, 13 Jan 2007)
New Revision: 770

Added:
   trunk/iso-codes/iso_639/iso-fdis-639-tab-parse.py
Removed:
   trunk/iso-codes/iso_639/iso-dis-639-tab-parse.py
Modified:
   trunk/iso-codes/iso_639/Makefile.am
Log:
File name has changed iso-dis-639-tab-parse.py to iso-fdis-639-tab-parse.py , as part2 fields split to 2B and 2T codes.

Modified: trunk/iso-codes/iso_639/Makefile.am
===================================================================
--- trunk/iso-codes/iso_639/Makefile.am	2007-01-13 13:52:43 UTC (rev 769)
+++ trunk/iso-codes/iso_639/Makefile.am	2007-01-13 13:56:20 UTC (rev 770)
@@ -17,7 +17,7 @@
 	                --fields name --outfile $@ iso_639.xml
 
 iso_639_3.xml:
-	$(top_srcdir)/iso_639/iso-dis-639-tab-parse.py 
+	$(top_srcdir)/iso_639/iso-fdis-639-tab-parse.py 
 
 iso_639.tab: iso_639.xml
 	LC_ALL=C $(srcdir)/iso639tab.py $< > iso_639.tab

Deleted: trunk/iso-codes/iso_639/iso-dis-639-tab-parse.py
===================================================================
--- trunk/iso-codes/iso_639/iso-dis-639-tab-parse.py	2007-01-13 13:52:43 UTC (rev 769)
+++ trunk/iso-codes/iso_639/iso-dis-639-tab-parse.py	2007-01-13 13:56:20 UTC (rev 770)
@@ -1,63 +0,0 @@
-#!/usr/bin/env python
-"""
-Parse the SIL.org iso-fdis-639-3_20061114.tab file and create
-an XML file for our own use.
-
-(Originally iso-dis-639-3_20050910.tab)
-"""
-
-f=open("iso-fdis-639-3_20061114.tab")
-
-ot=open("iso_639_3.xml","w")
-
-ot.write("""<?xml version="1.0" encoding="UTF-8" ?>
-
-<!-- iso_639_3.xml							-->
-<!-- 									-->
-<!-- DRAFT DRAFT DRAFT							-->
-<!-- iso-639-3 draft standard						-->
-<!-- WARNING: The contents of this DRAFT standard will not be shipped   -->
-<!-- in iso_639_3.xml in production releases of iso-codes; when the     -->
-<!-- standard is released, the data will probably be folded into        -->
-<!-- iso_639.xml. Please contact mckinstry at debian.org if you have any   -->
-<!-- comments on the format of this data.			        -->
-
-<!DOCTYPE iso_639_3_entries [
-	<!ELEMENT iso_639_3_entries (iso_639_3_entry+)>
-	<!ELEMENT iso_639_3_entry EMPTY>
-	<!ATTLIST iso_639_3_entry
-		id		CDATA	#REQUIRED
-		name		CDATA	#REQUIRED
-		type		CDATA	#REQUIRED
-		scope 		CDATA   #REQUIRED
-		iso_639_1_code	CDATA	#IMPLIED
-		iso_639_2B_code	CDATA	#IMPLIED
-		iso_639_2T_code	CDATA	#IMPLIED
-	>
-]>
-
-<iso_639_3_entries>
-""")
-
-f.readline()		# throw away the header
-for li in f.readlines():
-	(id,part2b,part2t,part1,scope,type,name) = li.split('\t')
-	name  = name.strip()
-	ot.write('\t<iso_639_3_entry\n')
-	ot.write('\t\tid="%s"\n' % id)
-	if part1 != '':
-		ot.write('\t\tiso_639_1_code="%s"\n' % part1)
-	if part2b != '':
-		ot.write('\t\tiso_639_2B_code="%s"\n' % part2b)
-	if part2t != '':
-		ot.write('\t\tiso_639_2T_code="%s"\n' % part2t)
-	ot.write('\t\tscope="%s"\n' % scope)
-	ot.write('\t\ttype="%s"\n' % type)
-	ot.write('\t\tname="%s" />\n' % name)
-
-ot.write('</iso_639_3_entries>')
-ot.close()
-f.close()
-	
-	
-

Copied: trunk/iso-codes/iso_639/iso-fdis-639-tab-parse.py (from rev 769, trunk/iso-codes/iso_639/iso-dis-639-tab-parse.py)




More information about the Pkg-isocodes-devel mailing list