def _parse_remind_line(self, line, text):
        """Parse a line of remind output into a dict

        line -- the remind output
        text -- the original remind input
        """
        event = {}
        line = line.split(None, 6)
        dat = [int(f) for f in line[0].split('/')]
        if line[4] != '*':
            start = divmod(int(line[4]), 60)
            event['dtstart'] = [datetime(dat[0], dat[1], dat[2], start[0], start[1], tzinfo=self._localtz)]
            if line[3] != '*':
                event['duration'] = timedelta(minutes=int(line[3]))
        else:
            event['dtstart'] = [date(dat[0], dat[1], dat[2])]

        msg = ' '.join(line[5:]) if line[4] == '*' else line[6]
        msg = msg.strip().replace('%_', '\n').replace('["["]', '[')

        if ' at ' in msg:
            (event['msg'], event['location']) = msg.rsplit(' at ', 1)
        else:
            event['msg'] = msg

        if '%"' in text:
            event['description'] = Remind._gen_description(text)

        tags = line[2].split(',')

        classes = ['PUBLIC', 'PRIVATE', 'CONFIDENTIAL']

        for tag in tags[:-1]:
            if tag in classes:
                event['class'] = tag

        event['categories'] = [tag for tag in tags[:-1] if tag not in classes]

        event['uid'] = '%s@%s' % (tags[-1][7:], getfqdn())

        return event
def _parse_remind_line ( self , line , text ) : event = { } line = line . split ( None , 6 ) dat = [ int ( f ) for f in line [ 0 ] . split ( '/' ) ] if line [ 4 ] != '*' : start = divmod ( int ( line [ 4 ] ) , 60 ) event [ 'dtstart' ] = [ datetime ( dat [ 0 ] , dat [ 1 ] , dat [ 2 ] , start [ 0 ] , start [ 1 ] , tzinfo = self . _localtz ) ] if line [ 3 ] != '*' : event [ 'duration' ] = timedelta ( minutes = int ( line [ 3 ] ) ) else : event [ 'dtstart' ] = [ date ( dat [ 0 ] , dat [ 1 ] , dat [ 2 ] ) ] msg = ' ' . join ( line [ 5 : ] ) if line [ 4 ] == '*' else line [ 6 ] msg = msg . strip ( ) . replace ( '%_' , '\n' ) . replace ( '["["]' , '[' ) if ' at ' in msg : ( event [ 'msg' ] , event [ 'location' ] ) = msg . rsplit ( ' at ' , 1 ) else : event [ 'msg' ] = msg if '%"' in text : event [ 'description' ] = Remind . _gen_description ( text ) tags = line [ 2 ] . split ( ',' ) classes = [ 'PUBLIC' , 'PRIVATE' , 'CONFIDENTIAL' ] for tag in tags [ : - 1 ] : if tag in classes : event [ 'class' ] = tag event [ 'categories' ] = [ tag for tag in tags [ : - 1 ] if tag not in classes ] event [ 'uid' ] = '%s@%s' % ( tags [ - 1 ] [ 7 : ] , getfqdn ( ) ) return event
Parse a line of remind output into a dict

        line -- the remind output
        text -- the original remind input