Sometimes I get an itch to hack something and does not go until I break or make it. And if neither happens then I am really frustated. Recently I was trying to integrate SimpleViewer with the flickr badge on my site.
So I saw a story in digg.com, the article's author had a page with a photos tab. The photos were displayed in a really nifty fashion and was really light weight. They were made using SimpleViewer, a free flash based software. So all you have to do is download the zip files (which contain fex xml and css files and few directories), put the jpeg pics and their thumbnails in the directories and voila!!, you have a very professional looking photo page.
Now the fact that it was done statically was really troubling me. I wanted it to directly take most recent pics from my flickr account... the way the flickr badge on my site does. I viewed the source of my page, particularly the part enclosed in the flickr badge code. There was a link embedded somewhere inside. Just copied the link on the browser... it spit out some pics and gibberish. Next I did a view source for that link and was able to see the links those jpeg images were pointing to and their captions... now all i had to do was to write a small perl script to do this programatically and put it in desired folders... but there was one problem, i needed 48 x 48 thumbnails in one of the folders. I was overwhelmed... the problem looked almost solved. I could just call "convert" from the command line ( the web server was running SunOS2.8 with gcc 2.95 :( ). How wrong was I???
There was no ImageMagick (of which convert is a part of) on that damn machine. Of course web servers (particularly my univ's web server hosting a gazillion sites) have to be lean and mean. I was not yet deterred. Downloaded the tar ball and ftpied it up to the machine (the connection sucked) and compiled it. The "./configure" part took for ever and the "make" halted abruptly :(.
Now I totally lost it. Flooded irc.freenode.net with help pleas.... #web came to rescue and one guy/gal had done the same thing(with convert). He suggested me to use the gd library. So all I had to do was to write program using GD library to convert a pic into a thumbnail... I dont complain... i like doing that sortta stuff. But before I got all charged up ls /usr/lib/libgd* revealed that there was infact no GD library... even #web said nothing can be done...
After 6 hours of head banging all i get is.... blood... what was i expecting???solaris stinks.
No comments:
Post a Comment