This project contains a Python automation script that streamlines the process of managing HackerRank solutions. Instead of manually uploading files, the script automatically:
- Collects solved challenge scripts.
- Organizes them into the correct folder structure. (currently just SQL folder, you can customize as your needs)
- Uses Git to push them into a GitHub repository.
- Includes the
edgedriverfolder required for browser automation.
This ensures all solutions are automatically pushed to GiHub in the same time users submit the solution in HackerRank, so that your solutions are version-controlled, backed up, and easily shareable.
You can explore the repository containing my SQL solutions, which are automatically committed through this project: Access HackerRank_Solutions.
- ✅ Automates repetitive Git commands (add → commit → push).
- ✅ Supports saving HackerRank solutions consistently.
- ✅ Handles challenges name consistenly and automatially matching with HackerRank challenges naming
- ✅ Helps track coding progress directly in GitHub.
- Language: Python 3.x
- Tools/Libraries:
os,subprocess(for automation)git(for version control)selenium(for browser tasks usingedgedriver)
┣ 📂 edgedriver/ # WebDriver dependency (if used for automation)
┣ 📂 HackerRank/ # Folder containing solved HackerRank scripts
┣ 📂 SQL/ # Folder containing solved SQL scripts and commits
┣ 📜 script.py # Main Python automation script
┣ 📜 README.md # Project documentation
✅ No Data Collection: no collect or store any of your code or data
✅ Open Source: Full transparency - review our code anytime
- Clone this repository into your working folder:
clone https://github.com/HuongNguyen0828/HackerRank_toGitHub/ - 🖥️ Set Up Microsoft Edge WebDriver
- Check your Microsoft Edge version:
Find your Edge version
- Check your Microsoft Edge version:
-
If your version is x86, ** Install msedgedriver.exe file underthe
edgedriver_win32folder** -
If not, Download the matching WebDriver:
Microsoft Edge WebDriver Downloads
- Navigate to the project folder: run
cd HackerRank_toGitHub - Install Python dependencies: run `pip install selenium``
- Set your GitHub repository:
-
Create a repository to store all HackerRank solutions.
-
In script.py, replace the remote_url variable with your repository URL:
remote_url = "https://github.com/YourUsername/YourRepoName"
- Run the automation script: run
python script.py✅ And, that’s it! Now, you can login and everytime you submit, your HackerRank solutions will now automatically push to GitHub.
- Multi-Language Support: Currently for SQL, expand to capture and organize C++, Java, JavaScript, etc. solutions
- Supporting additional web browsers (e.g., Google Chrome, Firefox, Safari)
- Extending automation to other platforms that don’t natively support saving code to GitHub (e.g., LeetCode).