Skip to main content

Download and export UNIHAN to Python, CSV, JSON and YAML

Project description

*unihan-tabular* - tool to build `UNIHAN`_ into tabular-friendly formats
like python, JSON, CSV and YAML. Part of the `cihai`_ project.

|pypi| |docs| |build-status| |coverage| |license|

Unihan's data is disperved across multiple files in the format of::

U+3400 kCantonese jau1
U+3400 kDefinition (same as U+4E18 丘) hillock or mound
U+3400 kMandarin qiū
U+3401 kCantonese tim2
U+3401 kDefinition to lick; to taste, a mat, bamboo bark
U+3401 kHanyuPinyin 10019.020:tiàn
U+3401 kMandarin tiàn

``unihan_tabular/`` will download and build all files into a
single tabular friendly format.

CSV (default output: ``./data/unihan.csv``)::

丘,U+3400,jau1,(same as U+4E18 丘) hillock or mound,,qiū
㐁,U+3401,tim2,"to lock; to taste, a mat, bamboo bark",10019.020:"tiàn,tiàn"

```` supports command line arguments. See `unihan_tabular/ CLI
arguments`_ for information on how you can specify custom columns, files,
download URL's and output destinations.

Being built against unit tests. See the `Travis Builds`_ and
`Revision History`_.

.. _cihai:
.. _cihai-handbook:
.. _cihai team:
.. _cihai-python:
.. _unihan-tabular on github:


To download and build your own ``unihan.csv``:

.. code-block:: bash

$ pip install unihan-tabular

.. code-block:: bash

$ unihan-tabular

Creates ``data/unihan.csv``.

See `unihan_tabular/ CLI arguments`_ for advanced usage examples.

.. _unihan_tabular/ CLI arguments:


.. code-block:: bash

# (future) when this package is stable, unihan.csv will be provided

# stores downloaded and it's txt file contents (.gitignore'd)

# script to download + build a SDF csv of unihan.

# unit tests to verify behavior / consistency of builder

# python 2/3 compatibility modules

# python module, public-facing python API.

# utility / helper functions

- ``data/unihan.csv`` - CSV export file.
- ``unihan_tabular/`` - create a ``data/unihan.csv``.

When this module is stable, ``data/unihan.csv`` will have prepared
releases, without requires using ``unihan_tabular/``. ````
will not require external libraries.

.. _MIT:
.. _API:

.. |pypi| image::
:alt: Python Package

.. |build-status| image::
:alt: Build Status

.. |coverage| image::
:alt: Code Coverage

.. |license| image::
:alt: License

.. |docs| image::
:alt: Documentation Status
:scale: 100%

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unihan-tabular-0.5.1.tar.gz (6.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page