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.0.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.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file ezgitup-0.2.0.tar.gz.

File metadata

  • Download URL: ezgitup-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 85b20188b0db79801b669dde006e1a1e02a8d4a84cf0dc644085c5cb30571d92
MD5 1d00ddccd96db8072949f8c422c3179a
BLAKE2b-256 312475d5f2d82eb44066e55102014129e3b088a792ea4b6d0028cedd2ca35a25

See more details on using hashes here.

File details

Details for the file ezgitup-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ezgitup-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7f8f665026f9f12eba3b8431fcffe0630c66d029d73fcc5c9ff6fbf4f2ee1ca2
MD5 7d9fa4636b0c04dee12d5db8367ac76e
BLAKE2b-256 cfdc1b7a5720d52d6068289dead5c3ae1afb8184aa369b3ab5448f5875897d37

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