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 owner and name
ezgitup --owner username --repo repository *.json
# or using short options
ezgitup -o username -r 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/

The tool will use the following priority for repository information:

  1. Command-line arguments (--owner/--repo)
  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 options (--owner/--repo)
    • Simple owner/repo format
    • GitHub SSH URLs
    • GitHub HTTPS URLs
  • Target directory support (--dir/-d)
  • Environment variable configuration
  • Interactive mode for user input
  • Progress tracking for multiple file uploads

Requirements

  • Python 3.6 or higher
  • requests library

License

MIT 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.1.0.tar.gz (9.1 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.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ezgitup-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for ezgitup-0.1.0.tar.gz
Algorithm Hash digest
SHA256 33a90c159a22861c55dbe4c25c2b9563004e75048c1791dd672bb0dc5f7a5ca4
MD5 25b2451d4a2bd63b87c868300529acd4
BLAKE2b-256 023d297a3983895078a0d885ca2e02a99e368d71bbb059895a7eeaac04db6665

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ezgitup-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0345548fcc32418739eb83195dc19db1368f6f0a32c630710aefc36ae2f5d14f
MD5 664b18c4ce2a1cb0a0ecb5c3eefba092
BLAKE2b-256 7e4a9d431b94bc9677b3ba8947e0f3f6ffe9b1290335652ad39ab66d083d4787

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