Version 0.2.0 adds a command-line tool for bdecoding files or standard input:
$ yabencode -h
usage: yabencode [-h] [-t KEY] [-r] FILE
Bdecode a file/standard input and pretty-print the resulting data
positional arguments:
FILE Input file. Use - for stdin
optional arguments:
-h, --help show this help message and exit
-t KEY, --truncate KEY
Truncate values under given key. May be repeated for
multiple values
-r, --raw Raw keys - do not decode dictionary keys
$ # The 'pieces'-bytestring is rather long, so let's truncate it
$ yabencode -t pieces ubuntu-17.04-desktop-amd64.iso.torrent
{'announce': b'http://torrent.ubuntu.com:6969/announce',
'announce-list': [[b'http://torrent.ubuntu.com:6969/announce'],
[b'http://ipv6.torrent.ubuntu.com:6969/announce']],
'comment': b'Ubuntu CD releases.ubuntu.com',
'creation date': 1492077159,
'info': {'length': 1609039872,
'name': b'ubuntu-17.04-desktop-amd64.iso',
'piece length': 524288,
'pieces': '<truncated>'}}
Upgrade yours with pip install --upgrade yabencode
(Trying out releases as well)