mirror of
https://github.com/outbackdingo/OpCore-Simplify.git
synced 2026-01-27 10:19:49 +00:00
Add GUI Support for OpCore Simplify (#512)
* Refactor OpCore-Simplify to GUI version * New ConfigEditor * Add requirement checks and installation in launchers * Add GitHub Actions workflow to generate manifest.json * Set compression level for asset * Skip .git and __pycache__ folders * Refactor update process to include integrity checker * Add SMBIOS model selection * Update README.md * Update to main branch
This commit is contained in:
29
Scripts/value_formatters.py
Normal file
29
Scripts/value_formatters.py
Normal file
@@ -0,0 +1,29 @@
|
||||
def format_value(value):
|
||||
if value is None:
|
||||
return "None"
|
||||
elif isinstance(value, bool):
|
||||
return "True" if value else "False"
|
||||
elif isinstance(value, (bytes, bytearray)):
|
||||
return value.hex().upper()
|
||||
elif isinstance(value, str):
|
||||
return value
|
||||
|
||||
return str(value)
|
||||
|
||||
def get_value_type(value):
|
||||
if value is None:
|
||||
return None
|
||||
elif isinstance(value, dict):
|
||||
return "Dictionary"
|
||||
elif isinstance(value, list):
|
||||
return "Array"
|
||||
elif isinstance(value, (bytes, bytearray)):
|
||||
return "Data"
|
||||
elif isinstance(value, bool):
|
||||
return "Boolean"
|
||||
elif isinstance(value, (int, float)):
|
||||
return "Number"
|
||||
elif isinstance(value, str):
|
||||
return "String"
|
||||
|
||||
return "String"
|
||||
Reference in New Issue
Block a user