# Mashup Tutorial

**URL:** <https://www.ruby-forum.com/t/mashup-tutorial/81132>\
**Category:** Rails\
**Created:** [January 4, 2007, 11:07am UTC](https://www.ruby-forum.com/t/mashup-tutorial/81132 "2007-01-04T11:07:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aeggberg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ba9def/32.png) [@aeggberg](https://www.ruby-forum.com/u/aeggberg)\
**Post date:** [January 4, 2007, 11:07am UTC](https://www.ruby-forum.com/t/mashup-tutorial/81132/1 "2007-01-04T11:07:27Z")

</div>

Hi:

I am looking for a good hands on web mashup tutorial? or books for that  
matter… Google gives me bits and pieces of the info but not any step by  
step or hands on tutorial…

Thanks a bundle

---

<div class="post-metadata">

**Author:** ![aeggberg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ba9def/32.png) [@aeggberg](https://www.ruby-forum.com/u/aeggberg)\
**Post date:** [January 4, 2007, 11:28am UTC](https://www.ruby-forum.com/t/mashup-tutorial/81132/2 "2007-01-04T11:28:20Z")

</div>

On 1/4/07, Antonio E. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi:
> 
> I am looking for a good hands on web mashup tutorial? or books for that  
> matter… Google gives me bits and pieces of the info but not any step by  
> step or hands on tutorial…
> 
> Thanks a bundle

A map-mashup, right? Have a look at  
[thepochisuperstarmegashow.com](http://thepochisuperstarmegashow.com/projects/) . That should get you  
going  
in no time.

Cheers,  
Jan

–  
––––––––––––––––––––––––––––––  
[http://www.inviado.de](http://www.inviado.de) - Internetseiten für RAe  
[Jan Prill - Teamleiter - adesso SE | XING](http://www.xing.com/profile/Jan_Prill)

---

<div class="post-metadata">

**Author:** ![aeggberg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ba9def/32.png) [@aeggberg](https://www.ruby-forum.com/u/aeggberg)\
**Post date:** [January 4, 2007, 11:32am UTC](https://www.ruby-forum.com/t/mashup-tutorial/81132/3 "2007-01-04T11:32:20Z")

</div>

Antonio E. wrote:

> Hi:
> 
> I am looking for a good hands on web mashup tutorial? or books for that  
> matter… Google gives me bits and pieces of the info but not any step by  
> step or hands on tutorial…

I can not really answer this question, but if you would like to hack on  
these things in Ruby/Rails, I am just going to release a web extraction  
framework (planning to add functionality in the next releases to make  
every task to build a mashup possible) written in Ruby. I will add a lot  
of tutorials (e.g. how build a list of Ruby books by scraping say  
amazon, b&n, [buy.com](http://buy.com) and putting the result together for price  
comparison etc.). and possibly some theory, too, so you could check it  
out. Unfortunately I have tons of other tasks right now so I am not  
progressing as fast as I would like, but if you can wait at most a few  
weeks, it will happen sooner or later for sure.

I would be really happy for any feedback and constructive ideas on which  
new features to add etc.

Peter  
\_\_  
[http://www.rubyrailways.com](http://www.rubyrailways.com)

---

<div class="post-metadata">

**Author:** ![aeggberg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ba9def/32.png) [@aeggberg](https://www.ruby-forum.com/u/aeggberg)\
**Post date:** [January 4, 2007, 11:42am UTC](https://www.ruby-forum.com/t/mashup-tutorial/81132/4 "2007-01-04T11:42:21Z")

</div>

> I can not really answer this question, but if you would like to hack on  
> these things in Ruby/Rails, I am just going to release a web extraction  
> framework (planning to add functionality in the next releases to make  
> every task to build a mashup possible) written in Ruby.

This is such a wonderful news! I am very very interested as a matter of  
fact  
I been to your site couple of times this week for the screen scrapping  
article 🙂

Something for Antonio maybe …

[http://www.rubyrailways.com/data-extraction-for-web-20-screen-scraping-in-rubyrails/](http://www.rubyrailways.com/data-extraction-for-web-20-screen-scraping-in-rubyrails/)

I will add a lot

> of tutorials (e.g. how build a list of Ruby books by scraping say  
> amazon, b&n, [buy.com](http://buy.com) and putting the result together for price  
> comparison etc.). and possibly some theory, too, so you could check it  
> out. Unfortunately I have tons of other tasks right now so I am not  
> progressing as fast as I would like, but if you can wait at most a few  
> weeks, it will happen sooner or later for sure.

YES, I would like to have a GO! Please send me the URL/Instruction  
directly… Cooool!

> I would be really happy for any feedback and constructive ideas on which  
> new features to add etc.

Off course thats the least I can do… Super! Look forward to hear from  
you!

---

<div class="post-metadata">

**Author:** ![aeggberg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ba9def/32.png) [@aeggberg](https://www.ruby-forum.com/u/aeggberg)\
**Post date:** [January 4, 2007, 11:48am UTC](https://www.ruby-forum.com/t/mashup-tutorial/81132/5 "2007-01-04T11:48:19Z")

</div>

Jan P. wrote:

> A map-mashup, right? Have a look at  
> [thepochisuperstarmegashow.com](http://thepochisuperstarmegashow.com/projects/) . That should get you  
> going  
> in no time.
> 
> Cheers,  
> Jan

THANK YOU!! Super I am checking it out now… Thanks again.

> –  
> ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½  
> [http://www.inviado.de](http://www.inviado.de) - Internetseiten fï¿½r RAe  
> [Jan Prill - Teamleiter - adesso SE | XING](http://www.xing.com/profile/Jan_Prill)

---

<div class="post-metadata">

**Author:** ![aeggberg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ba9def/32.png) [@aeggberg](https://www.ruby-forum.com/u/aeggberg)\
**Post date:** [January 4, 2007, 12:20pm UTC](https://www.ruby-forum.com/t/mashup-tutorial/81132/6 "2007-01-04T12:20:25Z")

</div>

> Something for Antonio maybe …
> 
> [http://www.rubyrailways.com/data-extraction-for-web-20-screen-scraping-in-rubyrails/](http://www.rubyrailways.com/data-extraction-for-web-20-screen-scraping-in-rubyrails/)

Ah, the good old screen scraping article. I am just planning to beef it  
up with some more theoretical stuff, as well as HPricot, (Fire)Watir and  
other ‘chapters’…

> YES, I would like to have a GO! Please send me the URL/Instruction  
> directly… Cooool!

Well, you will have to wait a few days at least… Until then, here is  
an example of what to expect in 0.1.0:

ebay\_data = Scrubyt::Extractor define do  
#Navigate to our page  
fetch ‘[ebay.com](http://ebay.com)’  
fill\_textfield ‘dell laptop’  
submit  
click\_link ‘Laptops/Notebooks’

#Construct the scraper  
record do  
name “DELL LATITUDE C600 P3 1.0 LAPTOP NOTEBOOK 256MB 20GB HD”  
price “$192.50” do  
(value /\d+.\d\d/).ensure\_greater\_than 150  
end  
shipping “$37.00”  
end.ensure\_presence\_of\_pattern(:price)  
next\_page “8 9 Next”, :limit =\> 5  
end

So, this extractor will automatically navigate to the page of interest  
(powered by Mechanize, later planning to add (Fire)Watir for javascript  
navigation or maybe even selenium). There, extract all records  
(specified by the example) which have a price, and this price is higher  
than 150. Once finished, navigate to the next 5 result pages and extract  
the records there too.

what you get back in ‘ebay\_data’ may be used in various ways. Either  
calling different to\_xxx methods on it (for example to\_xml - planning to  
add to\_csv, to\_atom etc.) or like this:

ebay\_data.record[3].price

etc.

This is but the top of the iceberg - I have tons of todo lists for the  
future releases :-). Also, the DSL can be very easily extended by anyone  
(with things like ‘ensure\_greater\_than’ - for example  
‘ensure\_contains\_string’ etc.) so it is not a take-it-and-use-it thing  
but a rather flexible tool to do these kind of stuff.

Stay tuned,  
Peter  
\_\_  
[http://www.rubyrailways.com](http://www.rubyrailways.com)
