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
6 changes: 5 additions & 1 deletion scripts/build_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ def build_apps_html(t, apps, n):
t = sub1(r'(<div class="grid">\n).*?( </div>\n </main>)',
lambda m: m.group(1) + cards + m.group(2), t, "apps.html の grid", re.S)
t = re.sub(r"Browse all \d+ mobile apps", f"Browse all {n} mobile apps", t)
t = sub1(r"<p>(?:\d+ free apps on Google Play|Explore our mobile app catalog)", "<p>Explore our mobile app catalog", t,
# The localized catalog keeps a stable ID on the intro paragraph.
# Preserve that ID when normalizing the legacy text, otherwise the
# catalog-language controller cannot find the translated introduction.
t = sub1(r'(<p(?:\s+id="catalog-intro")?>)(?:\d+ free apps on Google Play|Explore our mobile app catalog)',
lambda m: m.group(1) + "Explore our mobile app catalog", t,
"apps.html の見出し文")
return t

Expand Down
21 changes: 19 additions & 2 deletions scripts/test_sitemap_growth_freshness.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,24 @@

Run with: python3 -m unittest discover -s scripts -p 'test_sitemap_growth_freshness.py' -v
"""
from datetime import date
from datetime import date, datetime, timedelta, timezone
from pathlib import Path
import unittest
import xml.etree.ElementTree as ET

ROOT = Path(__file__).resolve().parent.parent
NS = "{http://www.sitemaps.org/schemas/sitemap/0.9}"
BASE = "https://appdevelopsk.com"
# Sitemap lastmod dates are authored in Japan Standard Time (UTC+09:00).
# GitHub-hosted runners use UTC, so date.today() wrongly rejects JST updates
# during 00:00–08:59 in Japan.
JST = timezone(timedelta(hours=9))


def publication_today(now=None):
current = now if now is not None else datetime.now(timezone.utc)
return current.astimezone(JST).date()

CHANGED_2026_11_07 = (
"/", "/apps",
"/support/taletime/", "/support/debate-me/",
Expand Down Expand Up @@ -65,7 +75,14 @@ def test_sitemap_dates_are_valid_and_not_future(self):
for url, stamp in entries():
with self.subTest(url=url):
parsed = date.fromisoformat(stamp)
self.assertLessEqual(parsed, date.today())
self.assertLessEqual(parsed, publication_today())

def test_jst_publication_date_is_not_utc_runner_date(self):
# At 15:30 UTC on Nov 12 it is already Nov 13 in Japan.
before_jst_midnight = datetime(2026, 11, 12, 14, 59, tzinfo=timezone.utc)
after_jst_midnight = datetime(2026, 11, 12, 15, 30, tzinfo=timezone.utc)
self.assertEqual(publication_today(before_jst_midnight), date(2026, 11, 12))
self.assertEqual(publication_today(after_jst_midnight), date(2026, 11, 13))

def test_filtered_catalog_urls_are_not_indexed_separately(self):
urls = [url for url, _ in entries()]
Expand Down
2 changes: 1 addition & 1 deletion support/debate-me/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="canonical" href="https://appdevelopsk.com/support/debate-me/">
<meta property="og:type" content="website">
<meta property="og:site_name" content="SK APPS">
<meta property="og:title" content="Debate Me: Practice Arguments with AI | Android App">
<meta property="og:title" content="Debate Me: AI Debate Practice App for Android | SK APPS">
<meta property="og:description" content="Practice debates against an AI opponent in Debate Me for Android. Pick a topic, build your argument and review feedback. Explore the app on Google Play.">
<meta property="og:url" content="https://appdevelopsk.com/support/debate-me/">
<meta property="og:image" content="https://appdevelopsk.com/icons/apps/debate-me.png">
Expand Down
10 changes: 5 additions & 5 deletions tests/debate-me-support-growth.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function dictionary(name, after) {
return runInNewContext('('+match[1]+')');
}
test('first paint shows real AI debate and never a food spinner', () => {
assert.match(html, /<title>Debate Me – Free AI Debate App for Android \| SK APPS<\/title>/);
assert.match(html, /<meta property="og:title" content="Debate Me – Free AI Debate App for Android">/);
assert.match(html, /<title>Debate Me: AI Debate Practice App for Android \| SK APPS<\/title>/);
assert.match(html, /<meta property="og:title" content="Debate Me: AI Debate Practice App for Android \| SK APPS">/);
assert.match(html, /<h1>Debate Me<\/h1>/);
assert.match(html, /<div class="hero-emoji">🗣️<\/div>/);
assert.match(html, /<div class="hero-cat">Education<\/div>/);
Expand Down Expand Up @@ -62,7 +62,7 @@ test('manual VPS publishing includes the landing and its read-only live validati
assert.match(live,/fetch '\/support\/debate-me\/' 'debate-me.html'/);
assert.match(live,/FAIL Debate Me page still describes cooking/);
assert.match(live,/FAIL Debate Me first-screen Play CTA not live/);
assert.match(live, /Debate Me – Free AI Debate App for Android/);
assert.match(live, /Debate Me: AI Debate Practice App for Android/);
assert.match(live, /FAIL Debate Me new SEO title not live/);
assert.match(live, /FAIL Debate Me new search description not live/);
assert.doesNotMatch(live, /grep -Fq 'AI Debate Practice &amp; Feedback'/);
Expand All @@ -77,7 +77,7 @@ test('search snippets match the visible Debate Me product and schema', () => {
assert.ok(description.length <= 160);
assert.match(description, /Debate Me/);
assert.match(description, /AI opponent/);
assert.match(description, /feedback on your arguments/);
assert.match(description, /Google Play for Android/);
assert.match(description, /review feedback/);
assert.match(description, /on Google Play/);
assert.equal(JSON.parse(schema).description, description);
});
Loading