
-----------------------------------
DtY
Mon Jul 20, 2009 11:39 am

BitTorrent Metadata from command line?
-----------------------------------
Does a program exist to do this? I need to extract some metadata from torrent files (specifically file size and torrent name) using a linux command line.
Google brought up nothing useful

-----------------------------------
Aziz
Mon Jul 20, 2009 1:30 pm

RE:BitTorrent Metadata from command line?
-----------------------------------
It's just a text file. Read it like any text file. Read it in and use some regex to parse it. :D

-----------------------------------
rdrake
Mon Jul 20, 2009 2:05 pm

RE:BitTorrent Metadata from command line?
-----------------------------------
Check out transmissioncli that comes with Transmission.

Man page here:  [url=http://linux.die.net/man/1/transmissioncli]Transmission CLI man page.

[code]transmissioncli -i .torrent[/code]

-----------------------------------
DtY
Mon Jul 20, 2009 2:47 pm

RE:BitTorrent Metadata from command line?
-----------------------------------
Aziz: It's binary based, I'm pretty sure. I looked at the specification a while ago, and it's something I could easily write a program to unpack, but why bother when someone's probably already done it?

rdrake: Like this :) Thanks, that's just what I need

-----------------------------------
Aziz
Mon Jul 20, 2009 3:05 pm

RE:BitTorrent Metadata from command line?
-----------------------------------
Of course! I somehow remember opening a .torrent file in notepad, and viewing it, but of course, I have a bad memory. Sorry for leading you down the wrong path! :P

And thanks rdrake, I LOVE LEARNING.

-----------------------------------
DtY
Mon Jul 20, 2009 6:30 pm

Re: RE:BitTorrent Metadata from command line?
-----------------------------------
Of course! I somehow remember opening a .torrent file in notepad, and viewing it, but of course, I have a bad memory. Sorry for leading you down the wrong path! :P

And thanks rdrake, I LOVE LEARNING.
If you're interested in learning more about it, BT has a complete specification of the format (somewhere). It's pretty interesting, it's all based around python. (Iirc, the basic types you have in the file are strings, integers, lists, and dictionaries)
