Skip to content

Instantly share code, notes, and snippets.

@jaysoffian
Created March 23, 2021 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaysoffian/6cedce3c4e873f3d9e60398eb528e0ae to your computer and use it in GitHub Desktop.
Save jaysoffian/6cedce3c4e873f3d9e60398eb528e0ae to your computer and use it in GitHub Desktop.
Convert Akira Kurosawa's top 100 films to a CSV for import to Letterboxd
#!/usr/bin/python3
"""
Convert Akira Kurosawa's top 100 films to a CSV for import to Letterboxd.
List extracted from https://www.openculture.com/2015/01/akira-kurosawas-list-of-his-100-favorite-movies.html
"""
LIST = """
1. Broken Blossoms or The Yellow Man and the Girl (Griffith, 1919) USA
2. Das Cabinet des Dr. Caligari [The Cabinet of Dr. Caligari] (Wiene, 1920) Germany
3. Dr. Mabuse, der Spieler – Ein Bild der Zeit (Part 1 – Part 2) [Dr. Mabuse, the Gambler] (Lang, 1922) Germany
4. The Gold Rush (Chaplin, 1925) USA
5. La Chute de la Maison Usher [The Fall of the House of Usher] (Jean Epstein, 1928) France
6. Un Chien Andalou [An Andalusian Dog] (Bunuel, 1928) France
7. Morocco (von Sternberg, 1930) USA
8. Der Kongress Tanzt (Charell, 1931) Germany
9. Die 3groschenoper [The Threepenny Opera] (Pabst, 1931) Germany
10. Leise Flehen Meine Lieder [Lover Divine] (Forst, 1933) Austria/Germany
11. The Thin Man (Dyke, 1934) USA
12. Tonari no Yae-chan [My Little Neighbour, Yae] (Shimazu, 1934) Japan
13. Tange Sazen yowa: Hyakuman ryo no tsubo [Sazen Tange and the Pot Worth a Million Ryo] (Yamanaka, 1935) Japan
14. Akanishi Kakita [Capricious Young Men] (Itami, 1936) Japan
15. La Grande Illusion [The Grand Illusion] (Renoir, 1937) France
16. Stella Dallas (Vidor, 1937) USA
17. Tsuzurikata Kyoshitsu [Lessons in Essay] (Yamamoto, 1938) Japan
18. Tsuchi [Earth] (Uchida, 1939) Japan
19. Ninotchka (Lubitsch, 1939) USA
20. Ivan Groznyy I, Ivan Groznyy II: Boyarsky Zagovor [Ivan the Terrible Parts I and II] (Eisenstein, 1944-46) Soviet Union
21. My Darling Clementine (Ford, 1946) USA
22. It’s a Wonderful Life (Capra, 1946) USA
23. The Big Sleep (Hawks, 1946) USA
24. Ladri di Biciclette [The Bicycle Thief] [Bicycle Thieves] (De Sica, 1948) Italy
25. Aoi sanmyaku [The Green Mountains] (Imai, 1949) Japan
26. The Third Man (Reed, 1949) UK
27. Banshun [Late Spring] (Ozu, 1949) Japan
28. Orpheus (Cocteau, 1949) France
29. Karumen kokyo ni kaeru [Carmen Comes Home] (Kinoshita, 1951) Japan
30. A Streetcar Named Desire (Kazan, 1951) USA
31. Thérèse Raquin [The Adultress] (Carne 1953) France
32. Saikaku ichidai onna [The Life of Oharu] (Mizoguchi, 1952) Japan
33. Viaggio in Italia [Journey to Italy] (Rossellini, 1953) Italy
34. Gojira [Godzilla] (Honda, 1954) Japan
35. La Strada (Fellini, 1954) Italy
36. Ukigumo [Floating Clouds] (Naruse, 1955) Japan
37. Pather Panchali [Song of the Road] (Ray, 1955) India
38. Daddy Long Legs (Negulesco, 1955) USA
39. The Proud Ones (Webb, 1956) USA
40. Bakumatsu taiyoden [Sun in the Last Days of the Shogunate] (Kawashima, 1957) Japan
41. The Young Lions (Dmytryk, 1957) USA
42. Les Cousins [The Cousins] (Chabrol, 1959) France
43. Les Quarte Cents Coups [The 400 Blows] (Truffaut, 1959) France
44. A bout de Souffle [Breathless] (Godard, 1959) France
45. Ben-Hur (Wyler, 1959) USA
46. Ototo [Her Brother] (Ichikawa, 1960) Japan
47. Une aussi longue absence [The Long Absence] (Colpi, 1960) France/Italy
48. Le Voyage en Ballon [Stowaway in the Sky] (Lamorisse, 1960) France
49. Plein Soleil [Purple Noon] (Clement, 1960) France/Italy
50. Zazie dans le métro [Zazie on the Subway](Malle, 1960) France/Italy
51. L’Annee derniere a Marienbad [Last Year in Marienbad] (Resnais, 1960) France/Italy
52. What Ever Happened to Baby Jane? (Aldrich, 1962) USA
53. Lawrence of Arabia (Lean, 1962) UK
54. Melodie en sous-sol [Any Number Can Win] (Verneuil, 1963) France/Italy
55. The Birds (Hitchcock, 1963) USA
56. Il Deserto Rosso [The Red Desert](Antonioni, 1964) Italy/France
57. Who’s Afraid of Virginia Woolf? (Nichols, 1966) USA
58. Bonnie and Clyde (Penn, 1967) USA
59. In the Heat of the Night (Jewison, 1967) USA
60. The Charge of the Light Brigade (Richardson, 1968) UK
61. Midnight Cowboy (Schlesinger, 1969) USA
62. MASH (Altman, 1970) USA
63. Johnny Got His Gun (Trumbo, 1971) USA
64. The French Connection (Friedkin, 1971) USA
65. El espíritu de la colmena [Spirit of the Beehive] (Erice, 1973) Spain
66. Solyaris [Solaris] (Tarkovsky, 1972) Soviet Union
67. The Day of the Jackal (Zinneman, 1973) UK/France
68. Gruppo di famiglia in un interno [Conversation Piece] (Visconti, 1974) Italy/France
69. The Godfather Part II (Coppola, 1974) USA
70. Sandakan hachibanshokan bohkyo [Sandakan 8] (Kumai, 1974) Japan
71. One Flew Over the Cuckoo’s Nest (Forman, 1975) USA
72. O, Thiassos [The Travelling Players] (Angelopoulos, 1975) Greece
73. Barry Lyndon (Kubrick, 1975) UK
74. Daichi no komoriuta [Lullaby of the Earth] (Masumura, 1976) Japan
75. Annie Hall (Allen, 1977) USA
76. Neokonchennaya pyesa dlya mekhanicheskogo pianino [Unfinished Piece for Mechanical Piano] (Mikhalkov, 1977) Soviet Union
77. Padre Padrone [My Father My Master] (P. & V. Taviani, 1977) Italy
78. Gloria (Cassavetes, 1980) USA
79. Harukanaru yama no yobigoe [A Distant Cry From Spring] (Yamada, 1980) Japan
80. La Traviata (Zeffirelli, 1982) Italy
81. Fanny och Alexander [Fanny and Alexander] (Bergman, 1982) Sweden/France/West Germany
82. Fitzcarraldo (Herzog, 1982) Peru/West Germany
83. The King of Comedy (Scorsese, 1983) USA
84. Merry Christmas Mr. Lawrence (Oshima, 1983) UK/Japan/New Zealand
85. The Killing Fields (Joffe 1984) UK
86. Stranger Than Paradise (Jarmusch, 1984) USA/ West Germany
87. Dongdong de Jiaqi [A Summer at Grandpa’s] (Hou, 1984) Taiwan
88. Paris, Texas (Wenders, 1984) France/ West Germany
89. Witness (Weir, 1985) USA
90. The Trip to Bountiful (Masterson, 1985) USA
91. Otac na sluzbenom putu [When Father was Away on Business] (Kusturica, 1985) Yugoslavia
92. The Dead (Huston, 1987) UK/Ireland/USA
93. Khane-ye doust kodjast? [Where is the Friend’s Home] (Kiarostami, 1987) Iran
94. Baghdad Cafe [Out of Rosenheim] (Adlon, 1987) West Germany/USA
95. The Whales of August (Anderson, 1987) USA
96. Running on Empty (Lumet, 1988) USA
97. Tonari no totoro [My Neighbour Totoro] (Miyazaki, 1988) Japan
98. A un [Buddies] (Furuhata, 1989) Japan
99. La Belle Noiseuse [The Beautiful Troublemaker] (Rivette, 1991) France/Switzerland
100. Hana-bi [Fireworks] (Kitano, 1997) Japan
"""
import csv
import re
f = open("kurosawa_top_100.csv", "w", newline="")
w = csv.DictWriter(
f, ["Title", "Year", "Directors", "Review"], quoting=csv.QUOTE_ALL)
w.writeheader()
for line in LIST.splitlines():
line = line.strip()
if not line:
continue
# print(line)
rank = int(re.search(r"^(\d+)", line).group(1))
director, year = re.search(r"\(([^\d,]+),?\s+(\d+)(?:-\d+)?\)", line).groups()
if '[' in line:
alt_title, = re.search(r"\[([^]]+)\]", line).groups()
else:
alt_title = None
title = re.search(r"^\d+. ([^[(]+)", line).group(1)
title = title.strip()
row = dict(
Title=alt_title or title,
Year=year,
Directors=director,
Review=line,
)
print(row)
w.writerow(row)
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment