This is a Python script that builds a 42 Project Template for your C Projects.
- Git
- Python 2.7.16 or later versions
Clone the repository:
git clone https://github.com/SrVariable/42ProjectTemplateBuilder
Go inside the folder:
cd 42ProjectTemplateBuilder
Run the file:
python main.py
It will ask you the project name, your login and your email
Introduce the name of the project: hello_world
Introduce your login: ribana-b
Introduce your email: [email protected]
It will create the following directory tree in the current directory:
| - include
| | - hello_world.h
| - src
| | - hello_world.c
| - utils
| | - utils.c
| - Makefile
Important
In Python 2.X you have to introduce your login and email with double quotes.
Tip
If you don't want to type this every time you can modify the inputs for strings with your login and email in the file main.py Check personal to see an example.
Since it creates the template in the current directory, you can create an alias to run the program, so you will be able to execute it anywhere.
If you have zsh:
alias build="python ~/(path_of_repository)/42ProjectTemplateBuilder/main.py" >> ~/.zshrc
If you have bash:
alias build="python ~/(path_of_repository)/42ProjectTemplateBuilder/main.py" >> ~/.bashrc