Esempio n. 1
0
def save_writer_films():
    writer_lines = get_writer_lines(writers_file)
    writer_films = pull_items(writer_lines)
    cPickle.dump(writer_films, open('writer_films.pickle', 'w+'))
Esempio n. 2
0
    writers_file,
    get_director_lines,
    directors_file,
)
from line_processing import pull_items
from tools import make_reverse_dict


"""list of films A-Z"""
film_list = read_films(ratings_file)

"""dict of film : ratings"""
ratings_list = read_ratings(ratings_file)

"""list of raw lines from writers_file"""
writer_lines = get_writer_lines(writers_file)
"""dict of writer : filmography"""
writer_films = pull_items(writer_lines)

"""list of raw lines from directors_file"""
director_lines = get_director_lines(directors_file)
"""dict of director : filmography"""
director_films = pull_items(director_lines)

"""dict of film : director(s)"""
film_directors = make_reverse_dict(director_films)

"""dict of film : writer(s)"""
film_writers = make_reverse_dict(writer_films)

director_ratings_dict = {}