Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raunaksingh9800/runner
C++ command-line tool compiler
https://github.com/raunaksingh9800/runner
bash-script command-line command-line-tool cpp11 shell-script
Last synced: 21 days ago
JSON representation
C++ command-line tool compiler
- Host: GitHub
- URL: https://github.com/raunaksingh9800/runner
- Owner: raunaksingh9800
- License: cc0-1.0
- Created: 2024-09-09T16:10:04.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-29T19:50:24.000Z (2 months ago)
- Last Synced: 2024-12-19T01:08:26.648Z (21 days ago)
- Topics: bash-script, command-line, command-line-tool, cpp11, shell-script
- Language: C++
- Homepage:
- Size: 841 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
![App Screenshot](https://github.com/raunaksingh9800/RUNNER/blob/main/IMG/runner-github.png?raw=true)
# RUNNER
Developed a C++ command-line tool that compiles and runs system commands from a `commands.txt` file 📄, handling command parsing, file I/O, and system calls with error handling 🚨. Integrated features for command listing 📝, initialization ⚙️, and efficient data processing using maps and vectors 🔄.
## Build 🛠️
To Build this project run
```
git clone https://github.com/raunaksingh9800/RUNNER.git
```
#### macOS / Linux 🍏🐧
```bash
g++ -std=c++11 main.cpp ./global_data/*.cpp ./__B2/*.cpp ./__file_handler/*.cpp ./__sys/*.cpp -o ./build/runner
```#### Windows 🖥️
- Install MinGW or MSYS2
- Once installed, open the Command Prompt or MSYS2 Shell and navigate to the directory where your C++ file is located.
``` bash
g++ -std=c++11 main.cpp ./global_data/*.cpp ./__B2/*.cpp ./__file_handler/*.cpp ./__sys/*.cpp -o ./build/runner.exe
```- Using Microsoft Visual Studio
``` bash
cl /EHsc main.cpp
```
## Run ▶️MacOs / Linux 🍏🐧
```bash
./build/runner
```
Windows 🖥️```bash
./build/runner.exe
```## Syntax 💡
| Name | Symbol | Description | Example |
| :-------- | :------- | :------------------------- | :---------------- |
| Heading | `->` | This is like naming your command | ``` -> Run the Program ``` |
| Argument | `>` | This is your command's unique identifiers you will use this as an argument in your terminal | ``` > run ``` |
| command | `$` | You will Write your command to run in the console Here | ``` $ python main.py ``` |
####
```
-> Run Test
> test
$ ./test###Ignored Lines
-> Push To Prod
> push
$ cp ./build ./prodIgnored Lines
-> Run Build
> build
$ g++ main.cpp -o main```
## Argument List 🔧
### Initialise 🆕```bash
runner -init
```| Name | Argument | Description |
| :-------- | :------- | :------------------------- |
| Initialise | `-init` | Makes a file called `commands.txt` . Where you can add your commands|OUTPUT
```bash
Created commands.txt succesfully 🎉SYNTAX:
->
>
$EXAMPLE:
-> Your First Command
> first
$ echo helloCopy the Above 👆 Code into commands.txt
Now Run : runner first
```### List 📃
```bash
runner -list
```| Name | Argument | Description |
| :-------- | :------- | :------------------------- |
| List | `-list` | lists all the commands stored in `commands.txt`|OUTPUT
```bash
⏐⎯⎯⎯ Build the project
⏐⎯⎯ build⏐⎯⎯⎯ clear the terminal
⏐⎯⎯ cls⏐⎯⎯⎯ push to prod
⏐⎯⎯ push⏐⎯⎯⎯ run the project
⏐⎯⎯ run⏐⎯⎯⎯ run test
```## Example 📘
#### File Structure
```
root/
│
├── main.py
│
├── commands.txt```
#### main.py
```python
print("Hello World")
```
#### commands.txt
```
-> Run the Program
> run
$ python main.py
```#### Your input in Terminal / Console
```
➜ runner run
```#### Output
```
RUNNER
▶ V 1.0Run the Program
Your Command:python main.pyHello World
```
## Add To Path 🔗- macOS : [YouTube Tutorial](https://youtu.be/2J58Pc2ZOAQ?si=zcRetl2UBtrtdrUo) 🍏
- Linux : [YouTube Tutorial](https://youtu.be/jIunQSnzs1Y?si=dhZDDfJejSVPGAP1) 🐧
- Windows : [YouTube Tutorial](https://youtu.be/pGRw1bgb1gU?si=EXLIyUoTYgxdq_tY) 🖥️
## Tech Stack**C++ 11 with only Standard library**