Tag - javascript

Entries feed - Comments feed

Last entries

Tue 26 Jan 2016

WE programming project: XKCD keyword index

With this post I'm starting a new kind of article: WE programming project. It's objective is to give ideas of programs that could be written over a WE, probably a lot more or lot less depending on your skill and willing to extend the idea.

Here is the first project proposal: an XKCD keyword index.

Objective

You probably known XKCD, "a webcomic of romance, sarcasm, math, and language". If not, I recommend it's reading. :-) All the XKCD comics are freely available, through an URL, e.g. "Asteroid" is available at URL https://imgs.xkcd.com/comics/asteroid.png.

Sometimes, I would like to illustrate a slide or blog item with one of XKCD comics. I know it exists, I saw it but I can no longer find it! So frustrating! So the main idea of this WE programming project is rather simple: make a keyword index of XKCD comics so that one could look for a comics over a theme or idea.

Requirements

Here is some requirements for this project, feel free to adapt to your needs or your own ideas: ;-)

  • It is a web site on the Internet that displays each XKCD comics (with proper reference to original web site) with associated keywords
  • One can search comics on a set of keywords
  • One can associate keywords (a-z- character set, space separated list) to a given comics
  • Already given keywords are suggested
  • No need of account by default, everybody is free to add new keywords (for easy contribution)
  • Moderators (with dedicated account) can make previously added keywords public, can remove keywords
  • No use of database (for easy installation), keywords are saved into a simple file
  • One can download the whole association of keywords to comics (e.g. as a JSON data structure)
  • There is an API to control the web site (for use by others and integration into other sites)

Needed programming technology

Any programming language you want which have a well designed web framework: Ruby with Rails, Python with Django, Javascript with Meteor, OCaml with Ocsigen, ...

If you tackle this project proposal, let me know! ;-)

Mon 30 Mar 2009

Convertir une URL Google Maps en Open Street Map

Xavier a déjà fait un billet dessus mais tant pis ! J'ai fait un petit script PHP pour convertir une URL de Google Maps en URL Open Street Map (source libre).

Mais après avoir montré le code sur la liste talk-fr d'openstreetmap, on m'a suggéré de faire la même chose en bookmarlet. Grâce à l'aide de Yann Coupin, c'est maintenant chose faite et disponible sur la même page que le script, idem pour le source.

Au passage, ça m'a permis d'apprendre ce qu'est un bookmarklet : c'est un bout de JavaScript qu'on stocke dans ses Marque-pages et qui fait des transformations sur la page courante lorsque on le sélectionne. Amusant. Maintenant je pourrais presque passer pour un pro du Web 2.0, presque... :-)

Et au passage, c'est un micro-exemple du travail en logiciel libre : quelqu'un fait une proposition, quelqu'un d'autre arrive et propose une extension auquel il n'avait pas pensé au départ, voir même propose un morceau de code. On construit beaucoup mieux en coopérant !