Simplificator_Logo

web applications


viagra moins cher viagra vendita italia achete levitra trouver du levitra pastilla sildenafil achat de cialis acheter viagra pas chere levitra 20 mg sildenafil sin receta viagra ricetta medica cialis generico 10 mg viagra bestellen levitra venta libre dysfonction erectile viagra 100 mg levitra ohne rezept acquisto viagra comprar viagra em portugal acheter viagra cialis prijs sildenafil kaufen viagra italia acheter cialis pharmacie comprar cialis generico kamagra gel acquisto viagra italia viagra venta libre tadalafil moins cher clomid prix kamagra 100 vardenafil generique sildenafil costo acheter cialis sur internet achat viagra en ligne cialis receta pastilla levitra cialis belgique compro viagra sildenafil rezeptfrei levitra en pharmacie levitra generique cialis meilleur prix acheter cialis generique pharmacie en ligne curare impotenza comprare levitra leivtra moins cher acheter prozac viagra senza ricetta acheter cialis sur la net acheter isotretinoine levitra generico cialis generico vardenafil generika levitra ricetta achat de viagra cialis venta libre levitra sin receta cialis suisse cialis svizzera acheter cialis en belgique sildenafil precio cialis preço posologia viagra viagra sans prescription cialis bon prix viagra kopen prezzi viagra comprar cialis tadalafil bestellen viagra prijs cialis livraison rapide viagra te koop levitra france cialis prix propecia prix kamagra te koop prezzi cialis compro levitra acheter zithromax commande viagra viagra ricetta receta viagra acheter cialis en ligne prezzi levitra cialis vente en ligne sildenafil moins cher commander kamagra impuissance homme acquistare viagra levitra sur le net compra levitra levitra pharmacie vendo viagra kamagra en france acquisto viagra originale achat levitra acheter kamagra france cialis sur le net pildoras cialis cura impotenza cialis france acquista levitra cialis rezeptfrei levitra precio cialis moins cher kamagra rezeptfrei levitra prezzo propecia generique achete cialis generique du cialis acheter kamagra oral jelly trouver du cialis vente de cialis traitement impuissance viagra rezeptfrei cialis sur internet vendo levitra vendita cialis aquisto viagra achat pharmacie acquisto viagra senza ricetta viagra en ligne cialis europe compro cialis cialis inde levitra te koop impuissance erection aquisto cialis acheter zyban viagra donne compra viagra
« git Cheat Sheet
rwebthumb gem updated »

RubyGem for webthumb

Webthumb is a service to create thumbnails from websites (descriptive name, isn’t it…). It creates different sized thumbnails by default and you can request custom sizes.It offers an API to access it’s services and we wrapped up some code i wrote while on vacation and bundled it as a gem.The code is still a bit clumsy (as i wrote it on vacation :-) ) but it works nice for us. There is already another ruby wrapper for the API but it is not available as a RubyGem and does not expose some of the latest webthumb functionalities so we decided to write our own library. Josh gave us some extra credits so we could develop the API. Thanks. The gem is available on Simplificator’s github repo. To install do following:
sudo gem update --system (in case you are not yet on version 1.2.0 or higher)
sudo gem sources -a http://gems.github.com (only once)
sudo gem install simplificator-rwebthumb

To create thumbnails:
require 'rubygems'
require 'rwebthumb'
include Simplificator::Webthumb
# main access point for the Webthumb API
wt = Webthumb.new('YOUR API KEY HERE')
job = wt.thumbnail(:url => 'http://simplificator.com')
job.write_file(job.fetch_when_complete(:large), '/tmp/test.jpg')

For more info check the README file and (currently) the source code. All the features from a the request element are supported but currently not documented. I’ll look into that in some days.If you want to use the Gem you’ll need an account for webthumb. You’ll get 100 free credits every month so it’s easy to try it out.

This entry was posted on Thursday, July 10th, 2008 at 16:20 and is filed under News, Ruby, Tech. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

back

4 Responses to “RubyGem for webthumb”

  1. simplificator » Blog Archive » rwebthumb gem updated Says:
    July 11th, 2008 at 14:09

    [...] web applications « RubyGem for webthumb [...]

  2. Alexander Kellett Says:
    August 22nd, 2008 at 14:16

    Also make sure you sudo gem install tzinfo.

    Alex

  3. pascal Says:
    August 24th, 2008 at 9:44

    Hey Alex

    tzinfo is mentioned as dependency. It is used to convert from MST to UTC time.
    I added it in installation section to make sure everything is working..

    Pascal

  4. Mike Says:
    October 9th, 2009 at 22:07

    On Thursday Oct. 8 around 10AM PDT the bluga service had “queueing issues”. As a result our requests tot he service using the ruby webthumb API entered endless loops. This is because the fetch_when_complete method continued in an endless loop as long as it was able to get valid responses from the server (presumably the response that says “still working on it”).

    The bluga site is fixed and should not have such issues but there is always the chance something else will happen to the service.

    I am going to modify/monkey patch Simplificator::Webthumb::Job.fetch_when_complete to take a timeout parameter so that it doesnt check in an endless loop forever.

    If you want the modification, can you send me an email with some instructions on where to send the modified code?

    Thanks, Mike

Leave a Reply


simplificator is proudly powered by WordPress
Entries (RSS) and Comments (RSS).