IdeaMonk

thoughts, ideas, code and other things...

Wednesday, November 11, 2009

PyMos - Creating mosaics of your photos was never easier

PyMos is a Python script/module that helps you generate those fancy photo mosaics wherein a large image is made out of tiny thumbnails of other images. But from a distance, the mosaic looks like original image. Here is an example.
PyMos just started as an random hack which later turned into an impromptu hackathon as Yuvi puts it. Man it was fun to work together with someone for the first time, to learn so many new things, and to get more awesome ideas through discussion. Some of the noteworthy things I came through this project are - argparse, PIL, setuptools, some more git gyaan, that colorspace can be also treated like x-y-z vectors, logging in python, caching things using Pickle to save time, writing re-usable code, checking code against standards using pylint, rounding off corners and adding shadows with css, and what not.
I never wished to put too much in the blog about it. Just finished the project page for PyMos an hour ago - Get to know more about PyMos at its project page.

this is how it should look.

Besides that, while making the page I noticed a few things -
  • I happened to find a nice motive for PyMos' existence - these people who sell mosaics as a service. PyMos liberates you financially, intellectually and gives you freedom to mix-n-mash to make your own custom version... for it is a F/OSS
  • The project page would look nice in modern browsers only as I've utilized CSS3 @font-face to pull in some nice fonts.
  • I've also used CSS to save time doing round corners and shadows, so again you need a good browser that supports it, currently Firefox 3.5+ and webkit based ones.
  • By the way, PyMos project page is totally made on Linux, thanks to wine for letting me run Photoshop 7, I no longer have to look towards windows in any case, not even in times of creativity blues.
  • Since I'm not an advanced user of Photoshop, I hardly find any differences in cs3 or 7 as far as the way I use.
So, have fun making some cool mosaics with PyMos :)

Labels: , , , , , ,

Friday, November 06, 2009

Introducing GTweetBar (alpha)

This is my Xournal entry of April 27th 2009. It clearly speaks of how much time I take in between imagining and creating things. I need to improve a lot on that part, or maybe organize my time well, and hack myself away from that saturday-sunday syndrome where you feel like spending the weekend doing nothing for you've been already been wasting time for college for 12 hrs a day away from your system.
Oh sweet, this snap is when I had just upgraded to Ubuntu 9.04 :)


Been almost 6 months I guess :o. A couple of months back I was playing around with gtk, glade, etc which gave some confidence to work over making it for real. So here we have - GTweetBar - A GNOME Panel Applet that lets you update your twitter status on the fly. An omnipresent, super-simplified twitter-client for your linux desktop. (which is still in development)
I initially started writing this applet with PyGTK and glade. The tutorials for writing a panel applet on gnome are pretty limited and there is a shortage of simple examples for beginners as far as I think. I found an interesting problem during the development, the Entry box did not respond when the app is run as applet. I found it pretty weird, but that led into a better understanding of how signals and handled, why and when to use an Event box and the use of applet.request_focus(). All this had to be understood by reading a random pastebin entry! :)
There were more issues coming later, I got it tested from a few friends on twitter. It's pretty cool to find the Issues section on github. It lets users of your software communicate and talk about any problems they encounter. Pretty cool to have it along the project page. Github \m/
Testing it on Ubuntu 8.04 on my old PC helped uncover some more compatibility issues. It seems that gtk.gdk.Color("#93E9FF") isn't backward compatible. You can use gtk.gdk.color_parse("#93E9FF") instead to ensure it works.

Here are few snaps -




As of now, I have to fix a lot of bugs (pending after end sems). It's not working on Ubuntu 9.10 under applet mode. Working with YuviPanda on PyMos taught me a lot of things. I also used GConf to store user preferences. Man! Its dead simple to use.. So this calls for an extension of todo list :) -

[ ] alerts for failed tweets...
[ ] loads of exception handling here and there
[ ] new setup using setuptools
[ ] test portability of python_twitter or throw it as dependency in setup()
[ ] add logging
[ ] optparse/argparse
[ ] tool tips to show current status
[ ] beautify the code
[ ] a drop down list of tweets

So go ahead fork it, test it, use it - GTweetBar alpha.

Labels: , , , , ,