{"id":13456627,"url":"https://github.com/Gsllchb/Handright","last_synced_at":"2025-03-24T11:30:51.047Z","repository":{"id":38776242,"uuid":"110765710","full_name":"Gsllchb/Handright","owner":"Gsllchb","description":"A lightweight Python library for simulating Chinese handwriting","archived":false,"fork":false,"pushed_at":"2024-04-06T03:02:03.000Z","size":41773,"stargazers_count":2074,"open_issues_count":5,"forks_count":249,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-02-09T09:30:47.232Z","etag":null,"topics":["chinese","handwriting","image","library","lightweight","simulation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gsllchb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-15T01:13:14.000Z","updated_at":"2025-02-09T09:27:17.000Z","dependencies_parsed_at":"2023-02-14T15:15:57.950Z","dependency_job_id":"47cf7179-402b-4862-9b85-44f0959a3a82","html_url":"https://github.com/Gsllchb/Handright","commit_stats":{"total_commits":851,"total_committers":6,"mean_commits":"141.83333333333334","dds":0.4900117508813161,"last_synced_commit":"7a52cb0ee8f3d333ab754dd94c0f2d8c3e364b75"},"previous_names":["gsllchb/pylf"],"tags_count":49,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gsllchb%2FHandright","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gsllchb%2FHandright/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gsllchb%2FHandright/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gsllchb%2FHandright/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gsllchb","download_url":"https://codeload.github.com/Gsllchb/Handright/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245061390,"owners_count":20554563,"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":["chinese","handwriting","image","library","lightweight","simulation"],"created_at":"2024-07-31T08:01:25.114Z","updated_at":"2025-03-24T11:30:51.014Z","avatar_url":"https://github.com/Gsllchb.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Handright\n___A lightweight Python library for simulating Chinese handwriting___\n\n[![released version](https://img.shields.io/pypi/v/Handright.svg)][pypi]\n[![python version](https://img.shields.io/pypi/pyversions/Handright.svg)][pypi]\n[![license](https://img.shields.io/github/license/Gsllchb/Handright.svg)][license]\n\n[Tutorial][tutorial] |\n[Release Notes][release-notes] |\n[Contributing][contributing]\n\n![](docs/images/slogan.png)\n\n## Vision\nReveal the nature of Chinese handwriting and use it to implement beautiful, simple and easy-to-use interfaces.\n\n## Algorithm\n首先，在水平位置、竖直位置和字体大小三个自由度上，对每个字的整体做随机扰动。随后，在水平位置、竖直位置和旋转角度三个自由度上，对每个字的每个笔画做随机扰动。\n\n## Installation\n```console\npip install handright\n```\n\n## Quick Start\n```python\n# coding: utf-8\nfrom PIL import Image, ImageFont\n\nfrom handright import Template, handwrite\n\ntext = \"我能吞下玻璃而不伤身体。\"\ntemplate = Template(\n    background=Image.new(mode=\"1\", size=(1024, 2048), color=1),\n    font=ImageFont.truetype(\"path/to/my/font.ttf\", size=100),\n)\nimages = handwrite(text, template)\nfor im in images:\n    assert isinstance(im, Image.Image)\n    im.show()\n\n```\n更多信息请参阅[Tutorial][tutorial]。\n\n\n[tutorial]: docs/tutorial.md\n[PIL]: http://www.pythonware.com/products/pil/\n[Pillow]: http://python-pillow.org/\n[release-notes]: docs/release_notes.md\n[pypi]: https://pypi.org/project/handright/\n[license]: LICENSE.txt\n[contributing]: .github/CONTRIBUTING.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGsllchb%2FHandright","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGsllchb%2FHandright","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGsllchb%2FHandright/lists"}