Skip to main content

RoundCreator

Create a folder structure for programming contest problems. It is intended to work in Python 3 and in Linux environments, but that does not mean that it cannot work on other platforms such as Windows or MacOS or other Python versions.

What it can be guaranteed is that RoundCreator won't work in Python 2.6 due to the argparse dependency.

Installation

If you have cloned this repo, you can type python setup.py install. This will install a package called "RoundCreator" and will create a "RoundCreator" terminal command.

This package can also be installed with pip

pip install RoundCreator

You can check libraries.io or PyPI for the whole version history.

General overview

RoundCreator accepts some command line arguments and then does some stuff. Its arguments (and its default values) are:

  • --name Contest name. Its default value is "myContest"
  • --amount Number of problems. Its default value is 5
  • --single Type it if you want a single problem. It will place the source and scripts in the contest folder. Overrides --amount
  • --author Your name
  • --command Shell command to execute after creating the folder structure. Will be execute inside the contest folder. Its default value is chmod 777 * -R

A simple example

Let's suppose that you are competing in a contest called "hardContest" which has two problems (a and b), then, the following command:
RoundCreator --name hardContest --amount 2

Will create the following folder structure:

$ tree hardContest/
hardContest/
├── a
│   ├── compile.sh
│   └── main.cc
└── b
    ├── compile.sh
    └── main.cc

2 directories, 4 files

And, given that the default command changes the permissions of the whole folder structure, you should expect to see something similar to this when listing the files:

$ ls -ltRa
.:
total 16
drwxrwxr-x 4 sergiorgs sergiorgs 4096 Aug  8 10:22 .
drwxrwxr-x 3 sergiorgs sergiorgs 4096 Aug  8 10:22 ..
drwxrwxrwx 2 sergiorgs sergiorgs 4096 Aug  8 10:22 a
drwxrwxrwx 2 sergiorgs sergiorgs 4096 Aug  8 10:22 b

./a:
total 16
drwxrwxrwx 2 sergiorgs sergiorgs 4096 Aug  8 10:22 .
drwxrwxr-x 4 sergiorgs sergiorgs 4096 Aug  8 10:22 ..
-rwxrwxrwx 1 sergiorgs sergiorgs  236 Aug  8 10:22 compile.sh
-rwxrwxrwx 1 sergiorgs sergiorgs  342 Aug  8 10:22 main.cc

./b:
total 16
drwxrwxrwx 2 sergiorgs sergiorgs 4096 Aug  8 10:22 .
drwxrwxr-x 4 sergiorgs sergiorgs 4096 Aug  8 10:22 ..
-rwxrwxrwx 1 sergiorgs sergiorgs  236 Aug  8 10:22 compile.sh
-rwxrwxrwx 1 sergiorgs sergiorgs  342 Aug  8 10:22 main.cc

Templates

The code templates are the following:

C++ source code

/*
    Template by RoundCreator
    https://github.com/srgrr/RoundCreator
    
    Author: ##AUTHOR##
*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;

int main() {
  ios_base::sync_with_stdio(0); cin.tie(0);
  
}

Compile script

g++ main.cc -Wall -Wextra -pedantic -std=c++14 -O2 -Wshadow -Wformat=2 -Wfloat-equal -Wconversion -Wlogical-op -Wcast-qual -Wcast-align -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_FORTIFY_SOURCE=2 -fsanitize=address -fstack-protector

Running on Windows

Since RoundCreator is written in Python you should expect it to work in Windows too. However, there are two unadressed issues:

  • The compile script will have the sh extension
  • The --command flag defaults to a linux command
  • Many Windows coders use MinGW instead of gcc. The compile command may not work. These issues can be addressed by using some sort of unix terminal in windows instead of cmd.exe and gcc instead of MinGW.

Release files for RoundCreator 2.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for RoundCreator 2.1.2
File Size Uploaded
RoundCreator-2.1.2.tar.gz 4.9 kB Details

Release files / RoundCreator-2.1.2.tar.gz

Download URL RoundCreator-2.1.2.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
eb753f141fdae24a9602946bc13232414769cb988d28406724782ad1af34161d
BLAKE2b-256 checksum
How to use checksums
0a4308b116dbe2cb9021933ebe822dd73f1d7f1e55b916eebec3970ff098f394
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.15+

Release history Release notifications | RSS feed

This release

2.1.2 This release

1 release file

2.1.1

1 release file

2.1.0

1 release file

1.6.1

1 release file

1.6.0

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page