Commit Graph

3 Commits

Author SHA1 Message Date
Moritz Poldrack
07469b4aa7 add option to get access token from command
To allow adding neosays configuration to a dotfiles repo, it's
beneficial to allow providing a command to retrieve the access token
via a command (for example from a password manager).

If an access token is set while a command is set as well, the token is
overwritten in favour of the securely retrieved one.

Fixes: https://github.com/donuts-are-good/neosay/issues/1
Signed-off-by: Moritz Poldrack <git@moritz.sh>
2023-04-18 21:54:18 -05:00
Moritz Poldrack
b966bcfb04 use XDG_CONFIG_HOME by default
To prevent having users always specify the configuration file, the path
now defaults to $XDG_CONFIG_HOME/neosay/config.json. This way it is
possible to send messages from a "default identity" like this:

	echo "look mom, I'm in someone's commit history!" | neosay

To make the code more succinct, flag parsing is no longer done manually,
but instead using the flag package from stdlib.

Fixes: https://github.com/donuts-are-good/neosay/issues/2
Signed-off-by: Moritz Poldrack <git@moritz.sh>
2023-04-18 21:54:02 -05:00
donuts-are-good
ab5679805a hello neo... 2023-04-08 22:16:01 -05:00