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
Hashes for github_grasp-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6a85f1ee25b2e8e5515247a72e1d83cdbb9e02eda23857deddfd744e7f70e34 |
|
MD5 | 1a28c12a029644eb7142ad585e546289 |
|
BLAKE2b-256 | acb6d0fd49733d254fcfdc2a7892bfad2dbc1f09cec4230b11791ad355ad108d |