gajim-remote output format
gajim-remote is a useful utility. However, I find current output sometimes less than desirable. Specifically, I don't understand what should be the output, and my guess is that it is not strictly defined. This is bad for scripting, which is one of the (main?) uses for gajim-remote.
Description of the new feature
I propose the (optional) usage of json to give output in gajim-remote. It is well supported, requires no additional dependencies, and is still better than nothing.
I'm not advocating for json itself over other formats; just advocating a format over no format. If I'm wrong and the format is documented somewhere, point me to the doc.
One of the subcommands whose output is more difficult to parse is list_contacts
. Here is a line of its output
b'name : friendOfMyne\nshow : online\njid : friend@some.where\nresources: \n (Conversations._123\t0\t)\ngroups: \n (10localz)\n (sth)\n'
I'm attaching a "patch" with a simple PoC. This is not a merge request because the patch is trivial, and because I don't really think that setting an environment variable is a good way to enable json formatting. An option would be better. However, that was the quickest thing to implement, so here it is.