{"id":24527193,"url":"https://github.com/echosun1996/chinesestrokesorting","last_synced_at":"2025-04-14T15:24:08.948Z","repository":{"id":62562060,"uuid":"301264894","full_name":"echosun1996/ChineseStrokeSorting","owner":"echosun1996","description":"中文按笔划排序的Python 模块(发布于PyPI)","archived":false,"fork":false,"pushed_at":"2020-10-07T10:53:15.000Z","size":168,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T12:48:31.053Z","etag":null,"topics":["chinese","pypi-package","python","sorting","stroke"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/echosun1996.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-10-05T01:32:24.000Z","updated_at":"2023-05-12T10:33:48.000Z","dependencies_parsed_at":"2022-11-03T15:30:25.524Z","dependency_job_id":null,"html_url":"https://github.com/echosun1996/ChineseStrokeSorting","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echosun1996%2FChineseStrokeSorting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echosun1996%2FChineseStrokeSorting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echosun1996%2FChineseStrokeSorting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echosun1996%2FChineseStrokeSorting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/echosun1996","download_url":"https://codeload.github.com/echosun1996/ChineseStrokeSorting/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248904964,"owners_count":21180890,"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","pypi-package","python","sorting","stroke"],"created_at":"2025-01-22T06:17:07.200Z","updated_at":"2025-04-14T15:24:08.914Z","avatar_url":"https://github.com/echosun1996.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 中文笔划排序程序\n\n![Python package](https://github.com/echosun1996/ChineseStrokeSorting/workflows/Python%20package/badge.svg)\n![PyPI version](https://badge.fury.io/py/chinese-stroke-sorting.svg)\n![Python](https://img.shields.io/pypi/pyversions/chinese-stroke-sorting.svg?style=plastic)\n\n## 特点\n- 支持对名单列表进行按笔划排序\n- 支持从文件中读取名单列表\n- 支持以便于阅读的方式输出排序后的结果\n- 支持将排序后的名单列表写入文件\n\n## 安装\n\n```bash\npip install chinese-stroke-sorting\n```\n\n## 更新\n\n```bash\npip install --upgrade chinese-stroke-sorting\n```\n\n## 使用说明\n\n```bash\n\u003e\u003e\u003e # 导入包\n\u003e\u003e\u003e from chinese_stroke_sorting import sort_by_stroke, write_sort_result_to_human, \\\n    write_sort_result_to_file, read_name_list_from_file\n\n\u003e\u003e\u003e # 直接对名单列表排序\n\u003e\u003e\u003e name_list = ['张三','张二','张一一', '李四', '王五']\n\u003e\u003e\u003e print(sort_by_stroke(name_list)) \n['王五', '李四', '张一一', '张二', '张三']\n\n\u003e\u003e\u003e # 从文件中读取名单列表\n\u003e\u003e\u003e name_list_file_path = 'test_name_list.txt'\n\u003e\u003e\u003e name_list = read_name_list_from_file(name_list_file_path)\n\u003e\u003e\u003e print(name_list)\n['张三', '李四', '王五', '赵六', '王一', '王一二']\n\n\u003e\u003e\u003e # 以便于阅读的方式显示排序结果\n\u003e\u003e\u003e sort_result = sort_by_stroke(name_list)\n\u003e\u003e\u003e result_for_human = write_sort_result_to_human(sort_result, split_char='|')\n\u003e\u003e\u003e print(result_for_human)\n王一|王一二|王五|李四|张三|赵六\n\n\u003e\u003e\u003e # 将排序结果写入文件\n\u003e\u003e\u003e output_file = 'result.txt'\n\u003e\u003e\u003e write_sort_result_to_file(sort_result, output_file, split_char='\\n')\n\n``` \n\n## 说明\n\n项目发布于PyPI：[单击访问](https://pypi.org/project/chinese-stroke-sorting/) \n\n本模块尚不完善，有任何相关问题或建议，欢迎在本项目的github页面中提交issue: [单击访问](https://github.com/echosun1996/ChineseStrokeSorting)\n\n# License\nGNU General Public License v3.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechosun1996%2Fchinesestrokesorting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fechosun1996%2Fchinesestrokesorting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechosun1996%2Fchinesestrokesorting/lists"}