import { initDatabase } from '../models/index.js';
import { logger } from '../utils/logger.js';
import { BaijiahaoContentOverviewImportService } from '../services/BaijiahaoContentOverviewImportService.js';

async function main() {
  try {
    await initDatabase();
    logger.info('[BJ Import] Manual run start...');
    await BaijiahaoContentOverviewImportService.runDailyImport();
    logger.info('[BJ Import] Manual run done.');
    process.exit(0);
  } catch (e) {
    logger.error('[BJ Import] Manual run failed:', e);
    process.exit(1);
  }
}

void main();

