Wednesday, December 31, 2008

Why I use Linux.

Today while trawling around on the opensuse mailing list I found this gem of a quote from one of the user's answers that summarize really well why I love and continue to use Linux and why any other thing would feel wrong ....

"""
I use openSUSE and Linux because it allows me to use my computers the
way I want. I have some almost new hardware and some really old
stuff. I'm typing this on a Thinkpad laptop with a P3/1Ghz and 256mB
RAM while I have 4 ssh sessions into my server running 2 movie
re-encodes and doing file maintenance in the other 2. I've got 2
directories on my server mounted on this and 1 directory on this
laptop mounted on the server to copy files with. If I was using MacOS
or Windows I'd barely be able to do anything.

""" - Larry Stotler

Thank you Larry for converting my thoughts into such simple but expressive words.

There have been mixed reviews for OpenSuSE 11.1, some lauding it while others panning it for a disaster almost as bad as the 10.1 release mostly surrounding KDE-4 desktop choice. The desktop environment is so much a part of a distro nowadays that normal users do not usually make the distinction between what is the distro and what is the desktop environment. For them, KDE or OpenSuSE they are both the same. For me I applaud the OpenSuSE team for taking a brave new step ahead! KDE-4 has it's faults no doubt but as usual I put my total trust in the OpenSource community to mold into something better than the current 3.5.x. I will still look forward to keeping OpenSuSE as my main working distro.

Finally to all the readers of this blog. Merry belated Christmas and a Happy Profitable new year ahead!

Sunday, December 28, 2008

opensuse 11.1 and python 2.6

Just upgraded my X61's opensuse from 11.0 to 11.1 and found that the opensuse team bumped up the python version from python-2.5.x to python-2.6. Woohooops! Definitely won't win them any new fans in the Python camp for that move. For one deluge no longer works as it uses Python-2.5.x. As a comparison, although the folks over at the Fedora-10 camp is also known for their up to date apps, they still maintained python at version 2.5.2 to maintain a semblance of sanity with some of the apps that need python 2.5. I am just going through the multitude of Python applications I have on my box to see which one greets me with a "Goodbye cruel world" bomb. Why oh why do you have to be like that opensuse?! Well on the upside the whole desktop experience has improved and I had a relatively smooth upgrade path.

Something else too, kde-4.1 which used to be pretty clunky and unusable in 11.0 has been improved and after a while of getting used to it, I am beginning to think it's pretty good.

Well, when the lizard gives you lemon make lemonade I guess ... time to revisit ktorrent. I just hope everything else is intact.

Saturday, December 20, 2008

Script to import mail from existing email account into google

I am writing a script to help our customers migrate from their current mail to google apps' gmail. Found a host of scripts on the net but finding one that works correctly not to mention even work proved a challenge. Too many of the script just fell short of what I needed. There were perl scripts, ruby scripts and also python scripts.

All of them just did not have the one thing I needed that is to convert the imap folders into gmail's labels. What about folders that have more than one level? Well I came up with the idea to convert them this way:

Original structure:
Level 1
=> Level2
Into a label : Level1_Level2

The normal mail migrate script that comes with gmail does not seem to convert imap folders into labels. Currently I am looking into using the libgmail library to do what I want. Ran into some trouble installing the source copy because it was looking for python-mechanize and one of the dependancy of python-mechanize is python < 2.5! Sheesh! Well poking around using google I found an older package of libgmail that did not need python-mechanize. Hopefully to be able to come up with early prototype by tomorrow. Has anyone built something similar?

Saturday, December 6, 2008

Some great functions in django templates

In my quest to capitalize the title for my application, I found some great functionality in django's templates.

To 'humanize' data there is contrib package called 'humanize'. For the docs you can find it here.

For some built in functions look here. I really like some of the humanize functions after spending so much time to implement some of the functions found here. While django's template language might not be as powerful as others they sure have some pretty useful functionality here!