added a main function to doctext.py