Send a file into github blob in command line (written in golang). The main goal is to store and restore file (large or medium) in github. Those files will not be visible on your github repo (instead of github lfs) and will can be only downloaded if you know the link.
github-blob-sender can upload file from your computer into a github repo and keep trace of these upload into a file
(A .github-blob-sender
file) and could restore uploaded file with a checksum verification to be reliable.
You can install this via the command-line with either curl
or wget
.
$ sh -c "$(curl -fsSL https://raw.github.com/ArthurHlt/github-blob-sender/master/bin/install.sh)"
$ sh -c "$(wget https://raw.github.com/ArthurHlt/github-blob-sender/master/bin/install.sh -O -)"
You can install it by downloading the .exe
corresponding to your cpu from releases page: https://github.com/ArthurHlt/github-blob-sender/releases .
Alternatively, if you have terminal interpreting shell you can also use command line script above, it will download file in your current working dir.
Simply run in terminal:
$ go get github.com/ArthurHlt/github-blob-sender
If compile failed you can use godep to restore dependencies:
$ go get github.com/tools/godep # if you haven't godep
$ cd $GOPATH/src/github.com/ArthurHlt/github-blob-sender
$ godep restore
$ go get github.com/ArthurHlt/github-blob-sender
NAME:
github-blob-sender - Store and restore file from github blob api
USAGE:
github-blob-sender [global options] command [command options] [arguments...]
COMMANDS:
store, s Store file to github blob
cat, c Cat file from github blob
restore, r Restore file from github blob
restore-all, a Restore all registered files in folder from github blob
list, l List registered files
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
NAME:
github-blob-sender store - Store file to github blob
USAGE:
github-blob-sender store [command options] [file1 file2 ...]
OPTIONS:
--github-token, --gt Set your github token (optional if already set or GITHUB_TOKEN env var set)
--owner, -o Which org or user you own to send file
--repo, -r Which repo you own to send file
NAME:
github-blob-sender cat - Cat file from github blob
USAGE:
github-blob-sender cat [command options] [file-name] (Note: file-name can be listed with list command)
OPTIONS:
--github-token, --gt Set your github token (optional if already set or GITHUB_TOKEN env var set)
--owner, -o Which org or user you own to send file (optional)
--repo, -r Which repo you own to send file (optional)
TIP: owner
and repo
flags are optional if only one file with this name is registered in .github-blob-sender
file
NAME:
github-blob-sender restore - Restore file from github blob
USAGE:
github-blob-sender restore [command options] [file-name] (Note: file-name can be listed with list command)
OPTIONS:
--github-token, --gt Set your github token (optional if already set or GITHUB_TOKEN env var set)
--owner, -o Which org or user you own to send file (optional)
--repo, -r Which repo you own to send file (optional)
--output Set where to write the downloaded file
TIP: owner
and repo
flags are optional if only one file with this name is registered in .github-blob-sender
file
NAME:
github-blob-sender restore-all - Restore all registered files in folder from github blob
USAGE:
github-blob-sender restore-all [command options] [folder/to/put/downloaded/file]
OPTIONS:
--create-folders, --create-folder, -c Create folders if not exist
NAME:
github-blob-sender list - List registered files
USAGE:
github-blob-sender list [command options] [arguments...]
OPTIONS:
--show-github-sha1, -g Show github checksum (in sha1)
--show-registered-sha1, -r Show registered checksum (in sha1)
--show-link, -l Show github link
Example output:
+-----------+-----------+--------------------+
| NAME | OWNER | REPO |
+-----------+-----------+--------------------+
| FILE1 | ArthurHlt | github-blob-sender |
| FILE2 | ArthurHlt | github-blob-sender |
+-----------+-----------+--------------------+