def gen_sitemap(main_site, md_file):
    pattern = re.compile(': (.*?).md', re.S)
    res = []
    with open(md_file) as md:
        for line in md.readlines():
            line = str(line)
            cur_urls = re.findall(pattern, line)
            if (len(cur_urls) > 0):
                if (cur_urls[0] == '/'):
                    continue
                res.append((main_site + cur_urls[0]))
    return res
def gen_sitemap(main_site, md_file):
    pattern = re.compile(': (.*?).md', re.S)
    res = []
    with open(md_file) as md:
        for line in md.readlines():
            line = str(line)
            cur_urls = re.findall(pattern, line)
            if (len(cur_urls) > 0):
                if (cur_urls[0] == '/'):
                    continue
                res.append((main_site + cur_urls[0]))
    return res