{"id":13656644,"url":"https://github.com/berniey/hanziconv","last_synced_at":"2026-01-22T12:30:58.186Z","repository":{"id":19652133,"uuid":"22904846","full_name":"berniey/hanziconv","owner":"berniey","description":"Hanzi Converter for Traditional and Simplified Chinese","archived":false,"fork":false,"pushed_at":"2020-03-28T08:03:26.000Z","size":243,"stargazers_count":184,"open_issues_count":19,"forks_count":45,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T01:35:59.993Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/berniey.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-13T06:17:10.000Z","updated_at":"2025-03-09T17:45:58.000Z","dependencies_parsed_at":"2022-09-18T01:10:15.887Z","dependency_job_id":null,"html_url":"https://github.com/berniey/hanziconv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berniey%2Fhanziconv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berniey%2Fhanziconv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berniey%2Fhanziconv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berniey%2Fhanziconv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berniey","download_url":"https://codeload.github.com/berniey/hanziconv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250526595,"owners_count":21445207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T05:00:28.368Z","updated_at":"2026-01-22T12:30:58.178Z","avatar_url":"https://github.com/berniey.png","language":"Python","funding_links":[],"categories":["Libraries/Packages"],"sub_categories":["Python"],"readme":"Hanzi Converter 繁簡轉換器 | 繁简转换器\n=======================================\n\nThis tool converts between simplified and traditional Chinese Characters.\nIt consists of two parts:\n\n  - a command line tool: ``hanzi-convert``\n  - a python library: ``hanziconv``\n\nThis module supports both Python 2 and 3\n\n.. image:: https://travis-ci.org/berniey/hanziconv.png?branch=master\n   :target: https://travis-ci.org/berniey/hanziconv\n   :alt: Build Status\n\n.. image:: https://img.shields.io/badge/version-0.3.2-brightgreen.svg?style=plastic\n   :target: https://pypi.python.org/pypi/hanziconv/\n   :alt: Latest Version\n\n.. image:: https://img.shields.io/badge/doc-0.3.2-brightgreen.svg?style=plastic\n   :target: https://pythonhosted.org/hanziconv/\n   :alt: Documentation\n\n.. image:: https://img.shields.io/badge/source-latest-blue.svg?style=plastic\n   :target: https://github.com/berniey/hanziconv\n   :alt: Source Code\n\n.. image:: https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=plastic\n   :target: https://raw.githubusercontent.com/berniey/hanziconv/master/LICENSE\n   :alt: License\n\n\nInstallation\n------------\n\n.. code-block:: sh\n\n    $ pip install hanziconv\n\n\nUninstallation\n--------------\n\n.. code-block:: sh\n\n    $ [sudo] pip uninstall hanziconv\n\n\nCommand Line Tool\n-----------------\n\nSynopsis\n********\n\n.. code-block:: sh\n\n    $ ./hanzi-convert --help\n    usage: hanzi-convert [-h] [-o OUTFILE] [-s] [-v] infile\n\n    Simplified and Traditional Chinese Character Conversion\n    Version 0.3.2 (By Bernard Yue)\n\n    Converting to Traditional Hanzi by default with no -s flag\n\n    positional arguments:\n      infile                filename | \"-\", corresponds to stdin\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -o OUTFILE, --output OUTFILE\n                            filename to save output, stdout if omitted\n      -s, --simplified      convert to simplified characters\n      -v, --version         show program's version number and exit\n\n\nExample\n*******\n\nConversion from stdin\n\n.. code-block:: sh\n\n    $ ./hanzi-convert -\n    Press Crtl-D when finished\n    Typing away\n    Now write some chinese characters\n    繁简转换器\n    ^D\n    Typing away\n    Now write some chinese characters\n    繁簡轉換器\n    $\n\n\nPython API\n----------\n\nExample\n*******\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e from hanziconv import HanziConv\n    \u003e\u003e\u003e print(HanziConv.toSimplified('繁簡轉換器'))\n    繁简转换器\n    \u003e\u003e\u003e print(HanziConv.toTraditional('繁简转换器'))\n    繁簡轉換器\n    \u003e\u003e\u003e HanziConv.same('繁簡轉換器', '繁简转换器')\n    True\n\n\nTesting\n-------\nThe module uses `pytest \u003chttp://pytest.org/latest/\u003e`_.  Use pip to install `pytest`.\n\n.. code-block:: sh\n\n    $ [sudo] pip install pytest\n\nThen checkout source code and run test as normal.\n\n.. code-block:: sh\n\n    $ git clone https://github.com/berniey/hanziconv\n    $ cd hanziconv\n    $ python setup.py test\n\n\nYou are encouraged to use `virtualenv \u003chttps://virtualenv.pypa.io/en/stable/\u003e`_\nand `virtualenvwrapper \u003chttps://virtualenvwrapper.readthedocs.io/en/latest/\u003e`_\nfor to avoid changing your currently operating environment.\n\n\nLicense\n-------\n\n| This module is distributed under Apache License Version 2.0.\n\nThe character map used in this module is based on the Multi-function\nChinese Character Database developed by Chinese University of Hong Kong.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberniey%2Fhanziconv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberniey%2Fhanziconv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberniey%2Fhanziconv/lists"}