From bf8126b1cd8d3f89ea08d275c306e13a705b9a83 Mon Sep 17 00:00:00 2001 From: Songhai <95398822+SonghaiFan@users.noreply.github.com> Date: Thu, 26 Nov 2026 20:24:43 +1100 Subject: [PATCH] docs: Franklin series README header, teaser and Chinese version Add a light/dark lockup, tagline, link row and in-app teaser to the README, a Chinese README.zh-CN.md with a language switch, and the shared Franklin series footer. Assets are generated by .github/brand/build_readme_assets.py. Co-Authored-By: Claude Opus 5.5 --- .github/brand/build_readme_assets.py | 118 ++++++++++++++++++++++++ .github/brand/frank-signature-dark.svg | 3 + .github/brand/frank-signature-light.svg | 3 + .github/brand/lockup-dark.svg | 6 ++ .github/brand/lockup-light.svg | 8 ++ .github/brand/series/leftopen.svg | 8 ++ .github/brand/series/roc-ui.svg | 1 + .github/brand/series/token-flow.svg | 6 ++ README.md | 60 ++++++++---- README.zh-CN.md | 61 +++++++----- 10 files changed, 233 insertions(+), 41 deletions(-) create mode 100644 .github/brand/build_readme_assets.py create mode 100644 .github/brand/frank-signature-dark.svg create mode 100644 .github/brand/frank-signature-light.svg create mode 100644 .github/brand/lockup-dark.svg create mode 100644 .github/brand/lockup-light.svg create mode 100644 .github/brand/series/leftopen.svg create mode 100644 .github/brand/series/roc-ui.svg create mode 100644 .github/brand/series/token-flow.svg diff --git a/.github/brand/build_readme_assets.py b/.github/brand/build_readme_assets.py new file mode 100644 index 0000000..2b1244d --- /dev/null +++ b/.github/brand/build_readme_assets.py @@ -0,0 +1,118 @@ +"""Build the shared Franklin README assets into /.github/brand. + +Usage, from the franklin/ folder that holds the repos: + uv run --with fonttools --with uharfbuzz python3 /.github/brand/build_readme_assets.py + +Writes lockup-light.svg / lockup-dark.svg (README hero), frank-signature-light/dark.svg +and series/.svg (footer tiles). Marks come from each project's committed +brand files; the dark lockups use the monochrome cut-out marks from +visual-design-2026-11-23/refined. The name is set in Inter SemiBold and outlined, +so GitHub never substitutes a font. The signature is the one the Frank series uses. +""" +import re, subprocess, sys, pathlib + +import uharfbuzz as hb +from fontTools.pens.svgPathPen import SVGPathPen +from fontTools.pens.transformPen import TransformPen +from fontTools.ttLib import TTFont +from fontTools.varLib.instancer import instantiateVariableFont + +F = pathlib.Path(__file__).resolve().parents[3] +repo = sys.argv[1].strip("/") +out = F / repo / ".github/brand" +(out / "series").mkdir(parents=True, exist_ok=True) +REFINED = F / "visual-design-2026-11-23/refined" +FONT = pathlib.Path.home() / "Library/Fonts/InterVariable.ttf" +PAPER = "#f4efe6" + + +def committed(repo_name, path): + return subprocess.run(["git", "-C", str(F / repo_name), "show", f"HEAD:{path}"], + check=True, capture_output=True, text=True).stdout + + +def inner(s): + vb = re.search(r'viewBox="([^"]+)"', s).group(1) + body = re.sub(r"^.*?]*>|\s*$", "", s, flags=re.S) + body = re.sub(r'\s(?:affinity|serif|sodipodi|inkscape):[\w-]+="[^"]*"', "", body) # editor metadata + return vb, re.sub(r"]*>.*?", "", body, flags=re.S) + + +# Each mark: (light source, dark source, ink colour) +roc = committed("roc-ui", "public/favicon.svg") +roc_shape = re.sub(r"]*/>", "", roc, count=1) +MARKS = { + "leftopen": ("LeftOpen", committed("leftopen", "assets/logo.svg"), + (REFINED / "leftopen/mono.svg").read_text(), "#211811"), + "roc-ui": ("ROC", roc_shape.replace("#FFFFFF", "#252525"), + roc_shape.replace("#FFFFFF", PAPER), "#252525"), + "token-flow": ("Token Flow", committed("token-flow", "token_tap/viewer_assets/token-flow-logo.svg"), + (REFINED / "token-flow/mono.svg").read_text(), "#020202"), +} + + +def tile(name, title, bg, source, pad, edge): + vb, body = inner(source) + box = 256 - 2 * pad + stroke = {"ink": ' stroke="#1f1e1b" stroke-opacity="0.14" stroke-width="4"', + "paper": f' stroke="{PAPER}" stroke-opacity="0.28" stroke-width="4"'}.get(edge, "") + (out / "series" / f"{name}.svg").write_text( + f'{title}' + f'' + f'{body}\n') + + +tile("leftopen", "LeftOpen", "#ffffff", MARKS["leftopen"][1], 40, "ink") +tile("roc-ui", "ROC", "#252525", roc, 0, "paper") +tile("token-flow", "Token Flow", "#ffffff", MARKS["token-flow"][1], 52, "ink") + +sig = (F.parent / "frank/news-metro/public/frank-signature.svg").read_text() +(out / "frank-signature-light.svg").write_text(sig) +(out / "frank-signature-dark.svg").write_text(sig.replace("#171916", PAPER)) + + +def wordmark(text, size): + """Outlined, kerned Inter SemiBold. Returns (path d, advance width).""" + font = TTFont(FONT) + instantiateVariableFont(font, {"wght": 600, "opsz": 32}, inplace=True) + blob = hb.Blob.from_file_path(str(FONT)) + hbfont = hb.Font(hb.Face(blob)) + hbfont.set_variations({"wght": 600, "opsz": 32}) + buf = hb.Buffer() + buf.add_str(text) + buf.guess_segment_properties() + hb.shape(hbfont, buf, {"kern": True, "liga": True}) + order = font.getGlyphOrder() + glyphs = font.getGlyphSet() + scale = size / font["head"].unitsPerEm + pen = SVGPathPen(glyphs) + x = 0 + for info, pos in zip(buf.glyph_infos, buf.glyph_positions): + glyphs[order[info.codepoint]].draw(TransformPen(pen, (scale, 0, 0, -scale, (x + pos.x_offset) * scale, 0))) + x += pos.x_advance + return pen.getCommands(), x * scale + + +def lockup(dark): + title, light_src, dark_src, ink = MARKS[repo] + vb, body = inner(dark_src if dark else light_src) + _, _, vw, vh = map(float, vb.split()) + h = 100 + w = h * vw / vh + d, tw = wordmark(title, 78) + cap = 78 * 1490 / 2048 + gap = 26 + colour = PAPER if dark else ink + if dark: + body = re.sub(r'fill="(?:#[0-9a-fA-F]{3,6}|currentColor)"', f'fill="{PAPER}"', body) + if 'fill=' not in body: + body = f'{body}' + total = w + gap + tw + return (f'{title}' + f'{body}' + f'\n') + + +(out / "lockup-light.svg").write_text(lockup(False)) +(out / "lockup-dark.svg").write_text(lockup(True)) +print(f"{repo}: wrote {sorted(str(p.relative_to(out)) for p in out.rglob('*.svg'))}") diff --git a/.github/brand/frank-signature-dark.svg b/.github/brand/frank-signature-dark.svg new file mode 100644 index 0000000..d1992bd --- /dev/null +++ b/.github/brand/frank-signature-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/.github/brand/frank-signature-light.svg b/.github/brand/frank-signature-light.svg new file mode 100644 index 0000000..46f4e5b --- /dev/null +++ b/.github/brand/frank-signature-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/.github/brand/lockup-dark.svg b/.github/brand/lockup-dark.svg new file mode 100644 index 0000000..f8f5fea --- /dev/null +++ b/.github/brand/lockup-dark.svg @@ -0,0 +1,6 @@ +LeftOpen + + + + + diff --git a/.github/brand/lockup-light.svg b/.github/brand/lockup-light.svg new file mode 100644 index 0000000..20334a4 --- /dev/null +++ b/.github/brand/lockup-light.svg @@ -0,0 +1,8 @@ +LeftOpen + + + + + + + diff --git a/.github/brand/series/leftopen.svg b/.github/brand/series/leftopen.svg new file mode 100644 index 0000000..283df31 --- /dev/null +++ b/.github/brand/series/leftopen.svg @@ -0,0 +1,8 @@ +LeftOpen + + + + + + + diff --git a/.github/brand/series/roc-ui.svg b/.github/brand/series/roc-ui.svg new file mode 100644 index 0000000..bacba5c --- /dev/null +++ b/.github/brand/series/roc-ui.svg @@ -0,0 +1 @@ +ROC diff --git a/.github/brand/series/token-flow.svg b/.github/brand/series/token-flow.svg new file mode 100644 index 0000000..4ef78d9 --- /dev/null +++ b/.github/brand/series/token-flow.svg @@ -0,0 +1,6 @@ +Token Flow + + + + + diff --git a/README.md b/README.md index 2b98b21..f653329 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,30 @@ -
- LeftOpen Logo -

LeftOpen

-

Native macOS Menu Bar Port Manager & CLI

-

See what your tools left running on localhost, identify projects, and gently close them.

- -

- Website - Release - Homebrew Cask - macOS 14+ - Apple Notarized - License: MIT -

- -

English · 中文

- -
+

+ + + + LeftOpen + + +

+ +

Gently close the doors left ajar.

+ +

+ Website · + Download · + Install · + CLI · + 中文 +

+ +

LeftOpen menu bar panel: closable ports first, apps and system services folded away -

-

+

+ +LeftOpen is a native macOS menu bar app and CLI. It shows what is listening on localhost, which process and project each port belongs to, and closes the ones you no longer need, gently. macOS 14+, notarized by Apple, MIT licensed. > When I have several coding agents working in parallel, dev servers and test runners keep starting up on different ports. By the end of the day there are always a few still running. > @@ -177,3 +180,20 @@ For complete removal, use **LeftOpen → Settings → About → Uninstall LeftOp Direct `brew uninstall` only removes the app and CLI; services, certificates and settings may remain. If already removed, reinstall the app and use its uninstaller. See [complete uninstall](docs/uninstall.md). + +
+ +

+ LeftOpen  + Token Flow  + ROC +

+ +

LeftOpen is part of the Franklin series.

+ +

+ + + Frank + +

diff --git a/README.zh-CN.md b/README.zh-CN.md index bdef88d..1828e58 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -1,28 +1,30 @@ -
- LeftOpen Logo -

LeftOpen

-

原生 macOS 菜单栏端口管理工具与 CLI

-

把那些虚掩着的门,轻轻关上。

-

See what your tools left running on localhost, identify projects, and gently close them.

- -

- Website - Release - Homebrew Cask - macOS 14+ - Apple Notarized - License: MIT -

- -

English · 中文

- -
+

+ + + + LeftOpen + + +

+ +

把虚掩着的门,轻轻关上。

+ +

+ 网站 · + 下载 · + 安装 · + 命令行 · + English +

+ +

LeftOpen 菜单栏面板:可关闭的端口排在前面,系统服务与 app 折叠收起 -

-

+

+ +LeftOpen 是一个原生 macOS 菜单栏应用和命令行工具:看清 localhost 上正在监听的端口、它们属于哪个进程和项目,再把不需要的轻轻关掉。支持 macOS 14 及以上,经 Apple 公证,MIT 许可。 > 当我并行让多个 agent 写代码时,开发服务器和测试服务会不断启动,监听不同的端口。忙完一天,电脑里往往留下不少还开着的服务。 > @@ -176,3 +178,20 @@ python3 Scripts/dev-app.py clean 直接运行 `brew uninstall` 只移除应用和 CLI,可能留下后台服务、证书和配置。 如果已删除应用,请重新安装后使用应用内卸载功能。 详见[完整卸载说明](docs/uninstall.md)。 + +
+ +

+ LeftOpen  + Token Flow  + ROC +

+ +

LeftOpen 是 Franklin 系列的一部分。

+ +

+ + + Frank + +