def exportText(pages):
    """Functions that exports all the pages in our file with
    format usable with pagefromfile.py script"""
    output = []
    for page in pages.values():
        if not page.collapsed:
            if page.text != '':
                output.append('##########')
                output.append("'''" + page.url + "'''")
                output.append(page.text)
                output.append('@@@@@@@@@@')
    return '\n'.join(output)
