Created
September 14, 2018 11:11
-
-
Save justindavies/6153e2a607cb93462c63911ac99d3d29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sitemapindex = '<?xml version="1.0" encoding="UTF-8"?>\n' | |
sitemapindex = sitemapindex + '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n' | |
for file in glob.glob('*.xml'): | |
sitemapindex = sitemapindex + '<sitemap>\n' | |
sitemapindex = sitemapindex + ' <loc>http://inkl.in/sitemaps/' + file + '</loc>\n' | |
sitemapindex = sitemapindex + '</sitemap>\n' | |
sitemapindex = sitemapindex + '</sitemapindex>' | |
sitemap = open("/mnt/sitemaps/map.xml", "w") | |
sitemap.write(sitemapindex) | |
sitemap.close() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment