Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 BitTorrent Metadata from command line?
Index -> General Discussion
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
DtY




PostPosted: Mon Jul 20, 2009 11:39 am   Post subject: 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
Sponsor
Sponsor
Sponsor
sponsor
Aziz




PostPosted: Mon Jul 20, 2009 1:30 pm   Post subject: 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. Very Happy
rdrake




PostPosted: Mon Jul 20, 2009 2:05 pm   Post subject: RE:BitTorrent Metadata from command line?

Check out transmissioncli that comes with Transmission.

Man page here: Transmission CLI man page.

code:
transmissioncli -i <file>.torrent
DtY




PostPosted: Mon Jul 20, 2009 2:47 pm   Post subject: 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 Smile Thanks, that's just what I need
Aziz




PostPosted: Mon Jul 20, 2009 3:05 pm   Post subject: 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! Razz

And thanks rdrake, I LOVE LEARNING.
DtY




PostPosted: Mon Jul 20, 2009 6:30 pm   Post subject: Re: RE:BitTorrent Metadata from command line?

Aziz @ Mon Jul 20, 2009 3:05 pm wrote:
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! Razz

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)
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: