AtCoderStudyBooster 0.3.3__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/PKG-INFO +138 -90
  2. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/README.md +137 -89
  3. atcoderstudybooster-0.4.0/atcdr/download.py +222 -0
  4. atcoderstudybooster-0.4.0/atcdr/util/problem.py +47 -0
  5. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/pyproject.toml +1 -1
  6. atcoderstudybooster-0.3.3/atcdr/download.py +0 -322
  7. atcoderstudybooster-0.3.3/atcdr/util/problem.py +0 -94
  8. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/.github/workflows/deploy.yaml +0 -0
  9. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/.gitignore +0 -0
  10. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/.images/demo1.png +0 -0
  11. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/.images/demo2.png +0 -0
  12. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/.images/demo3.png +0 -0
  13. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/.images/demo4.png +0 -0
  14. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/.pre-commit-config.yaml +0 -0
  15. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/.python-version +0 -0
  16. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/.vscode/extensions.json +0 -0
  17. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/.vscode/setting.json +0 -0
  18. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/.vscode/tasks.json +0 -0
  19. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/__init__.py +0 -0
  20. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/cli.py +0 -0
  21. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/generate.py +0 -0
  22. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/login.py +0 -0
  23. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/logout.py +0 -0
  24. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/markdown.py +0 -0
  25. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/open.py +0 -0
  26. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/submit.py +0 -0
  27. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/test.py +0 -0
  28. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/util/__init__.py +0 -0
  29. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/util/fileops.py +0 -0
  30. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/util/filetype.py +0 -0
  31. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/util/gpt.py +0 -0
  32. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/util/parse.py +0 -0
  33. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/atcdr/util/session.py +0 -0
  34. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/requirements-dev.lock +0 -0
  35. {atcoderstudybooster-0.3.3 → atcoderstudybooster-0.4.0}/requirements.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: AtCoderStudyBooster
3
- Version: 0.3.3
3
+ Version: 0.4.0
4
4
  Summary: A tool to download and manage AtCoder problems.
5
5
  Project-URL: Homepage, https://github.com/yuta6/AtCoderStudyBooster
6
6
  Author-email: yuta6 <46110512+yuta6@users.noreply.github.com>
@@ -25,86 +25,126 @@ Description-Content-Type: text/markdown
25
25
 
26
26
  🚧 このプロジェクトはまだ実験段階です。日々のAtCoder学習に役立つ機能を順次追加しています。
27
27
 
28
- AtCoderStudyBoosterはAtCoderの学習を加速させるためのCLIツールです。問題をローカルにダウンロードし、テスト、提出、解答の作成をサポートするツールです。Pythonが入っていることが必須です。Pythonが入っている環境なら、`pip install AtCoderStudyBooster`でインストールできます。(Python3.8以上が必要です)
28
+ AtCoderStudyBoosterはAtCoderの学習を加速させるためのCLIツールです。問題をローカルにダウンロードし、テスト、提出、解答の作成をサポートするツールです。Pythonが入っていることが必須です。Pythonが入っている環境なら、
29
+
30
+ ```sh
31
+ pip install AtCoderStudyBooster
32
+ ```
33
+
34
+ でインストールできます。(Python3.8以上が必要です)
29
35
 
30
36
  キャプチャ認証が導入されたあとでも、CLIから半自動でログイン&提出できます。ただしキャプチャをGUIから人力で解く必要があります。キャプチャー認証をバイパスするものではありません。
31
37
 
32
38
  このツールは以下のプロジェクトに強く影響を受けています。
33
- [online-judge-tools](https://github.com/online-judge-tools)
34
- [atcoder-cli](https://github.com/Tatamo/atcoder-cli)
35
-
39
+ - [online-judge-tools](https://github.com/online-judge-tools)
40
+ - [atcoder-cli](https://github.com/Tatamo/atcoder-cli)
36
41
 
37
42
  ## 利用ケース
38
43
 
39
44
  まずは`download`コマンドを利用して問題をローカルにダウンロードしてみましょう。
40
45
 
41
- ### B問題の練習したい場合
42
-
43
- ABCコンテストの223から226のB問題だけを集中的に練習したい場合、次のコマンドを実行します。
44
-
45
- ```sh
46
- ❯ atcdr download B 223..226
47
- ```
48
-
49
- コマンドを実行すると,次のようなフォルダーを作成して、各々のフォルダーに問題をダウンロードします。
50
-
51
- ```css
52
- B
53
- ├── 223
54
- │ ├── StringShifting.html
55
- │ └── StringShifting.md
56
- ├── 224
57
- │ ├── Mongeness.html
58
- │ └── Mongeness.md
59
- ├── 225
60
- │ ├── StarorNot.html
61
- │ └── StarorNot.md
62
- └── 226
63
- ├── CountingArrays.html
64
- └── CountingArrays.md
65
- ```
66
-
67
- ### 特定のコンテストの問題に取り組みたい場合
68
-
69
- ```sh
70
- ❯ atcdr download 223..225 A..C
71
- ```
72
- のように実行すると以下のようなフォルダーを生成します.
73
-
74
- ```css
75
- .
76
- ├── 223
77
- │ ├── A
78
- │ │ ├── ExactPrice.html
79
- │ │ └── ExactPrice.md
80
- │ ├── B
81
- │ │ ├── StringShifting.html
82
- │ │ └── StringShifting.md
83
- │ └── C
84
- │ ├── Doukasen.html
85
- │ └── Doukasen.md
86
- ├── 224
87
- │ ├── A
88
- │ │ ├── Tires.html
89
- │ │ └── Tires.md
90
- │ ├── B
91
- │ │ ├── Mongeness.html
92
- │ │ └── Mongeness.md
93
- │ └── C
94
- │ ├── Triangle.html
95
- │ └── Triangle.md
96
- └── 225
97
- ├── A
98
- │ ├── DistinctStrings.html
99
- │ └── DistinctStrings.md
100
- ├── B
101
- │ ├── StarorNot.html
102
- │ └── StarorNot.md
103
- └── C
104
- ├── CalendarValidator.html
105
- └── CalendarValidator.md
46
+ ### 1. 特定のコンテストをダウンロードする
47
+
48
+ 1つのコンテストの問題をダウンロードしたい場合の例です。
49
+
50
+ #### ABC350の全問題をダウンロード
51
+ ```sh
52
+ ❯ atcdr download abc350
53
+ ```
54
+
55
+ #### ABC350のA〜D問題をダウンロード
56
+ ```sh
57
+ ❯ atcdr download abc350 {A..D}
106
58
  ```
107
59
 
60
+ #### 競プロ典型90問のダウンロード
61
+ ```sh
62
+ ❯ atcdr download typical90
63
+ ```
64
+
65
+ ### 2. 複数のコンテストを一括でダウンロードする
66
+
67
+ 複数のコンテストを一度にダウンロードしたい場合の例です。bashのブレース展開を活用します。
68
+
69
+ #### ABC001〜ABC010までの全問題
70
+ ```sh
71
+ ❯ atcdr download abc{001..010}
72
+ ```
73
+
74
+ #### ABC320〜ABC325までのA〜C問題
75
+ ```sh
76
+ ❯ atcdr download abc{320..325} {A..C}
77
+ ```
78
+
79
+ 次のようなフォルダー構造が生成されます:
80
+
81
+ ```
82
+ abc320/
83
+ ├── A/
84
+ │ ├── Problem.html
85
+ │ └── Problem.md
86
+ ├── B/
87
+ │ ├── Problem.html
88
+ │ └── Problem.md
89
+ └── C/
90
+ ├── Problem.html
91
+ └── Problem.md
92
+ abc321/
93
+ ├── A/
94
+ ...(以下同様)
95
+ ```
96
+
97
+ ### 3. 特定の問題(A問題、B問題など)を集中的に演習したい場合
98
+
99
+ 特定の難易度の問題だけを集めて練習したい場合は、**問題ラベルを先に指定**すると便利です。
100
+
101
+ #### B問題だけを集中的に練習
102
+ ```sh
103
+ ❯ atcdr download B abc{250..260}
104
+ ```
105
+
106
+ 問題ラベルを先に指定すると、問題ラベルごとにフォルダが作成され、その中にコンテスト名のフォルダが配置されます。
107
+
108
+ ```
109
+ B/
110
+ ├── abc250/
111
+ │ ├── Problem.html
112
+ │ └── Problem.md
113
+ ├── abc251/
114
+ │ ├── Problem.html
115
+ │ └── Problem.md
116
+ ├── abc252/
117
+ │ ├── Problem.html
118
+ │ └── Problem.md
119
+ └── ...(以下同様)
120
+ ```
121
+
122
+ A問題とB問題を集める場合(`{A,B} abc{300..302}`):
123
+
124
+ ```
125
+ A/
126
+ ├── abc300/
127
+ │ ├── Problem.html
128
+ │ └── Problem.md
129
+ ├── abc301/
130
+ │ ├── Problem.html
131
+ │ └── Problem.md
132
+ └── abc302/
133
+ ├── Problem.html
134
+ └── Problem.md
135
+ B/
136
+ ├── abc300/
137
+ │ ├── Problem.html
138
+ │ └── Problem.md
139
+ ├── abc301/
140
+ │ ├── Problem.html
141
+ │ └── Problem.md
142
+ └── abc302/
143
+ ├── Problem.html
144
+ └── Problem.md
145
+ ```
146
+ このディレクトリ構造により、同じ難易度の問題を一箇所に集めて効率的に演習できます。
147
+
108
148
  ### 問題を解く
109
149
 
110
150
  MarkdownファイルあるいはHTMLファイルをVS CodeのHTML Preview, Markdown Previewで開くと問題を確認できます。VS Codeで開くと左側にテキストエディターを表示して、右側で問題をみながら問題に取り組めます。
@@ -116,13 +156,13 @@ MarkdownファイルあるいはHTMLファイルをVS CodeのHTML Preview, Markd
116
156
  問題をダウンロードしたフォルダーに移動します。
117
157
 
118
158
  ```sh
119
- ❯ cd 224/B
159
+ ❯ cd abc224/B
120
160
  ```
121
161
 
122
- 移動したフォルダーで解答ファイルを作成後をtestコマンドを実行すると, サンプルケースをテストします。
162
+ 移動したフォルダーで解答ファイルを作成後、testコマンドを実行すると、サンプルケースをテストします。
123
163
 
124
164
  ```sh
125
- ~/.../224/B
165
+ ~/.../abc224/B
126
166
  ❯ atcdr t
127
167
  ```
128
168
 
@@ -132,82 +172,90 @@ WAの場合は以下のような表示になります。
132
172
 
133
173
  ![demo画像](./.images/demo3.png)
134
174
 
135
-
136
175
  ### 提出する
137
176
 
138
177
  ```sh
139
- ~/.../224/B
178
+ ~/.../abc224/B
140
179
  ❯ atcdr s
141
180
  ```
142
- を実行すると, 提出することができます。提出にはAtCoderのサイトへのログインが必要です。
181
+
182
+ を実行すると、提出することができます。提出にはAtCoderのサイトへのログインが必要です。
143
183
 
144
184
  ### 解答をGPTで生成する
145
185
 
146
186
  ```sh
147
- ~/.../224/B
187
+ ~/.../abc224/B
148
188
  ❯ atcdr g
149
189
  ```
190
+
150
191
  で解答をGPTで生成します。Chat GPTのAPIキーが必要です。さらに、生成されたファイルはサンプルケースが自動でテストされ、**テストをパスしなかった場合、テスト結果がGPTにフィードバックされ解答が再生成**されます。
151
192
 
152
193
  GPTとプログラムとのやり取りのログはJSONファイルで保存されます。
153
194
 
154
195
  ## 解答生成機能generateコマンドに関する注意点
155
196
 
156
- [AtCoder生成AI対策ルール](https://info.atcoder.jp/entry/llm-rules-ja)によるとAtCoder Beginner Contest(以下、ABCとする)および AtCoder Regular Contest (Div. 2) においてに問題文を生成AIに直接与えることは禁止されています。ただし、このルールは過去問を練習している際には適用されません。 該当のコンテスト中にこの機能を使用しないでください。
197
+ [AtCoder生成AI対策ルール](https://info.atcoder.jp/entry/llm-rules-ja)によるとAtCoder Beginner Contest(以下、ABCとする)および AtCoder Regular Contest (Div. 2) においてに問題文を生成AIに直接与えることは禁止されています。ただし、このルールは過去問を練習している際には適用されません。該当のコンテスト中にこの機能を使用しないでください。
157
198
 
158
199
  ## その他の機能
159
200
 
160
201
  ### markdownコマンド
161
202
 
162
203
  完全なCLI環境方向けのコマンドです。
204
+
163
205
  ```sh
164
- ~/.../224/B
206
+ ~/.../abc224/B
165
207
  ❯ atcdr md
166
208
  ```
167
- を実行すると, 問題をプリントします。
209
+
210
+ を実行すると、問題をプリントします。
168
211
 
169
212
  ![demo画像](./.images/demo4.png)
170
213
 
171
214
  ### 複数のファイルを一度にテスト
172
215
 
173
216
  ```sh
174
- ~/.../224/B
217
+ ~/.../abc224/B
175
218
  ❯ atcdr t *.py
176
219
  ```
220
+
177
221
  でフォルダー内にあるすべてのPythonファイルを一度にテストします。
222
+
178
223
  ```sh
179
- ~/.../224/B
224
+ ~/.../abc224/B
180
225
  ❯ atcdr t mon.py mon.c mon.cpp
181
226
  ```
182
227
 
183
228
  フォルダー内に複数ファイルある場合は、インタラクティブに選択できます。
229
+
184
230
  ```sh
185
- ~/.../224/B
231
+ ~/.../abc224/B
186
232
  ❯ atcdr t
187
233
  ```
188
234
 
189
235
  ```sh
190
- ~/.../224/B
236
+ ~/.../abc224/B
191
237
  ❯ atcdr t
192
- 複数のファイルが見つかりました.ファイルを選択してください:
238
+ 複数のファイルが見つかりました.ファイルを選択してください:
193
239
  十字キーで移動, [enter]で実行
194
- ❯❯❯ mon.py
195
- mon.c
196
- mon.cpp
240
+ ❯❯❯ mon.py
241
+ mon.c
242
+ mon.cpp
197
243
  ```
198
244
 
199
245
  ### プログラミング言語を指定してコードを生成
200
246
 
201
247
  `--lang`オプションを使うと、生成したいプログラミング言語を指定できます。
248
+
202
249
  ```sh
203
- ~/.../224/B
250
+ ~/.../abc224/B
204
251
  ❯ atcdr generate --lang rust
205
252
  ```
253
+
206
254
  ### テストをせずにコードのみ生成
207
255
 
208
256
  デフォルトで`atcdr generate`コマンドは生成されたコードをテストしますが、テストせずにコードのみ生成できます。
209
257
 
210
258
  ```sh
211
- ~/.../224/B
259
+ ~/.../abc224/B
212
260
  ❯ atcdr generate --lang rust --without_test
213
261
  ```
@@ -4,86 +4,126 @@
4
4
 
5
5
  🚧 このプロジェクトはまだ実験段階です。日々のAtCoder学習に役立つ機能を順次追加しています。
6
6
 
7
- AtCoderStudyBoosterはAtCoderの学習を加速させるためのCLIツールです。問題をローカルにダウンロードし、テスト、提出、解答の作成をサポートするツールです。Pythonが入っていることが必須です。Pythonが入っている環境なら、`pip install AtCoderStudyBooster`でインストールできます。(Python3.8以上が必要です)
7
+ AtCoderStudyBoosterはAtCoderの学習を加速させるためのCLIツールです。問題をローカルにダウンロードし、テスト、提出、解答の作成をサポートするツールです。Pythonが入っていることが必須です。Pythonが入っている環境なら、
8
+
9
+ ```sh
10
+ pip install AtCoderStudyBooster
11
+ ```
12
+
13
+ でインストールできます。(Python3.8以上が必要です)
8
14
 
9
15
  キャプチャ認証が導入されたあとでも、CLIから半自動でログイン&提出できます。ただしキャプチャをGUIから人力で解く必要があります。キャプチャー認証をバイパスするものではありません。
10
16
 
11
17
  このツールは以下のプロジェクトに強く影響を受けています。
12
- [online-judge-tools](https://github.com/online-judge-tools)
13
- [atcoder-cli](https://github.com/Tatamo/atcoder-cli)
14
-
18
+ - [online-judge-tools](https://github.com/online-judge-tools)
19
+ - [atcoder-cli](https://github.com/Tatamo/atcoder-cli)
15
20
 
16
21
  ## 利用ケース
17
22
 
18
23
  まずは`download`コマンドを利用して問題をローカルにダウンロードしてみましょう。
19
24
 
20
- ### B問題の練習したい場合
21
-
22
- ABCコンテストの223から226のB問題だけを集中的に練習したい場合、次のコマンドを実行します。
23
-
24
- ```sh
25
- ❯ atcdr download B 223..226
26
- ```
27
-
28
- コマンドを実行すると,次のようなフォルダーを作成して、各々のフォルダーに問題をダウンロードします。
29
-
30
- ```css
31
- B
32
- ├── 223
33
- │ ├── StringShifting.html
34
- │ └── StringShifting.md
35
- ├── 224
36
- │ ├── Mongeness.html
37
- │ └── Mongeness.md
38
- ├── 225
39
- │ ├── StarorNot.html
40
- │ └── StarorNot.md
41
- └── 226
42
- ├── CountingArrays.html
43
- └── CountingArrays.md
44
- ```
45
-
46
- ### 特定のコンテストの問題に取り組みたい場合
47
-
48
- ```sh
49
- ❯ atcdr download 223..225 A..C
50
- ```
51
- のように実行すると以下のようなフォルダーを生成します.
52
-
53
- ```css
54
- .
55
- ├── 223
56
- │ ├── A
57
- │ │ ├── ExactPrice.html
58
- │ │ └── ExactPrice.md
59
- │ ├── B
60
- │ │ ├── StringShifting.html
61
- │ │ └── StringShifting.md
62
- │ └── C
63
- │ ├── Doukasen.html
64
- │ └── Doukasen.md
65
- ├── 224
66
- │ ├── A
67
- │ │ ├── Tires.html
68
- │ │ └── Tires.md
69
- │ ├── B
70
- │ │ ├── Mongeness.html
71
- │ │ └── Mongeness.md
72
- │ └── C
73
- │ ├── Triangle.html
74
- │ └── Triangle.md
75
- └── 225
76
- ├── A
77
- │ ├── DistinctStrings.html
78
- │ └── DistinctStrings.md
79
- ├── B
80
- │ ├── StarorNot.html
81
- │ └── StarorNot.md
82
- └── C
83
- ├── CalendarValidator.html
84
- └── CalendarValidator.md
25
+ ### 1. 特定のコンテストをダウンロードする
26
+
27
+ 1つのコンテストの問題をダウンロードしたい場合の例です。
28
+
29
+ #### ABC350の全問題をダウンロード
30
+ ```sh
31
+ ❯ atcdr download abc350
32
+ ```
33
+
34
+ #### ABC350のA〜D問題をダウンロード
35
+ ```sh
36
+ ❯ atcdr download abc350 {A..D}
85
37
  ```
86
38
 
39
+ #### 競プロ典型90問のダウンロード
40
+ ```sh
41
+ ❯ atcdr download typical90
42
+ ```
43
+
44
+ ### 2. 複数のコンテストを一括でダウンロードする
45
+
46
+ 複数のコンテストを一度にダウンロードしたい場合の例です。bashのブレース展開を活用します。
47
+
48
+ #### ABC001〜ABC010までの全問題
49
+ ```sh
50
+ ❯ atcdr download abc{001..010}
51
+ ```
52
+
53
+ #### ABC320〜ABC325までのA〜C問題
54
+ ```sh
55
+ ❯ atcdr download abc{320..325} {A..C}
56
+ ```
57
+
58
+ 次のようなフォルダー構造が生成されます:
59
+
60
+ ```
61
+ abc320/
62
+ ├── A/
63
+ │ ├── Problem.html
64
+ │ └── Problem.md
65
+ ├── B/
66
+ │ ├── Problem.html
67
+ │ └── Problem.md
68
+ └── C/
69
+ ├── Problem.html
70
+ └── Problem.md
71
+ abc321/
72
+ ├── A/
73
+ ...(以下同様)
74
+ ```
75
+
76
+ ### 3. 特定の問題(A問題、B問題など)を集中的に演習したい場合
77
+
78
+ 特定の難易度の問題だけを集めて練習したい場合は、**問題ラベルを先に指定**すると便利です。
79
+
80
+ #### B問題だけを集中的に練習
81
+ ```sh
82
+ ❯ atcdr download B abc{250..260}
83
+ ```
84
+
85
+ 問題ラベルを先に指定すると、問題ラベルごとにフォルダが作成され、その中にコンテスト名のフォルダが配置されます。
86
+
87
+ ```
88
+ B/
89
+ ├── abc250/
90
+ │ ├── Problem.html
91
+ │ └── Problem.md
92
+ ├── abc251/
93
+ │ ├── Problem.html
94
+ │ └── Problem.md
95
+ ├── abc252/
96
+ │ ├── Problem.html
97
+ │ └── Problem.md
98
+ └── ...(以下同様)
99
+ ```
100
+
101
+ A問題とB問題を集める場合(`{A,B} abc{300..302}`):
102
+
103
+ ```
104
+ A/
105
+ ├── abc300/
106
+ │ ├── Problem.html
107
+ │ └── Problem.md
108
+ ├── abc301/
109
+ │ ├── Problem.html
110
+ │ └── Problem.md
111
+ └── abc302/
112
+ ├── Problem.html
113
+ └── Problem.md
114
+ B/
115
+ ├── abc300/
116
+ │ ├── Problem.html
117
+ │ └── Problem.md
118
+ ├── abc301/
119
+ │ ├── Problem.html
120
+ │ └── Problem.md
121
+ └── abc302/
122
+ ├── Problem.html
123
+ └── Problem.md
124
+ ```
125
+ このディレクトリ構造により、同じ難易度の問題を一箇所に集めて効率的に演習できます。
126
+
87
127
  ### 問題を解く
88
128
 
89
129
  MarkdownファイルあるいはHTMLファイルをVS CodeのHTML Preview, Markdown Previewで開くと問題を確認できます。VS Codeで開くと左側にテキストエディターを表示して、右側で問題をみながら問題に取り組めます。
@@ -95,13 +135,13 @@ MarkdownファイルあるいはHTMLファイルをVS CodeのHTML Preview, Markd
95
135
  問題をダウンロードしたフォルダーに移動します。
96
136
 
97
137
  ```sh
98
- ❯ cd 224/B
138
+ ❯ cd abc224/B
99
139
  ```
100
140
 
101
- 移動したフォルダーで解答ファイルを作成後をtestコマンドを実行すると, サンプルケースをテストします。
141
+ 移動したフォルダーで解答ファイルを作成後、testコマンドを実行すると、サンプルケースをテストします。
102
142
 
103
143
  ```sh
104
- ~/.../224/B
144
+ ~/.../abc224/B
105
145
  ❯ atcdr t
106
146
  ```
107
147
 
@@ -111,82 +151,90 @@ WAの場合は以下のような表示になります。
111
151
 
112
152
  ![demo画像](./.images/demo3.png)
113
153
 
114
-
115
154
  ### 提出する
116
155
 
117
156
  ```sh
118
- ~/.../224/B
157
+ ~/.../abc224/B
119
158
  ❯ atcdr s
120
159
  ```
121
- を実行すると, 提出することができます。提出にはAtCoderのサイトへのログインが必要です。
160
+
161
+ を実行すると、提出することができます。提出にはAtCoderのサイトへのログインが必要です。
122
162
 
123
163
  ### 解答をGPTで生成する
124
164
 
125
165
  ```sh
126
- ~/.../224/B
166
+ ~/.../abc224/B
127
167
  ❯ atcdr g
128
168
  ```
169
+
129
170
  で解答をGPTで生成します。Chat GPTのAPIキーが必要です。さらに、生成されたファイルはサンプルケースが自動でテストされ、**テストをパスしなかった場合、テスト結果がGPTにフィードバックされ解答が再生成**されます。
130
171
 
131
172
  GPTとプログラムとのやり取りのログはJSONファイルで保存されます。
132
173
 
133
174
  ## 解答生成機能generateコマンドに関する注意点
134
175
 
135
- [AtCoder生成AI対策ルール](https://info.atcoder.jp/entry/llm-rules-ja)によるとAtCoder Beginner Contest(以下、ABCとする)および AtCoder Regular Contest (Div. 2) においてに問題文を生成AIに直接与えることは禁止されています。ただし、このルールは過去問を練習している際には適用されません。 該当のコンテスト中にこの機能を使用しないでください。
176
+ [AtCoder生成AI対策ルール](https://info.atcoder.jp/entry/llm-rules-ja)によるとAtCoder Beginner Contest(以下、ABCとする)および AtCoder Regular Contest (Div. 2) においてに問題文を生成AIに直接与えることは禁止されています。ただし、このルールは過去問を練習している際には適用されません。該当のコンテスト中にこの機能を使用しないでください。
136
177
 
137
178
  ## その他の機能
138
179
 
139
180
  ### markdownコマンド
140
181
 
141
182
  完全なCLI環境方向けのコマンドです。
183
+
142
184
  ```sh
143
- ~/.../224/B
185
+ ~/.../abc224/B
144
186
  ❯ atcdr md
145
187
  ```
146
- を実行すると, 問題をプリントします。
188
+
189
+ を実行すると、問題をプリントします。
147
190
 
148
191
  ![demo画像](./.images/demo4.png)
149
192
 
150
193
  ### 複数のファイルを一度にテスト
151
194
 
152
195
  ```sh
153
- ~/.../224/B
196
+ ~/.../abc224/B
154
197
  ❯ atcdr t *.py
155
198
  ```
199
+
156
200
  でフォルダー内にあるすべてのPythonファイルを一度にテストします。
201
+
157
202
  ```sh
158
- ~/.../224/B
203
+ ~/.../abc224/B
159
204
  ❯ atcdr t mon.py mon.c mon.cpp
160
205
  ```
161
206
 
162
207
  フォルダー内に複数ファイルある場合は、インタラクティブに選択できます。
208
+
163
209
  ```sh
164
- ~/.../224/B
210
+ ~/.../abc224/B
165
211
  ❯ atcdr t
166
212
  ```
167
213
 
168
214
  ```sh
169
- ~/.../224/B
215
+ ~/.../abc224/B
170
216
  ❯ atcdr t
171
- 複数のファイルが見つかりました.ファイルを選択してください:
217
+ 複数のファイルが見つかりました.ファイルを選択してください:
172
218
  十字キーで移動, [enter]で実行
173
- ❯❯❯ mon.py
174
- mon.c
175
- mon.cpp
219
+ ❯❯❯ mon.py
220
+ mon.c
221
+ mon.cpp
176
222
  ```
177
223
 
178
224
  ### プログラミング言語を指定してコードを生成
179
225
 
180
226
  `--lang`オプションを使うと、生成したいプログラミング言語を指定できます。
227
+
181
228
  ```sh
182
- ~/.../224/B
229
+ ~/.../abc224/B
183
230
  ❯ atcdr generate --lang rust
184
231
  ```
232
+
185
233
  ### テストをせずにコードのみ生成
186
234
 
187
235
  デフォルトで`atcdr generate`コマンドは生成されたコードをテストしますが、テストせずにコードのみ生成できます。
188
236
 
189
237
  ```sh
190
- ~/.../224/B
238
+ ~/.../abc224/B
191
239
  ❯ atcdr generate --lang rust --without_test
192
240
  ```