PS: Google (don't use a lame duck, I dislike Google, too, but it provides the best hits) for convert odt to text from command line etc., you probably could write a script using tools that first convert from those document formats to plain text files or maybe there are already tools that do what you want.