The regex used for parsing .crypt-table didn't allow colons in class
names. This commit changes the [^:] token with \S, meaning that class
names can now contain colons but can no longer contain whitespace.
I think this should be fine, since zcrypt is only used for MIT zephyr,
where (by convention) class names do not contain whitespace.
Additionally, it should not be possible for us to accidentally consume a
field-separating colon as part of the class capture group because the
regex enforces that all field-separating colons are followed by one or
more whitespace characters, whereas the class name cannot contain
whitespace.
Now this bot follows our latest structure for contrib_bots.
Switched the dependencies instructions, to install "google" rather than
"google-api-python-client".
Added all the search terms to the query (not only the first one).
Add one function (get_bot_botname_response()) that generates response
from the given input and replies back to the handle_message with the final
content of response to be sent. Also add code to bots(except followup) to
reply to private messages along with stream messages.
To make all bots consistent add shared function in bot_lib.py
to check if this bot is called. All bots respond to at-mention of
the bot instead of their specific names.
Now all the bots that are stored in contrib_bots are in the
same file/directory format.
The format is specified here #3427. Add tests.py file for encrypt_bot as well.
Fixes#3427.
Incorrect Index access in wikipedia.py resulted in IndexError and
wikipedia bot to crash for few queries. This causes the bug to be fixed.
Replaced url to avoid 2 redirects and enhance performance.
Fixes: #3508.
According to stubs from mypy 0.4.7 onwards, `requests.get` takes
a parameter `params` of type `Dict[AnyStr, AnyStr]` where `AnyStr`
can be either bytes or text. Actually, requests can accept values
of other types in dicts too but it casts them to a string type.
So to avoid type checking error messages, change `True` to `'True'`.
This adds support for controlling the basic configuration (user, API
key, etc.) of the Zulip API bindings via environment variables.
Fixes#3364.
Tweaked by tabbott to update variable names and document in README.md.