Becoming edumucated

A case of "why didn't I do this sooner" when I saw this post on the Tinderbox wiki about auto-generating a Google Sitemap. I modified the provided templates a bit because I wanted to fill in some of the optional attributes. As suggested, I use an agent to collect exported notes with the following templates:

<?xml version='1.0' encoding='UTF-8'?>

<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation= "http://www.google.com/schemas/sitemap/0.84

http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">

^children(sitemap-item.xml)^

</urlset>

and

<url>

<loc>^urlEncode(^URL^)^</loc>

<lastmod>^Get(Modified, =)^</lastmod>

<priority>^Get(GoogleSitemapPriority)^</priority>

<changefreq>^Get(GoogleSitemapChangeFreq)^</changefreq>

</url>

The change I made to this is to suck out the priority and change frequency from attributes. One nifty aspect of Tinderbox is that I can apply some defaults (say GoogleSitemapPriority of .5) and then override this so certain pages have a higher priority. Works like a charm and now I don't have to worry about mucking around with one of those perl sitemap builders...

Kudos to the Tinderbox community for continually finding neat things to do with this program.

Filed under Tinderbox , Internet .