/python_automation_cpp

This is how to run cpp program and organize all of your executable files, since in unix system you can't add them to .gitignore

Primary LanguagePython

python_automation_cpp

This is python script that automate the cpp compilation throught console.

How to use it:

First you need to have python 3.x.x and g++ compiler install. Then you will need vscode in order to run this program, on vscode install the extension "terminal-command-keys" Screen-Shot-2021-10-28-at-14-23-53

Now its time to configure your shourcuts: press cmd+shift+p or ctrl+shift+p type key and open the following: Screen-Shot-2021-10-28-at-14-26-21

Inside of it copy and paste the keybinding-config.json file in this repository. Open a vscode file press cmd+b and cmd+h and enjoy!

Motivation

I'm a mac user, one day I wanted to upload my C++ projects to a github repository and I noticed that I had a bunch of executable file, since C++ its a compiled lenguage. In unix based OS you cant add this executable files to .gitignore, so that was a problem.

Solution

I came up with an elegant solution, when I compiled my programs, this executable files will go to a folder /bin and then I can add /bin in .gitignore and problem solved!

Extras:

This code give you beatifully colored message in your console, telling you if there are sort of mistakes or typos.

Screen-Shot-2021-10-28-at-14-17-09 Screen-Shot-2021-10-28-at-14-17-31 Screen-Shot-2021-10-28-at-14-17-47 Screen-Shot-2021-10-28-at-14-18-05

In this repository I have not exclude the /bin folder to you, but its just for demostration the ideal thing is that you add bin in your .gitignore file