AppEngine Mail Processor

Tired of doing repetitive tasks on some emails you receive? AppEngine Mail Processor is here to solve your problems!

Sometimes we receive emails that ask us to click on a link to confirm an account, or to send some data or any other task. Everything that is triggered by an email and that requires an automatic task to process it can be programmed using this application. If the automatic task runs fine you will not have to do it yourself, if the task doesn’t work because something has changed you can always do it manually and fix it for the next time. You will not lose the time to repeat the same task again and you will get a report with the results.

AppEngine Mail Processor is an application designed for Google’s AppEngine application server. This application will receive the emails you choose and execute the actions or tasks you want over them. It is possible to add new actions to do anything you need to do. The application will then send the result of the action back in a mail, you just need to check the result mail and forget it.

AppEngine Mail Processor is open source so you can download it and use it in your applications. You can configure your own tasks or extend the application functionality. If you do, tell us about it!

To install it in your own AppEngine application follow this steps:

  • Create your account and basic application in Google’s AppEngine (http://appengine.google.com/http://code.google.com/appengine/). We used AppEngine for Java version 1.4.0, so use a compatible version.
  • Download AppEngine Mail Processor code from GitHub: https://github.com/lamboratory/AppEngine-Mail-Processor and add it to your application code.
  • Modify web.xml file to process mails by the com.lamboratory.mail.Mail class.
  • web.xml

  • Configure the application to reveive emails in appengine-web.xml.
  • appengine web.xml

  • Implement Action interface if you want to use a new action.
  • Upload your application to AppEngine.
  • Change the mail address in Mail.java class to a valid administrator of you AppEngine application. This is required to send emails from AppEngine.
  • Upload your application to AppEngine.
  • Create a filter in your mail to forward emails based on subject or sender to the desired AppEngine, depending on the Action to execute. To execute example ClickLinksAction you can use click_links@<yourAppEngineApplicationId>.appspotmail.com (Note it’s different from <yourAppEngineApplicationId>.appspot.com).
  • filter

  • If you want to check the logs for your application you’ll need to raise log level to info using logging.properties file.
  • Forget about repeating the same task again!

Note: The idea of this application included having the response mails delivered to your real email account and added to the same thread than the original mail. If this worked you could then create a new filter that archived the full conversation based on the automatic response. Currently, AppEngine deletes the mail headers that are used for thread view in emails like gmail. If you also think that would be useful you can check these links:
http://code.google.com/p/googleappengine/issues/detail?id=2802
http://groups.google.com/group/google-appengine/browse_thread/thread/b80737b41f53541f

Twitt… Quién? (Twitt… Who?)

[English version below]

Twitt… Who? icon

“Twitt… Quién?” es una extensión para Google Chrome que busca usuarios de twitter en las páginas visitadas y muestra información sobre ellos: “Twitt… Quién?” se puede descargar aquí.

twittWho panelLa idea es enriquecer la navegación habitual, proporcionando -no intrusivamente, en un panel desplegable- información básica de los usuarios de twitter que aparezcan en cualquier página. (Al lado de cada nombre encontrado habrá una imagen que permitirá desplegar la información, y sobre el icono de la extensión aparece el número de twitteros encontrados, pudiéndose desplegar la información también desde ahí.) Con esto se consigue no tener que abrir una nueva pestaña para ver esa información, ya que muchas veces encuentra uno nombres de twitteros en alguna página, pero da pereza abrir sus perfiles para saber más de ellos. Además, haciendo login con la cuenta de twitter, la extensión dice si se sigue o se es seguido por los usuarios encontrados, permitiendo hacer follow directamente desde el desplegable. (Por tanto, aunque sea una extensión de twitter, creemos que no es otro cliente de twitter como extensión, sino un concepto diferente:-)

Hemos desarrollado la extensión @jorgelamb@guillelamb (<– al lado de nuestros nombres deberíais ver un iconito si estáis leyendo esto en el lamboratory con la extensión instalada), una vez más con la importante colaboración de nuestro primo Pablo (<– aquí también deberíais ver un iconito;-) en las imágenes y el css para ponerlo todo presentable. En esta ocasión, tenemos que agradecer a otro “Pablo”, @PaulKinlan (<– iconito!;-), el aconsejarnos sobre cómo recorrer el DOM para encontrar un patrón, ya que tuvimos la suerte de charlar con él un poco durante el pasado DevFest en Madrid.

Técnicamente, hemos usado unas cuantas de las APIs de extensiones de Chrome, desde la de OAuth para el login en twitter hasta la de internacionalización (ya que la extensión está tanto en castellano como en inglés).

Somos conscientes de que la extensión no siempre encontrará los nombres o mostrará la información correctamente (por ejemplo, cuando la página carga cosas con AJAX, o use frames, etc.), y seguro que habrá más bugs (aunque esperamos que aún así resulte útil:-), así que adelante con vuestro feedback!

[Spanish version above ;-)] Continue Reading »

A Linked Data Movie Quiz: “The answers are out there; and so are the questions”

Motivation

We are increasingly dealing with Linked Data, witnessing how Internet is turning into a Web of Data, a huge DataBase with very different sets of data linked together and available online. We thought we could use this information not only to find answers, but also to automatically generate questions… for a quiz that could be played.

The opportunity

Even though we had the quiz-using-linked-data idea some time ago, the 10K Apart contest (challenge: build a web app in less than 10 kilobytes) was a good opportunity to showcase the power of having so much information available, building something with millions of questions by just writing a few lines of code…

The contest is full of great html5 demos, so we wouldn’t expect our app being a winner. Anyway, feel free to support our entry by giving us a vote! 🙂

Here’s a screenshot of our app:

LMDQ

The topic

LDMQ relations 1

In order to submit the app to the contest (and also to fit everything in 10K), we had to focus. And yes, there would be many interesting questions to be generated thanks to information made available from open governments… but we thought that asking questions about cinema would be a much better option for a light quiz. Plus, we had the chance of using the Linked Movie DataBase, which has information about tens of thousands of movies and actors… Plenty of cinema questions could be generated with that!

We decided to let the user choose an actor or actress, and generate a quiz with questions about the movies where he or she has appeared.

What kind of questions are generated? Some of them are pretty straightforward to create: For example, the director and release date of a particular film are easily related to the actor (See image on the right). Then it’s only a matter of giving other dates as options, or other directors of movies where the actor or actress has acted.

For other questions, there are more relations involved. For instance, the application asks which character did the actor or actress play in a particular movie (“performance 1” in the following image), giving as other options another character in the same movie, played by another actor (“performance 2”), another character played by the same person but in another movie (“performance 3”), and another character played by a different person in a different movie (“performance 4”).

LDMQ relations 2

The next two images depict a question of this kind generated by the application about Marlon Brando, before answering, and after a successful response:

LDMQ questionLDMQ correct answer

The development

The LMDB exposes the data through a SPARQL endpoint, which was very convenient for our purposes. With just a few queries, the application is able to retrieve the information needed to generate a quite decent set of questions. The following lines illustrate a query used to retrieve information about all the movies an actor or actress has appeared in (the title, the name of the character played, the name of the director, and the links to the IMDB and Freebase websites, if available).

PREFIX movie:<http://data.linkedmdb.org/resource/movie/>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX foaf:<http://xmlns.com/foaf/0.1/>
PREFIX dc:<http://purl.org/dc/terms/>
SELECT DISTINCT ?title ?char ?dirName ?date ?imdb ?fb WHERE {
?film movie:actor <**actorUri**>;
rdfs:label ?title.
OPTIONAL {?film movie:director ?dir. ?dir movie:director_name ?dirName }
OPTIONAL {?film dc:date ?date.}
OPTIONAL {?film foaf:page ?imdb.
FILTER regex(str(?imdb), "^http://www.imdb.com/title", "i" )}
OPTIONAL {?film foaf:page ?fb.
FILTER regex(str(?fb), "^http://www.freebase.com", "i" )}
OPTIONAL {
<**actorUri**> movie:performance ?perf.
?film movie:performance ?perf.
?perf movie:performance_character ?char.
}
}

Importantly enough, the 10K contest implied other limitations in addition to the code size: As client-side code is being used, it was kind of tricky to grab the information directly from the browser. Luckily, using jQuery in combination with YQL we could sort out this issue, also benefiting from its caching advantages, as we are particularly worried about knocking the LMDB down.

Of course, we are aware there are bugs (known issues with IE6 and IE7), and we are aware that sometimes there are problems accessing the data; let’s see how it goes once this is publicly available… Also, some of the answers might not be accurate (sometimes we’ll be responsible; sometimes we will just say it’s the data;) Anyway, do not blame us if you feel some answers are not well evaluated. (Disclaimer: We are not responsible if you get involved in some kind of underground bet involving money!:)

And do not hesitate to contact us with questions and comments. (We’ll try to upload the unminified code somewhere soon too.)

Acknowledgements

We would like to thank Oktie Hassanzadeh and the LMDB team for being supportive. Plus, in extension, thanks to the whole Linked (Open) Data crowd.

Additionally, we are grateful to the YDN and its YQL. In particular, Christian Heilmann (@codepo8) has lately been an inspiration in terms of how to easily build a webapp with external content.

Our cousin Pablo is responsible for many cosmetic changes in the webapp. We’re really glad about this yet-another-collaboration with him. 🙂

Finally, María Rodri and María Ipa, and our colleagues at iSOCO and Buongiorno are to thank for their valuable feedback and support.

Happy quiz!

2009 recap (4/4): Other stuff

We finally conclude with the fourth post about what went on for us during 2009:

iWeekend has meant a lot for us during this 2009, as we had the chance to attend three of them, and each of those in a different manner. It all began of course in January with the creation of Tusiyu; we had such a good experience there that we decided it was an experience worth repeating, so we attended the next one at Valencia in June, where Rifalia was born. In November, 10 iWeekends were run in parallel, and we helped organize the one at Madrid, in the one where Emprendemas was created.

All in all, we could live the iWeekend experience in three different ways (with our idea selected, contributing for a different one, and also from the organization point of view) and we feel lucky for those, and of course, for the people we have met.

We have not forgotten other code events; for example we were able to attend a Yahoo! Developer Network evening in Barcelona and then another one in Madrid. Regarding older projects, with so many things going on, we didn’t have much time to keep being involved in the developments such as for Google Gadgets, as we had previously been.

Let’s see how things keep going during 2010. (Yes, we know we’re already in March and still covering last year;-) Even though we’re trying to focus (at least a bit;-), we’re always open for new ideas and experiments, so who knows!

2009 recap (3/4): Tubegraph

We continue with our third post about where we were involved in 2009:

Tubegraph logo Tubegraph

We created Tubegraph as an experiment for dynamically rating videos at the end of 2008, following a contest in a Google Pizza Night event. The beginning of 2009 was very promising for this project, as we were featured in several websites and we even had a special mention in Beca Alzado amongst 176 contestants. 🙂

The truth is that later on we didn’t pay all the attention we would have liked to this project, due to the ongoing ones in parallel, despite of having some (interesting, we think;-) ideas on how the experiment should evolve, trying to promote the ratings via games with a purpose or crowdsourcing them via Mechanical Turk or similar.

The good news is that we might have found (or they might have found us!;-) the right partners to make this experiment evolve and be more useful. Stay tuned for news in this respect, which should come up in the first half of the year.

The project has a blog, even though we don’t update it so often. Check out the “tubegraphs of the month“, and analysis such as this basketball one over the generated graphs (example below) that show which are the most interesting parts of each video.

Tubegraph of 1998 NBA video

2009 recap (2/4): Meipi

This is the second post of our 2009 recap, where we are talking about:

  • Tusiyu
  • Meipi
  • Tubegraph (coming soon)
  • other stuff  (coming soon)

MEIPI

Meipi is the collaborative mapping project we’ve been working at with four other meipis (Dome aka @urbanohumano, Alfonso, Pablo and Francesco aka @immaginoteca) since 2007. The purpose of the tool is permit users create collaborative maps where other people can participate. To this day, 350 meipis have already been created, where more than 1800 users have collaborated.

The most interesting news for us last year was that in July we attended the I Encuentro Internacional de Cartografía Ciudadana in Gijón, where we were so happy to see that it’s been successfully used in many different ways within very interesting cartography projects. It was a great week indeed and we got in touch with plenty of “cartography people”, not only from all over Spain but from abroad as well.

The Gijón meeting was the perfect place for announcing some important news, as we open sourced the code of the project. Though it was very well received by our colleagues there, we know there is still a lot of work ahead to get people more involved. Of course, don’t hesitate to contact us, should you have any idea/feedback/etc or feel like participating. Translations are also welcome! 😉 (Right now meipi.org works in six languages, including Galician.)

Thanks in part to the new plugin system we have been able to include extra functionality in several meipis, such as having other base cartography like OpenStreetMap (for example in the 6000km project), and we look forward to introducing new features during this year.

You can check the list of meipis already available or create a new one online or downloading the code. It is also possible to follow us in the blog and twitter. Lastly, if you’re brave enough, check the (looong;-) video below with our participation at Gijón.

2009 recap (1/4): Tusiyu

With 2009 just over (well, kind of;-), we thought this was a good moment to write something about the projects we are involved in (in addition to Jorge’s work at Buongiorno and Guillermo’s at iSOCO) and what happened during the past year. So this is the first of four posts about:

  • Tusiyu
  • Meipi (coming soon)
  • Tubegraph (coming soon)
  • other stuff (coming soon)

Tusiyu logo

TUSIYU

The story of Tusiyu began last January, when we attended the first edition of iWeekend in Madrid (a sort of “Startup Weekend” where 50 people choose an idea and develop it together) and we were lucky enough to get ours selected: A simple agreement tool for a group of friends to choose when and where, which ended up being Tusiyu.

After the productive weekend and some time to refine the most important bugs, the tool was fully usable, and indeed used for different purposes (not only to organize dinners, but also trips, etc.) and little by little, thanks to the feedback of people, by an increased number of users.

In order to be able to keep growing and adding features (some of them are already taking place, like comments, edition or subscription), linking the tool with other systems (like table-reservation ones), etc., Alex joined the team in November. We have just reworked the design, and look forward to keep improving the project!

You can check the blog if you’re interested in Tusiyu and follow it via rss, in twitter, or facebook. We’re also participating at BBVA Open Talent contest, and your votes would be helpful indeed. 😉

¿Cómo seguir este blog? También por correo

En general, la gente que esté leyendo este post sabrá lo que es un feed, y la utilidad que tiene para estar al tanto de todo tipo de actualizaciones en Internet. A nuestro padre por ejemplo le tenemos ya convencido de las bondades del rss. Nosotros es cierto que no actualizamos este blog tanto como nos gustaría, pero nuestro feed avisa en las raras ocasiones en que sí publicamos.

En cualquier caso, para aquéllos que prefieran recibir por correo las entradas de este blog (a nuestra madre, por ejemplo, no la hemos convencido aún de las citadas feed-bondades), hemos habilitado esa posibilidad. Simplemente hay que introducir el mail en ahí a la derecha donde pone “Subscribe” (si no nos estás leyendo en el feed, claro;-)

Así nuestros dos lectores podrán recibir las actualizaciones del Lamboratory cómodamente. 🙂

Abriendo Meipi en Gijón

El equipo Meipi al completo (los seis:-) nos hemos venido a Gijón a participar en el Encuentro Internacional de Cartografía Ciudadana organizado por Pablo de Soto. El programa tiene muy buena pinta y tendremos la oportunidad de relacionarnos con gente involucrada en proyectos muy interesantes relacionados con los mapas y la participación. Algunos de estos proyectos tienen ya un largo recorrido, como es el caso de OpenStreetMap, con el que tenemos muchas ganas de interactuar.

meipi open/s

Al igual que los otros participantes, los meipis presentaremos las características de nuestro proyecto, y los ya numerosos usos interesantes que tanto nosotros mismos como otros colectivos le hemos ido dando a la herramienta.

Además, aprovecharemos este encuentro para liberar por fin el código de meipi, algo que para nosotros es muy ilusionante. Pese al trabajo de las últimas semanas por limpiar un poco el código, somos conscientes de las limitaciones del estado actual y del largo camino que queda por recorrer. Pero en cualquier caso, el paso más importante ya está dado y esta ocasión es dese luego propicia para tener un buen feedback de primera mano. 🙂

Así que ya sabéis, si tenéis ganas de crear un meipi, ahora hay una alternativa a hacerlo en meipi.org: Simplemente hay que descargar el código e instalarlo en un servidor.

Y si sois valientes como para hacer modificaciones o crear un plugin, no dejéis de hacérnoslo saber! 😀

Yahoo! Developer Network evening

Last Wednesday, approximately 50% of us attended the Yahoo! Developer Network evening in Barcelona, where Chris Heilmann presented some interesting stuff about what YDN is able to offer. What he talked about is quite well explained in his blog, so we’re just pointing at it from here. 🙂

We’re also taking this opportunity to show some lamb pictures (or rather, lamb-tagged photos from flickr😉 right here, using some minor modifications from his Barcelona YQL example.

query->results->photo as $s){
$src = “http://farm{$s->farm}.static.flickr.com/{$s->server}/”.
“{$s->id}_{$s->secret}_s.jpg”;
$phHTML.=’title.'” src=”‘.$src.'”>‘;
}

echo “

“;
echo $phHTML;
echo “

“;

function getstuff($url){
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, $url);
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
if (empty($buffer)){
return ‘Error retrieving data, please try later.’;
} else {
return $buffer;
}
}

?>

Looking forward to use this in (even more!;-) useful scenarios…

Estuvimos en otro iWeekend: Rifalia

RifaliaDespués de lo bien que lo pasamos en el iWeekend de Madrid, en el que salió adelante nuestra idea de Tusiyu, teníamos muchas ganas de repetir y participar desde otro punto de vista. Así que no lo dudamos y el fin de semana pasado nos plantamos en Valencia para ayudar en la creación de una nueva startup.

En este iWeekend salió Rifalia, una idea promovida por Juan Ramón Vidal que “tiene todas las papeletas” (lo siento, tenía que hacer la broma; seguro que a alguien más se le ha ocurrido;-) para ser un éxito. Esperamos poder comprar unos boletos pronto para ganar alguna de las casas que Juanra y compañía están ya preparando para rifar.

Como ya hemos comentado en el blog de Tusiyu, confirmamos que la experiencia es estupenda, y estamos encantados de haber visto a viejos conocidos y haber aprendido de nuevos.

En conclusión, un evento muy recomendable, desde luego. Y en esta ocasión, para completar, Amazon regalaba saldo en sus Web Services, aunque habrá que comprobar si entra el Mechanical Turk para llevar a cabo unos experimentos que tenemos en mente. 🙂

Lamboratory.com
Web: based in blog.txt theme by Scott Allan Wallick modified by montera34