The Text Creation Partnership has released some of their TEI-encoded pre-1800 texts for public use under permissive licenses. These are some scripts to scrape off some text and metadata into plain-text formats for processing. No promises at all about the validity of these results.