refactor: remove duplicate scripts + JSON constants + update docs

This commit is contained in:
知微
2026-07-04 09:30:50 +08:00
parent 7d6b08953c
commit 8b114d6e9e
26 changed files with 2200 additions and 4913 deletions
-4
View File
@@ -19,7 +19,6 @@ from mo_data import read_decisions
from mofin_db import get_conn, write_holdings_batch, write_portfolio_summary, write_holding_strategy
STOCKS_FILE = "/home/hmo/stocks/holding.xls"
PORTFOLIO_PATH = "/home/hmo/web-dashboard/data/portfolio.json"
DB_PATH = "/home/hmo/web-dashboard/data/mofin.db"
@@ -151,9 +150,6 @@ def main():
'updated_at': datetime.now().strftime('%Y-%m-%d %H:%M'),
'source': STOCKS_FILE,
}
# [migrated to DB] — cold backup removed; DB writes below
# with open(PORTFOLIO_PATH, 'w') as f:
# json.dump(portfolio, f, indent=2, ensure_ascii=False)
# DB 写入
try:
conn = get_conn()