def get_tag_uri(url, date):
    tag = re.sub('^http://', '', url)
    if date is not None:
        tag = re.sub('/', ',%s-%s-%s:/' % (date.year, date.month, date.day), tag, 1)
    tag = re.sub('#', '/', tag)
    return 'tag:' + tag


# based on django.contrib.syndication.feeds.Feed
Creates a TagURI. See http://diveintomark.org/archives/2004/05/28/howto-atom-id
dataset/ETHPy150Open llazzaro/django-scheduler/schedule/feeds/atom.py/get_tag_uri