https://github.com/srvariable/42projecttemplatebuilder
A template generator for 42 C Projects
https://github.com/srvariable/42projecttemplatebuilder
42 open-source python template
Last synced: about 1 year ago
JSON representation
A template generator for 42 C Projects
- Host: GitHub
- URL: https://github.com/srvariable/42projecttemplatebuilder
- Owner: SrVariable
- Created: 2023-11-12T11:27:36.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-19T10:12:02.000Z (almost 2 years ago)
- Last Synced: 2024-06-19T19:26:54.182Z (almost 2 years ago)
- Topics: 42, open-source, python, template
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 42 Project Template Builder
## Table of Contents
1. [Description](#description)
2. [Requirements](#requirements)
3. [Usage](#usage)
4. [Alias](#alias)
## Description
This is a Python script that builds a 42 Project Template for your C Projects.
## Requirements
- Git
- Python 2.7.16 or later versions
## Usage
Clone the repository:
```Shell
git clone https://github.com/SrVariable/42ProjectTemplateBuilder
```
Go inside the folder:
```Shell
cd 42ProjectTemplateBuilder
```
Run the file:
```Shell
python main.py
```
It will ask you the project name, your login and your email
```Shell
Introduce the name of the project: hello_world
Introduce your login: ribana-b
Introduce your email: ribana-b@student.42malaga.com
```
It will create the following directory tree in the current directory:
```text
| - 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](https://github.com/SrVariable/42ProjectTemplateBuilder/blob/personal/main.py) to see an example.
## Alias
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:
```Shell
alias build="python ~/(path_of_repository)/42ProjectTemplateBuilder/main.py" >> ~/.zshrc
```
If you have bash:
```Shell
alias build="python ~/(path_of_repository)/42ProjectTemplateBuilder/main.py" >> ~/.bashrc
```