nomadro/apps/nomadweb/scripts/compare_tw.py
eric d93a355fd5 Migrate navmini/ebook/nomadweb into apps/ as same-origin portal subpaths.
Shield external portal jumps (keep EXTERNAL_* for later), serve /nav from static build, and proxy /book + /community to vertical Next apps with Caddy notes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 03:30:34 -05:00

26 lines
1.0 KiB
Python

import re
import urllib.request
def check(url):
html = urllib.request.urlopen(url, timeout=30).read().decode("utf-8", "replace")
links = re.findall(r'href="([^"]+\.css[^"]*)"', html)
base = url.rstrip("/").rsplit("/", 1)[0] if False else re.match(r"https?://[^/]+", url).group(0)
found = {"grid": False, "max-w-6xl": False, "flex": False, "mt-8": False, "items-center": False}
for u in links:
full = u if u.startswith("http") else base + u
css = urllib.request.urlopen(full, timeout=30).read().decode("utf-8", "replace")
if "1.1fr" in css or "grid-cols" in css:
found["grid"] = True
if "max-w-6xl" in css:
found["max-w-6xl"] = True
if re.search(r"\.flex\{", css) or ".flex{" in css:
found["flex"] = True
if "mt-8" in css:
found["mt-8"] = True
if "items-center" in css:
found["items-center"] = True
print(url, found, "css files", len(links))
check("https://book.nomadro.com/")
check("https://nomadweb.nomadro.com/book")