fix: load all year shards into combined feed, not just top 2
This commit is contained in:
@@ -354,13 +354,9 @@ def write_combined_feed(data_dir: Path) -> int:
|
||||
activities = index.get("activities", [])
|
||||
|
||||
if shards:
|
||||
year_shards = sorted(
|
||||
[s for s in shards if re.match(r"index-\d{4}\.json$", s.get("url", ""))],
|
||||
key=lambda s: s["url"],
|
||||
reverse=True,
|
||||
)
|
||||
year_shards = [s for s in shards if re.match(r"index-\d{4}\.json$", s.get("url", ""))]
|
||||
base = index_path.parent
|
||||
for shard in year_shards[:2]:
|
||||
for shard in year_shards:
|
||||
shard_path = base / shard["url"]
|
||||
if shard_path.exists():
|
||||
shard_data = json.loads(shard_path.read_text(encoding="utf-8"))
|
||||
|
||||
Reference in New Issue
Block a user