Add new PNG images for clean and preview outputs
- Added `image_clean.png` to the output directory for the clean image representation. - Added `image_clean_preview.png` for the preview of the clean image. - Introduced `image_svg_clean.png` for the SVG clean image representation.
This commit is contained in:
@@ -9,9 +9,11 @@ import json
|
||||
from typing import Dict, List, Optional, Any
|
||||
from dataclasses import dataclass, asdict
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
# Import the user profile integration system
|
||||
from user_profile_integration import UserProfileIntegration
|
||||
from runtime_paths import DEFAULT_PROFILE_DATA, persistent_data_path
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -43,7 +45,10 @@ class ProfileDataManager:
|
||||
"""Core business logic for profile management"""
|
||||
|
||||
def __init__(self, profiles_file: str = "user_profiles.json"):
|
||||
self.profiles_file = profiles_file
|
||||
self.profiles_file = persistent_data_path(
|
||||
profiles_file,
|
||||
default_text=DEFAULT_PROFILE_DATA,
|
||||
)
|
||||
self.profiles: Dict[str, UserProfile] = {}
|
||||
self.active_profile: Optional[str] = None
|
||||
|
||||
@@ -60,7 +65,7 @@ class ProfileDataManager:
|
||||
return True
|
||||
|
||||
try:
|
||||
with open(self.profiles_file, 'r') as f:
|
||||
with Path(self.profiles_file).open('r', encoding='utf-8') as f:
|
||||
data = json.load(f)
|
||||
self.profiles = {
|
||||
name: UserProfile(**profile_data)
|
||||
@@ -84,7 +89,7 @@ class ProfileDataManager:
|
||||
}
|
||||
|
||||
try:
|
||||
with open(self.profiles_file, 'w') as f:
|
||||
with Path(self.profiles_file).open('w', encoding='utf-8') as f:
|
||||
json.dump(data, f, indent=2)
|
||||
return True
|
||||
except IOError as e:
|
||||
|
||||
Reference in New Issue
Block a user