跳转到主要内容

用于构建algo-method环境的命令行工具

项目描述

algo-method-tools

image image image

用于构建algo-method环境的命令行工具

自动生成包含输入示例和输出示例的目录。

本项目的规格可能在没有预先通知的情况下更改(预计将添加对test命令的支持)。

安装方法

$ pip install algo-method-tools

用法

$ algo-tools --help
Usage: algo-tools [OPTIONS] TASK_NO

Arguments:
  TASK_NO  [required]

Options:
  --base-dir PATH       [default: /home/yassu/algo-methods]
  --template-file TEXT
  --help                Show this message and exit.

示例

$ algo-tools 316
write into /home/yassu/algo-methods/316
$ cat ~/algo-methods/316/
in_1.txt   main.py    out_1.txt
$ cat ~/algo-methods/316/main.py
$ cat ~/algo-methods/316/in_1.txt
2 3
1 2 3
4 3 2
$ cat ~/algo-methods/316/out_1.txt
5


# algo-tools/template.pyは自分用のテンプレートファイル
$ algo-tools 316 --base-dir ~/repos/algo-tools --template-file ~/algo-tools/template.py
write into /home/yassu/repos/algo-tools/316
$ ls ~/repos/algo-tools/316/
in_1.txt  main.py  out_1.txt
$ cat ~/repos/algo-tools/316/main.py
from pprint import pprint
from sys import setrecursionlimit, stdin
from typing import Dict, Iterable, Set
INF: int = 2**62
...
$ cat ~/repos/algo-tools/316/in_1.txt
2 3
1 2 3
4 3 2
$ cat ~/repos/algo-tools/316/out_1.txt
5

选项

  • --template-file, -t:指定要使用的模板文件(如果没有指定,则不使用)
  • --base-dir, -b:指定文件存储的目录

项目详情


下载文件

为您的平台下载文件。如果您不确定要选择哪个,请了解更多关于安装包的信息。

源分布

algo-method-tools-0.1.2.tar.gz (4.3 kB 查看哈希值)

上传时间:

构建分布

algo_method_tools-0.1.2-py3-none-any.whl (4.5 kB 查看哈希值)

上传时间: Python 3

由以下组织支持