› Easily access quassellogs from the CLI 
Thu, 08/27/2009 - 16:56
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@190.245.176.231 > 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!
Comments
How is username and password Mon, 09/28/2009 - 18:17 — Anders Runeson (not verified)
How is username and password provided to core? This seems to be missing in your post. Thanks!
I access the sqlite DB Thu, 10/22/2009 - 00:49 — Milian Wolff
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.
Post new comment