handrightbeta


Namehandrightbeta JSON
Version 8.7.0 PyPI version JSON
download
home_pagehttps://github.com/14790897/Handright
SummaryA lightweight Python library for simulating Chinese handwriting
upload_time2024-04-06 03:10:06
maintainerNone
docs_urlNone
authorChenghui Li (Gsllchb)
requires_python>=3.8
licensebsd-3-clause
keywords simulating chinese handwriting
VCS
bugtrack_url
requirements Pillow pytest wheel setuptools twine
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Handright
___A lightweight Python library for simulating Chinese handwriting___

[![released version](https://img.shields.io/pypi/v/Handright.svg)][pypi]
[![python version](https://img.shields.io/pypi/pyversions/Handright.svg)][pypi]
[![license](https://img.shields.io/github/license/Gsllchb/Handright.svg)][license]

[Tutorial][tutorial] |
[Release Notes][release-notes] |
[Contributing][contributing]

![](docs/images/slogan.png)

## Vision
Reveal the nature of Chinese handwriting and use it to implement beautiful, simple and easy-to-use interfaces.

## Algorithm
首先,在水平位置、竖直位置和字体大小三个自由度上,对每个字的整体做随机扰动。随后,在水平位置、竖直位置和旋转角度三个自由度上,对每个字的每个笔画做随机扰动。

## Installation
```console
pip install handright
```

## Quick Start
```python
# coding: utf-8
from PIL import Image, ImageFont

from handright import Template, handwrite

text = "我能吞下玻璃而不伤身体。"
template = Template(
    background=Image.new(mode="1", size=(1024, 2048), color=1),
    font=ImageFont.truetype("path/to/my/font.ttf", size=100),
)
images = handwrite(text, template)
for im in images:
    assert isinstance(im, Image.Image)
    im.show()

```
更多信息请参阅[Tutorial][tutorial]。


## Join Us
扫码或点击[链接](https://t.zsxq.com/zzZfMJq)加入Handright社区,关于Handright的使用问题请优先在社区中咨询:
![手右](docs/images/zsxq.png)


[tutorial]: docs/tutorial.md
[PIL]: http://www.pythonware.com/products/pil/
[Pillow]: http://python-pillow.org/
[release-notes]: docs/release_notes.md
[pypi]: https://pypi.org/project/handright/
[license]: LICENSE.txt
[contributing]: .github/CONTRIBUTING.md

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/14790897/Handright",
    "name": "handrightbeta",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "simulating Chinese handwriting",
    "author": "Chenghui Li (Gsllchb)",
    "author_email": "14790897abc@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/dc/15/68aa7e13e891a79d99a7bedcac8f3b8a0f663cb869a70d66492378f52cba/handrightbeta-8.7.0.tar.gz",
    "platform": null,
    "description": "# Handright\r\n___A lightweight Python library for simulating Chinese handwriting___\r\n\r\n[![released version](https://img.shields.io/pypi/v/Handright.svg)][pypi]\r\n[![python version](https://img.shields.io/pypi/pyversions/Handright.svg)][pypi]\r\n[![license](https://img.shields.io/github/license/Gsllchb/Handright.svg)][license]\r\n\r\n[Tutorial][tutorial] |\r\n[Release Notes][release-notes] |\r\n[Contributing][contributing]\r\n\r\n![](docs/images/slogan.png)\r\n\r\n## Vision\r\nReveal the nature of Chinese handwriting and use it to implement beautiful, simple and easy-to-use interfaces.\r\n\r\n## Algorithm\r\n\u9996\u5148\uff0c\u5728\u6c34\u5e73\u4f4d\u7f6e\u3001\u7ad6\u76f4\u4f4d\u7f6e\u548c\u5b57\u4f53\u5927\u5c0f\u4e09\u4e2a\u81ea\u7531\u5ea6\u4e0a\uff0c\u5bf9\u6bcf\u4e2a\u5b57\u7684\u6574\u4f53\u505a\u968f\u673a\u6270\u52a8\u3002\u968f\u540e\uff0c\u5728\u6c34\u5e73\u4f4d\u7f6e\u3001\u7ad6\u76f4\u4f4d\u7f6e\u548c\u65cb\u8f6c\u89d2\u5ea6\u4e09\u4e2a\u81ea\u7531\u5ea6\u4e0a\uff0c\u5bf9\u6bcf\u4e2a\u5b57\u7684\u6bcf\u4e2a\u7b14\u753b\u505a\u968f\u673a\u6270\u52a8\u3002\r\n\r\n## Installation\r\n```console\r\npip install handright\r\n```\r\n\r\n## Quick Start\r\n```python\r\n# coding: utf-8\r\nfrom PIL import Image, ImageFont\r\n\r\nfrom handright import Template, handwrite\r\n\r\ntext = \"\u6211\u80fd\u541e\u4e0b\u73bb\u7483\u800c\u4e0d\u4f24\u8eab\u4f53\u3002\"\r\ntemplate = Template(\r\n    background=Image.new(mode=\"1\", size=(1024, 2048), color=1),\r\n    font=ImageFont.truetype(\"path/to/my/font.ttf\", size=100),\r\n)\r\nimages = handwrite(text, template)\r\nfor im in images:\r\n    assert isinstance(im, Image.Image)\r\n    im.show()\r\n\r\n```\r\n\u66f4\u591a\u4fe1\u606f\u8bf7\u53c2\u9605[Tutorial][tutorial]\u3002\r\n\r\n\r\n## Join Us\r\n\u626b\u7801\u6216\u70b9\u51fb[\u94fe\u63a5](https://t.zsxq.com/zzZfMJq)\u52a0\u5165Handright\u793e\u533a\uff0c\u5173\u4e8eHandright\u7684\u4f7f\u7528\u95ee\u9898\u8bf7\u4f18\u5148\u5728\u793e\u533a\u4e2d\u54a8\u8be2\uff1a\r\n![\u624b\u53f3](docs/images/zsxq.png)\r\n\r\n\r\n[tutorial]: docs/tutorial.md\r\n[PIL]: http://www.pythonware.com/products/pil/\r\n[Pillow]: http://python-pillow.org/\r\n[release-notes]: docs/release_notes.md\r\n[pypi]: https://pypi.org/project/handright/\r\n[license]: LICENSE.txt\r\n[contributing]: .github/CONTRIBUTING.md\r\n",
    "bugtrack_url": null,
    "license": "bsd-3-clause",
    "summary": "A lightweight Python library for simulating Chinese handwriting",
    "version": "8.7.0",
    "project_urls": {
        "Homepage": "https://github.com/14790897/Handright"
    },
    "split_keywords": [
        "simulating",
        "chinese",
        "handwriting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "561f36977733aefa9d7e8ea6f055977cba500f3b737c7e4260436ee443cc69e5",
                "md5": "ce309b76cddb2246d0a2b9f096ce476b",
                "sha256": "57ac7fea3dfde537d6e4d304699ea4a5f752f5ad36d7739c973454524791b04a"
            },
            "downloads": -1,
            "filename": "handrightbeta-8.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ce309b76cddb2246d0a2b9f096ce476b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 13958,
            "upload_time": "2024-04-06T03:10:04",
            "upload_time_iso_8601": "2024-04-06T03:10:04.507134Z",
            "url": "https://files.pythonhosted.org/packages/56/1f/36977733aefa9d7e8ea6f055977cba500f3b737c7e4260436ee443cc69e5/handrightbeta-8.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dc1568aa7e13e891a79d99a7bedcac8f3b8a0f663cb869a70d66492378f52cba",
                "md5": "44dae2c9b50b90b2de1532067e75660a",
                "sha256": "119a78ca5aaead6e114c1d8b3f862aaa919dd5bcf54e4db48b7160c88511b2f7"
            },
            "downloads": -1,
            "filename": "handrightbeta-8.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "44dae2c9b50b90b2de1532067e75660a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14432,
            "upload_time": "2024-04-06T03:10:06",
            "upload_time_iso_8601": "2024-04-06T03:10:06.742606Z",
            "url": "https://files.pythonhosted.org/packages/dc/15/68aa7e13e891a79d99a7bedcac8f3b8a0f663cb869a70d66492378f52cba/handrightbeta-8.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-06 03:10:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "14790897",
    "github_project": "Handright",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "Pillow",
            "specs": [
                [
                    "==",
                    "8.3.2"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": []
        },
        {
            "name": "wheel",
            "specs": []
        },
        {
            "name": "setuptools",
            "specs": [
                [
                    ">=",
                    "38.6.0"
                ]
            ]
        },
        {
            "name": "twine",
            "specs": []
        }
    ],
    "lcname": "handrightbeta"
}
        
Elapsed time: 0.22431s