{"id":13671530,"url":"https://github.com/woct0rdho/typeset","last_synced_at":"2025-04-27T18:31:21.484Z","repository":{"id":114689703,"uuid":"89977518","full_name":"woct0rdho/typeset","owner":"woct0rdho","description":"自动修正中文、英文、代码混合排版中的全半角、空格等问题","archived":false,"fork":false,"pushed_at":"2021-11-01T13:53:46.000Z","size":37,"stargazers_count":97,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-18T01:36:56.341Z","etag":null,"topics":["beautifier","chinese","formatter","sanitizer","typesetting"],"latest_commit_sha":null,"homepage":"","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/woct0rdho.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-05-02T01:14:44.000Z","updated_at":"2025-02-23T11:37:44.000Z","dependencies_parsed_at":"2023-04-07T01:48:18.289Z","dependency_job_id":null,"html_url":"https://github.com/woct0rdho/typeset","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/woct0rdho%2Ftypeset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woct0rdho%2Ftypeset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woct0rdho%2Ftypeset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woct0rdho%2Ftypeset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/woct0rdho","download_url":"https://codeload.github.com/woct0rdho/typeset/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251187156,"owners_count":21549596,"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":["beautifier","chinese","formatter","sanitizer","typesetting"],"created_at":"2024-08-02T09:01:12.099Z","updated_at":"2025-04-27T18:31:21.233Z","avatar_url":"https://github.com/woct0rdho.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# typeset\n自动修正中文、英文、代码混合排版中的全半角、空格、中英文标点等问题\n\n# 功能\n* 全角数字、英文字母、标点改为半角\n* 空格修正\n  * 中文字符与中文字符、数字之间去除空格\n  * 中文字符与英文字符\n    * 汉字与英文字母之间去除空格\n    * 汉字与英文标点的闭侧之间去除空格，开侧有且只有一个空格\n    * 中文标点与英文字符之间去除空格\n  * 英文字符与英文字符\n    * 英文字母与英文字母之间空格保持原样\n    * 英文字母与英文标点的闭侧之间去除空格，开侧有且只有一个空格\n    * 英文标点的开侧与闭侧、闭侧与闭侧之间去除空格，开侧与开侧之间有且只有一个空格\n  * 英文字符与数字\n    * 数字与英文字母之间空格保持原样\n    * 数字与英文标点的闭侧之间去除空格，开侧（除逗号、句号、冒号外）有且只有一个空格\n  * 数字与数字之间空格保持原样\n* 中英文标点修正\n  * 根据句子内容判断句子是中文还是英文\n  * 中文句子中的英文标点改为中文标点，英文句子中的中文标点改为英文标点\n* 汉字与英文字母、数字之间插入次级空格，次级空格的形式可以由用户定义，如忽略、普通空格、1/4 em等\n* 标点风格修正\n  * 中文句号统一为全角空心句号、全角实心句号或英文句号\n  * 中文引号统一为弯引号、全角直角引号、英文直引号或 TeX 记号\n  * 英文引号改为 TeX 记号\n\n# TODO\n* 根据语义识别引号，区分英文撇号与单引号\n* 识别URL与文件名，不修改其中的标点\n* 将一行分成多个句子\n* 根据语义判断句子是中文还是英文\n* 根据语义修改数字、英文字母、英文标点之间的空格\n* 根据语义修改专有名词的大小写\n* 简体/繁体中文转换\n* 日文排版\n\n# 参考\nhttps://github.com/sparanoid/chinese-copywriting-guidelines\n\nhttps://github.com/ricoa/copywriting-correct\n\n# 示例\nhttps://github.com/woct0rdho/read-matrix 使用本项目排版\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoct0rdho%2Ftypeset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoct0rdho%2Ftypeset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoct0rdho%2Ftypeset/lists"}