Load JSON config file via dialog
(self)
| 175 | self.process_config() |
| 176 | |
| 177 | def load_config(self): |
| 178 | """Load JSON config file via dialog""" |
| 179 | filepath = filedialog.askopenfilename( |
| 180 | title="Select Config JSON", |
| 181 | filetypes=[("JSON files", "*.json"), ("All files", "*.*")] |
| 182 | ) |
| 183 | |
| 184 | if not filepath: |
| 185 | return |
| 186 | |
| 187 | self.config_path = Path(filepath) |
| 188 | |
| 189 | try: |
| 190 | with open(self.config_path, 'r') as f: |
| 191 | self.config_data = json.load(f) |
| 192 | except Exception as e: |
| 193 | messagebox.showerror("Error", f"Failed to load config: {e}") |
| 194 | return |
| 195 | |
| 196 | self.process_config() |
| 197 | |
| 198 | def process_config(self): |
| 199 | """Process loaded config""" |
no test coverage detected