"""a festival report that fits the handoff

Generated from src/content/docs/reference/render-plaintext.md.
Run with the documented Fieldwork release in a writable directory.
Exports are saved there using the filenames shown in the walkthrough.
"""

import pandas as pd
import fieldwork as fw

films = pd.DataFrame(
    [
        ("Rialto", "English", "Short"),
        ("Rialto", "English", "Short"),
        ("Rialto", "English", "Feature"),
        ("Rialto", "French", "Short"),
        ("Café", "French", "Short"),
        ("Café", "French", "Feature"),
        ("Café", "English", "Short"),
        ("Annex\nStudio", "English", "Short"),
    ],
    columns=["venue", "language", "category"],
)
evidence = fw.census(films, ["venue", "language", "category"])

line_limited = fw.render_plaintext(evidence, width=90, max_lines=8)
print(line_limited)

three_nodes = fw.render_plaintext(evidence, width=90, max_nodes=3)
print(three_nodes)

venues = fw.census(films, ["venue"])
venue_report = fw.render_plaintext(venues, width=90)
print(venue_report)

narrow = fw.render_plaintext(venues, width=36)
print(narrow)

topology = fw.render_plaintext(venues, width=90, detail="topology")
print(topology)

ascii_only = fw.render_plaintext(venues, width=90, unicode_mode="safe")
print(ascii_only)
