'Map /thread/METADATA_ID/... to view or extract commands.
>>> path = \'/thread/=123/\'
>>> commands = urlmap._map_thread(request, path[1:].split(\'/\'), {}, {})
>>> commands
[<mailpile.plugins.core.Output...>, <mailpile.plugins.search.View...>]
>>> commands[1].args
(\'=123\',)'

def _map_thread(self, request, path_parts, query_data, post_data):

    (message_mids, i) = ([], 1)
    while path_parts[i].startswith('='):
        message_mids.append(path_parts[i])
        i += 1
    return [self._choose_output(path_parts), self._command('message', args=message_mids, query_data=query_data, post_data=post_data)]
