Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/sync-skills.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def published(check_only):
site_path = os.path.join(ROOT, "site", "index.html")
site = open(site_path, encoding="utf-8").read()
new_site = re.sub(r'(class="stat">)\d+(<)', r"\g<1>%d\g<2>" % total, site)
# the announcement pill states the same number and drifted once already
new_site = re.sub(r'(<b>)\w+ browsers(</b>)',
r"\g<1>%s browsers\g<2>" % NUMBER[total], new_site)
chips = "".join('<span class="chip">%s</span>' % a for a in chromium)
new_site = re.sub(r'(<dt>Chrome and everything built on it</dt>\s*<dd>).*?(</dd>)',
lambda m: m.group(1) + chips + m.group(2), new_site, flags=re.S)
Expand Down
4 changes: 2 additions & 2 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -481,12 +481,12 @@
<header class="hero" id="top">
<div class="wrap">
<a class="ann" href="#coverage">
<span class="dot"></span><span><b>Ten browsers</b>, one markdown file</span> <svg class="arrow" width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true"><path d="M2 7h9M7.5 3.5 11 7l-3.5 3.5" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/></svg>
<span class="dot"></span><span><b>Eleven browsers</b>, one markdown file</span> <svg class="arrow" width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true"><path d="M2 7h9M7.5 3.5 11 7l-3.5 3.5" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/></svg>
</a>

<h1>Your computer<br>is a mess.</h1>
<p class="sub">Teach your AI agent to clean it.</p>
<p class="lede">Open-source skills that organize your browsers, downloads, desktop, and notes. Adding support for an app is one file.</p>
<p class="lede">Open-source skills that organize your browsers, downloads, desktop, photos, and notes. Adding support for an app is one file.</p>

<div class="cmd herocmd">
<code id="c0">npx skills add vamgan/declutter</code>
Expand Down
9 changes: 9 additions & 0 deletions tests/test_skills.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,15 @@ def test_readme_browser_count_matches_code(self):
readme = read(os.path.join(ROOT, "README.md"))
self.assertIn(f"**{words[self.expected]} browsers, one markdown file.**", readme)

def test_announcement_pill_matches_code(self):
# This drifted once: the pill said "Ten browsers" while the coverage
# table said eleven. It is derived now, and this keeps it that way.
words = {8: "Eight", 9: "Nine", 10: "Ten", 11: "Eleven", 12: "Twelve"}
site = read(os.path.join(ROOT, "site", "index.html"))
m = re.search(r"<b>(\w+) browsers</b>", site)
self.assertIsNotNone(m, "the site no longer states a browser count in the pill")
self.assertEqual(m.group(1), words[self.expected])

def test_every_chromium_app_appears_on_the_site(self):
site = read(os.path.join(ROOT, "site", "index.html"))
for app in self.platforms.CHROMIUM:
Expand Down
Loading