Skip to main content

With dirgh you can easily download a directory from GitHub programmatically from Python or using the CLI.

Project description

dirgh

With dirgh you can easily download a directory from GitHub programmatically from Python or using the CLI.

CLI

usage: dirgh [-h] -r REPO [-o OWNER] [-d DIRECTORY] [-t TARGET] [--ref REF] [-R] [-O] [-a AUTH]

Download single directories from GitHub.
GitHub rate limits are 60 requests/hour when unauthenticated and 5,000/hour
 when using a token. Each subfolder  requires extra requests.

examples:
dirgh -r tiauth -o tiptenbrink -d deployment --ref cf51bff1a79b280388ba65f18998717b2fa5e1e3
dirgh -r tiptenbrink/tiauth -d deployment -R -t 'C:\Users\dirgher'\Cool projects/dürghé'
(You can use both forward and backwardslashes, even interchangeably)
dirgh -r tiptenbrink/tiauth -R -t './dürghé'

optional arguments:
  -h, --help            show this help message and exit
  -r REPO, --repo REPO  repository on GitHub using the format <owner>/<repository> or just <repository> if owner is also specified. If both are specified, owner is ignored.
  -o OWNER, --owner OWNER
                        repository owner on GitHub, can be an organization or user. Only necessary when not provided in the --repo option.
  -d DIRECTORY, --directory DIRECTORY
                        initial directory path in the format <subfolder1>/<subfolder2> etc. Defaults to root directory.
  -t TARGET, --target TARGET
                        output directory. If requesting a directory, this will overwrite the directory name. By default, the content will be placed in './dirgh/1673538759'.
  --ref REF             commit reference, can be in any branch. (default: HEAD)
  -R, --recursive       recursively enter all subfolders to get all files.
  -O, --overwrite       Overwrite target directory.
  -a AUTH, --auth AUTH  user authentication token, OAuth or personal access token. Not required but increases rate limits.

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

dirgh-0.3.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

dirgh-0.3.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file dirgh-0.3.1.tar.gz.

File metadata

  • Download URL: dirgh-0.3.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.12 Linux/6.2.0-1012-azure

File hashes

Hashes for dirgh-0.3.1.tar.gz
Algorithm Hash digest
SHA256 bf8e36d3a1c9df169fdcb22c2585fb970f879c5010d89c5ac8915d8ac2c0e1b9
MD5 65345c9c49814c16ea69788e17d7af82
BLAKE2b-256 ffacca4a5614e881c4285f93a953b8e41f4c1d0b8fcc98b9e341e9c246bc926b

See more details on using hashes here.

File details

Details for the file dirgh-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: dirgh-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.12 Linux/6.2.0-1012-azure

File hashes

Hashes for dirgh-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d3ffa21dc328829d7065597081c48d9fde7b9868c88d3ab1c4bbe2e90417200
MD5 6340b5fa9f0fdaa02cf3fe834162c410
BLAKE2b-256 18d86bad5ce6dad154d164419c0be08a6a33a05c50f6c12581efe08f7d77be60

See more details on using hashes here.

Supported by

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