背景
また、特定のディレクトリ (Linux の場合は
~/.config/online-judge-tools/template/
) の下に~/.config/online-judge-tools/template/customized.py
のようにファイルを配置しておくことで、oj-template -t customized.py https://...
のように指定できるようにもなります。組み込みのテンプレートと同じ名前のテンプレートがこのディレクトリにあれば上書きされます。
oj-prepare
の設定は (Linux の場合は)~/.config/online-judge-tools/prepare.config.toml
で行えます。
Mac, Windowsの場合はテンプレート、設定をどこに置けばいい?。
結果
oj-prepare -h
コマンド打てばデフォルトのパスを教えてくれる。
$ oj-prepare -h usage: oj-prepare [-h] [-v] [-c COOKIE] [--config-file CONFIG_FILE] url positional arguments: url options: -h, --help show this help message and exit -v, --verbose -c COOKIE, --cookie COOKIE --config-file CONFIG_FILE default: /Users/hoge/Library/Application Support/online-judge-tools/prepare.config.toml
私のMacではここ。
/Users/hoge/Library/Application Support/online-judge-tools/template/customized.py
/Users/hoge/Library/Application Support/online-judge-tools/prepare.config.toml