def exportText_single_pages(pages, base_path=''):
    """Function that exports the text of
    pages in separated files"""
    pf = open(base_path + '/pages.txt', 'w')
    for page in pages.values():
        pf.write('# [[' + page.url + ']]\n')
        if not page.collapsed:
            if page.text != '':
                text = []
                text.append('##########')
                text.append("'''" + page.url + "'''")
                text.append(page.text)
                text.append('@@@@@@@@@@')
                path = base_path + '/' + page.title + '.txt'
                path = path.encode('utf-8')
                f = open(path, 'w')
                f.write('\n'.join(text))
                f.close()
    pf.close()
