在简体中文和繁体中文之间转换文件。
lotecc的Python项目详细描述
LoteCC公司
LoteCC是一个在简体中文和繁体中文之间转换文件的工具。在
- 免费软件:麻省理工学院许可证
- 文档:https://lotecc.readthedocs.io。在
特点
- 文件或整个项目:可以转换项目中的单个文件或所有文件。在
- 要忽略的模式:使用.gitignore语法排除不需要的文件。在
用法
1。在终端中使用lotecc$ lotecc
上面的命令等于$ lotecc -c s2t -i . --ignore .gitignore。将当前目录和子目录中的所有文件从简体中文转换为繁体中文,不包括与.gitignore中模式匹配的文件:
- -c s2t:将简体中文转换为繁体中文
- -i .:输入是当前目录
- --ignore .gitignore:不包括与.gitignore中模式匹配的文件的文件
2。在项目中使用lotecc
^{pr2}$您可以通过在终端中键入$ lotecc --help获得帮助:
Options: -c, --conversion TEXT Conversion method between Simplified Chinese and Traditional Chinese. [default: s2t] -i, --input TEXT Input file or directory. The default is current dir. -o, --output TEXT Output file or directory. The default is the same as the source file, which means that the source file will be overwritten. -q, --quiet Disable screen output. [default: False] --ignore TEXT Can be a .gitignore syntax file. Also can be one or more patterns, separated by commas. [default: .gitignore] --suffix TEXT Suffix of output filename, add this to keep both the source file and converted file. --in-enc TEXT Encoding for input. [default: utf-8] --out-enc TEXT Encoding for output. [default: utf-8] --help Show this message and exit.
3。支持的转换
- {TT10}$:香港(中国标准)简化池讷森< /LI>
- {TT11}$:繁体中文(香港标准)N
- s2t:简体中文到繁体中文
- s2tw:简体中文转繁体中文(台湾标准)n
- s2twp:简体中文转繁体中文(台湾标准,带短语)n
- t2s:繁体中文到简体中文
- t2tw:繁体中文转繁体中文(台湾标准)n
- tw2s:繁体中文(台湾标准)至简体中文
- tw2sp:繁体中文(台湾标准)到简体中文(带短语)n
学分
- 简体中文和繁体中文转换的实现依赖于opencc-python。在
- 此包是用Cookiecutter和audreyr/cookiecutter-pypackage项目模板创建的。在
历史
0.1.1(2020-04-27)
已修复错误:
- 处理使用错误编码打开文件的错误。在
0.1.0(2020-04-25)
PyPI的第一个版本。在
特点:
- 文件或整个项目:可以转换项目中的单个文件或所有文件。在
- 要忽略的模式:使用.gitignore语法排除不需要的文件。在
- 项目
标签: