def get_title(doc):
    """Get title of doc"""
    if not doc:
        return ''
    lines = doc.strip('\n').split('\n', maxsplit=1)
    title = lines[0].strip()
    if len(title) > 30:
        title = title[:30] + '...'
    return title
