Making, Project Intialization easier with shell, python and github's api. We all have been through the repetitive task of initializing a git repository locally, then creating the repository on github and then manually adding the remote to the local repository.
This scripting tool will automate the process. All you have to provide is the repository's name and it will initialize and create a repostiory on github for you and will also launch your favourite code editor. As of now, it will launch VS Code but I will change it later.
cron_job_to_pull_django_project.sh
- This script can be used as a cron job for Django application deployed on Gunicorn/Nginx.
In terminal:
./create.sh nameofyourproject gitignore-env
*gitignore-env is an optional argument that can be used to initiate a .gitignore file. It fetches from the www.gitignore.io/api/ api, e.g Django, Node, Flask e.t.c
- Create a git repository locally.
- Create a repository on github.
- Add a readme.
- Add the remote to the local repository and push it to github.
- Launch VS Code
Ubuntu, Mac
- Python3
- VS Code*
- You need to have github api token, you can get by clicking on Settings -> Developers Settings -> Personal Access Token.
- Paste the token in the create.py file.
- In the same file you need to also put your username.
- There you need to check some of the checkboxes,I have checked all of the checkboxes under admin, user and repo.(That works fine for this particular tool).
- Create a directory called my-projects in the root (Your repository will be initialized in this folder).
- Lastly, you need to put your username in place of "yourusername" in line 16 of create.sh.
- Make the file executable(Permissions).
chmod u+x create.sh
-
Launching Vs Code
-
Adding .gitignore
- Help in structuring the documentation
- Provide better comments in the code.