Skip to content

jaixmario/AutoGitUploaderIncpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“˜ AutoGitUploader Guide

A C++ tool to automate uploading files to GitHub repositories. Perfect for backups, deployments, or syncing workflows! πŸš€

GitHub


🌟 Features

  • Recursive directory scanning
  • Skip hidden files/directories (configurable)
  • Base64 encoding for GitHub API compliance
  • Update existing files using SHA checks
  • Simple JSON configuration

πŸ› οΈ Prerequisites

  • libcurl (for HTTP requests)
  • nlohmann/json (JSON parsing)
  • C++17 compiler

Install dependencies on Ubuntu:

sudo apt-get install libcurl4-openssl-dev

βš™οΈ Installation

  1. Clone the repository (or download AutoGitUploader.cpp):
    git clone https://github.com/Niosjai/AutoGitUploaderIncpp.git
    cd AutoGitUploaderIncpp
  2. Compile the code:
    g++ -std=c++17 -o autogituploader AutoGitUploader.cpp -lcurl -lstdc++fs

πŸ”§ Configuration

Create a config.json file:

{
  "GITHUB_TOKEN": "your_github_token",
  "GITHUB_USERNAME": "your_username",
  "REPO_NAME": "your-repo",
  "BRANCH": "main",
  "HIDDEN": false
}
  • πŸ”’ Token Guide: Create a GitHub token here with repo scope.
  • HIDDEN: true skips files/directories starting with ..

πŸš€ Usage

./autogituploader

Example Output:

βœ… src/main.cpp
βœ… docs/README.md
❌ failed_file.txt

πŸ“ Notes

  • Files automatically skipped:
    config.json, autogituploader, *.bak, and hidden files (if HIDDEN: true).
  • Commit message is hardcoded as:
    "uploaded via automation script by mario πŸš€".

🚨 Troubleshooting

  • Compilation errors: Ensure libcurl and nlohmann/json are installed.
  • Permission denied: Run chmod +x autogituploader.
  • API failures: Verify token permissions and repo name.

πŸ’» Happy Automating!
Star this repo if you find it useful! ⭐️

About

.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages