feat: v3.0.0 - intelligent search, GitHub person/project mode, ELI5, 13+ sources
v3 rewrites the search engine from the ground up: - Intelligent pre-research: resolves X handles, GitHub repos, subreddits, TikTok hashtags, and YouTube channels before searching - GitHub person-mode: PR velocity, top repos by stars, release notes - GitHub project-mode: live star counts, README, releases, top issues - ELI5 mode: plain language synthesis, no jargon - 13+ sources: Reddit, X, YouTube, TikTok, Instagram, HN, Polymarket, GitHub, Threads, Pinterest, Perplexity, Bluesky, Web - Free Reddit comments via public JSON (no API key needed) - Fun judge v2: humor scoring baked into narrative - Cookie consent before browser scanning - 10,000 free ScrapeCreators calls - 1,012 tests Thank you to the community contributors whose issues and PRs shaped v3: @uppinote20 (#143), @zerone0x (#134, #136), @thinkun (#116), @thomasmktong (#124), @fanispoulinakisai-boop (#100), @pejmanjohn (#78), @zl190 (#115), @hnshah (#84, #85, #86) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+7
-3
@@ -14,7 +14,7 @@ Usage:
|
||||
import argparse
|
||||
import json
|
||||
import sys
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from pathlib import Path
|
||||
|
||||
SCRIPT_DIR = Path(__file__).parent.resolve()
|
||||
@@ -25,6 +25,10 @@ import store
|
||||
BRIEFS_DIR = Path.home() / ".local" / "share" / "last30days" / "briefs"
|
||||
|
||||
|
||||
def _parse_sqlite_utc_timestamp(value: str) -> datetime:
|
||||
return datetime.strptime(value, "%Y-%m-%d %H:%M:%S").replace(tzinfo=timezone.utc)
|
||||
|
||||
|
||||
def generate_daily(since: str = None) -> dict:
|
||||
"""Generate daily briefing data.
|
||||
|
||||
@@ -63,8 +67,8 @@ def generate_daily(since: str = None) -> dict:
|
||||
hours_ago = None
|
||||
if last_run:
|
||||
try:
|
||||
run_dt = datetime.fromisoformat(last_run.replace("Z", "+00:00"))
|
||||
hours_ago = (datetime.now() - run_dt.replace(tzinfo=None)).total_seconds() / 3600
|
||||
run_dt = _parse_sqlite_utc_timestamp(last_run)
|
||||
hours_ago = (datetime.now(timezone.utc) - run_dt).total_seconds() / 3600
|
||||
stale = hours_ago > 36 # Stale if > 36 hours
|
||||
except (ValueError, TypeError):
|
||||
stale = True
|
||||
|
||||
Reference in New Issue
Block a user