This commit is contained in:
PhishDestroy
2025-12-07 18:51:08 -08:00
parent f57bdf85fb
commit 51beb5005a
6 changed files with 759179 additions and 7 deletions

759157
archives/weekly/2025-W49.json Normal file

File diff suppressed because it is too large Load Diff

6
dns/month_added.json Normal file
View File

@@ -0,0 +1,6 @@
{
"schemaVersion": 1,
"label": "added this month",
"message": "+10,845",
"color": "success"
}

6
dns/month_community.json Normal file
View File

@@ -0,0 +1,6 @@
{
"schemaVersion": 1,
"label": "community this month",
"message": "+667,205",
"color": "blue"
}

View File

@@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "added today",
"message": "+208",
"message": "+219",
"color": "success"
}

View File

@@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "added this week",
"message": "+2,279",
"message": "+2,290",
"color": "success"
}

View File

@@ -1,7 +1,6 @@
#!/usr/bin/env python3
import json
import subprocess
import sys
from datetime import datetime, timezone
from pathlib import Path
from typing import Set
@@ -17,8 +16,10 @@ COMMUNITY_FILE = "community/blocklist.json"
OUTPUT_FILES = {
"today_added": DNS_DIR / "today_added.json",
"week_added": DNS_DIR / "week_added.json",
"month_added": DNS_DIR / "month_added.json",
"today_community": DNS_DIR / "today_community.json",
"week_community": DNS_DIR / "week_community.json",
"month_community": DNS_DIR / "month_community.json",
}
@@ -87,7 +88,6 @@ def save_archive():
"community_domains": sorted(community),
}
# Weekly archive (Monday)
if now.weekday() == 0:
weekly_dir = ARCHIVES_DIR / "weekly"
weekly_dir.mkdir(parents=True, exist_ok=True)
@@ -95,7 +95,6 @@ def save_archive():
week_file.write_text(json.dumps(archive_data, indent=2), encoding="utf-8")
print(f" Created weekly archive: {week_file.name}")
# Monthly archive (1st day)
if now.day == 1:
monthly_dir = ARCHIVES_DIR / "monthly"
monthly_dir.mkdir(parents=True, exist_ok=True)
@@ -111,18 +110,22 @@ def main():
stats = {
"today_added": get_domains_added_since(LIST_FILE, "1 day ago"),
"week_added": get_domains_added_since(LIST_FILE, "1 week ago"),
"month_added": get_domains_added_since(LIST_FILE, "1 month ago"),
"today_community": get_domains_added_since(COMMUNITY_FILE, "1 day ago"),
"week_community": get_domains_added_since(COMMUNITY_FILE, "1 week ago"),
"month_community": get_domains_added_since(COMMUNITY_FILE, "1 month ago"),
}
print(f" Primary - Today: +{stats['today_added']}, Week: +{stats['week_added']}")
print(f" Community - Today: +{stats['today_community']}, Week: +{stats['week_community']}")
print(f" Primary - Today: +{stats['today_added']}, Week: +{stats['week_added']}, Month: +{stats['month_added']}")
print(f" Community - Today: +{stats['today_community']}, Week: +{stats['week_community']}, Month: +{stats['month_community']}")
badges = {
"today_added": create_badge("added today", stats["today_added"], "success"),
"week_added": create_badge("added this week", stats["week_added"], "success"),
"month_added": create_badge("added this month", stats["month_added"], "success"),
"today_community": create_badge("community today", stats["today_community"], "blue"),
"week_community": create_badge("community this week", stats["week_community"], "blue"),
"month_community": create_badge("community this month", stats["month_community"], "blue"),
}
for key, data in badges.items():