.. _info_command: Info ====== The info command is used to print an overview of BitTorrent metafiles features. The basic invocation requires only the target .torrent file. .. code-block:: bash torrenttools info Either specify all options first or give the target first followed by all options. Overview --------- .. code-block:: none General information about bittorrent metafiles. Usage: torrenttools info [OPTIONS] target Positionals: target Target bittorrent metafile. Options: -h,--help Print this help message and exit --raw Print the metafile data formatted as JSON. Binary data is filtered out. --show-pieces Print the metafile data formatted as JSON. Binary data is included as hexadecimal strings. --show-padding-files Show padding files in the file tree. Output looks as follows: .. code-block:: Metafile: bittorrent-v2-hybrid-test.torrent Protocol version: v1 + v2 (hybrid) Infohash: v1: 8c9a2f583949c757c32e085413b581067eed47d0 v2: d8dd32ac93357c368556af3ac1d95c9d76bd0dff6fa9833ecdac3d53134efabb Piece size: 512 KiB (524288 bytes) Created by: libtorrent Created on: 2020-06-03 08:45:06 UTC Private: false Name: bittorrent-v1-v2-hybrid-test Source: Comment: Announces: Files: bittorrent-v1-v2-hybrid-test ├── [6.23 MiB] Darkroom (Stellar, 1994, Amiga ECS) HQ.mp4 ├── [19.6 MiB] Spaceballs-StateOfTheArt.avi ├── [ 326 MiB] cncd_fairlight-ceasefire_(all_falls_down)-1080p.mp4 ├── [58.8 MiB] eld-dust.mkv ├── [ 265 MiB] fairlight_cncd-agenda_circling_forth-1080p30lq.mp4 ├── [42.5 MiB] meet the deadline - Still _ Evoke 2014.mp4 ├── [61.0 B] readme.txt ├── [25.1 MiB] tbl-goa.avi └── [ 111 MiB] tbl-tint.mpg 854.06 MiB in 0 directories, 9 files Options ------- ``--raw`` ++++++++++ This options will print a JSON representation of the torrent with binary fields replaced by a string descibing the content. The torrent from the previous example will output as follows .. code-block:: { "created by": "libtorrent", "creation date": 1591173906, "info": { "file tree": { "Darkroom (Stellar, 1994, Amiga ECS) HQ.mp4": { "": { "length": 6535405, "pieces root": "" } }, "Spaceballs-StateOfTheArt.avi": { "": { "attr": "x", "length": 20506624, "pieces root": "" } }, "cncd_fairlight-ceasefire_(all_falls_down)-1080p.mp4": { "": { "length": 342230630, "pieces root": "" } }, "eld-dust.mkv": { "": { "length": 61638604, "pieces root": "" } }, "fairlight_cncd-agenda_circling_forth-1080p30lq.mp4": { "": { "length": 277889766, "pieces root": "" } }, "meet the deadline - Still _ Evoke 2014.mp4": { "": { "length": 44577773, "pieces root": "" } }, "readme.txt": { "": { "attr": "x", "length": 61, "pieces root": "" } }, "tbl-goa.avi": { "": { "attr": "x", "length": 26296320, "pieces root": "" } }, "tbl-tint.mpg": { "": { "length": 115869700, "pieces root": "" } } }, "files": [ { "length": 6535405, "path": [ "Darkroom (Stellar, 1994, Amiga ECS) HQ.mp4" ] }, { "attr": "p", "length": 280339, "path": [ ".pad", "280339" ] }, { "attr": "x", "length": 20506624, "path": [ "Spaceballs-StateOfTheArt.avi" ] }, { "attr": "p", "length": 464896, "path": [ ".pad", "464896" ] }, { "length": 342230630, "path": [ "cncd_fairlight-ceasefire_(all_falls_down)-1080p.mp4" ] }, { "attr": "p", "length": 129434, "path": [ ".pad", "129434" ] }, { "length": 61638604, "path": [ "eld-dust.mkv" ] }, { "attr": "p", "length": 227380, "path": [ ".pad", "227380" ] }, { "length": 277889766, "path": [ "fairlight_cncd-agenda_circling_forth-1080p30lq.mp4" ] }, { "attr": "p", "length": 507162, "path": [ ".pad", "507162" ] }, { "length": 44577773, "path": [ "meet the deadline - Still _ Evoke 2014.mp4" ] }, { "attr": "p", "length": 510995, "path": [ ".pad", "510995" ] }, { "attr": "x", "length": 61, "path": [ "readme.txt" ] }, { "attr": "p", "length": 524227, "path": [ ".pad", "524227" ] }, { "attr": "x", "length": 26296320, "path": [ "tbl-goa.avi" ] }, { "attr": "p", "length": 442368, "path": [ ".pad", "442368" ] }, { "length": 115869700, "path": [ "tbl-tint.mpg" ] } ], "meta version": 2, "name": "bittorrent-v1-v2-hybrid-test", "piece length": 524288, "pieces": "<1715 piece hashes>" }, "piece layers": { "": "<531 piece hashes>", "": "<653 piece hashes>", "": "<222 piece hashes>", "": "<13 piece hashes>", "": "<118 piece hashes>", "": "<51 piece hashes>", "": "<86 piece hashes>", "": "<40 piece hashes>" } } ``--show-pieces`` +++++++++++++++++ This options must be combined with ``--raw``. Instead of a string like <20 piece hashes> a full list with all pieces in hexadecimal representation will be printed. .. code-block:: { "pieces": [ "", "", "", "", ... ... "", "" ] }, "piece layers": { "": [ "", "", "", ... ], ... } ``--show-padding-files`` +++++++++++++++++++++++++ This option will include padding files for hybrid torrent in the file tree. By default padding files are not listed.