# cfkit
[![platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-blue.svg)](https://github.com/xalanq/cf-tool/releases)
[![Language](https://img.shields.io/badge/Language-Python-blue)](https://www.python.org/)
[![Python_version](https://img.shields.io/badge/Python->=3.8-gree)](https://www.python.org/)
[![license](https://img.shields.io/badge/license-MIT-%23373737.svg)](https://raw.githubusercontent.com/xalanq/cf-tool/master/LICENSE)
cfkit is a lightweight and efficient CLI tool designed for [Codeforces](https://codeforces.com/).
It’s easy to use, fast and works across platforms.
[Installation](#2-installation) | [Usage](#3-usage) | [FAQ](#4-faq)
## 1\. Introduction
#### Overview:
cfkit is a **fast, cross-platform (Windows, macOS, Linux) command-line interface (CLI)** tool built for Codeforces users to simplify competitive programming. It focuses on **result comparison, fetching problem samples, and automating routine contest tasks**, allowing users to focus more on problem-solving.
#### Features:
* **Efficient Result Comparison:** Compare floating-point numbers, allow any-order comparison, or use strict comparison.
* **High Traffic Resilience:** Parses problem data even under server load.
* **Language Support:** Compatible with all programming languages used on Codeforces.
* **Fetch Problem Samples:** Retrieves sample test cases for problems.
* **Local Compilation and Testing:** Compile and test solutions locally.
* **Template-Based Code Generation:** Generate code with templates, including timestamps and author info.
* **Contest Problem Stats:** Lists problem statistics for specific contests.
* **Enhanced CLI Output:** Distinguish correct and incorrect results easily with colored output.
## 2\. Installation
Ensure [Python](https://www.python.org/) is installed on your system. Then, run these commands in your terminal:
`pip install cfkit`
`cf config all`
#### And your are ready to go!
## 3\. Usage
```
cf run 2000a.cpp Compiles and tests your solution locally,
fetching and parsing missing sample test cases,
then comparing your output to the expected results with highlighted differences.
```
#### Options:
`-o`: Accept answers in any order.
`-c`: Run only custom samples or use custom input without comparing results.
`-s`: Do not ignore extra spaces during comparison.
`-n`: Do not ignore extra new lines during comparison.
```
cf gen 2000a Generates a code file from the default (or chosen) template.
```
In your template code, you can include various placeholders. When you generate code from the template, these placeholders will be automatically replaced with specific values:
```plain
$%author%$ (e.g., ghoudiy).
$%year%$ (e.g., 2024).
$%month%$ (e.g., 9).
$%day%$ (e.g., 7).
$%hour%$ (e.g., 12).
$%minute%$ (e.g., 05).
$%second%$ (e.g., 00).
```
```
cf parse 2000 Fetch all sample test cases from a contest.
```
## 4\. FAQ
**Q:** How do I add a new test case?
**A:** To add a new test case, create two files: `inK.txt` and `outK.txt`, where **K** is a number. If you're using **Linux or MacOs**, omit the **.txt** extension (e.g., `in1`, `ou1`, `in2`, `out2`). You can create additional test cases by increasing the value of K (e.g., `in1.txt`, `out1.txt`, `in2.txt`, `out2.txt`).
**Q**: How to update cfkit package?
**A**: `pip install --upgrade cfkit`
## 5\. Contact
I’m always open to feedback, suggestions, and collaboration! If you have any questions or want to get in touch, feel free to reach out:
Email: ghoudi.dev@gmail.com
GitHub: [my github account](https://github.com/ghoudiy/) — check out my other projects or contribute to ongoing ones.
Support: If you’d like to support my work and help me continue creating cool programs, you can do so [here](https://www.patreon.com/ghoudiy/membership).
Looking forward to hearing from you! :)
Raw data
{
"_id": null,
"home_page": "https://github.com/ghoudiy/cfkit",
"name": "cfkit",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "CLI, Python, competition, management",
"author": "Yassine Ghoudi",
"author_email": "ghoudi.dev@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/7f/1f/308e14cd6f363feb0fb55009605815ab51898e4db556f4b3ed1446c5251e/cfkit-0.0.26.tar.gz",
"platform": null,
"description": "# cfkit\n[![platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-blue.svg)](https://github.com/xalanq/cf-tool/releases)\n[![Language](https://img.shields.io/badge/Language-Python-blue)](https://www.python.org/)\n[![Python_version](https://img.shields.io/badge/Python->=3.8-gree)](https://www.python.org/)\n[![license](https://img.shields.io/badge/license-MIT-%23373737.svg)](https://raw.githubusercontent.com/xalanq/cf-tool/master/LICENSE)\n\ncfkit is a lightweight and efficient CLI tool designed for [Codeforces](https://codeforces.com/).\n\nIt\u2019s easy to use, fast and works across platforms.\n\n[Installation](#2-installation) | [Usage](#3-usage) | [FAQ](#4-faq)\n\n## 1\\. Introduction\n\n#### Overview:\n\ncfkit is a **fast, cross-platform (Windows, macOS, Linux) command-line interface (CLI)** tool built for Codeforces users to simplify competitive programming. It focuses on **result comparison, fetching problem samples, and automating routine contest tasks**, allowing users to focus more on problem-solving.\n\n#### Features:\n\n* **Efficient Result Comparison:** Compare floating-point numbers, allow any-order comparison, or use strict comparison.\n \n* **High Traffic Resilience:** Parses problem data even under server load.\n \n* **Language Support:** Compatible with all programming languages used on Codeforces.\n \n* **Fetch Problem Samples:** Retrieves sample test cases for problems.\n \n* **Local Compilation and Testing:** Compile and test solutions locally.\n \n* **Template-Based Code Generation:** Generate code with templates, including timestamps and author info.\n \n* **Contest Problem Stats:** Lists problem statistics for specific contests.\n \n* **Enhanced CLI Output:** Distinguish correct and incorrect results easily with colored output.\n \n\n## 2\\. Installation\n\nEnsure [Python](https://www.python.org/) is installed on your system. Then, run these commands in your terminal: \n`pip install cfkit` \n`cf config all`\n\n#### And your are ready to go!\n\n## 3\\. Usage\n```\ncf run 2000a.cpp Compiles and tests your solution locally,\n fetching and parsing missing sample test cases,\n then comparing your output to the expected results with highlighted differences.\n```\n\n#### Options:\n\n`-o`: Accept answers in any order. \n`-c`: Run only custom samples or use custom input without comparing results. \n`-s`: Do not ignore extra spaces during comparison. \n`-n`: Do not ignore extra new lines during comparison. \n\n```\ncf gen 2000a Generates a code file from the default (or chosen) template.\n```\n\nIn your template code, you can include various placeholders. When you generate code from the template, these placeholders will be automatically replaced with specific values:\n```plain\n$%author%$ (e.g., ghoudiy). \n$%year%$ (e.g., 2024). \n$%month%$ (e.g., 9). \n$%day%$ (e.g., 7). \n$%hour%$ (e.g., 12). \n$%minute%$ (e.g., 05). \n$%second%$ (e.g., 00). \n```\n\n```\ncf parse 2000 Fetch all sample test cases from a contest.\n```\n## 4\\. FAQ\n**Q:** How do I add a new test case? \n**A:** To add a new test case, create two files: `inK.txt` and `outK.txt`, where **K** is a number. If you're using **Linux or MacOs**, omit the **.txt** extension (e.g., `in1`, `ou1`, `in2`, `out2`). You can create additional test cases by increasing the value of K (e.g., `in1.txt`, `out1.txt`, `in2.txt`, `out2.txt`).\n\n**Q**: How to update cfkit package? \n**A**: `pip install --upgrade cfkit`\n\n## 5\\. Contact\nI\u2019m always open to feedback, suggestions, and collaboration! If you have any questions or want to get in touch, feel free to reach out:\n\nEmail: ghoudi.dev@gmail.com \nGitHub: [my github account](https://github.com/ghoudiy/) \u2014 check out my other projects or contribute to ongoing ones. \nSupport: If you\u2019d like to support my work and help me continue creating cool programs, you can do so [here](https://www.patreon.com/ghoudiy/membership). \nLooking forward to hearing from you! :)\n",
"bugtrack_url": null,
"license": null,
"summary": "A tool for managing coding competitions.",
"version": "0.0.26",
"project_urls": {
"Homepage": "https://github.com/ghoudiy/cfkit",
"Issues": "https://github.com/ghoudiy/cfkit/issues"
},
"split_keywords": [
"cli",
" python",
" competition",
" management"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "759b5bdb3001db40ef354506abf3cd35f9be2b270f0eaa82697fc34c387a7d60",
"md5": "e30b6b4d809b0ccde53fca107b4c17ec",
"sha256": "f8bf388f1408aa645114af2cc2213dd8729fa3b8652dcab833b6cb1fae0a8998"
},
"downloads": -1,
"filename": "cfkit-0.0.26-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e30b6b4d809b0ccde53fca107b4c17ec",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 8226044,
"upload_time": "2024-10-08T23:47:22",
"upload_time_iso_8601": "2024-10-08T23:47:22.816004Z",
"url": "https://files.pythonhosted.org/packages/75/9b/5bdb3001db40ef354506abf3cd35f9be2b270f0eaa82697fc34c387a7d60/cfkit-0.0.26-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7f1f308e14cd6f363feb0fb55009605815ab51898e4db556f4b3ed1446c5251e",
"md5": "827ff31149ff105009d835fb55ba297e",
"sha256": "d40b55c93279af0644db102d300d6b645606f4c7992d8e635ebdba900323230c"
},
"downloads": -1,
"filename": "cfkit-0.0.26.tar.gz",
"has_sig": false,
"md5_digest": "827ff31149ff105009d835fb55ba297e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 14438446,
"upload_time": "2024-10-09T00:08:40",
"upload_time_iso_8601": "2024-10-09T00:08:40.087668Z",
"url": "https://files.pythonhosted.org/packages/7f/1f/308e14cd6f363feb0fb55009605815ab51898e4db556f4b3ed1446c5251e/cfkit-0.0.26.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-09 00:08:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ghoudiy",
"github_project": "cfkit",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "cfkit"
}