Kosala Atapattu

This site is the home page of Kosala Atapattu. You can find verry little info on my self and other interesting links related to various Linux packages. Following links will help you navigate through the pages. Enjoy!!!
Home
Downloads
Taprobane Live CD
FireFox Plug-in
PHP website converted-Last Updated-July 28,2006
Until recently this website was running on a simple CMS, written by me (which was my first PHP coding), which was working on a file based data engine, again written by me. It was a happy CMS until we decided to remove PHP support from linux.lk for several reasons. I'm not a generally busy person but free time of mine is allocated (multiplexed) in to so many areas, and attention to my web site, was very low.

I tried several options like maintaning the same in HTML + Quanta Plus, by saving existing web pages as HTML, but this is too painful.... So finaly I found a way.

Solution is simple enough, I wrote a small perl script, to grab everything from the web site, and save as HTML and update all the links with the necessary file names. In simple terms to convert my CMS to file based web site.

So the final setup is, I have a web site running on my local PC, with PHP, where I maintain my CMS. And then convert everything to HTML using the script and upload it to the web server. The script seamlessly maintain all the links to the other locations of the files.

problem


Script still doesn't recognize the difference between mime types, therfore all the files are saved as .html. This is a problem with LWP package, we use to down load the web page, where it ignores the headers of the resoponse. That part should be handled in a different way...which is up to you to find out :-).

Script still identify hyperlinks only, images and other types of tags need to be added (I don't use them :)).

Uploading


Uploading part is a simple one liner...from the route folder type...

$ tar -cv * | gzip -c9 | ssh kosala@www.linux.lk tar -zxv -C [remote path to web files]

would complete the upload...end to end.
See downloads for the script