new tool: args2env
[hband-tools.git] / user-tools / bencode2json
blobc2fc13dcf151d181de021b63aea72dbc656d0299
1 #!/usr/bin/env python
3 """
4 =pod
6 =head1 NAME
8 bencode2json - Convert Bencode (BitTorrent's loosely structured data) to JSON
10 =cut
12 """
14 import sys
15 import json
16 import bencode
18 print json.dumps(bencode.bdecode(''.join(sys.stdin.readlines())), ensure_ascii=False)