import linecache


def get_title(notes_path, file_stem):
    """ Get the title by reading the second line of the .md file """
    title = linecache.getline(notes_path + file_stem + '.md', 2)
    title = title.replace('\n', '')
    title = title.replace('title: ', '')
    return title