View Single Post
Posts: 53 | Thanked: 20 times | Joined on Jan 2010
#126
I'll definitely be trying this at some point soon. But hutchinsfairy, I might have something that interests you so you can check your replies without looking at your phone...

http://sprunge.us/HMQH?sh
(plain text: http://sprunge.us/HMQH)

Help message:
Code:
<user@t900:~> texts --help
Usage: texts [-h|--help] [-n <contact name>] [-d <date of earliest message to be returned>|--latest|--recent]
--latest or --recent switch gives last 24 hours' worth
Last 24 hours' worth (piped to tail to get last 3 messages):
Code:
<user@t900:~>$ texts --latest | tail -n 3
2011-02-09 1748	Simon	<	Running by Tesco on my way home. Anything you guys need? Si :-)
2011-02-09 1801	Simon	>	vitamins, if it's not too late
2011-02-09 1907	Rikki	<	Http://innocentdrinks.com/recipearchive
As you can see, it puts the date and time, their number or their name if it knows it (from an optional mapping file, tab-separated number to name), then < for incoming or > for outgoing, then the message.

First three messages from a particular date from a particular person (it looks at an optional mapping file to turn numbers into names):
Code:
<user@t900:~>$ texts -d 2010-04-01 -n Kiwi | head -n 3
2010-04-02 1507	Kiwi	<	Are your faces going to be at Claires tomorrow? Looking forward to seeing you if the are. Xx
2010-04-02 1509	Kiwi	>	didn't know Claire had a thing. kinda want to see Tiny anyway.
2010-04-02 1511	Kiwi	<	Is Tiny visiting? Bring him to Claires!? How are you? X
There are a lot of ways this could be improved (it'd be very nice for instance to be able to use the N900's contacts database itself rather than a mapping file, but I don't know how) but this does the trick for now.

Hope it helps.
 

The Following 2 Users Say Thank You to tremby For This Useful Post: