This repository contains a python script, that speeds up the process of setting up projects.
Running the script will initialize a local repository, add an empty README.md and push it to Github.
git clone https://github.com/lepasq/repo-automation.git
In order to get the program running, a few variables need to be changed.
Inside main.py
, user_token, user_name and code_editor have to be adjusted.
Next, you need to install the required python packages.
pip3 install -r requirements.txt
If your version 3.X of Python is linked to
python
instead of python3
, you should run
pip install -r requirements.txt
and replace the first line of create.py
with
#!/usr/bin/env python
If you are running windows, you need to replace echo
inside create.py
(l. 34) with ECHO
.
In order to use the program inside your command prompt, the folder containing the repository has to be added to the environment variables.
In order to open the environment variables, type env in the windows search bar and hit enter Click on "Environment Variables".
Edit the user variable "Path" (or create a new user variable with the variable name Path, it if it doesn't exist yet). Enter the location of the directory containing this repository in the variable name.
Your window should now look like this:
In order to execute the command, you need to type
create name
where name is the desired name of the repository that shall be created.
If you want the command to be called differently, you should change the name of create.bat
.
You should keep the python file create
in your scripts folder (~/.local/bin/
) and rename the file to whatever the command should be called.
Finally, you need to add Execution Permissions to your file:
chmod +x create