27 lines
772 B
Python
27 lines
772 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Daily autonomous publishing script.
|
|
Runs every morning to discover topics, research, write, and publish articles.
|
|
|
|
Usage: python3 ~/auto-publisher/cron/daily_publish.py [--max 3]
|
|
"""
|
|
import sys
|
|
import os
|
|
sys.path.insert(0, os.path.expanduser("~/auto-publisher/core"))
|
|
|
|
from orchestrator import run_daily_pipeline, init_db
|
|
|
|
if __name__ == "__main__":
|
|
import argparse
|
|
ap = argparse.ArgumentParser()
|
|
ap.add_argument("--max", type=int, default=3, help="Max articles to publish")
|
|
args = ap.parse_args()
|
|
|
|
# Initialize DB if needed
|
|
init_db()
|
|
|
|
# Run the pipeline
|
|
print("🚀 Starting daily autonomous publishing pipeline...")
|
|
run_daily_pipeline(max_articles=args.max)
|
|
print("✅ Daily pipeline complete")
|