# 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.
![](./examples/run_solution.gif)
## 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/b8/ad/0b895b5a9281c53f04f96e111da9021716a429799880f247211009b87668/cfkit-0.0.27.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![](./examples/run_solution.gif)\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.27",
"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": "03d0c40040ae8bac8e34eb00354017ae6d123ab280e7adc16df7559b3ab70902",
"md5": "ff7e1c0117013d731d93724eec19341b",
"sha256": "e6471bd7a110a911d4713c7abda184aa93121900c04a8b7de9b4ee5695cf12f0"
},
"downloads": -1,
"filename": "cfkit-0.0.27-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ff7e1c0117013d731d93724eec19341b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 8226098,
"upload_time": "2024-12-14T09:40:45",
"upload_time_iso_8601": "2024-12-14T09:40:45.342115Z",
"url": "https://files.pythonhosted.org/packages/03/d0/c40040ae8bac8e34eb00354017ae6d123ab280e7adc16df7559b3ab70902/cfkit-0.0.27-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b8ad0b895b5a9281c53f04f96e111da9021716a429799880f247211009b87668",
"md5": "947b42b2bbba4fd1e8d59da0876eaaa0",
"sha256": "5e8248afea960a3d0d3eafb0879fb3398150a061fe0b7b2e27f94fdf967a28af"
},
"downloads": -1,
"filename": "cfkit-0.0.27.tar.gz",
"has_sig": false,
"md5_digest": "947b42b2bbba4fd1e8d59da0876eaaa0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 15516983,
"upload_time": "2024-12-14T09:43:28",
"upload_time_iso_8601": "2024-12-14T09:43:28.828193Z",
"url": "https://files.pythonhosted.org/packages/b8/ad/0b895b5a9281c53f04f96e111da9021716a429799880f247211009b87668/cfkit-0.0.27.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-14 09:43:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ghoudiy",
"github_project": "cfkit",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "cfkit"
}