Open RokeJulianLockhart opened 1 month ago
My original use case was simply that I wanted the values to paste in other places for development and testing. Having it in xml/json would make that a lot more annoying.
Can you provide your use case why you need in another format? And do you really need all those values? Typically you would only want a couple like btaddress and maybe the icon name.
My original use case was simply that I wanted the values to paste in other places for development and testing. Having it in XML/JSON would make that a lot more annoying.
@infirit, would https://en.wikipedia.org/w/index.php?title=INI_file&oldid=1232644417#Example suit you better, then? That's what FreeDesktop and KDE use. It's a lot simpler.
Can you provide your use case and why you need it in another format? And do you really need all those values? Typically you would only want a couple, like
btaddress
, and maybe the icon name.
I use it to compare hardware information across devices.
The device info window/plugin is for simple viewing and retrieving some values. I personally like to keep it that way.
If you want parse-able data get the properties directly from bluez over dbus with something like below.
gdbus call --system --dest org.bluez --object-path /org/bluez/hci0/dev_00_16_94_38_38_F2 --method org.freedesktop.DBus.Properties.GetAll org.bluez.Device1
Which outputs
({'Address': <'00:16:94:38:38:F2'>, 'AddressType': <'public'>, 'Name': <'HD 4.40BT'>, 'Alias': <'HD 4.40BT'>, 'Class': <uint32 2360324>, 'Icon': <'audio-headset'>, 'Paired': <true>, 'Bonded': <true>, 'Trusted': <true>, 'Blocked': <false>, 'LegacyPairing': <false>, 'Connected': <false>, 'UUIDs': <['00001108-0000-1000-8000-00805f9b34fb', '0000110b-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '0000110d-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '0000110f-0000-1000-8000-00805f9b34fb', '0000111e-0000-1000-8000-00805f9b34fb', '00001131-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb']>, 'Modalias': <'bluetooth:v0A12p0001d0000'>, 'Adapter': <objectpath '/org/bluez/hci0'>, 'ServicesResolved': <false>},)
GLib/Gio provides nice DBus classes that hides a lot of the details from the user and has bindings for many languages.
The device info window/plugin is for simple viewing and retrieving some values. I personally like to keep it that way.
@infirit, could the value and key at least be on the same line then, separated by something like a tab? That would then give me an easily readable TSV. I can't imagine you find it easier to read each value on a new line?
If you want parse-able data get the properties directly from bluez over dbus.
Thanks. I'll do that.
Prerequisites
cpe:/o:fedoraproject:fedora:40
Request
When I duplicate the content of the undermentioned window to my clipboard:
...the result is nigh incomprehensible:
Consequently, I suggest that you instead copy those values in some kind of key-value pair specification, like JSON (or XML).