Fortunately, Pidgin stores the contact list (sometimes called roster) in an XML file blist.xml, and there are lots of libraries for different programming languages which help to manipulate XML structures. One of the most interesting scripts I have found was written in Python: it sorts the contact list alphabetically by name, and it's only 12 lines of code. I prepared an enhanced version, which allows you to create a list with predefined priorities, for example:
roster = { 'Family': 1, 'Friends': 2 }In this case groups Family and Friends will be moved to the top of the list, with group Family as first, Friends as second, and the remaining groups sorted alphabetically in ascending order.
You can download the script here. Some important notes:
- You have to run it in the same directory Pidgin keep the blist.xml in.
- Also, turn off the messenger before you run the script, because it keeps the whole contact list in memory and will overwrite version stored on disk once you shut it down.
- Don't forget to make a backup of the original blist.xml file in case something goes wrong.
No comments:
Post a Comment