lucc / khard

Console vcard client
https://khard.readthedocs.io/en/latest/
GNU General Public License v3.0
596 stars 65 forks source link

option --help fails until config file is created and parses correctly #145

Closed jonassmedegaard closed 6 years ago

jonassmedegaard commented 7 years ago

Freshly installing khard 0.1.3 on my Debian system I am curious how to use it.

"man khard" fails - no man page. Fair enough - we strive in Debian for having man pages of everything, but you may not bother as authors about that.

"khard --help" fails: Config file /home/jonas/.config/khard/khard.conf not available

hm. I did not expect the tool to fully work before configuring, but not even providing help on how to interact with it? E.g. check if perhaps I could point to a custom located config file, or run in a read-only or demo mode, or something.

Now after I copied over a default config, and fixed it (I don't use vim and don't have it installed on my system) I can get --help.

Please reorder the internal logic to resolve the help action before parsing local config. That would also help distributors like Debian to pre-generate a man page using e.g. help2man (see also #104 ).

scheibler commented 7 years ago

Your problem was fixed with khard 0.11.4 (although by accident to be honest). Now khard -h returns the general help page but khard ACTION -h still doesn't work. But I guess, that's ok.

Unfortunately version 0.11.4 didn't make it into Debian yet (not sure for testing though). But you could try to install it into a python virtual environment. Please have a look into the readme for further instructions.

Now after I copied over a default config, and fixed it (I don't use vim and don't have it installed on my system) I can get --help.

I guess the more appropriate word is "adapted" cause the example config file is just that: an example. The default editor could have been nano, emacs or ed instead but I chose my preferred one and that's vim. Feel free to enter whatever you like.

jonassmedegaard commented 7 years ago

Quoting Eric Scheibler (2017-09-13 15:52:11)

Your problem was fixed with khard 0.11.4 (although by accident to be honest). Now khard -h returns the general help page but khard ACTION -h still doesn't work. But I guess, that's ok.

Oh, excellent!

I did notice a slightly newer khard in experimental, and even went to checkout if I was missing some important changes by sticking with what was made available in unstable.

Unfortunately https://github.com/scheibler/khard/releases/tag/v0.11.4 didn't contain any info on what had changed, and https://github.com/scheibler/khard/commit/03f5891 didn't mention that detail either - which makes sense when you now describe that change as accidental.

Thanks in any case for the information. I now updated to khard 0.1.4 :-)

Unfortunately version 0.11.4 didn't make it into Debian yet (not sure for testing though). But you could try to install it into a python virtual environment. Please have a look into the readme for further instructions.

Right. The package was packaged close to the freeze of what was since released as the current stable Debian. If you are interested (you need not be, perfectly understandable if you might not care in details about your redistributors), the best overview of the state of your project as packaged in Debian is at https://tracker.debian.org/pkg/khard

Now after I copied over a default config, and fixed it (I don't use vim and don't have it installed on my system) I can get --help.

I guess the more appropriate word is "adapted" cause the example config file is just that: an example. The default editor could have been nano, emacs or ed instead but I chose my preferred one and that's vim. Feel free to enter whatever you like.

Yes. Sorry for bullying vim - that was not intended.

(for the record I don't use Emacs either: I use Midnight Commander).

--