@register.tag(name="resource_calendar_events")
def resource_calendar_events(parser, token):
    bits = token.split_contents()
    if 6 != len(bits):
        raise TemplateSyntaxError('%r expects 5 arguments' % bits[0])
    if bits[-2] != 'as':
        raise TemplateSyntaxError(
            '%r expects "as" as the third argument' % bits[0])
    cal_date = bits[-4]
    limit = bits[-3]
    varname = bits[-1]
    cal_id = int(bits[1][1:-1])
    return resource_calendar_events_node(cal_id, cal_date, limit, varname)
Given a collection, cleans up plain page files for books in the collection.
dataset/ETHPy150Open zorna/zorna/zorna/calendars/templatetags/calendars_tags.py/resource_calendar_events--crossover with--dataset/ETHPy150Open inpho/vsm/vsm/extensions/htrc.py/proc_htrc_coll