-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional -g
/--grimoire
flag to choose source file other than Niet…
#131
Add optional -g
/--grimoire
flag to choose source file other than Niet…
#131
Conversation
…zche While I do think all bots enjoy Nietzche (who doesn't?), I think we should take a stance to educate them. What better way than to be able to choose from any book! Personal suggestions include: - The Sorrows of Young Werther by Goethe - Any political manifesto - The Declaration of Independence etc. etc.
This removes globals from `heffalumpt/`, which are hard to reason about, easy to get wrong, and should not be created if they are never used. A possible drawbacks is if you would create multiple new defaults, but this should never be the case.
See this commit message for rationale about removing globals and markovmap |
This prints the short variants (like `-c` for `--config`) in the help. Also fixes bug where only `-h` flag works, not `--help`.
@@ -18,11 +18,12 @@ var CLI = help{ | |||
title: Title, | |||
version: Version, | |||
usage: map[int][]string{ | |||
0: {0: "--config", 1: "<file>", 2: "Specify config file"}, | |||
0: {0: "-c, --config", 1: "<file>", 2: "Specify config file"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this still end up being aligned properly when you run --help
?
i consider my code here for the CLI alignment to be pretty janky and it may be sensitive to this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked and it's aligned in a way 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm yeah, i took a look - definitely busted with this change
i don't consider your change to be at fault here, I blame my janktastic code that surrounds it
with that being said; we'll have to refactor the help cli somehow to account for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a look, but as you said, that can of worms would be a nice use of the new flag (no offense). Might need a refactor (or perhaps outsource the whole CLI thing to a dependency)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd like to avoid 3rd party dependencies, but stdlib flags
package would probably work just fine
to tell you the truth i never expected this much involvement (incredibly grateful to see it though), or else I wouldn't have set contributors up for failure in this context - so sorry about that!
if i have time i'll try to look into this, but if you just hack the thing to bits and replace it, I won't be at all offended
you can expect my usual annoying gopher style feedback, or I may collab with you and modify it - but that's not personal at all and I'll always accept feedback in the other direction :D
but with that in mind; go ahead and rip that shit up if you find the time before I do (open invitation to any contributor)
Unrelated to this PR: Thanks for the shoutout in the README 😄 |
something else to keep in mind would be if there are any conflicts with #137 - i'm also starting to think that due to the lack of unit tests ( #139 ) along with the way both PRs change fundamental mechanics - it may be wise for me to bring development branch up to date and for all relevant parties to consider changing the base of both PRs to development this would allow us to move forward with both merges with more confidence that we aren't going to FUBAR main on accident fixing #139 of course would be an alternate solution - broken record here, but I'll try to find some time to address these matters soon |
-b
/--book
flag to choose source file other than Niet…-g
/--grimoire
flag to choose source file other than Niet…
i'd say just drop the aesthetically breaking changes in the cli part of the code for now (people can read the docs and wait for us to refactor that) so we can get this merged |
…zche
While I do think all bots enjoy Nietzche (who doesn't?), I think we should take a stance to educate them. What better way than to be able to choose from any book!
Personal suggestions include:
etc. etc.
I tried to fit this feature in without doing a refactor, but perhaps my way of doing this is disturbing in other ways than the implicated use case.