Get current harmonised standards count from local _index.json.
(self)
| 2677 | return match.group(1) if match else "" |
| 2678 | |
| 2679 | def _get_local_standards_count(self) -> int: |
| 2680 | """Get current harmonised standards count from local _index.json.""" |
| 2681 | index_path = ROOT / "eu_mdr" / "standards" / "_index.json" |
| 2682 | if not index_path.exists(): |
| 2683 | return 0 |
| 2684 | try: |
| 2685 | with open(index_path) as f: |
| 2686 | data = json.load(f) |
| 2687 | return data.get("total_standards", 0) |
| 2688 | except Exception: |
| 2689 | return 0 |
| 2690 | |
| 2691 | |
| 2692 | # --------------------------------------------------------------------------- |