https://bugs.kde.org/show_bug.cgi?id=472545
Bug ID: 472545
Summary: KScreenDoctor - take JSON/YAML/etc. as input Format
Classification: Plasma
Product: KScreen
Version: 5.25.5
Platform: Ubuntu
OS: Linux
Status: REPORTED
Severity: wishlist
Priority: NOR
Component: common
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
HI,
I see kscreendoctor can output in JSON. The default output also gives me
colours, which helps with readability - nice job on that.
However, it would be nice to be able to provide commands to change the current
configuration in JSON/YAML/ any other standard format as desired aswell. This
helps to make it easier to interoperate with other tools in scripting
pipelines, and also, whilst the format has already been fixed and so shouldn't
be removed for compatibility reasons, overall it seems better to leverage an
existing language for structured data rather than inventing a new one. The
program has to have a custom parser written to operate with data given to it,
and then I also have to figure things out for casual use, or do the same and
operate over text if I want to script things for any reason.
I am thinking of something like this sort of syntax:
`kscreen-doctor '{"outputs": [ "1": {"primary": true} ] }'`
for the equivalent of
`kscreen-doctor output.1.primary`
The existing form is already JSON-like and may mix well in some way - e.g. how
`jq` and similar tool extend the syntax a bit to give ways to set values in an
elegant way. There may be a way to blend the two.
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 22.04 Plasma 5.25.5; taken from KUbuntu backports
extra PPAs:
```shell
$ apt-cache policy kscreen
kscreen:
Installed: 4:5.25.5-0ubuntu1~ubuntu22.04~ppa1
Version table:
*** 4:5.25.5-0ubuntu1~ubuntu22.04~ppa1 500
500 https://ppa.launchpadcontent.net/kubuntu-ppa/backports-extra/ubuntu
jammy/main amd64 Packages
...
```
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0 (I think)
Qt Version: 5.15.3
ADDITIONAL INFORMATION
--
You are receiving this mail because:
You are watching all bug changes.