mirror of
https://github.com/outbackdingo/OpCore-Simplify.git
synced 2026-01-27 18:19:49 +00:00
* 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
29 lines
776 B
Python
29 lines
776 B
Python
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" |