A simple tool to upload files to GitHub repositories
Project description
EZGitUp
A simple command-line tool to upload files to GitHub repositories.
Installation
pip install ezgitup
Usage
Environment Variables
You can set the following environment variables:
GITHUB_TOKEN: Your GitHub personal access token (required)EZGITUP_DEPO: Repository in format "owner/repo" or GitHub URL (optional)
The EZGITUP_DEPO environment variable supports multiple formats:
- Simple format:
owner/repo - SSH URL:
git@github.com:owner/repo.git - HTTPS URL:
https://github.com/owner/repo.git
Command Line Usage
Upload single or multiple files:
# Upload single file
ezgitup path/to/file.txt
# Upload multiple files
ezgitup path/to/file1.txt path/to/file2.txt
# Upload files using wildcards
ezgitup *.json # All JSON files in current directory
ezgitup path/to/dir/* # All files in a directory
ezgitup *.py *.json *.md # Multiple file types
ezgitup test_*.py # Files matching a pattern
# Specify repository
ezgitup --repo username/repository *.json
# or using short option
ezgitup -r username/repository *.json
# Upload files to a specific directory in the repository
ezgitup --dir docs *.md # Upload all markdown files to docs/
ezgitup -d src/data *.json # Upload JSON files to src/data/
# Add UUID to filenames to ensure uniqueness
ezgitup --uuid *.json # Files will be renamed like: data_a1b2c3d4.json
ezgitup -u *.json # Same as above, using short option
# Combine options
ezgitup -r username/repository -d docs -u *.md
The tool will use the following priority for repository information:
- Command-line argument (
--repo/-r) - Environment variable (
EZGITUP_DEPO) - Interactive prompt
If no files are specified, the tool will prompt you to enter file paths interactively. Wildcards are also supported in interactive mode.
Interactive Mode
If you don't specify any files or the EZGITUP_DEPO environment variable, the tool will guide you through the process:
ezgitup
Features
- Upload single or multiple files to GitHub repositories
- Support for wildcard patterns (e.g.,
*.json,test_*.py) - Flexible repository specification:
- Command-line option (
--repo/-r) - Simple owner/repo format
- GitHub SSH URLs
- GitHub HTTPS URLs
- Command-line option (
- Target directory support (
--dir/-d) - UUID support for unique filenames (
--uuid/-u) - Environment variable configuration
- Interactive mode for user input
- Progress tracking for multiple file uploads
Requirements
- Python 3.6 or higher
- requests library
License
Apache-2.0 License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ezgitup-0.2.1.tar.gz.
File metadata
- Download URL: ezgitup-0.2.1.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf54a3315aca7ae1dcb0fc3a7043c6bb6a7ba73e4a6cf844b989957dfabe4987
|
|
| MD5 |
43d9df04dadf9e69de504f8013a94e00
|
|
| BLAKE2b-256 |
1e470d94803e31c690de01c6c707aeaae4bbfe7f4dcdafaf41777382311b2d8a
|
File details
Details for the file ezgitup-0.2.1-py3-none-any.whl.
File metadata
- Download URL: ezgitup-0.2.1-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
694342eb00ebe52c8894b9e3917349b1b035e894c9504d443f4210b763bf9b1c
|
|
| MD5 |
290c5c5e5531ceafc11e6020738f3316
|
|
| BLAKE2b-256 |
925f679c684c75c71feafa3acaa1d51bf374d328b1ce90e94ae37a484bba57f9
|