GithubHelp home page GithubHelp logo

ultraviolet33 / automatic-create-project-repo Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 8 KB

Automation-Create-Repository-Python

PowerShell 15.85% Python 69.71% Shell 14.44%
bash-script powershell-script python selenium-python webscraping

automatic-create-project-repo's Introduction

Create-Project-Automation

Description

This is a little Python-Bash-Powershell project that creates a repo on your Github account and clone it on your computer, so you no more need to do it yourself.

This project automates the project creation :

  • creates the repository in your Github account
  • creates the folder in the directory you indicates by cloning the repo
  • creates the files you indicates according to the project type
  • and open the project with your IDE

I used Python with Selenium for web scraping to log in Github and create the repository and bash and powershell scripts to clone the repository.

Python Script

This script uses Selenium to create a repository in your Github account. It does not work everytime because Github can use double auth when Python log in but it is funny to look at.

Steps

  1. You need the driver of your browser to make it work, (chrome, firefox...) check the Selenium doc here

  2. Put your Github pseudo or email in the main python file line 34

    input_login.send_keys("your_email")
  1. Put your Github pseudo in the URL so Python can go to your new repo line 53
    driver.get("https://github.com/" + "your_pseudo/" + repo_name)
  1. Update the scipt call line 59 :

if you use bash :

   subprocess.call(['bash', './scripts/commands_create_project.sh', repo_name, project_type, url_to_clone])

if you use powershell :

    subprocess.call(['powershell', './scripts/commands_create_project.ps1', repo_name, project_type url_to_clone])
  1. Then either in the bash or powershell script, update the path you want the repo will be cloned
    cd your_path/$project_type
  1. Test it in a terminal
    >python main.py repo_name project_type github_pwd

automatic-create-project-repo's People

Contributors

ultraviolet33 avatar

Stargazers

Tenzin Dekyong  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.