SPE3DLab allows you to integrate your text files as a structured dataset.
Documents are cut according to a template provided when configuring the datasource, and then extracted blocks are refined using filters (also specified in the template). SPE3DLab provides a number of refining filters and can be added as simple R functions if necessary.