cf-tool-cli 1.0.0__py3-none-any.whl
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.
- cf_tool/__init__.py +3 -0
- cf_tool/__main__.py +6 -0
- cf_tool/build.py +211 -0
- cf_tool/cli/__init__.py +117 -0
- cf_tool/cli/account.py +32 -0
- cf_tool/cli/common.py +262 -0
- cf_tool/cli/completion.py +226 -0
- cf_tool/cli/configure.py +386 -0
- cf_tool/cli/problems.py +399 -0
- cf_tool/cli/setup.py +195 -0
- cf_tool/cli/submitting.py +309 -0
- cf_tool/cli/testing.py +354 -0
- cf_tool/codeforces/__init__.py +3 -0
- cf_tool/codeforces/browser.py +346 -0
- cf_tool/codeforces/client.py +521 -0
- cf_tool/codeforces/crypto.py +41 -0
- cf_tool/codeforces/gateway.py +288 -0
- cf_tool/codeforces/http.py +213 -0
- cf_tool/codeforces/pages.py +767 -0
- cf_tool/codeforces/session.py +103 -0
- cf_tool/doctor.py +124 -0
- cf_tool/errors.py +37 -0
- cf_tool/judge.py +481 -0
- cf_tool/languages.py +1195 -0
- cf_tool/listen.py +178 -0
- cf_tool/paths.py +57 -0
- cf_tool/process.py +431 -0
- cf_tool/settings.py +386 -0
- cf_tool/stress.py +167 -0
- cf_tool/ui.py +455 -0
- cf_tool/views.py +306 -0
- cf_tool/workspace.py +777 -0
- cf_tool_cli-1.0.0.dist-info/METADATA +106 -0
- cf_tool_cli-1.0.0.dist-info/RECORD +38 -0
- cf_tool_cli-1.0.0.dist-info/WHEEL +5 -0
- cf_tool_cli-1.0.0.dist-info/entry_points.txt +2 -0
- cf_tool_cli-1.0.0.dist-info/licenses/LICENSE +48 -0
- cf_tool_cli-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cf-tool-cli
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Codeforces from your terminal: get problems, test your code on their samples, submit
|
|
5
|
+
Author: Fau818
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Fau818/cf-tool
|
|
8
|
+
Project-URL: Issues, https://github.com/Fau818/cf-tool/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/Fau818/cf-tool/blob/main/CHANGELOG.md
|
|
10
|
+
Keywords: codeforces,competitive-programming,cli,cp
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Education
|
|
15
|
+
Classifier: Topic :: Education
|
|
16
|
+
Classifier: Topic :: Software Development :: Testing
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: click>=8.1.0
|
|
28
|
+
Requires-Dist: curl_cffi>=0.10.0
|
|
29
|
+
Requires-Dist: beautifulsoup4>=4.12.0
|
|
30
|
+
Requires-Dist: lxml>=4.9.0
|
|
31
|
+
Requires-Dist: rich>=13.0.0
|
|
32
|
+
Requires-Dist: questionary>=2.0.0
|
|
33
|
+
Requires-Dist: cryptography>=42.0.0
|
|
34
|
+
Requires-Dist: psutil>=5.9.0
|
|
35
|
+
Requires-Dist: DrissionPage>=4.0.0
|
|
36
|
+
Requires-Dist: tomlkit>=0.12.0
|
|
37
|
+
Provides-Extra: dev
|
|
38
|
+
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
39
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
40
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
41
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
42
|
+
Requires-Dist: mypy>=1.4.0; extra == "dev"
|
|
43
|
+
Requires-Dist: basedpyright>=1.38.0; extra == "dev"
|
|
44
|
+
Dynamic: license-file
|
|
45
|
+
|
|
46
|
+
# cf-tool
|
|
47
|
+
|
|
48
|
+
[](https://github.com/Fau818/cf-tool/actions/workflows/ci.yml)
|
|
49
|
+
[](https://pypi.org/project/cf-tool-cli/)
|
|
50
|
+
|
|
51
|
+
Codeforces from your terminal: get a contest, test your code on the samples, submit, and
|
|
52
|
+
watch the verdict. No setup first.
|
|
53
|
+
|
|
54
|
+

|
|
55
|
+
|
|
56
|
+
## Install
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
uv tool install cf-tool-cli # or: pipx install cf-tool-cli
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
You need Python 3.10+, a compiler or interpreter for your language, and Google Chrome to
|
|
63
|
+
log in (it works in the background).
|
|
64
|
+
|
|
65
|
+
## A contest, start to finish
|
|
66
|
+
|
|
67
|
+
**`cf get 2050`** makes a folder per problem: the statement, the samples and your starter
|
|
68
|
+
code. The first time, cf asks which language you write in.
|
|
69
|
+
|
|
70
|
+
**`cf test`** builds your code and runs it on the samples. A wrong answer shows the input
|
|
71
|
+
and where your output parts from the answer, down to the test case:
|
|
72
|
+
|
|
73
|
+

|
|
74
|
+
|
|
75
|
+
**`cf submit`** sends it and shows the verdict as it comes. Once the contest is over, a
|
|
76
|
+
failed test comes with it, as Codeforces keeps it, and is saved for `cf test`:
|
|
77
|
+
|
|
78
|
+

|
|
79
|
+
|
|
80
|
+
**`cf status`** lists your submissions, refreshed until they're judged:
|
|
81
|
+
|
|
82
|
+

|
|
83
|
+
|
|
84
|
+
## Commands
|
|
85
|
+
|
|
86
|
+
| Command | What it does |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| `cf get 2050` / `cf get 2050b` | folders, samples and starter code for a contest or a problem |
|
|
89
|
+
| `cf test [problem] [test...]` | build your code and run it on the problem's tests (`-w`: on every save) |
|
|
90
|
+
| `cf submit [problem] [file]` | submit, then watch the verdict |
|
|
91
|
+
| `cf status [submission]` | your submissions, or one with the test it failed |
|
|
92
|
+
| `cf stress` | random tests until your code and a brute force disagree |
|
|
93
|
+
| `cf race 2050` | count down to the start, then get the problems |
|
|
94
|
+
| `cf open` / `cf problems` / `cf contests` | the problem in the browser, a contest's problems, upcoming contests |
|
|
95
|
+
| `cf pick -r 1600 -t dp` | a random problem you haven't solved |
|
|
96
|
+
| `cf new` / `cf listen` | a code file from your starter code; problems from Competitive Companion |
|
|
97
|
+
| `cf pull` / `cf clone` | download the code of your (or anyone's) submissions |
|
|
98
|
+
| `cf login` / `cf config` / `cf doctor` | log in; settings from menus; check the setup |
|
|
99
|
+
|
|
100
|
+
More in the [guide](https://github.com/Fau818/cf-tool/blob/main/docs/guide.md): your own
|
|
101
|
+
tests, checkers, interactive problems, settings, CP Editor, Tab completion, coming from
|
|
102
|
+
cf-tool 0.3.
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
MIT. cf-tool began as a port of [xalanq/cf-tool](https://github.com/xalanq/cf-tool).
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
cf_tool/__init__.py,sha256=Q0u-vcm2x8j4bqpe6wOhMvsYKkWacYmTVtHdYjo40As,69
|
|
2
|
+
cf_tool/__main__.py,sha256=dG2ELP1nFPxHIkcYCshy-gsCrAeBMVdZRL3TzQS3UBg,130
|
|
3
|
+
cf_tool/build.py,sha256=3bM-VJN6cIDVwhS6cMJfzlvsMV_hUIeM3n6I7s0adRQ,8261
|
|
4
|
+
cf_tool/doctor.py,sha256=Tf0jYhUP1XP2ayeHf1lG1vVTCkFFP4JRBmxmOlBMr6Y,4689
|
|
5
|
+
cf_tool/errors.py,sha256=j2TNz6iSp92BvTx4Um5RT0w4S0M-7AhWv55NGMUWgHE,1180
|
|
6
|
+
cf_tool/judge.py,sha256=_fmMW4hlireL6Bd3Kasu7aIo_1XRX611Cp8byM0T8xs,19571
|
|
7
|
+
cf_tool/languages.py,sha256=hpF_8P4QxVoL-1X-GFdEPNfeBcFxJIVbOamsYJhfDGI,42066
|
|
8
|
+
cf_tool/listen.py,sha256=PBP1zdn60oGTvvrFq1BpHRdeJvgOf3GphWKmK5vAlgI,7303
|
|
9
|
+
cf_tool/paths.py,sha256=En5CCvC0uinOH_a9bACmZo9eqzZ-Rr4GpfDdKnJ5uM0,1920
|
|
10
|
+
cf_tool/process.py,sha256=bTjbMrXUcR5o3e-0RCY34LXVBJjxI0-Jz2Qk7ArcJCA,15249
|
|
11
|
+
cf_tool/settings.py,sha256=lPDrqSZ4guV8Ur3tyCVgCoOBd5jn283QLcaXRtg7iDU,15894
|
|
12
|
+
cf_tool/stress.py,sha256=RvS4DXnKHRBFz26KXFQ7n1dKyXmoEr2wQEIUhvxK58M,6955
|
|
13
|
+
cf_tool/ui.py,sha256=yvmVzyHD5DmMXEgoTGAsco0QxGlExVRpVlqT7gRqwO0,15266
|
|
14
|
+
cf_tool/views.py,sha256=tso4J0I0idTCEbR_IjMLw_3KGbUbJC-Tm1zI3VfnBAg,11741
|
|
15
|
+
cf_tool/workspace.py,sha256=dLRBL-Sc1vl4pv1r0ofQ78g6iqAXBaZVkOHAqgdQh9s,32386
|
|
16
|
+
cf_tool/cli/__init__.py,sha256=_OqRbgoDbBqUxWvTYSyA4bNlipos6t87pjUTfYTXdfQ,4006
|
|
17
|
+
cf_tool/cli/account.py,sha256=4uBTa7KDmcgP4rI0n43G9iQFFejsEW8rpwyiwIOIHsM,721
|
|
18
|
+
cf_tool/cli/common.py,sha256=WKWmMx5o3cdYcejB-EzXpLcwhKrztZx7FwPzyRfzCus,10217
|
|
19
|
+
cf_tool/cli/completion.py,sha256=-Ug_2LiY97cj5QaZRBZ37OAA7jujK3wXrvZ2fDDMfmo,8764
|
|
20
|
+
cf_tool/cli/configure.py,sha256=NbYqYMy6dVgWN_rtMMrf-j8a2QybdzhW3ifIvNurfN0,15444
|
|
21
|
+
cf_tool/cli/problems.py,sha256=fqbCsdH2Z6FyaVR66xinEVgMn7Bks9u0GqWgOz9gPDQ,15468
|
|
22
|
+
cf_tool/cli/setup.py,sha256=4Cgd8ZsQwhvWqXLEtnlikscYy_VlWnrRk6QNBuFLw0s,7740
|
|
23
|
+
cf_tool/cli/submitting.py,sha256=M0jILDDKgCVkhoqyeircJi0CWqqgZA-_fFpMGBaCaSw,12207
|
|
24
|
+
cf_tool/cli/testing.py,sha256=md7IdRh6VA7zRUzMqx5nex4D3OyQdpAj8_b4u9zT8ks,13193
|
|
25
|
+
cf_tool/codeforces/__init__.py,sha256=DacGy4hmJYDpKzF_E29UhikHlpcSsxb7hbr_Zb9Oep0,164
|
|
26
|
+
cf_tool/codeforces/browser.py,sha256=c6fuAvB3zr61iPd-u8ff9O4LqO36gtkKj4B_tnVbepk,11515
|
|
27
|
+
cf_tool/codeforces/client.py,sha256=DDU3hH3bzeEfe97tl8G6aWwgFJPVLuVu0xlKhgliL9Y,23852
|
|
28
|
+
cf_tool/codeforces/crypto.py,sha256=0uIKntHocgGGf9mfP9cqc2lvJnySwDG2s1E0pv5mh2E,1369
|
|
29
|
+
cf_tool/codeforces/gateway.py,sha256=shHa0y2w8auq7lUAfZVkS2cVt25c5m_oIrnBa-hbU00,11841
|
|
30
|
+
cf_tool/codeforces/http.py,sha256=sKxLShdDAXaxVTQHk53ieOVWewNj8rorOAPpKB7Yamo,8270
|
|
31
|
+
cf_tool/codeforces/pages.py,sha256=Ytn97BvS0CN0PeMvnuu3DSX1aglSjQbFxQvoDjM9go0,27702
|
|
32
|
+
cf_tool/codeforces/session.py,sha256=3eP63M_Z0h85Nc3jDq5XyGUZ1aKNHx1vb634cGBsiRE,3578
|
|
33
|
+
cf_tool_cli-1.0.0.dist-info/licenses/LICENSE,sha256=gVJ8pB207BlyTL_EvsrcMUDdzAsTgU1PNBKbqJfOcRM,2341
|
|
34
|
+
cf_tool_cli-1.0.0.dist-info/METADATA,sha256=OEvDGjRW-poKNToU-lTo7XILMay6BWMGYF_QH9FsPu0,4650
|
|
35
|
+
cf_tool_cli-1.0.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
36
|
+
cf_tool_cli-1.0.0.dist-info/entry_points.txt,sha256=T647U_7Asnq2mOOt0sxnL8RqocoU0UbIv0OegnphSx0,40
|
|
37
|
+
cf_tool_cli-1.0.0.dist-info/top_level.txt,sha256=sn-InjXWL0nI_zEN7OYjf1a69i55eC5231PEg1ARteg,8
|
|
38
|
+
cf_tool_cli-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Fau818
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
--------------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
cf-tool is a Python port of xalanq/cf-tool (https://github.com/xalanq/cf-tool),
|
|
26
|
+
whose license follows:
|
|
27
|
+
|
|
28
|
+
The MIT License (MIT)
|
|
29
|
+
|
|
30
|
+
Copyright (c) 2014 Manuel Martínez-Almeida
|
|
31
|
+
|
|
32
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
33
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
34
|
+
in the Software without restriction, including without limitation the rights
|
|
35
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
36
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
37
|
+
furnished to do so, subject to the following conditions:
|
|
38
|
+
|
|
39
|
+
The above copyright notice and this permission notice shall be included in
|
|
40
|
+
all copies or substantial portions of the Software.
|
|
41
|
+
|
|
42
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
43
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
44
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
45
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
46
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
47
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
48
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cf_tool
|