生成多个factorio changelog格式的脚本。
factorio-changelog-creator的Python项目详细描述
factorio changelog创建者
这是一个快速而脏的python脚本,用于以各种格式为factorio mods生成变更日志。
快速安装
从pypi安装最新版本
pip install factorio-changelog-creator
从github安装当前开发版本
pip install git+https://github.com/Roang-zero1/factorio-changelog-creator.git
用法
把脚本文件放到你电脑的某个地方。
使用factorio-changelog-creator
从命令行运行脚本。如果没有给定参数,它将在调用它的目录中查找名为changelog.json
的文件,并将其输出到同一目录中。
有一个可用的命令行帮助,可以用factorio-changelog-creator -h
输出。
usage: factorio-changelog-creator [-h] [-f {md,ingame,forum} [{md,ingame,forum} ...]] [-v] [output_dir] [input_file] Factorio changelog generator positional arguments: output_dir Directory where the files will be written input_file JSON file to parse for changes optional arguments: -h, --help show this help message and exit -f {md,ingame,forum} [{md,ingame,forum} ...], --formats {md,ingame,forum} [{md,ingame,forum} ...] Which format[s] should be generated -v, --verbose Output verbosity
默认情况下,将生成降价和游戏内更改日志。论坛变更日志可以用python3 changelog-script.py -f forum
生成。
changelog_forum.txt
:语法forums.factorio.com使用CHANGELOG.md
:一种标记语法,应该在mods.factorio.com和github上都有效changelog.txt
:游戏使用的语法-这是应该留在mod中的语法
格式
变更日志定义文件应为包含版本字典字典的JSON文件。
字典的格式如下:
{"0.1.0":{"date":"2019-06-08",--Optional,canbeanything"Changes":["Change without category"],--ChangeswillbeputintheOterhCategory"Categories":{--Categoriesmaybeanystring"Features":["Change in category"]}}}
更改可以声明为简单字符串,也可以声明为以下格式的表:
{"change":"Change description",--Mandatory"more":"https://link.to.nowhere.com",--Optional"by":"Name",--Optional}
more
和by
工作方式相同,但含义不同:more
是一个包含更多信息的链接,by
更改的作者。
它们可以是单个条目,也可以是条目列表,列表将以逗号分隔输出。
每个条目可以是将直接使用的纯字符串,也可以是具有以下格式的单个条目的词典:
{"url_text":"url_target"}
根据格式,如果这不可能,more
将使用url_target
值而by
将使用url_text
值,则将生成一个链接。
确认
ustyknife/factorio changelog脚本的初始lua实现