[climm] day history

stanio at cs.tu-berlin.de stanio at cs.tu-berlin.de
Sat May 17 11:53:15 CEST 2008


Hi everyone,

In case someone finds it useful, I post this script here. 

The background is the following: I often forget to shut down climm and it
quite often happens that people send me messages while I am outside. Later
I log in to the same machine and start climm, which causes the disconnect
of the old instance and the 

climm> last 

history is lost. It is unfeasible to check the history for all my contacts
in order to verify I didn't miss some message. Running the script like

climm> hday 20080218
or
climm> !~/.climm/day_incomming 20080218

produces the output

|For 20080218 we have:
| contact1
| contact2
| contact3

The listed contacts have sent me a message on the given day. Then I can get
the history with

climm> h contact3

When the date 20080218 is omitted, the current date is used (that is the
common use case for me but sometimes it is useful for older dates too).

If you have suggestions how to improve this, please let me know.


Have a nice day!


-=-=-=-=-= day_incomming =-=-=-=-=-=-=-=-=-

#!/bin/sh

DAY=$1

if [ -z $DAY ]; then
        DAY=`date +"%Y%m%d"`;
fi

echo For $DAY we have:
cat $HOME/.climm/history/nick*log | \
	    grep $DAY | \
	    grep "<-"| \
	    grep -e "\+[0-9][0-9]*$" |\
	    sed 's/^.*<-\(.*\)\[.*$/ \1/g' | \
	    sort -u
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

=-=-=-=-= climmrc -=-=-=-=-=-=-=-=-=-=-=-=-
[...]
alias autoexpand "hday" "!~/.climm/day_incomming"
[...]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


-- 
 cheers
 stanio_


More information about the climm-list mailing list