preserve a single trailing newline when reformatting JSON files
Build all / build_linux (push) Has been cancelled
Build all / build_windows (push) Has been cancelled
Build all / build_macos_arch (arm64) (push) Has been cancelled
Build all / build_macos_arch (x86_64) (push) Has been cancelled
Build all / Build macOS Universal (push) Has been cancelled
Build all / Unit Tests (push) Has been cancelled
Build all / Flatpak (map[arch:aarch64 runner:ubuntu-24.04-arm]) (push) Has been cancelled
Build all / Flatpak (map[arch:x86_64 runner:ubuntu-24.04]) (push) Has been cancelled
Shellcheck / Shellcheck (push) Has been cancelled
Auto-close duplicate issues / auto-close-duplicates (push) Has been cancelled
Assign Issue / assign (push) Has been cancelled
Build all / build_linux (push) Has been cancelled
Build all / build_windows (push) Has been cancelled
Build all / build_macos_arch (arm64) (push) Has been cancelled
Build all / build_macos_arch (x86_64) (push) Has been cancelled
Build all / Build macOS Universal (push) Has been cancelled
Build all / Unit Tests (push) Has been cancelled
Build all / Flatpak (map[arch:aarch64 runner:ubuntu-24.04-arm]) (push) Has been cancelled
Build all / Flatpak (map[arch:x86_64 runner:ubuntu-24.04]) (push) Has been cancelled
Shellcheck / Shellcheck (push) Has been cancelled
Auto-close duplicate issues / auto-close-duplicates (push) Has been cancelled
Assign Issue / assign (push) Has been cancelled
This commit is contained in:
@@ -132,6 +132,7 @@ def update_profile_library(vendor="",profile_type="filament"):
|
||||
library[profile_section] = sorted_profiles
|
||||
f.seek(0)
|
||||
json.dump(library, f, indent="\t", ensure_ascii=False)
|
||||
f.write('\n')
|
||||
f.truncate()
|
||||
|
||||
print(f"Profile library for {vendor} updated successfully!")
|
||||
@@ -230,6 +231,7 @@ def clean_up_profile(vendor="", profile_type="", force=False):
|
||||
f.seek(0)
|
||||
ordered_profile = create_ordered_profile(_profile, ['type', 'name', 'renamed_from', 'inherits', 'from', 'setting_id', 'filament_id', 'instantiation'])
|
||||
json.dump(ordered_profile, f, indent="\t", ensure_ascii=False)
|
||||
f.write('\n')
|
||||
f.truncate()
|
||||
print(f"Updated profile: {full_path}")
|
||||
except Exception as e:
|
||||
@@ -274,6 +276,7 @@ def rename_filament_system(vendor="OrcaFilamentLibrary"):
|
||||
if modified:
|
||||
with open(full_path, 'w', encoding='utf-8') as f:
|
||||
json.dump(data, f, indent="\t", ensure_ascii=False)
|
||||
f.write('\n')
|
||||
print(f"Updated {full_path}")
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user