Compare commits
No commits in common. "e47d22aa227729143a48afb2e338970af8ca00aa" and "11ba1e621261203612602445912b0bee8e97dbf4" have entirely different histories.
e47d22aa22
...
11ba1e6212
@ -121,22 +121,10 @@ def get_film_list(films):
|
|||||||
film_links = []
|
film_links = []
|
||||||
|
|
||||||
for film in films:
|
for film in films:
|
||||||
film_link = generate_imdb_film_link(film)
|
film_link = "[{}](https://www.imdb.com/title/tt{}/)".format(film['title'], film['imdb_id'])
|
||||||
film_links.append(film_link)
|
film_links.append(film_link)
|
||||||
|
|
||||||
if len(film_links) > 0:
|
if len(film_links) > 0:
|
||||||
return "<br>".join(film_links)
|
return "<br>".join(film_links)
|
||||||
else:
|
else:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
def generate_markdown_link(text, url):
|
|
||||||
return "[{}]({})".format(text, url)
|
|
||||||
|
|
||||||
|
|
||||||
def generate_imdb_film_link(film):
|
|
||||||
return generate_markdown_link(film['title'], "https://www.imdb.com/title/tt{}/".format(film['imdb_id']))
|
|
||||||
|
|
||||||
|
|
||||||
def generate_wikipedia_page_link(page_title):
|
|
||||||
return generate_markdown_link(page_title, "https://en.wikipedia.org/wiki/{}".format(page_title.replace(" ", "_")))
|
|
||||||
|
@ -29,7 +29,7 @@ def build_page(films_by_reference_keyword):
|
|||||||
table += "\n"
|
table += "\n"
|
||||||
|
|
||||||
row_data = []
|
row_data = []
|
||||||
row_data.append(VCinemaUtils.generate_wikipedia_page_link(string.capwords(year[13:].replace("-", " "))))
|
row_data.append("[{}](https://en.wikipedia.org/wiki/{})".format(str(string.capwords(year[13:].replace("-", " "))), str(string.capwords(year[13:].replace("-", " ")).replace(" ", "_"))))
|
||||||
row_data.append(VCinemaUtils.get_film_list(reference_keywords_sorted[year]))
|
row_data.append(VCinemaUtils.get_film_list(reference_keywords_sorted[year]))
|
||||||
|
|
||||||
table += " | ".join(row_data)
|
table += " | ".join(row_data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user