Easily access quassellogs from the CLI
Quassel is really a cool program. I like how I can use it from everywhere and access the same set of data. Now using IMAP and Quassel I’d really look forward for similar shared access to other IMs, but that’s not the topic of this blog post.
What I want to introduce is a new addition to my set of shell helpers, called quassellog:
$ quassellog -u milian -b "#kdevelop" | tail -n 1 [2009-08-27 13:09:11] milian > hi all $ quassellog -b "#kdevelop" | tail -n 1 [2009-08-27 16:43:35] Fersis!n=Fersis@220.127.116.11 > yeah i did $ quassellog quassellog [-u USER] [-b BUFFER] [PATTERN] -u USER show only messages from users, who have USER at the start of their sender name. -b BUFFER show only messages in this buffer valid buffers are: ##linux #khtml &IMP ...SNIP... PATTERN a simple pattern, use * for wildcard matching NOTE: order of options is not exchangable, i.e. first -u, then -b then pattern...
You can get the code from github. To make it work from all your servers I recommend the following alias:
alias quassellog='QUASSEL_HOST=theHostQuasselCoreRunsOn quassellog' # e.g. for me: alias quassellog='QUASSEL_HOST=jongleur quassellog'
That way the script runs automatically on the right server (provided it’s also accessible there under the same path). Have fun!