perceval/backends/mozilla/remo.py
def metadata_category(item):
        """Extracts the category from a ReMo item.

        This backend generates items types 'event', 'activity'
        or 'user'. To guess the type of item, the code will look
        for unique fields.
        """
        if 'estimated_attendance' in item:
            category = CATEGORY_EVENT
        elif 'activity' in item:
            category = CATEGORY_ACTIVITY
        elif 'first_name' in item:
            category = CATEGORY_USER
        else:
            raise TypeError("Could not define the category of item " + str(item))

        return category
def metadata_category(item):
        """Extracts the category from a ReMo item.

        This backend generates items types 'event', 'activity'
        or 'user'. To guess the type of item, the code will look
        for unique fields.
        """
        if 'estimated_attendance' in item:
            category = CATEGORY_EVENT
        elif 'activity' in item:
            category = CATEGORY_ACTIVITY
        elif 'first_name' in item:
            category = CATEGORY_USER
        else:
            raise TypeError("Could not define the category of item " + str(item))

        return category
Extracts the category from a ReMo item.

        This backend generates items types 'event', 'activity'
        or 'user'. To guess the type of item, the code will look
        for unique fields.