contest-builder


Namecontest-builder JSON
Version 0.0.5 PyPI version JSON
download
home_pageNone
SummaryCompetetive Programming Management Tool
upload_time2024-04-10 00:30:57
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2023 Amirhossein Shapoori Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords competetive programming cp manager compile tool codeforces
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Contest Builder

![Python](https://img.shields.io/badge/Python-3.9%2B-blue)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)

Contest Builder is a CLI tool designed to simplify the process of managing programming contest solutions by providing a structured workflow for organizing, compiling, and testing code.

## Features

- Quickly generate the folder and file structure for a contest's problems.
- Customize templates for generating solution files.
- Compile and run solutions with ease.
- Test solutions for correctness.

## Table of Contents

<!-- vim-markdown-toc GFM -->

* [Installation](#installation)
* [Usage](#usage)
  * [Initializing The Workspace](#initializing-the-workspace)
  * [Generating Contest Structure](#generating-contest-structure)
  * [Compiling and Running Solutions](#compiling-and-running-solutions)
  * [Creating Structure for Single Problem](#creating-structure-for-single-problem)
* [Configuration](#configuration)
* [Contributing](#contributing)
* [License](#license)

<!-- vim-markdown-toc -->

## Installation

You can install Contest Builder via pip:

```bash
pip install contest-builder
```

## Usage

### Initializing The Workspace

In order to specify the template files and default options for the future, you need to initialize a folder inorder
to store the files of the contest over there.

```bash
contest-builder --init
```

- this will generate:
  1. A config file named `cb-config.json`, and
  1. A `templates` folder which stores language specific templates.

### Generating Contest Structure

To generate the folder and file structure for a contest, use the contest-builder command with the `--name` option:

```bash
contest-builder --name <contest_name>
```

This will create the necessary directories and files for each problem in the contest, using the provided templates.
You can specify the details of the contest by passing other options as well. The list of all options are as follow:

- `--provider <site_provider>`
  You need to specify the website that provides the contest in the config file first. There are some default values
  as well like `codeforces` and `leetcode`.
- `--problem_cnt <problem_count>`
  Specify the number of problems.
- `--language <programming_language>`
  Specify the language you are using at this contest if it differs from the default value.
- `--name_type <folders_name_type>`
  It can be `alphabetical`, `numerical`, or `roman`.

For example you want to create a codeforces contest with 8 problems, using python language. in order to do this, you
can simply write:

```bash
contest-builder --name "Codeforces Round 938 (Div. 3)" --problem_cnt 8 --language py --provider cf
```

You can set your desired abbreviations for languages and contest providers in the `cb-config`.

### Compiling and Running Solutions

To compile and run a solution for a specific problem, use the contest-builder command with the --run option:

```bash
contest-builder --run <problem_name>
```

This will detect the language you've chosen to write the code, and then
compiles and executes the solution based on the way it's provided in the
`cb-config`. If you are located in the
problem's folder, you can discard the `<problem_name>` and just pass the `--run` option.

Example:

```bash
contest-builder --run a
```

### Creating Structure for Single Problem

   You can also create the folder and file structure for a single problem using the contest-builder command with the `--problem` option:

```bash
contest-builder --problem --name <problem_name>
```

This will generate the necessary files and directories for the specified problem.

Example:

```bash
contest-builder --problem --name "Random Problem" --language seepp --provider lc
```

it will generate `leetcode/problemset/random-problem/random-problem.cpp` and it's
corresponding input as well.

## Configuration

Contest Builder allows you to customize templates for generating solution files. You can modify these templates according to your 
preferences by editing the template files located in the `templates` directory or adding the new ones for other languages.

Also you need to edit the `compile` and `run` sections in the config file as you wish.

## Contributing

Contributions are welcome! If you have any ideas for improvements or new features, feel free to open an issue or submit a pull request.

## License

Contest Builder is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "contest-builder",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "competetive, programming, CP, manager, compile tool, codeforces",
    "author": null,
    "author_email": "shamir0xe <shamir0xe@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/79/51/fab0714f787cd59155f87934d91896965e90e1ddffb796af2e5f4c406578/contest-builder-0.0.5.tar.gz",
    "platform": null,
    "description": "# Contest Builder\n\n![Python](https://img.shields.io/badge/Python-3.9%2B-blue)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\nContest Builder is a CLI tool designed to simplify the process of managing programming contest solutions by providing a structured workflow for organizing, compiling, and testing code.\n\n## Features\n\n- Quickly generate the folder and file structure for a contest's problems.\n- Customize templates for generating solution files.\n- Compile and run solutions with ease.\n- Test solutions for correctness.\n\n## Table of Contents\n\n<!-- vim-markdown-toc GFM -->\n\n* [Installation](#installation)\n* [Usage](#usage)\n  * [Initializing The Workspace](#initializing-the-workspace)\n  * [Generating Contest Structure](#generating-contest-structure)\n  * [Compiling and Running Solutions](#compiling-and-running-solutions)\n  * [Creating Structure for Single Problem](#creating-structure-for-single-problem)\n* [Configuration](#configuration)\n* [Contributing](#contributing)\n* [License](#license)\n\n<!-- vim-markdown-toc -->\n\n## Installation\n\nYou can install Contest Builder via pip:\n\n```bash\npip install contest-builder\n```\n\n## Usage\n\n### Initializing The Workspace\n\nIn order to specify the template files and default options for the future, you need to initialize a folder inorder\nto store the files of the contest over there.\n\n```bash\ncontest-builder --init\n```\n\n- this will generate:\n  1. A config file named `cb-config.json`, and\n  1. A `templates` folder which stores language specific templates.\n\n### Generating Contest Structure\n\nTo generate the folder and file structure for a contest, use the contest-builder command with the `--name` option:\n\n```bash\ncontest-builder --name <contest_name>\n```\n\nThis will create the necessary directories and files for each problem in the contest, using the provided templates.\nYou can specify the details of the contest by passing other options as well. The list of all options are as follow:\n\n- `--provider <site_provider>`\n  You need to specify the website that provides the contest in the config file first. There are some default values\n  as well like `codeforces` and `leetcode`.\n- `--problem_cnt <problem_count>`\n  Specify the number of problems.\n- `--language <programming_language>`\n  Specify the language you are using at this contest if it differs from the default value.\n- `--name_type <folders_name_type>`\n  It can be `alphabetical`, `numerical`, or `roman`.\n\nFor example you want to create a codeforces contest with 8 problems, using python language. in order to do this, you\ncan simply write:\n\n```bash\ncontest-builder --name \"Codeforces Round 938 (Div. 3)\" --problem_cnt 8 --language py --provider cf\n```\n\nYou can set your desired abbreviations for languages and contest providers in the `cb-config`.\n\n### Compiling and Running Solutions\n\nTo compile and run a solution for a specific problem, use the contest-builder command with the --run option:\n\n```bash\ncontest-builder --run <problem_name>\n```\n\nThis will detect the language you've chosen to write the code, and then\ncompiles and executes the solution based on the way it's provided in the\n`cb-config`. If you are located in the\nproblem's folder, you can discard the `<problem_name>` and just pass the `--run` option.\n\nExample:\n\n```bash\ncontest-builder --run a\n```\n\n### Creating Structure for Single Problem\n\n   You can also create the folder and file structure for a single problem using the contest-builder command with the `--problem` option:\n\n```bash\ncontest-builder --problem --name <problem_name>\n```\n\nThis will generate the necessary files and directories for the specified problem.\n\nExample:\n\n```bash\ncontest-builder --problem --name \"Random Problem\" --language seepp --provider lc\n```\n\nit will generate `leetcode/problemset/random-problem/random-problem.cpp` and it's\ncorresponding input as well.\n\n## Configuration\n\nContest Builder allows you to customize templates for generating solution files. You can modify these templates according to your \npreferences by editing the template files located in the `templates` directory or adding the new ones for other languages.\n\nAlso you need to edit the `compile` and `run` sections in the config file as you wish.\n\n## Contributing\n\nContributions are welcome! If you have any ideas for improvements or new features, feel free to open an issue or submit a pull request.\n\n## License\n\nContest Builder is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Amirhossein Shapoori  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Competetive Programming Management Tool",
    "version": "0.0.5",
    "project_urls": {
        "Homepage": "https://github.com/shamir0xe/contest-builder"
    },
    "split_keywords": [
        "competetive",
        " programming",
        " cp",
        " manager",
        " compile tool",
        " codeforces"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "de1485434cae2a9bd2c0e83346f1d9a68f739b97af2d21bb3f7a60d4c7037b43",
                "md5": "96a406ae3092e9ff84f8b6d50ad709ce",
                "sha256": "2be69ae02a3c25725ec9004720d481cf77c7dbf047ec781f905eb23907654e18"
            },
            "downloads": -1,
            "filename": "contest_builder-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "96a406ae3092e9ff84f8b6d50ad709ce",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 31881,
            "upload_time": "2024-04-10T00:31:12",
            "upload_time_iso_8601": "2024-04-10T00:31:12.497049Z",
            "url": "https://files.pythonhosted.org/packages/de/14/85434cae2a9bd2c0e83346f1d9a68f739b97af2d21bb3f7a60d4c7037b43/contest_builder-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7951fab0714f787cd59155f87934d91896965e90e1ddffb796af2e5f4c406578",
                "md5": "dd8c434ab63c9467d25cb625f10c3620",
                "sha256": "dc7ff7acea716c3422a1e8912dc7b409947d7c993e52474b40099e59c98df5a8"
            },
            "downloads": -1,
            "filename": "contest-builder-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "dd8c434ab63c9467d25cb625f10c3620",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 19218,
            "upload_time": "2024-04-10T00:30:57",
            "upload_time_iso_8601": "2024-04-10T00:30:57.565481Z",
            "url": "https://files.pythonhosted.org/packages/79/51/fab0714f787cd59155f87934d91896965e90e1ddffb796af2e5f4c406578/contest-builder-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-10 00:30:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "shamir0xe",
    "github_project": "contest-builder",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "contest-builder"
}
        
Elapsed time: 0.21637s