解析出现的代码问题语句,以降低与选项也下载输入,同时保持一切井然有序
aoc-to-markdown的Python项目详细描述
将Advent Of Code问题语句解析为带选项的降价,以下载输入,同时保持一切井然有序。在
特点
- 将问题语句解析为Markdown。在
- 使用输入和降价说明轻松组织解决方案。在
- 样板可以复制到输入和问题陈述旁边。在
- 您可以在同一天内任意多次执行此脚本,并确信样板不会改变您迄今为止所做的工作。在
组织
每天都会进入一个语法为day-<day>的文件夹中,您可以在下面查看。在
|____day-01 | |____README.md | |____input.txt |____day-02 | |____README.md | |____input.txt ... |____day-15 | |____README.md | |____input.txt |____day-16 | |____README.md | |____input.txt ... |____day-24 | |____README.md | |____input.txt |____day-25 | |____README.md | |____input.txt
这是通过执行aoc-to-markdown-i-s25次而生成的。可以提供其他参数来复制文件夹中的目录/文件(有助于设置要解决的所有问题)。您还可以指定输出目录(文件夹将在其中创建),但在本例中,也没有指定。在
安装
如果要直接从此存储库安装,请安装依赖项,然后就可以开始:
^{pr2}$如果您希望更简单,请从PyPi下载,然后就可以开始:
pip install aoc-to-markdown aoc_to_markdown -h
论据
Usage: aoc-to-markdown [-h] [-y <year>] [-d <day>] [-o <output_dir>] [-b <boilerplate_dir>] [-s] [-i] -h, --help Optional parameter to print this message -y, --year Optional parameter to indicate the year of the problem -d, --day Optional parameter to indicate the day of the problem -o, --output Optional parameter to indicate the path of the output (default = ".") -b, --boilerplate Optional parameter to copy a directory/file to the output -s, --save Optional argument to indicate that the markdown should not be printed to stdout, but to a file -i, --input Optional argument to indicate that the input is to be downloaded and saved to a file SESSION_ID environment flag is required to download part 2 of the problem. This session id can be copied from the requests made on the Advent Of Code website after you login. Extended description: --year, if not given, defaults to the current year if in december; otherwise is the current year --day, if not given, defaults to the first day which has not been retrieved (checks for directories named "day-<day>"); if all days have been retrieved, then go drink some hot chocolate and enjoy the rest of the day --output is the prefix path where the folder (syntax: "day-<day>") will be created --boilerplate is an argument useful to copy the solution boilerplate to help you get started --save is only necessary if you want to save directly to a file and --output is not given Example: aoc-to-markdown -y 2018 -d 1 -o my-solution-directory -b my-boilerplate -i
相似的
- 还有一个another project in JavaScript也将问题语句解析为Markdown。在
- 项目
标签: