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@ > 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!


Want to comment? Send me an email!

Comment by Anders Runeson (not verified) (2009-09-28 18:17:00)

How is username and password provided to core? This seems to be missing in your post. Thanks!

Comment by Milian Wolff (2009-10-22 00:49:00)

I access the sqlite DB directly. I.e. I circumvent quassel core, there is no support to only show the stuff of a given user.

It’s still secure, since the SQLite DB should only be readable to you if you are an admin, or if you - like I do it - run quasselcore as a local user on some server. That way only I can read my DB.

Of course for multi-user cores this script is not really usable.

Published on October 22, 2009.