A command line tool to organize your competitive programming folders and create .cpp
file from a template, compile, and execute them; right from your terminal.
Use the package manager pip to install CPCLI.
Clone the repo
git clone https://github.com/EricLiclair/CPCLI.git
Change to root directory
cd CPCLI
Run directly or in a virtual environment (make sure you have python >=3.8.10)
python setup.py install
Alternately, you can install it with pip
pip install .
The package is not yet uploaded to PyPI. Once it's up there it will be installed using the python package manager pip.
pip install cpcli
cpcli create <filename>
This will create a folder named filename
in the current directory. This folder will further contain a filename.cpp
file using a predefined template.
cpcli run <filename>
This will create an executable in the directory filename
using the filename\filename.cpp
file and run it.
cpcli delete <filename>
This will check if a subdirectory filename
exists in the directory. If it does, it'll force remove all the content of the dir, else throws an error: No such directory exists
All the input output redirecting commands works fine with the run
command. For example,
cpcli run filename < input.txt
This will execute the output.exe using the input.txt file as input.
cpcli run filename > output.txt
This will execute the output.exe and create output.txt with the console output of the execution.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.