pax_global_header00006660000000000000000000000064146172362100014514gustar00rootroot0000000000000052 comment=1d7d414abfa2c4bb924b4f3762ae12b33165c324 babelfish-0.6.1/000077500000000000000000000000001461723621000134375ustar00rootroot00000000000000babelfish-0.6.1/.github/000077500000000000000000000000001461723621000147775ustar00rootroot00000000000000babelfish-0.6.1/.github/workflows/000077500000000000000000000000001461723621000170345ustar00rootroot00000000000000babelfish-0.6.1/.github/workflows/publish.yml000066400000000000000000000007061461723621000212300ustar00rootroot00000000000000name: Publish on: release: types: - created jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install poetry run: pipx install poetry - uses: actions/setup-python@v5 with: python-version: 3.12 cache: poetry - run: poetry install - run: poetry publish --build env: POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} babelfish-0.6.1/.github/workflows/test.yml000066400000000000000000000010141461723621000205320ustar00rootroot00000000000000name: Test on: push: branches: - main pull_request: branches: - main jobs: test: runs-on: ubuntu-latest strategy: matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - name: Install poetry run: pipx install poetry - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: poetry - run: poetry install - run: poetry run pytest babelfish-0.6.1/.gitignore000066400000000000000000000006211461723621000154260ustar00rootroot00000000000000*.py[cod] # Packages *.egg *.egg-info dist build eggs parts bin var sdist develop-eggs .installed.cfg lib lib64 # Installer logs pip-log.txt # Unit test / coverage reports .coverage .tox nosetests.xml coverage.xml # Translations *.mo # Mr Developer .mr.developer.cfg # Pydev .project .pydevproject .settings # Rope .ropeproject # PyCharm .idea # Sphinx docs/_build # direnv .direnv/ .envrc babelfish-0.6.1/.gitmodules000066400000000000000000000001501461723621000156100ustar00rootroot00000000000000[submodule "docs/_themes"] path = docs/_themes url = git://github.com/Diaoul/diaoul-sphinx-themes.git babelfish-0.6.1/CHANGELOG.md000066400000000000000000000040631461723621000152530ustar00rootroot00000000000000# Changelog ## 0.6.1 **release date:** 2024-05-09 * Bump dependencies * Replace pkg_resources with importlib ## 0.6.0 **release date:** 2021-08-09 **WARNING:** Backward incompatible changes * Use poetry as build system * Use pytest as test runner * Move documentation to README * Use GitHub Actions CI ## 0.5.5 **release date:** 2015-10-31 * Fix hasattr on Country object when called with an invalid attribute ## 0.5.4 **release date:** 2015-01-24 * Fix setuptools deprecation warning ## 0.5.3 **release date:** 2014-06-22 * Better equality semantics for Language, Country, Script ## 0.5.2 **release date:** 2014-05-25 * BabelFish objects (Language, Country, Script) are now picklable * Added support for Python 3.4 ## 0.5.1 **release date:** 2014-01-26 * Add a register method to ConverterManager to register without loading ## 0.5.0 **release date:** 2014-01-25 **WARNING:** Backward incompatible changes * Simplify converter management with ConverterManager class * Make babelfish usable in place * Add Python 2.6 / 3.2 compatibility ## 0.4.0 **release date:** 2013-11-21 **WARNING:** Backward incompatible changes * Add converter support for Country * Language/country reverse name detection is now case-insensitive * Add alpha3t, scope and type converters * Use lazy loading of converters ## 0.3.0 **release date:** 2013-11-09 * Add support for scripts * Improve built-in converters * Add support for ietf ## 0.2.1 **release date:** 2013-11-03 * Fix reading of data files ## 0.2.0 **release date:** 2013-10-31 * Add str method * More explicit exceptions * Change repr format to use ascii only ## 0.1.5 **release date:** 2013-10-21 * Add a fromcode method on Language class * Add a codes attribute on converters ## 0.1.4 **release date:** 2013-10-20 * Fix converters not raising NoConversionError ## 0.1.3 **release date:** 2013-09-29 * Fix source distribution ## 0.1.2 **release date:** 2013-09-29 * Add missing files to source distribution ## 0.1.1 **release date:** 2013-09-28 * Fix python3 support ## 0.1 **release date:** 2013-09-28 * Initial version babelfish-0.6.1/LICENSE000066400000000000000000000027711461723621000144530ustar00rootroot00000000000000Copyright (c) 2015, by the respective authors (see AUTHORS file). All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the BabelFish authors nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. babelfish-0.6.1/README.md000066400000000000000000000034321461723621000147200ustar00rootroot00000000000000# BabelFish BabelFish is a Python library to work with countries and languages. [![tests](https://github.com/Diaoul/babelfish/actions/workflows/test.yml/badge.svg)](https://github.com/Diaoul/babelfish/actions/workflows/test.yml) ## Usage BabelFish provides scripts, countries and languages from their respective ISO standards and a handy way to manipulate them with converters. ### Script Script representation from 4-letter code (ISO-15924): ```python >>> import babelfish >>> script = babelfish.Script('Hira') >>> script