Skip to main content

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.

Release files for github-grasp 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for github-grasp 0.0.2
File Size Uploaded
github-grasp-0.0.2.tar.gz 2.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for github-grasp 0.0.2
File Interpreter ABI Platform
github_grasp-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 5.4 kB

Release files / github-grasp-0.0.2.tar.gz

Download URL github-grasp-0.0.2.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
edfae727b4000d75f5534b2a019799af6790bc6cba993d5f0d75b3020e7153d3
BLAKE2b-256 checksum
How to use checksums
bd882124e9b6fc5ed2aa7c1cce1be16da68db2de4537a7f3f6bb3e3c8892f381
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / github_grasp-0.0.2-py3-none-any.whl

Download URL github_grasp-0.0.2-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6a85f1ee25b2e8e5515247a72e1d83cdbb9e02eda23857deddfd744e7f70e34
BLAKE2b-256 checksum
How to use checksums
acb6d0fd49733d254fcfdc2a7892bfad2dbc1f09cec4230b11791ad355ad108d
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page