Get single files from any public repository onto your computer
Project description
GitHub Grasp
Grasp single files from any public repository onto your computer.
Installation
pip3 install github-grasp
Usage
Scrape a file:
ghg scrape [OPTIONS]
Options:
-r, --repo TEXT Target repository [required]
-b, --branch TEXT Target branch (default: master)
-f, --file TEXT Path of target file [required]
-o, --output TEXT Output to local file'
Example
Let's say you wanted the file scripts/authors
from Facebook's React Repository.
You could use git clone
, but the repository is massive, and you just need a single file.
To echo the contents file:
ghg scrape -r facebook/react -f scripts/authors
If you wanted to save the file locally, run the same command, but with the --output
option.
ghg scrape -r facebook/react -f scripts/authors -o authors.sh
Now you have authors.sh
on your computer!
If you wanted a file from a specific branch, you add the option --branch
.
So for example, if you wanted the file .github/stale.yml
from the branch 17.0.1
of the React repository, you would run...
ghg scrape -r facebook/react -f .github/stale -b 17.0.1 -o test.yml
NOTE: This branch has probably been deleted.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file github-grasp-0.0.2.tar.gz
.
File metadata
- Download URL: github-grasp-0.0.2.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edfae727b4000d75f5534b2a019799af6790bc6cba993d5f0d75b3020e7153d3 |
|
MD5 | 439709e8c0609de0b4ab5ae3546a51b6 |
|
BLAKE2b-256 | bd882124e9b6fc5ed2aa7c1cce1be16da68db2de4537a7f3f6bb3e3c8892f381 |
File details
Details for the file github_grasp-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: github_grasp-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6a85f1ee25b2e8e5515247a72e1d83cdbb9e02eda23857deddfd744e7f70e34 |
|
MD5 | 1a28c12a029644eb7142ad585e546289 |
|
BLAKE2b-256 | acb6d0fd49733d254fcfdc2a7892bfad2dbc1f09cec4230b11791ad355ad108d |