# Metalink (XML) library for Ruby?

**URL:** <https://www.ruby-forum.com/t/metalink-xml-library-for-ruby/125133>\
**Category:** Ruby\
**Created:** [January 6, 2008, 12:23am UTC](https://www.ruby-forum.com/t/metalink-xml-library-for-ruby/125133 "2008-01-06T00:23:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthonybaker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c68b51/32.png) [@anthonybaker](https://www.ruby-forum.com/u/anthonybaker)\
**Post date:** [January 6, 2008, 12:23am UTC](https://www.ruby-forum.com/t/metalink-xml-library-for-ruby/125133/1 "2008-01-06T00:23:13Z")

</div>

Hi,

Would anyone be interested in working on a Metalink library for Ruby?  
There’s already one for PHP & Python (  
[Google Code Archive - Long-term storage for Google Code Project Hosting.](http://code.google.com/p/metalink-library/) ).

Metalink is a simple XML format for describing downloads. Most  
.metalink files contain mirror lists/p2p (the various ways you can get  
a file) and checksums (for file verification). They’re frequently used  
for large files like ISOs and also contain chunk checksums for  
repairing downloads and other info. But they’re also used by smaller  
things like cURL, [OpenOffice.org](http://OpenOffice.org), podcasts, videos, and other stuff.

Close to 20 download programs support Metalink. There’s more info at

> **[Metalink](https://en.wikipedia.org/wiki/Metalink)**
>
> Metalink is an extensible metadata file format that describes one or more computer files available for download. It specifies files appropriate for the user's language and operating system; facilitates file verification and recovery from data corruption; and lists alternate download sources (mirror URIs).
> The metadata is encoded in HTTP header fields and/or in an XML file with extension .meta4 or .metalink. The duplicate download locations provide reliability in case one method fails. Some cl...

Here’s an example ruby-1.8.6-p111.tar.gz.metalink (most would contain  
more mirrors, and maybe a description):

Ruby 1.8.6-p111 (md5: c36e011733a3a3be6f43ba27b7cd7485)

 c36e011733a3a3be6f43ba27b7cd7485 ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.gz 

Thanks,

---

<div class="post-metadata">

**Author:** ![anthonybaker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c68b51/32.png) [@anthonybaker](https://www.ruby-forum.com/u/anthonybaker)\
**Post date:** [January 6, 2008, 4:25pm UTC](https://www.ruby-forum.com/t/metalink-xml-library-for-ruby/125133/2 "2008-01-06T16:25:27Z")

</div>

On Jan 5, 2008 5:22 PM, Anthony B. wrote:

> Would anyone be interested in working on a Metalink library for Ruby?

Metalinks are very cool. There’s some folks working on a wget  
implementation in Ruby, and I had proposed they incorporate metalinks,  
I don’t think they’ve done that yet, maybe not ever. Some guy named  
Dag Odenhall[1] looks started a project for this on sharesource[2],  
but it doesn’t appear to have anything done. I’m sorry I don’t have  
time to help you in the near future.

Daniel Brumbaugh K.

[1]

> **[Tim Groeneveld](https://timg.ws)**
>
> Random musings from the world of an Open Source geek

[2]

> **[Tim Groeneveld](https://timg.ws)**
>
> Random musings from the world of an Open Source geek

---

<div class="post-metadata">

**Author:** ![anthonybaker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c68b51/32.png) [@anthonybaker](https://www.ruby-forum.com/u/anthonybaker)\
**Post date:** [January 9, 2008, 1:08am UTC](https://www.ruby-forum.com/t/metalink-xml-library-for-ruby/125133/3 "2008-01-09T01:08:28Z")

</div>

On Jan 6, 2008 10:24 AM, Daniel Brumbaugh K.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Daniel Brumbaugh K.
> 
> [1]  
> [Tim Groeneveld - Random musings from the world of an Open Source geek](http://sharesource.org/user/dag/)  
> [2]  
> [http://sharesource.org/project/metalink4r](http://sharesource.org/project/metalink4r)

Daniel, thanks a lot for the encouragement!

I hadn’t known about metalink4r, even tho there was never a release  
it’s at least interesting to know that someone thought about doing it  
🙂

If this seems like something that you’d be interesting in working on  
later, please let me know. Or if you’re just interested in metalinks,  
we have a pretty low traffic discussion list at  
[http://groups.google.com/group/metalink-discussion](http://groups.google.com/group/metalink-discussion) , feel free to join  
us.

---

<div class="post-metadata">

**Author:** ![anthonybaker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c68b51/32.png) [@anthonybaker](https://www.ruby-forum.com/u/anthonybaker)\
**Post date:** [January 9, 2008, 5:30pm UTC](https://www.ruby-forum.com/t/metalink-xml-library-for-ruby/125133/4 "2008-01-09T17:30:22Z")

</div>

On 6 Jan., 00:22, Anthony B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> Would anyone be interested in working on a Metalink library for Ruby?  
> There’s already one for PHP & Python ([Google Code Archive - Long-term storage for Google Code Project Hosting.](http://code.google.com/p/metalink-library/)).

Hello Anthony,

I would like to help porting my library to Ruby.  
That would be a good way to learn it 😉  
But I would need someone to help with the trickier parts at least:

- reading XML
- hash libraries (MD5, SHA-1, SHA-256, maybe ED2K)
- HTTP requests and responses including headers
- bin2ascii for creating and parsing BitTorrent

The Python code is a bit more than 2000 lines long and I would port  
most of them.

Anyone interested?

---

<div class="post-metadata">

**Author:** ![anthonybaker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c68b51/32.png) [@anthonybaker](https://www.ruby-forum.com/u/anthonybaker)\
**Post date:** [January 9, 2008, 5:36pm UTC](https://www.ruby-forum.com/t/metalink-xml-library-for-ruby/125133/5 "2008-01-09T17:36:53Z")

</div>

On 9 Jan 2008, at 16:29, Rene L. wrote:

> That would be a good way to learn it 😉  
> But I would need someone to help with the trickier parts at least:
> 
> - reading XML
> - hash libraries (MD5, SHA-1, SHA-256, maybe ED2K)
> - HTTP requests and responses including headers
> - bin2ascii for creating and parsing BitTorrent
> 
> The Python code is a bit more than 2000 lines long and I would port  
> most of them.

None of that’s terribly difficult, I’d be happy to lend a hand (and I  
wrote metalink support into an app on the mac, so I at least have a  
vague idea of what’s going on 🙂 )

Fred

---

<div class="post-metadata">

**Author:** ![anthonybaker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c68b51/32.png) [@anthonybaker](https://www.ruby-forum.com/u/anthonybaker)\
**Post date:** [January 9, 2008, 9:57pm UTC](https://www.ruby-forum.com/t/metalink-xml-library-for-ruby/125133/6 "2008-01-09T21:57:05Z")

</div>

On Jan 9, 2008 11:29 AM, Rene L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> But I would need someone to help with the trickier parts at least:
> 
> - reading XML
> - hash libraries (MD5, SHA-1, SHA-256, maybe ED2K)
> - HTTP requests and responses including headers
> - bin2ascii for creating and parsing BitTorrent
> 
> The Python code is a bit more than 2000 lines long and I would port  
> most of them.
> 
> Anyone interested?

Rene, that would be great if you & Fred could collaborate.

I take it you’ve seen Fred’s reply, he worked on Speed Download (a  
cool and absolutely gorgeous download manager) from

> **[VideoDuke: the best video downloader for Mac](https://www.yazsoft.com/)**
>
> If you are looking for a way to download video from YouTube, Vimeo, Dailymotion and other websites on Mac, then VideoDuke is exactly what you need.

small world, didn’t expect to run into both you guys here 🙂
