package
Generate a .torrent file corresponding to a particular Github Release
npm install webtorrentify-github-releaseGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Generate a .torrent file corresponding to a particular Github Release
Distributing your application over WebTorrent/BitTorrent is cool! 😎
It can improve reliability and save money:
* as long as the torrent is being seeded
This tool makes it easy to add a .torrent file to your existing Github Releases!
It downloads the files associated with a particular Github Release and creates a torrent file for them. If you provide a Github OAuth token in the environment variable, it will add the torrent file to your release for you.
You don't even have to add any new code or change your CI deployment process. You can try it first and see if you like it, and only automate it later.
TODO: Simplify seeding the result.
npm install webtorrentify-github-release --globalwebtorrentify-github-release [owner] [repo] [version] [--upload]If you don't specify owner, repo, or version it will try to obtain them from package.json in the current working directory.
Otherwise
owner is the Github username or name.repo is the repository name.version is the release to use. It must exactly match the git tag.If --upload is used, it will create a Github OAuth token using ghauth or reuse one previously saved by gh-release, and use putasset to upload the .torrent file to your release.
The Github Release files are downloaded to a temporary directory and deleted afterwards.
The torrent file is saved in the current working directory and named ${repo}-${version}.torrent.
If there was a problem it will exit with a non-zero exit code.
> cd mymodule
> webtorrentify-github-release
Downloading wmhilton/mymodule@v0.0.1...
RELEASES ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 0.0s
Skipping upload to Github because the --upload flag wasn\'t used.
> ls
mymodule-v0.0.2.torrentPublishing torrent to Github the first time:
> webtorrentify-github-release --upload
Downloading wmhilton/mymodule@v0.0.2...
RELEASES ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 0.0s
Your GitHub username: wmhilton
Your GitHub password: ✔✔✔✔✔✔✔✔✔
Your GitHub OTP/2FA Code (optional): ******
Uploaded .torrent to Github.Subsequent usage:
> webtorrentify-github-release --upload
Downloading wmhilton/mymodule@v0.0.3...
RELEASES ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 0.0s
Uploaded .torrent to Github.Install it as a dev dependency and add a script in your package.json
"devDependencies": {
"webtorrentify-github-release": "1.x"
},
"scripts": {
"deploy:torrent": "webtorrentify-github-release"
}Then you can run it using "npm run deploy:torrent".
Copyright 2017 William Hilton. Licensed under The Unlicense.
Estimated unpacked size across 62 packages.
5.7 MB+
Includes dependencies.
7 direct · 4 outdated
^0.8.3
0.9.4
^3.2.1
7.0.16
^2.1.6
7.0.0
^2.0.0
2.0.1
^3.29.2
6.1.3
^4.0.2
4.0.6
^0.3.0
0.3.2