在structuredtext中转换epytext标记语言
epytext2rst的Python项目详细描述
eyptext2rst是一个命令行工具,用于在structuredtext中转换epytext标记语言。
一般用法
epytext2rst.py [-h] [-v] [-o OUTPUT] input positional arguments: input input file or directory to convert optional arguments: -h, --help show this help message and exit -v, --verbose show changes -o OUTPUT, --output-dir OUTPUT directory for output of parsed files
要转换目录中的所有python文件(.py,.pyw),请键入以下命令:
python epytext2rst.py mydirectory -o newdirectory
如果您只想知道替换的内容,请执行以下操作:
python epytext2rst.py mydirectory -v
惯例
epytext2rst处理以下epytext的转换 组件:
关键词
@(param|type|rtype|return|ivar) --> :(param|type|rtype|return|ivar)
斜体
I\{(.*?)\} --> *..*
粗体
B\{(.*?)\} --> **..**
代码
C\{(.*?)\} --> ``...``