Closed jackmac92 closed 2 months ago
I don't want to be picky and will accept as is. But consider having just one "jsonDump" function and then have devices and folders as nodes in the json?
no problem can take a look tomorrow, wanted to send off the initial PR for feedback before I spent more time
thanks for starting this project, looks like it'll be helpful for me!
again thanks a lot!
please remind me to create a release if I don't do it in a day or two
also could you update readme? thanks
hey I ran it on a mac and getting this:
2024/09/21 12:14:19 apikey and target flags not specified, config file: stat /var/folders/mm/vms_5fl93xsdj9038v77jfx80000gn/T/go-build1836372428/b001/exe/config.xml: no such file or directory
this doesn't sound right?
@tenox7 hmm no that doesn't seem correct, I've been running on ubuntu but have a mac machine I can test on and can do some more testing there
I just did a quick test there of cloning the repo and running go run . json_dump
w/in it, printed the expected json for me.
Could you share the commands you used for testing to try to help me reproduce the issue?
I think you're hitting that error here line 372 before it gets into the switch flag.Arg(0)
yeah, but since you're trying to find the config file, could you maybe add to the error that it's not specified and attempt to find automatically it also failed? :)
Gotcha! I don't think I can expand the error message after a log.Fatal
but can update the existing init on cfg
, just need to look into how later
I wasn't using any env vars/flags to set api auth, just relied on findCfgFile
so I'm not sure how to make the error more helpful
no worries, I think I can add a better message then release it :)
@tenox7 thanks for the error update and release!
Added two new commands to get either device or folder info in json format, but it always prints in json. Is that ok with you?
Closes #4