{"name":"pangu.py: Automated Paranoid Text Spacing for Enhanced Readability","description":"pangu.py is a Python library designed for opinionated, \"paranoid\" text spacing. It automatically inserts whitespace between CJK (Chinese, Japanese, Korean) and half-width characters, such as alphabetical letters, numerical digits, and symbols. This tool significantly improves text readability by ensuring consistent and proper spacing.","github":"https://github.com/vinta/pangu.py","url":"https://osrepos.com/repo/vinta-pangu.py","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/vinta-pangu.py","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/vinta-pangu.py.md","json":"https://osrepos.com/repo/vinta-pangu.py.json","topics":["pangu","pangu-spacing","python","text-spacing","text-formatting","readability","utility"],"keywords":["pangu","pangu-spacing","python","text-spacing","text-formatting","readability","utility"],"stars":null,"summary":"pangu.py is a Python library designed for opinionated, \"paranoid\" text spacing. It automatically inserts whitespace between CJK (Chinese, Japanese, Korean) and half-width characters, such as alphabetical letters, numerical digits, and symbols. This tool significantly improves text readability by ensuring consistent and proper spacing.","content":"## Introduction\n`pangu.py` is a Python library that implements \"paranoid\" text spacing to enhance readability. It automatically inserts whitespace between CJK (Chinese, Japanese, Korean) characters and half-width characters (alphabetical letters, numerical digits, and symbols). This opinionated approach ensures consistent and visually pleasing text formatting, making your content easier to read.\n\n## Installation\nInstalling `pangu.py` is straightforward using `uv` or `pip`:\n\nbash\n$ uv add pangu\n# or\n$ pip install -U pangu\n\n\n## Examples\n`pangu.py` can be used both within Python scripts and as a command-line tool.\n\n### In Python\npython\nimport pangu\n\nnew_text = pangu.spacing_text(\"???????????????Monkey Patch????\")\n# new_text = \"??????????????? Monkey Patch ????\"\n\nnew_content = pangu.spacing_file(\"path/to/file.txt\", encoding=\"utf-8\")\n# new_content = \"? PM ??????????????? PM\"\n\npangu.has_proper_spacing(\"?? Hadoop ??????????? Map/Reduce ?\")\n# True\n\n\n### In CLI\nbash\n$ pangu-py \"?????????????????????DevOps???????????????????????????????1.??2.???3.????\"\n????????????????????? DevOps??????????????????????????????? 1. ?? 2. ??? 3. ????\n\n$ pangu-py -t \"??????????Google?????Bing\"\n?????????? Google????? Bing\n\n\n## Why Use It\nThe primary benefit of `pangu.py` is the automatic improvement of text readability, especially for content mixing CJK and half-width characters. By consistently applying proper spacing, it eliminates common formatting inconsistencies and reduces visual clutter. This makes documents, articles, and user interfaces appear more professional and easier for readers to process, saving manual editing time.\n\n## Links\n*   [GitHub Repository](https://github.com/vinta/pangu.py)\n*   [PyPI Project](https://pypi.org/project/pangu/)\n*   Other `pangu` implementations:\n    *   [pangu.js](https://github.com/vinta/pangu.js)\n    *   [pangu.go](https://github.com/vinta/pangu)\n    *   [pangu.java](https://github.com/vinta/pangu.java)\n    *   [pangu.space](https://github.com/vinta/pangu.space)","metrics":{"detailViews":0,"githubClicks":0},"dates":{"published":null,"modified":"2026-08-01T11:09:50.000Z"}}