def gen_wiki_map(file_name, ext_url=''):
    '''
    Generate the urls for wiki.
    :return: None
    '''

    # wiki
    wiki_recs = MWiki.query_all(limit=10000, kind='1')

    with open(file_name, 'a') as fileout:
        for rec in wiki_recs:
            url = os.path.join(SITE_CFG['site_url'],
                               'wiki' + '/_edit' if ext_url else '',
                               rec.title)
            fileout.write('{url}\n'.format(url=url))

    ## page.
    page_recs = MWiki.query_all(limit=10000, kind='2')

    with open(file_name, 'a') as fileout:
        for rec in page_recs:
            url = os.path.join(SITE_CFG['site_url'],
                               'page' + '/_edit' if ext_url else '',
                               rec.uid)

            fileout.write('{url}\n'.format(url=url))
Generate the urls for wiki.
    :return: None