def generate_csv(path, out):
    """\
    Walks through the `path` and generates the CSV file `out`
    """
    known_persons = ()
    with codecs.open(os.path.join(os.path.dirname(__file__), 'person_names.txt'), 'rb', 'utf-8') as f:
        known_persons = set((l.rstrip() for l in f))
    writer = UnicodeWriter(open(out, 'wb'), delimiter=';')
    for cable in cables_from_source(path):
        content = cable.content_body
        if not content:
            continue
        persons = [person for person in known_persons if person in content]
        if persons:
            row = [cable.reference_id]
            row.extend(persons)
            writer.writerow(row)