Add examples to fetch prefs from Lua & Python scripts

This commit is contained in:
Philippe Teuwen committed 2024-10-27 11:20:27 +01:00
1 parent 57d3de2af6
commit 7fa1a204f4
4 files changed
+40

No files matched your search

@@ -13,3 +13,15 @@ end
print("Device:", p.name)
p:console("Rem passthru remark! :coffee:", true)
local json = require("dkjson")
print("Fetching prefs:")
p:console("prefs show --json")
local prefs, err = json.decode(p.grabbed_output)
if not prefs then
print("Error decoding JSON: ", err)
else
print("Save path: ", prefs['file.default.savepath'])
print("Dump path: ", prefs['file.default.dumppath'])
print("Trace path:", prefs['file.default.tracepath'])
end