Archive for May, 2007

Text editing in Firefox

Friday, May 25th, 2007

I’ve often been annoyed with the editing possibilities in Firefox, but now I have found a couple of useful add-ons which helps quite a bit.

The first, Resizeable Textarea, does as it says. It makes all text areas, that is, multiline text input boxes, resizeable. Place the mouse over the edge of the text area, and the area can be resized interactively, just like in most window managers. No more editing long texts in four lines windows đŸ™‚

It’s All Text screenshotThe other add-on is It’s All Text, which adds a small “edit” button to each text area. Click that button and the text in the area is opened in an external editor where you often have much better editing functions than you have in Firefox. The text in the text area is synchronised with the text in the editor automatically when you save the file, and, of course, when you exit the editor.

Playlists on a Nokia 6131

Sunday, May 20th, 2007

Nokia has in their infinite wisdom decided to make playlists in the media player of my Nokia 6131 phone a complete mess.

They claim the phone supports M3U playlists, but if you copy one to the phone using a cable or bluetooth, you just get a “Unsupported media type” message. So much for support. Playlist files has to be places in a semi-hidden folder on the phone to work.

There is no way to make a playlist on the phone, so you have to use Nokia PC Suite which is windows only.

Making a playlist for the phone under Linux is cumbersome, but it can be done with a bit of effort.

Files can be copied back and forth between phone and computer using gammu, formerly gnokii. With the right options one can read and write the entire file system on the phone, not just what is exposed through USB storage or bluetooth.

Unfortunately, gammu and the phone have different ideas about how the world looks. gammu uses drive letter A: for the memory card and D: for the internal memory of the phone, but the phone itself uses C: for internal memory and E: for the memory card. gammu uses / as the separator in path names and the phone uses \ like DOS and derivatives. gammu escapes non-ascii characters in filenames with a =XX syntax, which the phone doesn’t understand.

This means that everything has to be expressed in two different ways. It is possible to get a complete listing of the files on the phone in gammu syntax, and to copy files between phone and computer, with names in gammu syntax, but the content of the files have to be in the phone’s syntax to work.

Anyway, here is what I have done to make playlists for my phone.

First I make a complete listing of all the files on the phone:

gammu --getfilesystem -flatall > nokia6131.lst

Using this file I can easily generate lists of files I want in my playlist and convert this list of files to a playlist in a format usable on the phone:

grep 'Patrick Bruel/Des Souvenirs Devant.*mp3' nokia6131.lst
 | sort | perl
 > "Patrick Bruel - Des Souvenirs Devant.m3u"

The script “” does the conversion of filenames from gammu syntax to a playlist in the phones format. It is quite simple: download script here.

The resulting playlist file can then be copied to the phone using a command like:

gammu --addfile 'd:/predefgallery/predefplaylist'
 "Patrick Bruel - Des Souvenirs Devant.m3u"