%global _empty_manifest_terminate_build 0 Name: python-norwegian-numbers Version: 1.0.2 Release: 1 Summary: Make and verify official Norwegian numbers like: KID-nummer, organisasjonsnummer, fødselsnummer, kontonummer License: MIT URL: https://github.com/Ondkloss/norwegian-numbers Source0: https://mirrors.nju.edu.cn/pypi/web/packages/5c/96/1ca91a00e587b066a2c8001a6a4659db8bc60608035e945355808e80890e/norwegian-numbers-1.0.2.tar.gz BuildArch: noarch %description # Norwegian numbers [![PyPI](https://img.shields.io/pypi/v/norwegian-numbers.svg)](https://pypi.org/project/norwegian-numbers) [![Build Status](https://travis-ci.com/Ondkloss/norwegian-numbers.svg?branch=master)](https://travis-ci.com/Ondkloss/norwegian-numbers) [![Coverage Status](https://coveralls.io/repos/github/Ondkloss/norwegian-numbers/badge.svg?branch=master)](https://coveralls.io/github/Ondkloss/norwegian-numbers?branch=master) [![License](https://img.shields.io/pypi/l/norwegian-numbers.svg)](https://github.com/Ondkloss/norwegian-numbers/blob/master/LICENSE) Make and verify official Norwegian numbers: * KID-nummer: `make_kid_number` and `verify_kid_number` * Organisasjonsnummer: `make_organisation_number` and `verify_organisation_number` * Fødselsnummer: `make_birth_number` and `verify_birth_number` * Kontonummer: `make_account_number` and `verify_account_number` This currently only concerns itself with the control digits. ## Installation To install from PyPi as a module in your environment: pip install norwegian-numbers To install from source as a module in your environment: python setup.py install ## Code usage from installation Example code usages after installation: >>> import norwegian_numbers as nn >>> nn.make_kid_number('1234', 'mod10') '12344' >>> nn.verify_kid_number('12344', 'mod10') True >>> nn.make_account_number('1234567890') '12345678903' >>> nn.make_organisation_number('12345678') '123456785' >>> nn.make_birth_number('311299567') '31129956715' ## Running from command line Usage from command line: $ python -m norwegian_numbers --help usage: __main__.py [-h] (-m {kid10,kid11,organisation,birth,account} | -v {kid10,kid11,organisation,birth,account}) value Generate or verify KID-nummer, organisasjonsnummer, fødselsnummer, kontonummer positional arguments: value The value to make or verify based on optional arguments: -h, --help show this help message and exit -m {kid10,kid11,organisation,birth,account}, --make {kid10,kid11,organisation,birth,account} Choose what to make -v {kid10,kid11,organisation,birth,account}, --verify {kid10,kid11,organisation,birth,account} Choose what to verify Example usage: $ python -m norwegian_numbers -m kid10 1234 12344 $ python -m norwegian_numbers -v kid10 12344 True $ python -m norwegian_numbers -m account 1234567890 12345678903 $ python -m norwegian_numbers -m organisation 12345678 123456785 $ python -m norwegian_numbers -m birth 311299567 31129956715 ## Testing from source To run the tests: python -m unittest discover Or if you have tox: tox Or for coverage (with html report): coverage run -m unittest discover coverage html ## Sources Some sources on the background material: * [KID-nummer](https://no.wikipedia.org/wiki/KID-nummer) * [Fødselsnummer](https://no.wikipedia.org/wiki/F%C3%B8dselsnummer) * [Organisasjonsnummer](https://no.wikipedia.org/wiki/Organisasjonsnummer) * [Kontonummer](https://no.wikipedia.org/wiki/Kontonummer) * [MOD10](https://no.wikipedia.org/wiki/MOD10) * [MOD11](https://no.wikipedia.org/wiki/MOD11) ## Distribution The distribution was created by the following commands: python setup.py sdist bdist_wheel python -m twine upload dist/* %package -n python3-norwegian-numbers Summary: Make and verify official Norwegian numbers like: KID-nummer, organisasjonsnummer, fødselsnummer, kontonummer Provides: python-norwegian-numbers BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-norwegian-numbers # Norwegian numbers [![PyPI](https://img.shields.io/pypi/v/norwegian-numbers.svg)](https://pypi.org/project/norwegian-numbers) [![Build Status](https://travis-ci.com/Ondkloss/norwegian-numbers.svg?branch=master)](https://travis-ci.com/Ondkloss/norwegian-numbers) [![Coverage Status](https://coveralls.io/repos/github/Ondkloss/norwegian-numbers/badge.svg?branch=master)](https://coveralls.io/github/Ondkloss/norwegian-numbers?branch=master) [![License](https://img.shields.io/pypi/l/norwegian-numbers.svg)](https://github.com/Ondkloss/norwegian-numbers/blob/master/LICENSE) Make and verify official Norwegian numbers: * KID-nummer: `make_kid_number` and `verify_kid_number` * Organisasjonsnummer: `make_organisation_number` and `verify_organisation_number` * Fødselsnummer: `make_birth_number` and `verify_birth_number` * Kontonummer: `make_account_number` and `verify_account_number` This currently only concerns itself with the control digits. ## Installation To install from PyPi as a module in your environment: pip install norwegian-numbers To install from source as a module in your environment: python setup.py install ## Code usage from installation Example code usages after installation: >>> import norwegian_numbers as nn >>> nn.make_kid_number('1234', 'mod10') '12344' >>> nn.verify_kid_number('12344', 'mod10') True >>> nn.make_account_number('1234567890') '12345678903' >>> nn.make_organisation_number('12345678') '123456785' >>> nn.make_birth_number('311299567') '31129956715' ## Running from command line Usage from command line: $ python -m norwegian_numbers --help usage: __main__.py [-h] (-m {kid10,kid11,organisation,birth,account} | -v {kid10,kid11,organisation,birth,account}) value Generate or verify KID-nummer, organisasjonsnummer, fødselsnummer, kontonummer positional arguments: value The value to make or verify based on optional arguments: -h, --help show this help message and exit -m {kid10,kid11,organisation,birth,account}, --make {kid10,kid11,organisation,birth,account} Choose what to make -v {kid10,kid11,organisation,birth,account}, --verify {kid10,kid11,organisation,birth,account} Choose what to verify Example usage: $ python -m norwegian_numbers -m kid10 1234 12344 $ python -m norwegian_numbers -v kid10 12344 True $ python -m norwegian_numbers -m account 1234567890 12345678903 $ python -m norwegian_numbers -m organisation 12345678 123456785 $ python -m norwegian_numbers -m birth 311299567 31129956715 ## Testing from source To run the tests: python -m unittest discover Or if you have tox: tox Or for coverage (with html report): coverage run -m unittest discover coverage html ## Sources Some sources on the background material: * [KID-nummer](https://no.wikipedia.org/wiki/KID-nummer) * [Fødselsnummer](https://no.wikipedia.org/wiki/F%C3%B8dselsnummer) * [Organisasjonsnummer](https://no.wikipedia.org/wiki/Organisasjonsnummer) * [Kontonummer](https://no.wikipedia.org/wiki/Kontonummer) * [MOD10](https://no.wikipedia.org/wiki/MOD10) * [MOD11](https://no.wikipedia.org/wiki/MOD11) ## Distribution The distribution was created by the following commands: python setup.py sdist bdist_wheel python -m twine upload dist/* %package help Summary: Development documents and examples for norwegian-numbers Provides: python3-norwegian-numbers-doc %description help # Norwegian numbers [![PyPI](https://img.shields.io/pypi/v/norwegian-numbers.svg)](https://pypi.org/project/norwegian-numbers) [![Build Status](https://travis-ci.com/Ondkloss/norwegian-numbers.svg?branch=master)](https://travis-ci.com/Ondkloss/norwegian-numbers) [![Coverage Status](https://coveralls.io/repos/github/Ondkloss/norwegian-numbers/badge.svg?branch=master)](https://coveralls.io/github/Ondkloss/norwegian-numbers?branch=master) [![License](https://img.shields.io/pypi/l/norwegian-numbers.svg)](https://github.com/Ondkloss/norwegian-numbers/blob/master/LICENSE) Make and verify official Norwegian numbers: * KID-nummer: `make_kid_number` and `verify_kid_number` * Organisasjonsnummer: `make_organisation_number` and `verify_organisation_number` * Fødselsnummer: `make_birth_number` and `verify_birth_number` * Kontonummer: `make_account_number` and `verify_account_number` This currently only concerns itself with the control digits. ## Installation To install from PyPi as a module in your environment: pip install norwegian-numbers To install from source as a module in your environment: python setup.py install ## Code usage from installation Example code usages after installation: >>> import norwegian_numbers as nn >>> nn.make_kid_number('1234', 'mod10') '12344' >>> nn.verify_kid_number('12344', 'mod10') True >>> nn.make_account_number('1234567890') '12345678903' >>> nn.make_organisation_number('12345678') '123456785' >>> nn.make_birth_number('311299567') '31129956715' ## Running from command line Usage from command line: $ python -m norwegian_numbers --help usage: __main__.py [-h] (-m {kid10,kid11,organisation,birth,account} | -v {kid10,kid11,organisation,birth,account}) value Generate or verify KID-nummer, organisasjonsnummer, fødselsnummer, kontonummer positional arguments: value The value to make or verify based on optional arguments: -h, --help show this help message and exit -m {kid10,kid11,organisation,birth,account}, --make {kid10,kid11,organisation,birth,account} Choose what to make -v {kid10,kid11,organisation,birth,account}, --verify {kid10,kid11,organisation,birth,account} Choose what to verify Example usage: $ python -m norwegian_numbers -m kid10 1234 12344 $ python -m norwegian_numbers -v kid10 12344 True $ python -m norwegian_numbers -m account 1234567890 12345678903 $ python -m norwegian_numbers -m organisation 12345678 123456785 $ python -m norwegian_numbers -m birth 311299567 31129956715 ## Testing from source To run the tests: python -m unittest discover Or if you have tox: tox Or for coverage (with html report): coverage run -m unittest discover coverage html ## Sources Some sources on the background material: * [KID-nummer](https://no.wikipedia.org/wiki/KID-nummer) * [Fødselsnummer](https://no.wikipedia.org/wiki/F%C3%B8dselsnummer) * [Organisasjonsnummer](https://no.wikipedia.org/wiki/Organisasjonsnummer) * [Kontonummer](https://no.wikipedia.org/wiki/Kontonummer) * [MOD10](https://no.wikipedia.org/wiki/MOD10) * [MOD11](https://no.wikipedia.org/wiki/MOD11) ## Distribution The distribution was created by the following commands: python setup.py sdist bdist_wheel python -m twine upload dist/* %prep %autosetup -n norwegian-numbers-1.0.2 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-norwegian-numbers -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue May 30 2023 Python_Bot - 1.0.2-1 - Package Spec generated