Posts from 2006

Replace occurrence of string in files under directory tree

This Python recipe “ASPN : Python Cookbook : Replace occurrence of string in files under directory tree” has a comment that reminded me of the power of Perl.

I am updating my slides for a lecture course that uses rst2s5 (a utility that uses Docutils/reStructuredText to generate S5 slides). When I wrote the original slides for last year’s course, rst2s5 was still in the Docutils Sandbox. It has now been promoted into the official Docutils distribution but some changes have been made. One of these was that
the directive

.. handout::

has been changed to

.. class:: handout

so I had a need for to make a search/replace in every file in a collection.

I know that there is a recipe for this in my copy of the Perl Cookbook (but I didn’t have a copy of that to hand), so I looked it up on the Python Cookbook. And there (in the comments to the above link) I found the Perl recipe:

find . -name '*.txt' -print | xargs perl -pi
-e 's/.. handout::/.. class:: handout/'

Now that’s simple … and it worked!

Must be Some Kind of Record

Talk about information overload! I currently have 1675 unread items on my main blog roll in Bloglines. I just exported the OPML file of my subscriptions and imported it into Flock’s RSS aggregator but as I’m sure that this only shows a few days worth, I’ll feel guilty forever unless I go through the list on Bloglines. I have to say Flock’s RSS reader is lovely to look at and very slick. If it also stored the subscriptions (and reading history) on the web as Bloglines does, it’d be a definite candidate to replace Bloglines. Maybe Bloglines and Flock will come to a similar arrangement to that in place for Flickr, del.icio.us and blogger. technorati tags:blogging, bloglines, flock, rss, aggregation, browser

Blogged with Flock

Free Basecamp Clone in PHP5 and MySQL

As reported today on TechCrunch Serbian developer Ilija Studen has released a free clone of the popular project management service Basecamp. Studen’s product is called ActiveCollab. It differs from Basecamp (a hosted web application for which, if you have more than one project or a team larger than 2, you pay a monthly subscription to use) in that the product is free and open source. It is also a PHP5/MySQL application that indiduals, small companies, and even, presumably, Universities can download and install on their own web server. Not sure what code quality and community support is or will be like, but certainly one to watch I think.

Blogged with Flock

Mother's Day

 Spent a nice weekend in Hedon with with my mom Sheila and her partner Terry (Pictured). This entry is really an excuse to use Picassa which I’ve just installed along with the Google Desktop Package. Picassa has the best UI for photo album work that I’ve seen and it also produces great CDs for exchange with friends. An it’s free! Posted by Picasa