export.py: remove headers and footer of the text