app.py
def show_files():
    """
    Render the template with ZIP info
    """
    zips = get_zips(DIR)
    devices = get_devices()
    build_dates = {}
    for zip in zips:
        zip = os.path.splitext(zip)[0]
        device = zip.split('-')[3]
        if device not in devices:
            devices[device] = device
        build_date = zip.split('-')[4]
        if device not in build_dates or build_date > build_dates[device]:
            build_dates[device] = build_date

    for date in build_dates:
        build_dates[date] = datetime.strftime(
            datetime.strptime(build_dates[date], '%Y%m%d'), '%A, %d %B - %Y'
        )

    return render_template("latest.html", devices=devices, build_dates=build_dates)

    Render the template with ZIP info
    
Render the template with ZIP info
Render the template with ZIP info
def show_files():
    zips = get_zips(DIR)
    devices = get_devices()
    build_dates = {}
    for zip in zips:
        zip = os.path.splitext(zip)[0]
        device = zip.split('-')[3]
        if device not in devices:
            devices[device] = device
        build_date = zip.split('-')[4]
        if device not in build_dates or build_date > build_dates[device]:
            build_dates[device] = build_date
    for date in build_dates:
        build_dates[date] = datetime.strftime(
            datetime.strptime(build_dates[date], '%Y%m%d'), '%A, %d %B - %Y'
        )
    return render_template("latest.html", devices=devices, build_dates=build_dates)
def show_files ( ) : zips = get_zips ( DIR ) devices = get_devices ( ) build_dates = { } for zip in zips : zip = os . path . splitext ( zip ) [ 0 ] device = zip . split ( '-' ) [ 3 ] if device not in devices : devices [ device ] = device build_date = zip . split ( '-' ) [ 4 ] if device not in build_dates or build_date > build_dates [ device ] : build_dates [ device ] = build_date for date in build_dates : build_dates [ date ] = datetime . strftime ( datetime . strptime ( build_dates [ date ] , '%Y%m%d' ) , '%A, %d %B - %Y' ) return render_template ( "latest.html" , devices = devices , build_dates = build_dates )
Render the template with ZIP info
Render the template with ZIP info
"""
    Render the template with ZIP info
    """