Skip to content
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

BotConfig example #18

Open
alkurbatov opened this issue Aug 15, 2017 · 5 comments
Open

BotConfig example #18

alkurbatov opened this issue Aug 15, 2017 · 5 comments
Assignees

Comments

@alkurbatov
Copy link
Contributor

alkurbatov commented Aug 15, 2017

I have several suggestion regarding the bot's config:

a. BotConfigs has .txt extension by some reason while it is .json. Could it be renamed? The .txt extension confuses IDEs and disables syntax highlight, making it easier to make a mistake.

b. Rename BotConfig.txt into Botconfig.example.txt (or something like it). The motivation: this config is just a general example. As a user of this project I have several different settings, especially regarding map path and have to rebase the settings on each change.
The example should be renamed manually (or during build) into BotConfig.txt while BotConfig.txt must be ignored in .gitignore.
This approach allows to keep local changes outside of git control while still receive the latest updates. Just for convenience.

@davechurchill
Copy link
Owner

a. The reason I have the .txt extansion is because with UAlbertaBot when I had a .json file, I received a surprising number of emails / questions about what program you use to open it, etc. So I left it as a .txt file for it to be more obvious. The general computer / programming skill of many users is not that high.

b. I'll think about this, but again, people will skip some instructions, run the bot, and it will say that the config file is missing and ask questions about it. I agree with the principle of what you're saying, just not sure if this is the way I want to go about it

@alkurbatov
Copy link
Contributor Author

alkurbatov commented Aug 15, 2017

a. The reason I have the .txt extansion is because with UAlbertaBot when I had a .json file, I received a surprising number of emails / questions about what program you use to open it.

I see, thank you for clarifying this.

Regarding #b it just cause some inconvenience during dev, i.e. I have to cast:

$ git stash
$ git fetch
$ git merge upstream/master
$ git stash pop
# Resolve conflicts in the config.

Also I should be careful to not commit the config accidentally.

@alkurbatov
Copy link
Contributor Author

people will skip some instructions, run the bot, and it will say that the config file is missing and ask questions about it.

We can workaround it by searching BotConfig.txt first and BotConfig.example.txt next :) But I believe there should be a better solution.

Who are those people who use the bot? They checkout the sources or use something like .exe in an archive? For the latter it is possible to make special command (or script) which pack everything with proper names.

@davechurchill
Copy link
Owner

I agree with you that a change should be made, just gonna think for a while about how to do it

@stolencatkarma
Copy link

you could change it to BotConfig.example.txt and if there isn't one at runtime just rename the file to BotConfig.txt and continue. This let's new people just run it and have it work.

my 2 cents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants