lists.arthurdejong.org
RSS feed

python-stdnum commit: r169 - in python-stdnum: . stdnum

[Date Prev][Date Next] [Thread Prev][Thread Next]

python-stdnum commit: r169 - in python-stdnum: . stdnum



Author: arthur
Date: Sun Feb 26 16:19:16 2012
New Revision: 169
URL: http://arthurdejong.org/viewvc/python-stdnum?revision=169&view=revision

Log:
use a script to generate the list of number formats in stdnum

Added:
   python-stdnum/getnumlist.py   (contents, props changed)
Modified:
   python-stdnum/README
   python-stdnum/stdnum/__init__.py

Modified: python-stdnum/README
==============================================================================
--- python-stdnum/README        Sun Feb 26 16:08:37 2012        (r168)
+++ python-stdnum/README        Sun Feb 26 16:19:16 2012        (r169)
@@ -9,68 +9,62 @@
 
 Currently this package supports the following formats:
 
- * ISBN (International Standard Book Number)
- * ISSN (International Standard Serial Number)
- * ISMN (International Standard Music Number)
- * ISAN (International Standard Audiovisual Number)
- * EAN (International Article Number)
- * BSN (Burgerservicenummer, the Dutch national identification number)
- * Onderwijsnummer (Dutch school number)
- * BTW (the Dutch VAT number)
- * CPF (Cadastro de Pessoas Físicas, the Brazillian national identification
-   number)
- * RČ (Rodné číslo, the Slovak and Czech birth number)
- * SIREN (Système d'Identification du Répertoire des Entreprises, a French
-   company identification number)
- * SSN (U.S. Social Security Number)
- * HETU (Finnish personal identity code)
- * CIF (Certificado de Identificación Fiscal, Spanish tax identification
-   number)
- * DNI (Documento nacional de identidad, Spanish personal identity codes)
- * NIE (Número de Identificación de Extranjeros, Spanish identification number
-   for foreigners)
- * CNP (Cod Numeric Personal, Romanian Numerical Personal Code)
- * EGN (ЕГН, Единен граждански номер, Bulgarian personal identity codes)
- * PNF (ЛНЧ, Личен номер на чужденец, Bulgarian personal number of a foreigner)
- * OIB (Osobni identifikacijski broj, Croatian personal identification number)
- * PPS No (Personal Public Service Number, Irish personal number)
- * CPR (personnummer, the Danish citizen number)
- * NIF (Número de Identificación Fiscal, Spanish VAT number)
- * FPA, ΦΠΑ (Foros Prostithemenis Aksias, the Greek VAT number)
- * Ust ID Nr. (Umsatzsteur Identifikationnummer, the German VAT number)
- * BTW, TVA, NWSt (Belgian VAT number)
- * PVN (Pievienotās vērtības nodokļa, Latvian VAT number)
- * CVR (Momsregistreringsnummer, Danish VAT number)
- * TVA (Numéro d'identification à la taxe sur la valeur ajoutée,
-   Luxembourgian VAT number)
- * CF (Cod de înregistrare în scopuri de TVA, Romanian VAT number)
- * Partita IVA (Italian VAT number)
- * Αριθμός Εγγραφής Φ.Π.Α. (Cypriot VAT number)
- * UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number)
- * NIF (Número de identificação fiscal, Portuguese VAT number)
- * IČ DPH (Identifikačné číslo pre daň z pridanej hodnoty, Slovak VAT number)
- * ALV nro (Arvonlisäveronumero, Finnish VAT number)
- * DIČ (Daňové identifikační číslo, Czech VAT number)
- * VAT (Irish VAT number)
- * ANUM (Közösségi adószám, Hungarian VAT number)
- * KMKR (Käibemaksukohuslase, Estonian VAT number)
- * PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT number)
- * TVA (Numéro d'identification à la taxe sur la valeur ajoutée, French
-   VAT number)
- * VAT (Maltese VAT number)
- * NIP (Numer Identyfikacji Podatkowej, Polish VAT number)
- * ID za DDV (Davčna številka, Slovenian VAT number)
- * VAT (Moms, Mervärdesskatt, Swedish VAT number)
- * VAT (United Kingdom (and Isle of Man) VAT registration number)
- * VAT (Идентификационен номер по ДДС, Bulgarian VAT number)
- * VAT (European Union VAT number)
- * IMEI (International Mobile Equipment Identity)
- * IMSI (International Mobile Subscriber Identity)
- * MEID (Mobile Equipment Identifier)
- * GRid (Global Release Identifier)
- * IBAN (International Bank Account Number)
- * ISIL (International Standard Identifier for Libraries and Related
-   Organizations)
+ * UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number).
+ * BTW, TVA, NWSt (Belgian VAT number).
+ * EGN (ЕГН, Единен граждански номер, Bulgarian personal identity codes).
+ * PNF (ЛНЧ, Личен номер на чужденец, Bulgarian number of a foreigner).
+ * VAT (Идентификационен номер по ДДС, Bulgarian VAT number).
+ * CPF (Cadastro de Pessoas Físicas, Brazillian national identifier).
+ * Αριθμός Εγγραφής Φ.Π.Α. (Cypriot VAT number).
+ * DIČ (Daňové identifikační číslo, Czech VAT number).
+ * RČ (Rodné číslo, the Czech birth number).
+ * Ust ID Nr. (Umsatzsteur Identifikationnummer, the German VAT number).
+ * CPR (personnummer, the Danish citizen number).
+ * CVR (Momsregistreringsnummer, Danish VAT number).
+ * EAN (International Article Number).
+ * KMKR (Käibemaksukohuslase, Estonian VAT number).
+ * CIF (Certificado de Identificación Fiscal, Spanish company tax number).
+ * DNI (Documento nacional de identidad, Spanish personal identity codes).
+ * NIE (Número de Identificación de Extranjeros, Spanish foreigner number).
+ * NIF (Número de Identificación Fiscal, Spanish VAT number).
+ * VAT (European Union VAT number).
+ * ALV nro (Arvonlisäveronumero, Finnish VAT number).
+ * HETU (Henkilötunnus, Finnish personal identity code).
+ * SIREN (a French company identification number).
+ * n° TVA (taxe sur la valeur ajoutée, French VAT number).
+ * VAT (United Kingdom (and Isle of Man) VAT registration number).
+ * FPA, ΦΠΑ (Foros Prostithemenis Aksias, the Greek VAT number).
+ * GRid (Global Release Identifier).
+ * OIB (Osobni identifikacijski broj, Croatian identification number).
+ * ANUM (Közösségi adószám, Hungarian VAT number).
+ * IBAN (International Bank Account Number).
+ * PPS No (Personal Public Service Number, Irish personal number).
+ * VAT (Irish VAT number).
+ * IMEI (International Mobile Equipment Identity).
+ * IMSI (International Mobile Subscriber Identity).
+ * ISAN (International Standard Audiovisual Number).
+ * ISBN (International Standard Book Number).
+ * ISIL (International Standard Identifier for Libraries).
+ * ISMN (International Standard Music Number).
+ * ISSN (International Standard Serial Number).
+ * Partita IVA (Italian VAT number).
+ * PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT number).
+ * TVA (taxe sur la valeur ajoutée, Luxembourgian VAT number).
+ * PVN (Pievienotās vērtības nodokļa, Latvian VAT number).
+ * MEID (Mobile Equipment Identifier).
+ * VAT (Maltese VAT number).
+ * BSN (Burgerservicenummer, the Dutch national identification number).
+ * BTW-nummer (Omzetbelastingnummer, the Dutch VAT number).
+ * Onderwijsnummer (Dutch school number).
+ * NIP (Numer Identyfikacji Podatkowej, Polish VAT number).
+ * NIF (Número de identificação fiscal, Portuguese VAT number).
+ * CF (Cod de înregistrare în scopuri de TVA, Romanian VAT number).
+ * CNP (Cod Numeric Personal, Romanian Numerical Personal Code).
+ * VAT (Moms, Mervärdesskatt, Swedish VAT number).
+ * ID za DDV (Davčna številka, Slovenian VAT number).
+ * IČ DPH (IČ pre daň z pridanej hodnoty, Slovak VAT number).
+ * RČ (Rodné číslo, the Slovak birth number).
+ * SSN (U.S. Social Security Number).
 
 Furthermore a number of generic check digit algorithms are available:
 

Added: python-stdnum/getnumlist.py
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ python-stdnum/getnumlist.py Sun Feb 26 16:19:16 2012        (r169)
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+
+# getnumlist.py - script to get a list of number formats in stdnum
+#
+# Copyright (C) 2012 Arthur de Jong
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
+
+"""This script uses introspection to present a list of number formats
+suitable to be included in the README and stdnum packag description."""
+
+import pydoc
+
+from stdnum import util
+
+
+# these are excluded
+algortihms = ('stdnum.verhoeff', 'stdnum.luhn', 'stdnum.iso7064')
+
+
+def get_number_name(module):
+    """Return the short description of the number module."""
+    return pydoc.splitdoc(pydoc.getdoc(module))[0]
+
+
+if __name__ == '__main__':
+    print 'Currently this package supports the following formats:'
+    print ''
+    for module in util.get_number_modules():
+        if module.__name__ not in algortihms and \
+           not module.__name__.startswith('stdnum.iso7064'):
+             print ' * %s' % get_number_name(module)

Modified: python-stdnum/stdnum/__init__.py
==============================================================================
--- python-stdnum/stdnum/__init__.py    Sun Feb 26 16:08:37 2012        (r168)
+++ python-stdnum/stdnum/__init__.py    Sun Feb 26 16:19:16 2012        (r169)
@@ -25,68 +25,62 @@
 
 Currently this package supports the following formats:
 
- * ISBN (International Standard Book Number)
- * ISSN (International Standard Serial Number)
- * ISMN (International Standard Music Number)
- * ISAN (International Standard Audiovisual Number)
- * EAN (International Article Number)
- * BSN (Burgerservicenummer, the Dutch national identification number)
- * Onderwijsnummer (Dutch school number)
- * BTW (the Dutch VAT number)
- * CPF (Cadastro de Pessoas Físicas, the Brazillian national identification
-   number)
- * RČ (Rodné číslo, the Slovak and Czech birth number)
- * SIREN (Système d'Identification du Répertoire des Entreprises, a French
-   company identification number)
- * SSN (U.S. Social Security Number)
- * HETU (Finnish personal identity code)
- * CIF (Certificado de Identificación Fiscal, Spanish tax identification
-   number)
- * DNI (Documento nacional de identidad, Spanish personal identity codes)
- * NIE (Número de Identificación de Extranjeros, Spanish identification number
-   for foreigners)
- * CNP (Cod Numeric Personal, Romanian Numerical Personal Code)
- * EGN (ЕГН, Единен граждански номер, Bulgarian personal identity codes)
- * PNF (ЛНЧ, Личен номер на чужденец, Bulgarian personal number of a foreigner)
- * OIB (Osobni identifikacijski broj, Croatian personal identification number)
- * PPS No (Personal Public Service Number, Irish personal number)
- * CPR (personnummer, the Danish citizen number)
- * NIF (Número de Identificación Fiscal, Spanish VAT number)
- * FPA, ΦΠΑ (Foros Prostithemenis Aksias, the Greek VAT number)
- * Ust ID Nr. (Umsatzsteur Identifikationnummer, the German VAT number)
- * BTW, TVA, NWSt (Belgian VAT number)
- * PVN (Pievienotās vērtības nodokļa, Latvian VAT number)
- * CVR (Momsregistreringsnummer, Danish VAT number)
- * TVA (Numéro d'identification à la taxe sur la valeur ajoutée,
-   Luxembourgian VAT number)
- * CF (Cod de înregistrare în scopuri de TVA, Romanian VAT number)
- * Partita IVA (Italian VAT number)
- * Αριθμός Εγγραφής Φ.Π.Α. (Cypriot VAT number)
- * UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number)
- * NIF (Número de identificação fiscal, Portuguese VAT number)
- * IČ DPH (Identifikačné číslo pre daň z pridanej hodnoty, Slovak VAT number)
- * ALV nro (Arvonlisäveronumero, Finnish VAT number)
- * DIČ (Daňové identifikační číslo, Czech VAT number)
- * VAT (Irish VAT number)
- * ANUM (Közösségi adószám, Hungarian VAT number)
- * KMKR (Käibemaksukohuslase, Estonian VAT number)
- * PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT number)
- * TVA (Numéro d'identification à la taxe sur la valeur ajoutée, French
-   VAT number)
- * VAT (Maltese VAT number)
- * NIP (Numer Identyfikacji Podatkowej, Polish VAT number)
- * ID za DDV (Davčna številka, Slovenian VAT number)
- * VAT (Moms, Mervärdesskatt, Swedish VAT number)
- * VAT (United Kingdom (and Isle of Man) VAT registration number)
- * VAT (Идентификационен номер по ДДС, Bulgarian VAT number)
- * VAT (European Union VAT number)
- * IMEI (International Mobile Equipment Identity)
- * IMSI (International Mobile Subscriber Identity)
- * MEID (Mobile Equipment Identifier)
- * GRid (Global Release Identifier)
- * IBAN (International Bank Account Number)
- * ISIL (International Standard Identifier for Libraries and Related
-   Organizations)
+ * UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number).
+ * BTW, TVA, NWSt (Belgian VAT number).
+ * EGN (ЕГН, Единен граждански номер, Bulgarian personal identity codes).
+ * PNF (ЛНЧ, Личен номер на чужденец, Bulgarian number of a foreigner).
+ * VAT (Идентификационен номер по ДДС, Bulgarian VAT number).
+ * CPF (Cadastro de Pessoas Físicas, Brazillian national identifier).
+ * Αριθμός Εγγραφής Φ.Π.Α. (Cypriot VAT number).
+ * DIČ (Daňové identifikační číslo, Czech VAT number).
+ * RČ (Rodné číslo, the Czech birth number).
+ * Ust ID Nr. (Umsatzsteur Identifikationnummer, the German VAT number).
+ * CPR (personnummer, the Danish citizen number).
+ * CVR (Momsregistreringsnummer, Danish VAT number).
+ * EAN (International Article Number).
+ * KMKR (Käibemaksukohuslase, Estonian VAT number).
+ * CIF (Certificado de Identificación Fiscal, Spanish company tax number).
+ * DNI (Documento nacional de identidad, Spanish personal identity codes).
+ * NIE (Número de Identificación de Extranjeros, Spanish foreigner number).
+ * NIF (Número de Identificación Fiscal, Spanish VAT number).
+ * VAT (European Union VAT number).
+ * ALV nro (Arvonlisäveronumero, Finnish VAT number).
+ * HETU (Henkilötunnus, Finnish personal identity code).
+ * SIREN (a French company identification number).
+ * n° TVA (taxe sur la valeur ajoutée, French VAT number).
+ * VAT (United Kingdom (and Isle of Man) VAT registration number).
+ * FPA, ΦΠΑ (Foros Prostithemenis Aksias, the Greek VAT number).
+ * GRid (Global Release Identifier).
+ * OIB (Osobni identifikacijski broj, Croatian identification number).
+ * ANUM (Közösségi adószám, Hungarian VAT number).
+ * IBAN (International Bank Account Number).
+ * PPS No (Personal Public Service Number, Irish personal number).
+ * VAT (Irish VAT number).
+ * IMEI (International Mobile Equipment Identity).
+ * IMSI (International Mobile Subscriber Identity).
+ * ISAN (International Standard Audiovisual Number).
+ * ISBN (International Standard Book Number).
+ * ISIL (International Standard Identifier for Libraries).
+ * ISMN (International Standard Music Number).
+ * ISSN (International Standard Serial Number).
+ * Partita IVA (Italian VAT number).
+ * PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT number).
+ * TVA (taxe sur la valeur ajoutée, Luxembourgian VAT number).
+ * PVN (Pievienotās vērtības nodokļa, Latvian VAT number).
+ * MEID (Mobile Equipment Identifier).
+ * VAT (Maltese VAT number).
+ * BSN (Burgerservicenummer, the Dutch national identification number).
+ * BTW-nummer (Omzetbelastingnummer, the Dutch VAT number).
+ * Onderwijsnummer (Dutch school number).
+ * NIP (Numer Identyfikacji Podatkowej, Polish VAT number).
+ * NIF (Número de identificação fiscal, Portuguese VAT number).
+ * CF (Cod de înregistrare în scopuri de TVA, Romanian VAT number).
+ * CNP (Cod Numeric Personal, Romanian Numerical Personal Code).
+ * VAT (Moms, Mervärdesskatt, Swedish VAT number).
+ * ID za DDV (Davčna številka, Slovenian VAT number).
+ * IČ DPH (IČ pre daň z pridanej hodnoty, Slovak VAT number).
+ * RČ (Rodné číslo, the Slovak birth number).
+ * SSN (U.S. Social Security Number).
 
 Furthermore a number of generic check digit algorithms are available:
 
-- 
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/python-stdnum-commits/