asjoyner / shade

SHA Drive Engine stores files in the cloud, in a flexible fashion, optionally encrypted.
Apache License 2.0
7 stars 3 forks source link

Make shadeutil a little better #3

Closed cfunkhouser closed 8 years ago

cfunkhouser commented 8 years ago

Make shadeutil ls output a little better. Also adds the requirement that a config file path be passed to shade.Clients() and shade.Read(), and adds tests for shade.ConfigDir().

Exampel of the new output of shadeutil ls:

$ go run cmd/shadeutil/shadeutil.go ls -l -f ~/Source/shade/localdrive.config.json 
localdrive
 id (sha)                                                              size     chunksize chunks mtime           filename
 0  (06ab0b76266a9314b0a6970d1660e9dcbbfec0217cae05036ce5662f2cbb4a60) 11999829 16777216  1      Jan  1 00:00:00 DSC_0036.NEF
 1  (1ba6ae17f0cd8a0d10661836f4f3890908b439b20e87358eb68db2a277ae30de) 11999829 16777216  1      Jan  1 00:00:00 DSC_0035.NEF
 2  (987bc43318e7ad1687b6d9fa37143f931abead44162863da7033d2c4e762563a) 11999829 1024      11719  Jan  1 00:00:00 DSC_0035.NEF
 3  (d5b499544fb2354d6c3fcd9b3591903710d76834efc05601d1a75c77dc430e83) 11999829 1024      11719  Jan  1 00:00:00 /foo/bar/DSC_0035.NEF