Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pippolo84/beetools
CLI application to manipulate torrent file
https://github.com/pippolo84/beetools
bencode go golab torrent
Last synced: about 1 month ago
JSON representation
CLI application to manipulate torrent file
- Host: GitHub
- URL: https://github.com/pippolo84/beetools
- Owner: pippolo84
- License: apache-2.0
- Created: 2021-03-21T22:54:22.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-24T16:14:05.000Z (almost 4 years ago)
- Last Synced: 2024-11-13T13:57:56.519Z (about 2 months ago)
- Topics: bencode, go, golab, torrent
- Language: Go
- Homepage: https://golab.io/en/agenda/your-first-go-project/
- Size: 313 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# beetools
[![Go Report Card](https://goreportcard.com/badge/github.com/Pippolo84/beetools)](https://goreportcard.com/report/github.com/Pippolo84/beetools)
[![Go Reference](https://pkg.go.dev/badge/github.com/Pippolo84/beetools.svg)](https://pkg.go.dev/github.com/Pippolo84/beetools)
beetools is a CLI application to manipulate torrent file in [bencode](https://en.wikipedia.org/wiki/Bencode) format.
It currently supports three subcommands:
- `decode` to decode data in bencode format and encode them in JSON format.
```
$ beetools decode debian-10.8.0-amd64-netinst.iso.torrent | jq .
{
"announce": "http://bttracker.debian.org:6969/announce",
"comment": "\"Debian CD from cdimage.debian.org\"",
"creation date": "2021-02-06T13:59:34+01:00",
"httpseeds": [
"https://cdimage.debian.org/cdimage/release/10.8.0//srv/cdbuilder.debian.org/dst/deb-cd/weekly-builds/amd64/iso-cd/debian-10.8.0-amd64-netinst.iso",
"https://cdimage.debian.org/cdimage/archive/10.8.0//srv/cdbuilder.debian.org/dst/deb-cd/weekly-builds/amd64/iso-cd/debian-10.8.0-amd64-netinst.iso"
],
"info": {
"length": 352321536,
"name": "debian-10.8.0-amd64-netinst.iso",
"piece length": 262144,
"pieces": "..."
}
}
```- `encode` to decode data in JSON format and encode them in bencode format.
```
$ beetools encode debian-10.8.0-amd64-netinst.iso.json
d8:announce41:http://bttracker.debian.org:6969/announce7:comment35:"Debian CD from cdimage.debian.org"13:creation datei1612616374e9:httpseedsl145:https://cdimage.debian.org/cdimage/release/10.8.0//srv/cdbuilder.debian.org/dst/deb-cd/weekly-builds/amd64/iso-cd/debian-10.8.0-amd64-netinst.iso145:https://cdimage.debian.org/cdimage/archive/10.8.0//srv/cdbuilder.debian.org/dst/deb-cd/weekly-builds/amd64/iso-cd/debian-10.8.0-amd64-netinst.isoe4:infod6:lengthi352321536e4:name31:debian-10.8.0-amd64-netinst.iso12:piece lengthi262144e6:pieces26880:...
```- `show` to show information extracted from the content of a valid .torrent file (filtering "pieces" data).
```
$ beetools show debian-10.8.0-amd64-netinst.iso.torrent
{
"announce": "http://bttracker.debian.org:6969/announce",
"comment": "\"Debian CD from cdimage.debian.org\"",
"creation date": "2021-02-06T13:59:34+01:00",
"httpseeds": [
"https://cdimage.debian.org/cdimage/release/10.8.0//srv/cdbuilder.debian.org/dst/deb-cd/weekly-builds/amd64/iso-cd/debian-10.8.0-amd64-netinst.iso",
"https://cdimage.debian.org/cdimage/archive/10.8.0//srv/cdbuilder.debian.org/dst/deb-cd/weekly-builds/amd64/iso-cd/debian-10.8.0-amd64-netinst.iso"
],
"info": {
"length": 352321536,
"name": "debian-10.8.0-amd64-netinst.iso",
"piece length": 262144,
"pieces": ""
}
}
```