[Pkg-isocodes-devel] r914 - in trunk/iso-codes: . iso_639
toddy-guest at alioth.debian.org
toddy-guest at alioth.debian.org
Thu Jun 28 09:34:27 UTC 2007
Author: toddy-guest
Date: 2007-06-28 09:34:27 +0000 (Thu, 28 Jun 2007)
New Revision: 914
Removed:
trunk/iso-codes/iso_639/iso639tab.py
Modified:
trunk/iso-codes/ChangeLog
trunk/iso-codes/iso_639/Makefile.am
Log:
Remove iso639tab.py and iso_639.tab from distribution, as
both files are deprecated and no longer used
Modified: trunk/iso-codes/ChangeLog
===================================================================
--- trunk/iso-codes/ChangeLog 2007-06-28 09:30:34 UTC (rev 913)
+++ trunk/iso-codes/ChangeLog 2007-06-28 09:34:27 UTC (rev 914)
@@ -15,6 +15,8 @@
[Tobias Toedter]
* Don't include iso-codes.pc in the tarball, it is generated
automatically during configuration
+ * Remove iso639tab.py and iso_639.tab from distribution, as
+ both files are deprecated and no longer used
iso-codes 1.1.1
Modified: trunk/iso-codes/iso_639/Makefile.am
===================================================================
--- trunk/iso-codes/iso_639/Makefile.am 2007-06-28 09:30:34 UTC (rev 913)
+++ trunk/iso-codes/iso_639/Makefile.am 2007-06-28 09:34:27 UTC (rev 914)
@@ -5,9 +5,6 @@
xmldir = $(datadir)/xml/iso-codes
xml_DATA = $(DOMAIN).xml iso_639_3.xml
-tabdir = $(datadir)/iso-codes
-tab_DATA = $(DOMAIN).tab
-
pofiles = $(wildcard $(srcdir)/*.po)
mofiles = $(patsubst $(srcdir)/%.po,%.mo, $(pofiles))
noinst_DATA = $(mofiles) iso_639.pot
@@ -21,18 +18,13 @@
iso_639_3.xml:
$(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
-
EXTRA_DIST = \
$(pofiles) \
$(xml_DATA) \
- $(tab_DATA) \
iso_639.pot
MOSTLYCLEANFILES = \
- $(mofiles) \
- $(tab_DATA)
+ $(mofiles)
check-local: check-content
Deleted: trunk/iso-codes/iso_639/iso639tab.py
===================================================================
--- trunk/iso-codes/iso_639/iso639tab.py 2007-06-28 09:30:34 UTC (rev 913)
+++ trunk/iso-codes/iso_639/iso639tab.py 2007-06-28 09:34:27 UTC (rev 914)
@@ -1,87 +0,0 @@
-#!/usr/bin/env python
-#
-# Read iso-codes iso_639.xml data file and output a .tab file
-#
-# Copyright (C) 2005 Alastair McKinstry <mckinstry at debian.org>
-# Released under the GPL.
-# $Id$
-
-from xml.sax import make_parser, SAXException, SAXParseException
-from xml.sax.handler import feature_namespaces, ContentHandler
-import sys, os, getopt, urllib2
-
-lines = []
-class printLines(ContentHandler):
- def __init__(self):
- pass
-
- def startElement(self, name, attrs):
- if name != 'iso_639_entry':
- return
- t_code = attrs.get('iso_639_2T_code', None)
- if t_code == None:
- raise RunTimeError, "Bad file"
- if type(t_code) == unicode:
- t_code = t_code.encode('UTF-8')
- b_code = attrs.get('iso_639_2B_code', None)
- if b_code == None:
- raise RunTimeError, "Bad file"
- if type(b_code) == unicode:
- b_code = b_code.encode('UTF-8')
- name = attrs.get('name', None)
- if name == None:
- raise RunTimeError, " BadFile"
- short_code=attrs.get('iso_639_1_code','XX')
- short_code=short_code.encode('UTF-8')
- if type(name) == unicode:
- name = name.encode('UTF-8')
- lines.append(t_code + '\t' + b_code + '\t' + short_code + '\t' + name + '\n')
-
-##
-## MAIN
-##
-
-
-ofile = sys.stdout
-ofile.write("""
-## iso-639.tab
-##
-## Copyright (C) 2005 Alastair McKinstry <mckinstry at computer.org>
-## Released under the GNU License; see file COPYING for details
-##
-## PLEASE NOTE: THIS FILE IS DEPRECATED AND SCHEDULED TO BE REMOVED.
-## IT IS FOR BACKWARD-COMPATIBILITY ONLY: PLEASE USE THE ISO-639.XML
-## FILE INSTEAD.
-##
-## This file gives a list of all languages in the ISO-639
-## standard, and is used to provide translations (via gettext)
-##
-## Status: ISO 639-2:1998 + additions and changes until 2003-03-05
-## Source: http://lcweb.loc.gov/standards/iso639-2/englangn.html
-##
-## Columns:
-## iso-639-2 terminology code
-## iso-639-2 bibliography code
-## iso-639-1 code (XX if none exists)
-## Name (English)
-##
-##
-""")
-p = make_parser()
-try:
- dh = printLines()
- p.setContentHandler(dh)
- p.parse(sys.argv[1])
-except SAXParseException, e:
- sys.stderr.write('%s:%s:%s: %s\n' % (e.getSystemId(),
- e.getLineNumber(),
- e.getColumnNumber(),
- e.getMessage()))
- sys.exit(1)
-except Exception, e:
- sys.stderr.write('<unknown>: %s\n' % str(e))
- sys.exit(1)
-lines.sort()
-for l in lines:
- ofile.write(l)
-ofile.close()
More information about the Pkg-isocodes-devel
mailing list