Skip to main content

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:

  1. Command-line argument (--repo/-r)
  2. Environment variable (EZGITUP_DEPO)
  3. 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
  • 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

ezgitup-0.2.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ezgitup-0.2.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

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

Hashes for ezgitup-0.2.1.tar.gz
Algorithm Hash digest
SHA256 cf54a3315aca7ae1dcb0fc3a7043c6bb6a7ba73e4a6cf844b989957dfabe4987
MD5 43d9df04dadf9e69de504f8013a94e00
BLAKE2b-256 1e470d94803e31c690de01c6c707aeaae4bbfe7f4dcdafaf41777382311b2d8a

See more details on using hashes here.

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

Hashes for ezgitup-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 694342eb00ebe52c8894b9e3917349b1b035e894c9504d443f4210b763bf9b1c
MD5 290c5c5e5531ceafc11e6020738f3316
BLAKE2b-256 925f679c684c75c71feafa3acaa1d51bf374d328b1ce90e94ae37a484bba57f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page