Skip to content

SrVariable/42ProjectTemplateBuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

42 Project Template Builder

Table of Contents

  1. Description
  2. Requirements
  3. Usage
  4. 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:

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.

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:

alias build="python ~/(path_of_repository)/42ProjectTemplateBuilder/main.py" >> ~/.zshrc

If you have bash:

alias build="python ~/(path_of_repository)/42ProjectTemplateBuilder/main.py" >> ~/.bashrc