Files
marcus-web/update_nfr_descriptions.py
T

250 lines
17 KiB
Python

#!/usr/bin/env python3
"""
Update NFR files for 1991-1997 with descriptions from available sources.
"""
import os
import re
# Descriptions from sources
descriptions = {
1992: {
"Adam's Rib": "The Spencer Tracy-Katharine Hepburn romantic comedy (1949), directed by George Cukor, exploring gender roles in a courtroom setting.",
"Annie Hall": "Woody Allen's 1977 comedy about a neurotic New York comedian reflecting on his relationship with the titular character, marking a significant departure from his earlier slapstick work.",
"Big Business": "The 1929 Hal Roach-produced Laurel and Hardy comedy featuring the iconic duo in mistaken identity antics.",
"Bonnie and Clyde": "Arthur Penn's 1967 crime drama romanticizing the infamous outlaws, starring Faye Dunaway and Warren Beatty.",
"Carmen Jones": "Otto Preminger's 1954 lavish musical adaptation of Bizet's opera starring Dorothy Dandridge.",
"Castro Street": "Bruce Baillie's experimental 10-minute avant-garde short film, one of the 'motion picture orphans' included for the first time.",
"Detour": "The 1945 cult classic directed by Edgar G. Ulmer, the story of a hitchhiker who becomes involved with a femme fatale, the first B movie included on the Registry.",
"Double Indemnity": "Billy Wilder's 1944 film noir classic starring Fred MacMurray and Barbara Stanwyck as scheming lovers plotting murder.",
"Footlight Parade": "The Busby Berkeley 1933 musical extravaganza featuring elaborate dance sequences and aquatic finales, showcasing the peak of Hollywood's pre-Code musical era.",
"Nashville": "Robert Altman's 1975 ensemble drama satirizing American culture through interconnected stories in the country music capital.",
"Night of the Hunter": "The only film directed by Charles Laughton (1955), a thriller about a preacher hunting stepchildren.",
"Paths of Glory": "Stanley Kubrick's 1957 antiwar classic about French soldiers court-martialed during World War I.",
"Psycho": "Alfred Hitchcock's 1960 suspense thriller that revolutionized the horror genre with its shocking twists and innovative storytelling.",
"Salt of the Earth": "A 1954 film made by blacklisted filmmakers Paul Jerrico, Herbert J. Biberman, Michael Wilson, and composer Sol Kaplan.",
"The Bank Dick": "W.C. Fields' 1940 comedy about a small-town drunk who becomes a bank guard during a robbery.",
"The Big Parade": "King Vidor's 1925 silent film produced by Irving Thalberg, depicting the horrors of World War I.",
"The Birth of a Nation": "D.W. Griffith's 1915 epic silent film, considered the granddaddy of all silents, portraying the Civil War and Reconstruction from a Confederate viewpoint.",
"The Gold Rush": "Charlie Chaplin's 1925 silent comedy about gold prospectors in the Klondike, featuring his iconic Little Tramp.",
"What's Opera, Doc?": 'A 1957 Warner Bros. cartoon directed by Chuck Jones featuring Bugs Bunny and Elmer Fudd in a Wagnerian opera parody.',
"Within Our Gates": "A black & white silent made in 1920, addressing racial issues in America.",
"Dog Star Man": "Stan Brakhage's 1964 silent experimental film, another 'motion picture orphan' added this year.",
"Adam's Rib": "The Spencer Tracy-Katharine Hepburn romantic comedy (1949), directed by George Cukor, exploring gender roles in a courtroom setting.",
"Psycho": "Alfred Hitchcock's 1960 suspense thriller that revolutionized the horror genre with its shocking twists and innovative storytelling.",
"Double Indemnity": "Billy Wilder's 1944 film noir classic starring Fred MacMurray and Barbara Stanwyck as scheming lovers plotting murder.",
"Nashville": "Robert Altman's 1975 ensemble drama satirizing American culture through interconnected stories in the country music capital.",
"The Bank Dick": "W.C. Fields' 1940 comedy about a small-town drunk who becomes a bank guard during a robbery.",
"Big Business": "The 1929 Hal Roach-produced Laurel and Hardy comedy featuring the iconic duo in mistaken identity antics.",
"The Big Parade": "King Vidor's 1925 silent film produced by Irving Thalberg, depicting the horrors of World War I.",
"Bonnie and Clyde": "Arthur Penn's 1967 crime drama romanticizing the infamous outlaws, starring Faye Dunaway and Warren Beatty.",
"Carmen Jones": "Otto Preminger's 1954 lavish musical adaptation of Bizet's opera starring Dorothy Dandridge.",
"The Gold Rush": "Charlie Chaplin's 1925 silent comedy about gold prospectors in the Klondike, featuring his iconic Little Tramp.",
"Night of the Hunter": "The only film directed by Charles Laughton (1955), a thriller about a preacher hunting stepchildren.",
"Paths of Glory": "Stanley Kubrick's 1957 antiwar classic about French soldiers court-martialed during World War I.",
"Salt of the Earth": "A 1954 film made by blacklisted filmmakers Paul Jerrico, Herbert J. Biberman, Michael Wilson, and Sol Kaplan, about a miners' strike.",
"Within Our Gates": "A black & white silent made in 1920 by Oscar Micheaux, addressing racial issues in America.",
"Dog Star Man": "Stan Brakhage's 1964 silent experimental film, another 'motion picture orphan' added this year.",
},
1993: {
# From LCIB article, no detailed descriptions, but the article has some context
# The article mentions some films with context, but not detailed descriptions
"An American in Paris": "Vincente Minnelli's 1951 musical featuring Gene Kelly's iconic dance sequence, winner of multiple Academy Awards.",
"Badlands": "Terrence Malick's 1973 debut film starring Martin Sheen and Sissy Spacek as young lovers on a killing spree.",
"The Black Pirate": "Douglas Fairbanks' 1926 swashbuckler with stunning Technicolor sequences.",
"Blade Runner": "Ridley Scott's 1982 sci-fi classic based on Philip K. Dick's novel, starring Harrison Ford.",
"Cat People": "Jacques Tourneur's 1942 horror film about a woman who turns into a panther.",
"The Cheat": "Cecil B. DeMille's 1915 silent drama starring Fannie Ward.",
"Chulas Fronteras": "Leslie Marmon Silko's 1976 documentary about Mexican-Americans.",
"Eaux d'Artifice": "Kenneth Anger's 1953 experimental short film with fountains and fireworks.",
"The Godfather, Part II": "Francis Ford Coppola's 1974 sequel, widely regarded as one of the greatest films ever made.",
"His Girl Friday": "Howard Hawks' 1940 screwball comedy starring Cary Grant and Rosalind Russell.",
"It Happened One Night": "Frank Capra's 1934 romantic comedy that swept the Academy Awards.",
"Lassie, Come Home": "Fred M. Wilcox's 1943 family film about the loyal collie.",
"Magical Maestro": "Tex Avery's 1952 animated short featuring a symphony conductor.",
"March of Time: Inside Nazi Germany -- 1938": "A 1938 newsreel documentary showing life under Nazi rule.",
"A Night at the Opera": "The Marx Brothers' 1935 comedy classic.",
"Nothing but a Man": "Michael Roemer's 1964 drama about a Black railroad worker.",
"One Flew over the Cuckoo's Nest": "Miloš Forman's 1975 adaptation of Ken Kesey's novel, starring Jack Nicholson.",
"Point of Order": "Emile de Antonio's 1964 documentary about the Army-McCarthy hearings.",
"Shadows": "John Cassavetes' 1959 independent drama about racial identity.",
"Shane": "George Stevens' 1953 Western starring Alan Ladd as the mysterious gunslinger.",
"Sweet Smell of Success": "Alexander Mackendrick's 1957 film noir about a powerful columnist.",
"Touch of Evil": "Orson Welles' 1958 noir masterpiece starring Charlton Heston.",
"Where Are My Children?": "Lois Weber's 1916 silent film about birth control and eugenics.",
"The Wind": "Victor Sjöström's 1928 silent drama starring Lillian Gish.",
"Yankee Doodle Dandy": "Michael Curtiz's 1942 biopic of George M. Cohan starring James Cagney.",
},
1994: {
# From Horse's Head blog, short descriptions
"A Corner in Wheat": "A 1909 short film by D.W. Griffith about wheat speculation and social inequality.",
"The Exploits of Elaine": "A 1914 serial film featuring Pearl White in cliffhanger adventures.",
"Hell's Hinges": "William S. Hart's 1916 Western about a gunslinger reforming a town.",
"Safety Last!": "Harold Lloyd's 1923 comedy featuring the iconic clock tower climb.",
"Tabu: A Story of the South Seas": "F.W. Murnau's 1931 romance set in Polynesia.",
"Freaks": "Tod Browning's 1932 horror film about carnival performers.",
"Scarface": "Howard Hawks' 1932 gangster film starring Paul Muni.",
"Snow-White": "Dave Fleischer's 1933 animated short featuring Betty Boop.",
"Pinocchio": "Walt Disney's 1940 animated feature about the wooden boy.",
"The Lady Eve": "Preston Sturges' 1941 screwball comedy starring Barbara Stanwyck.",
"Meet Me in St. Louis": "Vincente Minnelli's 1944 musical set in 1903.",
"Force of Evil": "Abraham Polonsky's 1948 film noir about stock market manipulation.",
"Louisiana Story": "Robert Flaherty's 1948 documentary about Cajun life.",
"The African Queen": "John Huston's 1951 adventure starring Humphrey Bogart and Katharine Hepburn.",
"Marty": "Delbert Mann's 1955 drama about a lonely butcher.",
"Invasion of the Body Snatchers": "Don Siegel's 1956 sci-fi thriller about alien invasion.",
"A MOVIE": "Bruce Conner's 1958 experimental collage film.",
"The Apartment": "Billy Wilder's 1960 comedy-drama starring Jack Lemmon.",
"The Manchurian Candidate": "John Frankenheimer's 1962 political thriller.",
"The Cool World": "Shirley Clarke's 1963 drama about Harlem street gangs.",
"Zapruder Film": "Abraham Zapruder's 1963 home movie of JFK's assassination.",
"Midnight Cowboy": "John Schlesinger's 1969 drama about two hustlers in New York.",
"Hospital": "Frederick Wiseman's 1970 documentary about a hospital.",
"Taxi Driver": "Martin Scorsese's 1976 thriller starring Robert De Niro.",
"E.T. the Extra-Terrestrial": "Steven Spielberg's 1982 family adventure about a boy and an alien.",
},
1995: {
# From Buffalo News article and Horse's Head
"Blacksmith Scene": "Thomas Edison's 1893 short film showing a blacksmith at work.",
"Rip Van Winkle": "1896/1903 short films by J. Stuart Blackton.",
"Fatty's Tintype Tangle": "Roscoe Arbuckle's 1915 comedy short.",
"The Last of the Mohicans": "Maurice Tourneur's 1920 adaptation of the novel.",
"The Four Horsemen of the Apocalypse": "Rex Ingram's 1921 epic about World War I.",
"Manhatta": "Paul Strand and Charles Sheeler's 1921 experimental film.",
"7th Heaven": "Frank Borzage's 1927 silent romance.",
"Fury": "Fritz Lang's 1936 drama about mob justice.",
"The Adventures of Robin Hood": "Michael Curtiz's 1938 swashbuckler.",
"Stagecoach": "John Ford's 1939 Western classic.",
"The Philadelphia Story": "George Cukor's 1940 comedy starring Katharine Hepburn.",
"Jammin' the Blues": "Gjon Mili's 1944 jazz documentary.",
"Gerald McBoing Boing": "Robert Cannon's 1950 animated short.",
"The Day the Earth Stood Still": "Robert Wise's 1951 sci-fi film.",
"The Band Wagon": "Vincente Minnelli's 1953 musical.",
"All That Heaven Allows": "Douglas Sirk's 1955 melodrama.",
"North by Northwest": "Alfred Hitchcock's 1959 thriller.",
"To Kill a Mockingbird": "Robert Mulligan's 1962 drama.",
"The Hospital": "Arthur Hiller's 1971 comedy-drama.",
"Cabaret": "Bob Fosse's 1972 musical.",
"American Graffiti": "George Lucas's 1973 coming-of-age film.",
"The Conversation": "Francis Ford Coppola's 1974 thriller.",
"To Fly!": "Greg MacGillivray's 1976 IMAX documentary.",
"Chan Is Missing": "Wayne Wang's 1982 mystery film.",
"El Norte": "Gregory Nava's 1983 immigration drama.",
},
1996: {
# From LCIB article
"The Awful Truth": "Leo McCarey's 1937 screwball comedy.",
"Broken Blossoms": "D.W. Griffith's 1919 silent drama.",
"The Deer Hunter": "Michael Cimino's 1978 Vietnam War film.",
"Destry Rides Again": "George Marshall's 1939 Western comedy.",
"Flash Gordon serial": "Frederick Stephani's 1936 sci-fi serial.",
"The Forgotten Frontier": "Marion Grierson's 1931 documentary.",
"Frank Film": "Frank Mouris's 1973 animated short.",
"The Graduate": "Mike Nichols's 1967 coming-of-age comedy.",
"The Heiress": "William Wyler's 1949 drama.",
"The Jazz Singer": "Alan Crosland's 1927 part-talkie.",
"Life and Times of Rosie the Riveter": "Connie Field's 1980 documentary.",
"M*A*S*H": "Robert Altman's 1970 war comedy.",
"Mildred Pierce": "Michael Curtiz's 1945 film noir.",
"The Outlaw Josey Wales": "Clint Eastwood's 1976 Western.",
"The Producers": "Mel Brooks's 1968 comedy.",
"Pull My Daisy": "Robert Frank's 1959 Beat film.",
"Road to Morocco": "David Butler's 1942 comedy.",
"She Done Him Wrong": "Lowell Sherman's 1933 pre-Code film.",
"Shock Corridor": "Samuel Fuller's 1963 psychological drama.",
"Show Boat": "James Whale's 1936 musical.",
"The Thief of Bagdad": "Raoul Walsh's 1924 adventure.",
"To Be or Not To Be": "Ernst Lubitsch's 1942 comedy.",
"Topaz": "Alfred Hitchcock's 1969 thriller.",
"Verbena Tragica": "Emilio Fernandez's 1939 drama.",
"Woodstock": "Michael Wadleigh's 1970 documentary.",
},
1997: {
# From LCIB article, no descriptions, but we can use standard ones
"Ben-Hur": "William Wyler's 1959 epic about a Jewish prince seeking revenge.",
"The Big Sleep": "Howard Hawks's 1946 film noir with Humphrey Bogart.",
"The Bridge on the River Kwai": "David Lean's 1957 war film.",
"Cops": "Buster Keaton's 1922 silent comedy.",
"Czechoslovakia 1968": "Denis Sanders and Robert M. Fresco's 1969 documentary.",
"Grass": "Merian C. Cooper's 1925 ethnographic film.",
"The Great Dictator": "Charlie Chaplin's 1940 satire.",
"Harold and Maude": "Hal Ashby's 1971 comedy-drama.",
"Hindenburg Disaster Newsreel Footage": "1937 newsreel of the airship disaster.",
"How the West Was Won": "John Ford's 1962 Western epic.",
"The Hustler": "Robert Rossen's 1961 drama.",
"Knute Rockne, All American": "Lloyd Bacon's 1940 biopic.",
"The Life and Death of 9413 -- A Hollywood Extra": "Robert Florey's 1928 short.",
"The Little Fugitive": "Ray Ashley's 1953 drama.",
"Mean Streets": "Martin Scorsese's 1973 breakthrough film.",
"Motion Painting No. 1": "Oskar Fischinger's 1947 abstract animation.",
"The Music Box": "James Parrott's 1932 Laurel and Hardy film.",
"The Naked Spur": "Anthony Mann's 1953 Western.",
"Rear Window": "Alfred Hitchcock's 1954 thriller.",
"Republic Steel Strike Riots Newsreel Footage": "1937 newsreel.",
"Return of the Secaucus 7": "John Sayles's 1980 drama.",
"The Thin Man": "W.S. Van Dyke's 1934 comedy.",
"Tulips Shall Grow": "George Pal's 1942 puppet animation.",
"West Side Story": "Jerome Robbins and Robert Wise's 1961 musical.",
"Wings": "William A. Wellman's 1927 silent war film.",
},
}
def update_nfr_file(year, film_descriptions):
filename = f"scripts/nfr_data/nfr_{year}.py"
if not os.path.exists(filename):
print(f"File {filename} not found")
return
with open(filename, 'r') as f:
content = f.read()
# Parse the dict to get exact keys
import ast
start = content.find('NFR_' + str(year) + ' = {')
end = content.rfind('}') + 1
dict_str = content[start:end]
try:
nfr_dict = ast.literal_eval(dict_str.split(' = ', 1)[1])
except:
print(f"Could not parse dict in {filename}")
return
# Update the dict
updated = 0
for film in nfr_dict:
if film in film_descriptions:
nfr_dict[film]['description'] = film_descriptions[film]
updated += 1
# Reconstruct the dict string
lines = []
lines.append("{")
for film in sorted(nfr_dict.keys()):
data = nfr_dict[film]
lines.append(f' "{film}": {{')
lines.append(f' "year": {data["year"]},')
lines.append(f' "description": "{data["description"]}"')
lines.append(' },')
lines[-1] = lines[-1].rstrip(',') # Remove comma from last entry
lines.append("}")
dict_content = '\n'.join(lines)
# Replace in content
new_content = content.replace(dict_str, f"NFR_{year} = {dict_content}")
with open(filename, 'w') as f:
f.write(new_content)
print(f"Updated {filename} with {updated} descriptions")
def main():
for year in range(1992, 1998):
if year in descriptions:
update_nfr_file(year, descriptions[year])
# For 1991, we don't have descriptions, so leave as is
if __name__ == "__main__":
main()