Example #1
0
algortihms = (
    'stdnum.verhoeff', 'stdnum.luhn', 'stdnum.iso7064', 'stdnum.damm')


def get_number_modules():
    """Provides the number modules that are not algorithms."""
    for module in util.get_number_modules():
        if module.__name__ not in algortihms and \
           not module.__name__.startswith('stdnum.iso7064'):
            yield module

if __name__ == '__main__':
    print 'For README:'
    print ''
    for module in get_number_modules():
        print ' * %s' % util.get_module_name(module)
    print ''
    print 'For stdnum/__init__.py:'
    print ''
    for module in get_number_modules():
        print '* %s: %s' % (
            module.__name__.replace('stdnum.', ''),
            util.get_module_name(module),
        )
    print ''
    print 'For docs/index.rst:'
    print ''
    for module in get_number_modules():
        print '   %s' % module.__name__.replace('stdnum.', '')
    print ''
    print 'For formats.xml:'
Example #2
0

# these are excluded
algortihms = (
    'stdnum.verhoeff', 'stdnum.luhn', 'stdnum.iso7064', 'stdnum.damm')


def get_number_modules():
    """Provide the number modules that are not algorithms."""
    for module in util.get_number_modules():
        if module.__name__ not in algortihms and \
           not module.__name__.startswith('stdnum.iso7064'):
            yield module


if __name__ == '__main__':
    print('For README:')
    print('')
    for module in get_number_modules():
        print(' * %s' % util.get_module_name(module))
    print('')
    print('For docs/index.rst:')
    print('')
    for module in get_number_modules():
        print('   %s' % module.__name__.replace('stdnum.', ''))
    print('')
    print('For formats.xml:')
    print('')
    for module in get_number_modules():
        print('  <li>%s</li>' % util.get_module_name(module))
Example #3
0
algortihms = ('stdnum.verhoeff', 'stdnum.luhn', 'stdnum.iso7064')


def get_number_modules():
    """Provides the number modules that are not algorithms."""
    for module in util.get_number_modules():
        if module.__name__ not in algortihms and \
           not module.__name__.startswith('stdnum.iso7064'):
            yield module


if __name__ == '__main__':
    print 'For README:'
    print ''
    for module in get_number_modules():
        print ' * %s' % util.get_module_name(module)
    print ''
    print 'For stdnum/__init__.py:'
    print ''
    for module in get_number_modules():
        print ' * %s: %s' % (
            module.__name__.replace('stdnum.', ''),
            util.get_module_name(module),
        )
    print ''
    print 'For docs/index.rst:'
    print ''
    for module in get_number_modules():
        print '   %s' % module.__name__.replace('stdnum.', '')
    print ''
    print 'For index.xml:'