Files
Chronos/branding/ui-icons/icons.py
T
Alby96 aa1d4913a3 feat(admin): Library pages on the web panel (owner review 2, R6)
The web panel now manages the library without editing it: the owner can
browse and view sequences and photos, delete sequences and photos into the
archive's trash, restore or empty the trash and run mass operations, as
R6 asks, on top of the engine endpoints of the previous commit.

- Library page right after the Dashboard: search, Year/Camera/Status/Tag
  filters fed by a new GET /api/v1/sequences/facets, sort, cards or list
  (remembered per browser), lazy cover thumbnails, Load more by cursor,
  multi-select with Shift ranges and "Select all N" of the filter, and a
  sticky bar for the selection: Analyse, Proxies, Thumbnails, Verify,
  Tags (add/remove), Export CSV (client-side) and Delete (dry run, list
  of what moves to the trash, then the move). Filters live in the address,
  so Back from a sequence finds them again.
- Sequence view (#/library?id=): inline title, tags, rating and notes,
  facts, photos in pages of 500 with content-visibility, a photo viewer
  (proxy, arrows, Esc, Exif facts), Set cover, Download original, Delete
  photos (typing the count above 20 photos), Delete sequence, renders to
  download. No video editing controls.
- Trash view (#/library?view=trash, also linked from Archive): entries,
  Restore, and Empty (dry run, list, the localised word typed, the plan's
  fingerprint sent back, the job followed to its end).
- Live updates from sequenceChanged and jobState; keyboard grid (one tab
  stop, arrows, Space, Shift+Space, Enter, Ctrl+A, Esc); RTL, dark theme.
- GET /sequences takes rendered=true|false for the Status filter.
- ui.js: confirmDialog's typed confirmation by name, word or count, with a
  list of what the action concerns; formDialog. api.js: putBytes for the
  web upload, which the Library imports on demand (upload.js, optional).
- New web icons from icons.py (Image for the Library, trash, grid/list,
  arrows, stars, cover); directional glyphs mirror in right-to-left pages.
- Strings in en and it; tests for the facets (both dialects), the rendered
  filter, the menu, the modules and the on-demand upload import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 029cf334f66cb6fa1265b96a6f8faff2964c11ea)
2026-10-27 10:51:04 +01:00

198 lines
14 KiB
Python

"""Chronos UI icon set (DESIGN.md §5): 16-px grid, 1.5-px strokes, round caps/joins.
Each icon = stroke path data + optional fill path data. Generates the WPF resource dictionary
src/Chronos.Ui/Icons/Icons.xaml, the web admin's src/Chronos.Server/Admin/web/icons.js and a preview sheet (icons.svg).
Run: python3 branding/ui-icons/icons.py"""
import math, os
def rr(x, y, w, h, r):
return (f"M{x+r} {y} H{x+w-r} A{r} {r} 0 0 1 {x+w} {y+r} V{y+h-r} A{r} {r} 0 0 1 {x+w-r} {y+h} "
f"H{x+r} A{r} {r} 0 0 1 {x} {y+h-r} V{y+r} A{r} {r} 0 0 1 {x+r} {y} Z")
def circ(cx, cy, r):
return f"M{cx-r} {cy} A{r} {r} 0 1 0 {cx+r} {cy} A{r} {r} 0 1 0 {cx-r} {cy} Z"
def arc(cx, cy, r, a0, a1):
"""Arc clockwise from a0 to a1 degrees (0 = 12 o'clock)."""
p = lambda a: (cx + r * math.sin(math.radians(a)), cy - r * math.cos(math.radians(a)))
x0, y0 = p(a0); x1, y1 = p(a1)
large = 1 if (a1 - a0) % 360 > 180 else 0
return f"M{x0:.2f} {y0:.2f} A{r} {r} 0 {large} 1 {x1:.2f} {y1:.2f}"
def gear(cx, cy, r_out, r_in, teeth, tip, base):
"""Toothed outline, first tooth at 12 o'clock: each tooth has the half-width tip on r_out and base on r_in;
the valleys between teeth are arcs on r_in."""
f = lambda v: f"{v:.2f}".rstrip("0").rstrip(".")
p = lambda a, r: f"{f(cx + r * math.sin(math.radians(a)))} {f(cy - r * math.cos(math.radians(a)))}"
t, b, step = math.degrees(math.asin(tip / r_out)), math.degrees(math.asin(base / r_in)), 360 / teeth
d = [f"M{p(-b, r_in)}"]
for k in range(teeth):
a = k * step
d.append(f"L{p(a - t, r_out)} A{r_out} {r_out} 0 0 1 {p(a + t, r_out)} L{p(a + b, r_in)} A{r_in} {r_in} 0 0 1 {p(a + step - b, r_in)}")
return " ".join(d) + " Z"
I = {}
# Navigation
I["Library"] = (rr(1.5,1.5,5.5,5.5,1)+rr(9,1.5,5.5,5.5,1)+rr(1.5,9,5.5,5.5,1)+rr(9,9,5.5,5.5,1), None)
I["Import"] = ("M8 2V10 M4.5 6.5 L8 10 L11.5 6.5 M2.5 13.5 H13.5", None)
I["Sequence"] = ("M2 12.5 L11.5 3 L13 4.5 L3.5 14 H2 Z", None)
I["Archive"] = ("M2 4.5 H14 V13.5 H2 Z M2 2 H14 V4.5 H2 Z M6 8 H10", None)
I["Jobs"] = ("M3 8 H13 M3 4 H13 M3 12 H9", None)
I["Server"] = ("M4.5 12.5 A3 3 0 0 1 4.2 6.5 A4 4 0 0 1 11.9 5.5 A3.5 3.5 0 0 1 12.2 12.5 Z", None)
# Owner review 2: a toothed gear with a centre hole (the circle with rays it replaces read as a sun). Narrow teeth
# close up into solid knobs at 16 px, which keeps the gaps between them open.
I["Settings"] = (gear(8,8,6.5,4.6,8,0.6,0.85)+" "+circ(8,8,1.7), None)
I["About"] = (circ(8,8,6.5)+" M8 7 V11 M8 4.8 V5.2", None)
I["Menu"] = ("M2.5 4 H13.5 M2.5 8 H13.5 M2.5 12 H13.5", None)
I["Users"] = (circ(8,5,3)+" M2.5 14 A5.5 5.5 0 0 1 13.5 14", None)
I["User"] = I["Users"]
I["Logs"] = ("M3.5 1.5 H9.5 L12.5 4.5 V14.5 H3.5 Z M5.5 7 H10.5 M5.5 9.5 H10.5 M5.5 12 H8.5", None)
# Toolbar / actions
I["Search"] = (circ(7,7,4.5)+" M10.4 10.4 L14 14", None)
I["Refresh"] = (arc(8,8,5.5,30,320)+" M13.2 2.6 L13.2 5.3 L10.5 5.3", None)
I["ViewGrid"] = I["Library"]
I["ViewList"] = ("M5.5 4 H13.5 M5.5 8 H13.5 M5.5 12 H13.5 M2.5 4 H2.6 M2.5 8 H2.6 M2.5 12 H2.6", None)
I["ViewTimeline"] = ("M2 13.5 H14 M3.5 11 V8 M6 11 V5 M8.5 11 V7 M11 11 V3.5 M13.5 11 V9", None)
I["ChevronDown"] = ("M4 6 L8 10 L12 6", None)
I["ChevronUp"] = ("M4 10 L8 6 L12 10", None)
I["ChevronRight"] = ("M6 4 L10 8 L6 12", None)
I["ChevronLeft"] = ("M10 4 L6 8 L10 12", None)
I["Close"] = ("M4 4 L12 12 M12 4 L4 12", None)
I["Check"] = ("M3 8.5 L6.5 12 L13 4.5", None)
I["Back"] = ("M13 8 H3 M7 4 L3 8 L7 12", None)
I["Forward"] = ("M3 8 H13 M9 4 L13 8 L9 12", None)
I["Plus"] = ("M8 3 V13 M3 8 H13", None)
I["Minus"] = ("M3 8 H13", None)
I["More"] = (None, circ(3.5,8,1.1)+circ(8,8,1.1)+circ(12.5,8,1.1))
I["Play"] = (None, "M4.5 2.8 L13 8 L4.5 13.2 Z")
I["Pause"] = (None, rr(4,3,2.6,10,0.8)+rr(9.4,3,2.6,10,0.8))
I["Stop"] = (None, rr(3.5,3.5,9,9,1.5))
I["Folder"] = ("M1.5 4 A1 1 0 0 1 2.5 3 H6 L7.5 4.5 H13.5 A1 1 0 0 1 14.5 5.5 V12.5 A1 1 0 0 1 13.5 13.5 H2.5 A1 1 0 0 1 1.5 12.5 Z", None)
I["FolderOpen"] = ("M1.5 12.5 V4 A1 1 0 0 1 2.5 3 H6 L7.5 4.5 H12.5 V6.5 M1.5 12.5 L3.5 7 H14.5 L12.5 13.5 H2.5 A1 1 0 0 1 1.5 12.5 Z", None)
I["Card"] = ("M4.5 1.5 H10 L12.5 4 V13.5 A1 1 0 0 1 11.5 14.5 H4.5 A1 1 0 0 1 3.5 13.5 V2.5 A1 1 0 0 1 4.5 1.5 Z M6 3.5 V5.5 M8 3.5 V5.5 M10 4.5 V5.5", None)
I["Drive"] = (rr(1.5,4.5,13,7,1.5)+" M4.5 8 H4.6 M7 8 H11.5", None)
I["Eject"] = ("M3 13 H13", "M8 2.8 L13 9.5 H3 Z")
I["Download"] = ("M8 2 V10 M4.5 6.5 L8 10 L11.5 6.5 M2.5 13.5 H13.5", None)
I["Upload"] = ("M8 10.5 V2.5 M4.5 6 L8 2.5 L11.5 6 M2.5 13.5 H13.5", None)
I["Sync"] = (arc(8,8,5.5,20,160)+" "+arc(8,8,5.5,200,340)+" M13.5 6.5 L13.2 9.4 L10.6 8.4 M2.5 9.5 L2.8 6.6 L5.4 7.6", None)
I["Compare"] = (rr(1.5,2.5,13,11,1.5)+" M8 1 V15", None)
I["Vectors"] = ("M2.5 12.5 L7 8 M7 8 H4.5 M7 8 V10.5 M9 7 L13.5 2.5 M13.5 2.5 H11 M13.5 2.5 V5", None)
I["Regions"] = ("M1.5 9.5 C4 8 6 10.5 8.5 9 C10.5 7.8 12.5 8.5 14.5 9.5 M1.5 13.5 H14.5 M1.5 2.5 H14.5", None)
I["CropMask"] = ("M4 1.5 V12 H14.5 M1.5 4 H12 V14.5", None)
I["Fullscreen"] = ("M2 6 V2 H6 M10 2 H14 V6 M14 10 V14 H10 M6 14 H2 V10", None)
I["ActualSize"] = (rr(1.5,2.5,13,11,1.5)+" M5 6 L6 5.5 V10.5 M9.5 6 L10.5 5.5 V10.5 M8 7 V7.1 M8 9.5 V9.6", None)
I["Reset"] = (arc(8,8.5,5,300,210)+" M3.2 3.2 V6.2 H6.2", None)
I["Warning"] = ("M8 1.8 L14.8 13.8 H1.2 Z M8 6.2 V9.6 M8 11.7 V11.8", None)
I["ErrorCircle"] = (circ(8,8,6.5)+" M5.8 5.8 L10.2 10.2 M10.2 5.8 L5.8 10.2", None)
I["SuccessCircle"] = (circ(8,8,6.5)+" M5 8.3 L7.1 10.3 L11 6", None)
I["Lock"] = (rr(3,7,10,7.5,1.5)+" M5.5 7 V5 A2.5 2.5 0 0 1 10.5 5 V7", None)
I["Key"] = (circ(5,10.5,3)+" M7.2 8.3 L13.5 2 M11.5 4 L13 5.5 M9.8 5.7 L11 6.9", None)
I["Power"] = ("M8 1.8 V7.5 "+arc(8,8.8,5.5,40,320), None)
I["Moon"] = ("M9.5 1.8 A6.5 6.5 0 1 0 14.2 11.2 A5.5 5.5 0 0 1 9.5 1.8 Z", None)
I["Sun"] = (circ(8,8,3)+" M8 1 V2.5 M8 13.5 V15 M1 8 H2.5 M13.5 8 H15 M3 3 L4 4 M12 12 L13 13 M3 13 L4 12 M12 4 L13 3", None)
I["Star"] = ("M8 1.8 L9.9 5.8 L14.2 6.3 L11 9.3 L11.9 13.6 L8 11.4 L4.1 13.6 L5 9.3 L1.8 6.3 L6.1 5.8 Z", None)
I["StarFilled"] = (None, "M8 1.8 L9.9 5.8 L14.2 6.3 L11 9.3 L11.9 13.6 L8 11.4 L4.1 13.6 L5 9.3 L1.8 6.3 L6.1 5.8 Z")
I["Tag"] = ("M1.5 2.5 A1 1 0 0 1 2.5 1.5 H7.5 L14.5 8.5 L8.5 14.5 L1.5 7.5 Z M5 5 H5.1", None)
I["Delete"] = ("M2.5 4 H13.5 M6 4 V2.5 H10 V4 M3.8 4 L4.6 14 H11.4 L12.2 4 M6.6 6.8 V11.2 M9.4 6.8 V11.2", None)
I["Copy"] = (rr(5,5,9.5,9.5,1.5)+" M11 5 V2.5 A1 1 0 0 0 10 1.5 H2.5 A1 1 0 0 0 1.5 2.5 V10 A1 1 0 0 0 2.5 11 H5", None)
I["Link"] = ("M6.8 9.2 L9.2 6.8 M7.5 4.5 L9 3 A2.8 2.8 0 0 1 13 7 L11.5 8.5 M8.5 11.5 L7 13 A2.8 2.8 0 0 1 3 9 L4.5 7.5", None)
I["ExternalLink"] = ("M9.5 2 H14 V6.5 M14 2 L7.5 8.5 M12 9.5 V13 A1 1 0 0 1 11 14 H3 A1 1 0 0 1 2 13 V5 A1 1 0 0 1 3 4 H6.5", None)
I["Calendar"] = (rr(1.5,3,13,11.5,1.5)+" M1.5 6.5 H14.5 M5 1.5 V4 M11 1.5 V4", None)
I["Camera"] = ("M1.5 5 A1 1 0 0 1 2.5 4 H4.5 L6 2.5 H10 L11.5 4 H13.5 A1 1 0 0 1 14.5 5 V12.5 A1 1 0 0 1 13.5 13.5 H2.5 A1 1 0 0 1 1.5 12.5 Z "+circ(8,8.5,2.8), None)
I["Chart"] = ("M2 2 V14 H14 M4.5 10.5 L7.5 7 L9.5 9 L13.5 4", None)
I["Filmstrip"] = (rr(1.5,2.5,13,11,1.5)+" M4.5 2.5 V13.5 M11.5 2.5 V13.5 M1.5 6 H4.5 M1.5 10 H4.5 M11.5 6 H14.5 M11.5 10 H14.5", None)
I["Layers"] = ("M8 1.8 L14.5 5.2 L8 8.6 L1.5 5.2 Z M1.5 8.2 L8 11.6 L14.5 8.2 M1.5 11 L8 14.4 L14.5 11", None)
I["Clock"] = (circ(8,8,6.5)+" M8 4.5 V8 L10.5 9.5", None)
I["Exposure"] = (circ(8,8,6.5)+" M3.4 12.6 L12.6 3.4 M4.5 6 H7 M5.75 4.75 V7.25 M9 10 H11.5", None)
I["Motion"] = ("M1.5 8 C3.5 3 5.5 3 7.5 8 C9.5 13 11.5 13 14.5 8", None)
I["Time"] = I["Clock"]
I["Stack"] = I["Layers"]
I["Export"] = ("M8 10 V1.8 M4.8 5 L8 1.8 L11.2 5 M5 7.5 H3 A1 1 0 0 0 2 8.5 V13.5 A1 1 0 0 0 3 14.5 H13 A1 1 0 0 0 14 13.5 V8.5 A1 1 0 0 0 13 7.5 H11", None)
I["Render"] = (rr(1.5,2.5,13,11,1.5), "M6.5 5.5 L10.8 8 L6.5 10.5 Z")
I["Analyse"] = ("M1.5 8.5 H4.5 L6.5 3.5 L9.5 12.5 L11.5 8.5 H14.5", None)
I["Optimise"] = ("M7 2 L8.2 5.8 L12 7 L8.2 8.2 L7 12 L5.8 8.2 L2 7 L5.8 5.8 Z M12.5 10.5 L13 12 L14.5 12.5 L13 13 L12.5 14.5 L12 13 L10.5 12.5 L12 12 Z", None)
I["Duplicate"] = I["Copy"]
I["Verify"] = ("M8 1.5 L13.5 3.5 V7.5 C13.5 11 11 13.3 8 14.5 C5 13.3 2.5 11 2.5 7.5 V3.5 Z M5.5 8 L7.3 9.8 L10.6 6.3", None)
I["Database"] = ("M2.5 3.8 C2.5 2.5 13.5 2.5 13.5 3.8 C13.5 5.1 2.5 5.1 2.5 3.8 Z M2.5 3.8 V12.2 C2.5 13.5 13.5 13.5 13.5 12.2 V3.8 M2.5 8 C2.5 9.3 13.5 9.3 13.5 8", None)
I["Gpu"] = (rr(3.5,3.5,9,9,1.5)+" "+rr(6,6,4,4,0.5)+" M6 1.5 V3.5 M10 1.5 V3.5 M6 12.5 V14.5 M10 12.5 V14.5 M1.5 6 H3.5 M1.5 10 H3.5 M12.5 6 H14.5 M12.5 10 H14.5", None)
I["Network"] = ("M2 6 A8.5 8.5 0 0 1 14 6 M4 8.5 A5.5 5.5 0 0 1 12 8.5 M6 11 A2.6 2.6 0 0 1 10 11", circ(8,13,1.1))
I["Sort"] = ("M5 2.5 V13.5 M2.5 11 L5 13.5 L7.5 11 M11 13.5 V2.5 M8.5 5 L11 2.5 L13.5 5", None)
I["Filter"] = ("M1.5 2.5 H14.5 L9.5 8.5 V13.5 L6.5 12 V8.5 Z", None)
I["Info"] = I["About"]
I["Image"] = (rr(1.5,2.5,13,11,1.5)+" M1.5 11 L5.5 7 L9 10.5 L11 8.5 L14.5 12", circ(10.8,5.6,1.2))
I["Hero"] = (rr(1.5,2.5,13,11,1.5), "M8 4.8 L8.9 6.9 L11.1 7.1 L9.4 8.5 L9.9 10.7 L8 9.5 L6.1 10.7 L6.6 8.5 L4.9 7.1 L7.1 6.9 Z")
I["Exclude"] = (circ(8,8,6.5)+" M3.4 12.6 L12.6 3.4", None)
I["Eye"] = ("M1.5 8 C3.5 4 12.5 4 14.5 8 C12.5 12 3.5 12 1.5 8 Z "+circ(8,8,2.2), None)
I["Wipe"] = I["Compare"]
I["Spline"] = ("M2 13 C5 13 5 3 8 8 C11 13 11 3 14 3", circ(2,13,1.2)+circ(14,3,1.2))
I["Keyframe"] = ("M8 2 L13 8 L8 14 L3 8 Z", None)
I["Tray"] = ("M1.5 9.5 H5 L6.5 11.5 H9.5 L11 9.5 H14.5 M1.5 9.5 L3.5 3 H12.5 L14.5 9.5 V13.5 H1.5 Z", None)
I["Window"] = (rr(1.5,2.5,13,11,1.5)+" M1.5 5.5 H14.5", None)
I["Clipboard"] = (rr(2.5,2.5,11,12,1.5)+" "+rr(5.5,1.5,5,2.5,0.8), None)
I["Cancel"] = I["ErrorCircle"]
I["Retry"] = I["Refresh"]
I["Grip"] = (None, circ(6,4,1)+circ(10,4,1)+circ(6,8,1)+circ(10,8,1)+circ(6,12,1)+circ(10,12,1))
I["Dot"] = (None, circ(8,8,3.5))
I["Ring"] = (circ(8,8,3.5), None)
I["HalfDot"] = (circ(8,8,3.5), "M8 4.5 A3.5 3.5 0 0 1 8 11.5 Z")
I["Triangle"] = (None, "M8 3 L13.5 12.5 H2.5 Z")
I["TriangleRight"] = (None, "M5 3 L12 8 L5 13 Z")
I["Cross"] = ("M4.5 4.5 L11.5 11.5 M11.5 4.5 L4.5 11.5", None)
# Glyphs that point along the reading direction (arrows, chevrons, start-aligned text lines): mirrored in RTL.
# Everything else (clocks, media controls, the ▶ rendered status, symmetric shapes) never mirrors.
DIRECTIONAL = {"Back", "Forward", "ChevronLeft", "ChevronRight", "ExternalLink", "Jobs", "Logs", "ViewList"}
here = os.path.dirname(__file__)
# UTF-8 with LF on every OS (the repository's .gitattributes), whatever the system code page.
write = lambda path: open(path, "w", encoding="utf-8", newline="\n")
out = os.path.join(here, "..", "..", "src", "Chronos.Ui", "Icons", "Icons.xaml")
with write(out) as f:
f.write('<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\n')
f.write(' xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"\n')
f.write(' xmlns:ui="clr-namespace:Chronos.Ui.Controls">\n')
f.write(' <!-- Generated by branding/ui-icons/icons.py — 16-px grid, 1.5-px round strokes (DESIGN.md §5). Do not edit by hand. -->\n')
for name, (stroke, fill) in sorted(I.items()):
attrs = ''
if stroke: attrs += f' Stroke="{stroke}"'
if fill: attrs += f' Fill="{fill}"'
if name in DIRECTIONAL: attrs += ' IsDirectional="True"'
f.write(f' <ui:IconData x:Key="Icon.{name}"{attrs} />\n')
f.write('</ResourceDictionary>\n')
cols = 10
names = sorted(I)
rows = (len(names) + cols - 1) // cols
svg = [f'<svg xmlns="http://www.w3.org/2000/svg" width="{cols*90}" height="{rows*70}" style="background:#1f1f23">']
for k, name in enumerate(names):
x, y = (k % cols) * 90 + 37, (k // cols) * 70 + 14
stroke, fill = I[name]
svg.append(f'<g transform="translate({x},{y}) scale(1.5)">')
if fill: svg.append(f'<path d="{fill}" fill="#f2f3f5"/>')
if stroke: svg.append(f'<path d="{stroke}" fill="none" stroke="#f2f3f5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>')
svg.append('</g>')
svg.append(f'<text x="{x+12}" y="{y+52}" fill="#a9aeb9" font-size="10" text-anchor="middle" font-family="sans-serif">{name}</text>')
svg.append('</svg>')
with write(os.path.join(here, "icons.svg")) as f:
f.write("\n".join(svg))
# The web admin's icons (its own names -> this set's), as inline SVG strings for app.js and the pages. The dashboard keeps
# the four tiles of mockup Admin.html, so the panel's Library (owner review 2, R6) is drawn as a photo.
WEB = {"dashboard": "Library", "library": "Image", "users": "Users", "archive": "Archive", "jobs": "Jobs", "settings": "Settings",
"logs": "Logs", "menu": "Menu", "power": "Power", "moon": "Moon", "refresh": "Refresh", "close": "Close", "plus": "Plus",
"copy": "Copy", "search": "Search", "grid": "ViewGrid", "list": "ViewList", "trash": "Delete", "upload": "Upload",
"download": "Download", "back": "Back", "previous": "ChevronLeft", "next": "ChevronRight", "star": "Star",
"starFilled": "StarFilled", "hero": "Hero", "image": "Image", "warning": "Warning"}
STROKE = 'fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"'
with write(os.path.join(here, "..", "..", "src", "Chronos.Server", "Admin", "web", "icons.js")) as f:
f.write("// Generated by branding/ui-icons/icons.py (same 16-px set as the desktop apps). Do not edit by hand.\n")
f.write("// Glyphs that point along the reading direction carry class=\"directional\" (mirrored in right-to-left pages, admin.css).\n")
f.write("export const icons = {\n")
for key, name in WEB.items():
stroke, fill = I[name]
paths = (f'<path d="{fill}" fill="currentColor"/>' if fill else "") + (f'<path d="{stroke}" {STROKE}/>' if stroke else "")
mirror = ' class="directional"' if name in DIRECTIONAL else ""
f.write(f' {key}: `<svg{mirror} viewBox="0 0 16 16" width="16" height="16" aria-hidden="true">{paths}</svg>`,\n')
f.write("};\n")
print(len(I), "icons,", len(WEB), "web icons")