utils/export_annotations.py
changeset 46 7cff1f0a6882
parent 43 e27c3c1c57f1
child 66 658561ea9e65
equal deleted inserted replaced
44:76f2fa4eb4f7 46:7cff1f0a6882
    43     if start_date:
    43     if start_date:
    44         res.append({'name': 'ts', 'op': ">=", 'val':start_date.isoformat() })
    44         res.append({'name': 'ts', 'op': ">=", 'val':start_date.isoformat() })
    45     if end_date:
    45     if end_date:
    46         res.append({'name': 'ts', 'op': "<=", 'val':end_date.isoformat() })
    46         res.append({'name': 'ts', 'op': "<=", 'val':end_date.isoformat() })
    47     if events:
    47     if events:
    48         res.append({'name': 'event', 'op': "in", 'val':events })
    48         res.append({'name': 'event_code', 'op': "in", 'val':events })
    49     if channels:
    49     if channels:
    50         res.append({'name': 'channel', 'op': "in", 'val':channels })
    50         res.append({'name': 'channel', 'op': "in", 'val':channels })
    51     if user_whitelist:
    51     if user_whitelist:
    52         res.append({'name': 'user', 'op': "in", 'val':user_whitelist })
    52         res.append({'name': 'user', 'op': "in", 'val':user_whitelist })
    53     return res
    53     return res