Pectojin / duplicati-client

A command line client for controlling the Duplicati Server
GNU Lesser General Public License v2.1
75 stars 20 forks source link

Added --output with default YAML to commands: describe, get, list, log; --script to export and some optimizations #26

Closed avmaksimov closed 3 years ago

avmaksimov commented 3 years ago
  1. Added --output with default YAML to commands: describe, get, list, log. You can json, JSON, jSon and so on to output with json format.
  2. I added new feature --output as it was added to export backups, but I prefered to choose YAML as default due compatibility.
  3. Some small optimization
  4. Case-insensitivity for commands, input and --output [type].
avmaksimov commented 3 years ago

@Pectojin , please merge it if you don't mind and there are no errors in it,

Pectojin commented 3 years ago

Oh, this merge request was against the utf-8-sigbranch, which marked this issue as closed when I deleted the branch.

I'm looking into making a few changes, but overall this looks very good.

Some thoughts I've had while testing: I wanna move the Loaded 1 parameters from file message over to verbose logging so it doesn't break the flow of duc xxxxx | jq

I'm playing around with merging all the dicts inside the array so the data is more easily accessible. Right now I'm just unwrapping the top level array using jq to no benefit jq '.[]["Files"].ID', which could just be jq '.["Files"].ID'

I'll just finish testing then I can merge your change in.

Pectojin commented 3 years ago

I guess merging it doesn't really work for repeating types such as the logs. I'll just leave it as is. Still a big improvement over having to parse plaintext.