fix: j/k only navigates sidebar when video selected, add publish_date to detail view
This commit is contained in:
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env python3
|
||||
import asyncio, os, sys, logging
|
||||
|
||||
REPO_ROOT = os.path.dirname(os.path.abspath(__file__))
|
||||
ENV_PATH = os.path.join(REPO_ROOT, ".env")
|
||||
if os.path.exists(ENV_PATH):
|
||||
with open(ENV_PATH) as f:
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
if line and not line.startswith("#") and "=" in line:
|
||||
key, _, value = line.partition("=")
|
||||
value = value.strip().strip("'\"")
|
||||
os.environ[key] = value
|
||||
|
||||
sys.path.insert(0, REPO_ROOT)
|
||||
sys.path.insert(0, os.path.join(REPO_ROOT, "backend"))
|
||||
|
||||
from backend.db import init_db
|
||||
from backend.fetcher import fetch_subscriptions
|
||||
from backend.summarizer import summarize_all_pending
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
|
||||
|
||||
async def main():
|
||||
await init_db()
|
||||
count = await fetch_subscriptions()
|
||||
print(f"Fetched {count} new videos")
|
||||
if count > 0:
|
||||
print(f"Summarizing {count} videos...")
|
||||
await summarize_all_pending()
|
||||
print("Done")
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user