Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Flickr Banners

If you are one of the three per­sons who ac­tu­al­ly see this blog on its site in­stead of read­ing it through some sort of ag­gre­ga­tor, you may have no­ticed I have a ban­ner.

This is what it looks like:


Nice, ah?

It's not very orig­i­nal (look for "spell with flick­r" to see where I stole the idea), but I wrote a script to do it. So here it is, feel free to steal it too, it's your turn.

You will need this, Im­ageMag­ick, and a Flickr API key.

To use it sim­ply call it like this:

python something

And you will have a some­thing.jpg with some­thing in it.

#!/usr/bin/env python

import flickr,sys,random
from urllib import urlopen
import os


urls = []
for l in sys.argv[1]:
  if l=="a":
  if l=="i":
  photos = g.getPhotos(tags=[l], per_page=50)
              size='Square', urlType='source'))

for i in range(0,len(urls)):

os.system ("montage -tile %dx1 -geometry +0+0 %s %s"%(
            len(urls),' '.join([ '%d.jpg'%x for x in range(0,
            len(urls)) ]), sys.argv[1]+'.jpg'))

Contents © 2000-2023 Roberto Alsina