I've been using two custom scripts for a while now with Licq - one
sorts the users in users.conf by alphabetical order of Alias, and
the other returns the list of contacts sorted in order of history
size in bytes, to see who i talk to the most. They were both quick
hacks and I have no idea how portable they are, but they work for
me, and other people might be interesting in using them or
modifying/improving it. I've pasted them in here as they're not too
big and hopefully self-explanatory (almost :). Feel free to take and
change whatever you like.

-- sortusers.sh

#/bin/sh

# to be run from within .licq directory

mv users.conf oldusers.conf

num=`/bin/ls -1 users/|wc|awk '{print $1}'`

echo "[users]" > users.conf
echo "NumOfUsers = $num" >> users.conf

n=1
for i in `grep Alias users/*|sort -r -f +2 |cut -d "/" -f 2 |cut -d "." -f 1` ; do
  echo "User$n = $i" >> users.conf
  n=$(($n+1))
done

-- end of sortusers.sh

-- stats-history.sh

#!/bin/bash

# To be run from within .licq directory

for i in `ls -lS history |grep -v owner | awk '{print $9}' | cut -d "." -f 1`
do
  if [ -f history/$i.history ] && [ -f users/$i.uin ] ; then
  sizey=`ls -l history/$i.history |tail -1 | awk '{print $5}'` 
  cat users/$i.uin |grep Alias|cut -d " " -f 3- | awk '{print $1 " " $2 " " $3 " - 
"'${sizey}'}'
  fi
done

-- end of stats-history.sh

Regards,

Bernard.

-- 
 Bernard Blackham
 [EMAIL PROTECTED]

_______________________________________________
Licq-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/licq-devel

Reply via email to