Open j6k4m8 opened 6 years ago
Just added some more inline documentation.
@j6k4m8 Could we move that file do perhaps ~/.slackadaisicalrc
or ~/.slackadaisical.json
as it doesn't only contain a token anymore. And I'd like to use it to add other configuration options.
I was thinking the same thing. Maybe something like this?
{
"workspaces": {
"workspace-name": {
"token": "...",
// Room for other options
},
// Room for other workspaces
},
// Room for global options
}
(It also makes sense for #12 to merge first, since it adds command-line-args
which I'll use here instead of my process.argv
code)
@j6k4m8 Yes the structure for the proposed config file is perfect from my point of view.
Now uses the JSON format specified in the comment (not the original PR description).
If you fail to specify a workspace:
$ slackadaisical
If using multi-workspace mode, you must specify a workspace with `slackadaisical [workspacename]`.
If you misspell or ask for a workspace that DNE:
$ slackadaisical badconversations
Couldn't find workspace [badconversations] in ~/.slackadaisical.json. Your options are:
* goodconversations
* justgifs
$ slackadaisical goodconversations
works as expected.
$ slackadaisical
with a ~/.slack_token
file still works. (We can optionally remove this if you choose to deprecate that method of auth.)
@bkanber hoping to get your thoughts / merge on this? :)
Of course! I'm out of town this week and wrapping up a book next week but I will certainly hop on this, I haven't forgotten you guys!
On Mon, Apr 23, 2018, 7:34 PM Jordan Matelsky notifications@github.com wrote:
@bkanber https://github.com/bkanber hoping to get your thoughts / merge on this? :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bkanber/Slackadaisical/pull/11#issuecomment-383755255, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEdNhox4ykI1oIKdMEVLyIV4Azxw8Mlks5trmTqgaJpZM4SQAM6 .
May I poke again on this? :)
Invoke with
slackadaisical myWorkspace
, with a JSON file at~/.slack_token
shaped like this:Addresses #10 and (part of) #6.
Input and feedback very welcome!