diff --git a/scripts/sync-skills.py b/scripts/sync-skills.py index ac1fd11..f68f6d3 100755 --- a/scripts/sync-skills.py +++ b/scripts/sync-skills.py @@ -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'()\w+ browsers()', + r"\g<1>%s browsers\g<2>" % NUMBER[total], new_site) chips = "".join('%s' % a for a in chromium) new_site = re.sub(r'(
Chrome and everything built on it
\s*
).*?(
)', lambda m: m.group(1) + chips + m.group(2), new_site, flags=re.S) diff --git a/site/index.html b/site/index.html index 5a1475c..6b43b99 100644 --- a/site/index.html +++ b/site/index.html @@ -481,12 +481,12 @@
- Ten browsers, one markdown file + Eleven browsers, one markdown file

Your computer
is a mess.

Teach your AI agent to clean it.

-

Open-source skills that organize your browsers, downloads, desktop, and notes. Adding support for an app is one file.

+

Open-source skills that organize your browsers, downloads, desktop, photos, and notes. Adding support for an app is one file.

npx skills add vamgan/declutter diff --git a/tests/test_skills.py b/tests/test_skills.py index 699dbb4..6c8c742 100644 --- a/tests/test_skills.py +++ b/tests/test_skills.py @@ -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"(\w+) browsers", 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: