 |
Forums |
Admin Start New Thread
By: Ikkei
RE: Working on the metainfofile creator now.. [ reply ] 2004-09-03 03:05
|
update v0.0.2 about make metainfo file
(http://www1.kcn.ne.jp/~tea/tmp/rubit/)
- MetaInfo extends Hash
- Added MetaInfo#load, MetaInfo#save methods
- Added MetaInfo#make is class method, like Factory
- Support multi files (maybe work, not test enough)
MetaInfo.make(path, announce_url) {|m|
m['announce-list'] = [ ... ]
m['comment'] = '...'
}.save(filename)
since MetaInfo 'is_a' Hash.
announce = {'announce' => '', 'announce-list' => []}
m1.merge!(announce)
m2.merge!(announce)
This is an advanage, developper knew Hash api already.
No need to remember other api for metainfo.
and we does not need to define those accessor methods, too.
(known bug)
But if changed under 'info' field,
maybe need to update 'pieces' by your hand.
|
By: Ikkei
RE: Working on the metainfofile creator now.. [ reply ] 2004-09-01 11:39
|
Hi, I checked out cvs now.
> m.add("announce-list", "http://some.backup.tracker";)
announce-list must be Array.
and its called .write method in makemetafile already. override?
---- more about metainfo fields
I did not research which application has thise,
and could not find document about this. but I had seen metainfo files which has thise optional fields.
encoding, comment.utf-8, publisher.utf-8, publisher-url.utf-8 and
under info field, name.utf-8
those .utf-8 surffixed fields are useful when make gui application.
|
By: Ikkei
RE: Working on the metainfofile creator now.. [ reply ] 2004-08-28 12:53
|
Hai, Tom
Yes, I wish porting bittorrent tools and modules to ruby, too.
For me, that was for personal studing,
learning peer-to-peer protocol and learning ruby programing..
Can I know your email address to send the program ?
About tracker ... No,
I wrote was only download part and bencoding.
I'm still on going to learn how to use WEBrick module.
about metainfo file, I suggest TODO
There are some optional fields in metainfo.
"announce-list", "md5sum", "created by" fileds
and utf-8 comment field also (undocumented)
Here has more details:
http://wiki.theory.org/index.php/BitTorrentSpecification
|
By: Ikkei
RE: Working on the metainfofile creator now... [ reply ] 2004-08-27 07:37
|
Hello, I had interested about bittorrent.
my interest was about peer-to-peer protocol part, but,
I read the spec about metainfo file, bee-encoding,
and tracker also some un-official documents.
Can I help your project ? if you will make other bittorrent tools.
I have written buggy Net::BitTorrent module.
(status buggy, not check exceptions at all, but
at least it can complete download)
|
|
 |