File size: 747 Bytes
361bd3e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import argparse
import logging
from dotenv import load_dotenv

from core.settings import settings
from scripts.portfolio.portfolio_ingestion import PortfolioIngest

logging.basicConfig(
    level=logging.INFO,  # Use INFO level to see all sync progress logs
    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)

load_dotenv()

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Synchronize portfolio data from Notion")
    parser.add_argument(
        "--since",
        type=str,
        help="ISO 8601 date to sync from (e.g. 2024-01-01T00:00:00.000Z). If not provided, uses last sync date."
    )
    args = parser.parse_args()
    
    orchestrator = PortfolioIngest()
    orchestrator.sync(args.since)