(self)
| 298 | return metadata |
| 299 | |
| 300 | def sync_public_stats(self) -> Dict[str, Optional[str]]: |
| 301 | updated_at = datetime.now().isoformat() |
| 302 | try: |
| 303 | success = SourceUpdater(self.project_root).run_update() |
| 304 | if success: |
| 305 | return { |
| 306 | "success": True, |
| 307 | "status": "success", |
| 308 | "updated_at": updated_at, |
| 309 | "error": None, |
| 310 | } |
| 311 | return { |
| 312 | "success": False, |
| 313 | "status": "failed", |
| 314 | "updated_at": updated_at, |
| 315 | "error": "README 或站点统计同步失败", |
| 316 | } |
| 317 | except Exception as e: |
| 318 | return { |
| 319 | "success": False, |
| 320 | "status": "failed", |
| 321 | "updated_at": updated_at, |
| 322 | "error": str(e), |
| 323 | } |
| 324 | |
| 325 | def inventory_status(self) -> Dict: |
| 326 | working = self.load_working_sources() |
no test coverage detected