Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing template for complete film info #123

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/letsrolld/webcli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def directors_get():
for director in get_directors.sync(client=client):
director_reports.append(list_director(director))

print("\n\n".join(director_reports))
print("\n".join(director_reports))


@cli.group()
Expand Down Expand Up @@ -113,7 +113,7 @@ def films_query(
for film in films:
film_reports.append(report_film(film))

print("\n\n".join(film_reports))
print("\n".join(film_reports))


if __name__ == "__main__":
Expand Down
25 changes: 25 additions & 0 deletions src/letsrolld/webcli/templates/film-full.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
>>>
{{ film.title }}
>>>
📅:{{ film.year }} | 📽:{{ film.directors|map(attribute='name')|join(', ') }}
⌛:{{ film.runtime }}m ⭐:{{ film.rating }} 📎:{{ film.genres|join(',') }}
{%- set ns = namespace(all_country_names=[]) -%}
{%- for country in film.countries -%}
{%- set ns.all_country_names = ns.all_country_names + [country.flag + country.name] -%}
{%- endfor %}
Countries: {{ ns.all_country_names|join(', ') }}
---
Letterboxd: {{ film.lb_url }}
JustWatch: {{ film.jw_url }}
Trailer: {{ film.trailer_url }}
---
{{ film.description|wordwrap(70)|indent(2, first=True) }}
---
Available @
{% for offer in film.offers|selectattr("name", "in", offers) -%}
{%- if offer.url -%}
{{ offer.name }}: {{ offer.url }}
{% else -%}
{{ offer.name }}
{% endif -%}
{% endfor -%}
Loading