File tree Expand file tree Collapse file tree 4 files changed +24
-4
lines changed
atcodertools/release_management Expand file tree Collapse file tree 4 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Change Log
2
2
3
+ ## 1.0.6 / 2018-01-13
4
+ - [ #68 ] ( https://github.com/kyuridenamida/atcoder-tools/pull/68 ) Support custom code generator specification.
5
+ - [ #69 ] ( https://github.com/kyuridenamida/atcoder-tools/pull/69 ) Support template file specification in toml.
6
+ - [ #65 ] ( https://github.com/kyuridenamida/atcoder-tools/pull/65 ) Ignore exception while checking version.
7
+ - [ #64 ] ( https://github.com/kyuridenamida/atcoder-tools/pull/64 ) Increase recall of input format prediction, supporting tex formula.
8
+ - [ #71 ] ( https://github.com/kyuridenamida/atcoder-tools/pull/71 ) Minor speeding up of prediction.
9
+ - [ #73 ] ( https://github.com/kyuridenamida/atcoder-tools/pull/73 ) Colorful messages in gen / tester / submit.
10
+ - Fix a bug that the color never goes back when you get a message saying "the latest version is available".
11
+
12
+
3
13
## 1.0.5 / 2018-01-06
4
14
- [ #59 ] ( https://github.com/kyuridenamida/atcoder-tools/pull/59 ) Support user-defined postprocessor commands after code generation.
5
15
- [ #54 ] ( https://github.com/kyuridenamida/atcoder-tools/pull/54 ) Support constants (MOD/YES/NO) prediction so you can use them in your template.
Original file line number Diff line number Diff line change @@ -137,19 +137,28 @@ optional arguments:
137
137
## 設定ファイルの例
138
138
` ~/.atcodertools.toml ` に以下の設定を保存すると、コードスタイルや、コード生成後に実行するコマンドを指定できます。
139
139
140
- 以下は、コードスタイルの設定が幅4のスペースインデントで、
141
- 問題用ディレクトリ内で毎回` clang-format ` を実行して、最後に` CMakeLists.txt ` (空)をコンテスト用ディレクトリに生成する場合の` ~/.atcodertools.toml ` の例です。
140
+ 以下は、次の挙動を期待する場合の` ~/.atcodertools.toml ` の例です。
141
+
142
+ - コードスタイルの設定が幅4のスペースインデントである
143
+ - コード生成テンプレートとして` ~/my_template.cpp ` を使う
144
+ - 問題用ディレクトリ内で毎回` clang-format ` を実行して、最後に` CMakeLists.txt ` (空)をコンテスト用ディレクトリに生成する
145
+ - カスタムコードジェネレーター ` custom_code_generator.py ` を指定す
142
146
143
147
``` $xslt
144
148
[codestyle]
145
149
indent_type = 'space' # 'tab' or 'space'
146
150
indent_width = 4
147
-
151
+ template_file='~/my_template.cpp'
148
152
[postprocess]
149
153
exec_on_each_problem_dir='clang-format -i ./*.cpp'
150
154
exec_on_contest_dir='touch CMakeLists.txt'
155
+ code_generator_file="~/custom_code_generator.py"
151
156
```
152
157
158
+ ### カスタムコードジェネレーター
159
+ [ 標準のC++コードジェネレーター] ( https://github.com/kyuridenamida/atcoder-tools/blob/master/atcodertools/codegen/code_generators/cpp.py ) に倣って、
160
+ ` (CogeGenArgs) -> str(ソースコード) ` が型であるような` main ` 関数を定義した.pyファイルを` code_generator_file ` で指定すると、コード生成時にカスタムコードジェネレーターを利用できます。
161
+
153
162
## テンプレートの例
154
163
` atcoder-tools gen ` コマンドに対し` --template ` , ` --replacement ` でそれぞれ入力形式の推論に成功したときのテンプレート、生成に失敗したときに代わりに生成するソースコードを指定できます。テンプレートエンジンの仕様については[ jinja2] ( http://jinja.pocoo.org/docs/2.10/ ) の公式ドキュメントを参照してください。テンプレートに渡される変数は以下の通りです。
155
164
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ def notify_if_latest_version_found():
23
23
print ("To upgrade, run the following command:" )
24
24
print ("" )
25
25
print ("pip3 install atcoder-tools --upgrade" )
26
+ print (Style .RESET_ALL )
26
27
except VersionCheckError :
27
28
print (Fore .RED , end = '' )
28
29
print ("Failed to fetch the latest version information "
Original file line number Diff line number Diff line change 1
- __version__ = "1.0.5 "
1
+ __version__ = "1.0.6 "
You can’t perform that action at this time.
0 commit comments