Commit graph

15 commits

Author SHA1 Message Date
Anders Kaseorg 5428c5f296 typing: Convert function type annotations to Python 3 style.
Generated by com2ann (slightly patched to avoid also converting
assignment type annotations, which require Python 3.6), followed by
some manual whitespace adjustment, and two fixes for use-before-define
issues:

-    def set_zulip_client(self, zulipToJabberClient: ZulipToJabberBot) -> None:
+    def set_zulip_client(self, zulipToJabberClient: 'ZulipToJabberBot') -> None:

-def init_from_options(options: Any, client: Optional[str] = None) -> Client:
+def init_from_options(options: Any, client: Optional[str] = None) -> 'Client':

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg e30b3b094b Modernize legacy Python 2 syntax with pyupgrade.
Generated by `pyupgrade --py3-plus --keep-percent-format` followed by
manual indentation fixes.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 15:04:36 -07:00
rht 46c78ce7b5 integrations: Remove usage of six. 2020-04-02 13:02:28 -04:00
rht 1412403037 integrations: Remove from __future__ imports. 2020-04-02 13:02:28 -04:00
rht a465467388 integrations: Switch to python3. 2020-04-02 13:02:28 -04:00
rht 8a74f576a3 python: Remove per-file copyright notices.
These notices are redundant and obscure what are often very short
example scripts.
2020-03-23 12:52:52 -07:00
Sutou Kouhei 843b21769a twitter: Add support for phrase.
Twitter supports phrase search by quoting terms such as "Zulip API".

If we use the feature, the current twitter-bot can't detect used
search phrase. We can detect used search phrase with this change.
2020-01-14 15:58:08 -08:00
Maxim Vov d68bc7eada twitter: Add --excluded-users and --excluded-terms options.
This makes it easy to filter out an users/terms that are effectively
spam for your use case.
2018-12-13 14:11:20 -08:00
derAnfaenger c6aed00aa1 integrations: Make twitter bot handle search terms more intelligently.
When invoked with search terms, twitter bot looks for these terms
in the content of a message to find out if they match. However,
Twitter can return messages that don't directly contain a search term.
This commit adds the tweeter user handle and expanded urls to the
places to look for a search term.
2017-11-07 11:13:29 -08:00
derAnfaenger 2553cf45a5 integrations: Use default client init from options for twitter bot.
This allows users to specify a config file with the
--config-file option.
2017-11-07 11:13:29 -08:00
derAnfaenger 6630deda6a twitter bots: Merge twitter-bot and twitter-search-bot. 2017-09-15 00:55:01 -07:00
derAnfaenger 26a774503b twitter bots: Write internal config to separate file.
Tweaked by tabbott to remove duplicate write_config lines.

Fixes #88.
2017-08-27 19:27:13 -07:00
Tim Abbott 9c18c0b4ed twitter: Fix buggy handling of config_file in Python 3.
This fixes the most broken part of #88.
2017-08-22 17:20:54 -07:00
Eeshan Garg 18a73324a9 integrations/twitter: Upgrade to argparse. 2017-08-02 00:51:25 -02:30
Eeshan Garg 3d0f7955b6 api: Move the API package to a dedicated subdirectory.
In order to keep all three packages (zulip, zulip_bots,
zulip_botserver) in the same repo, all package files must now
be nested one level deeper.

For instance, python-zulip-api/zulip_bots/zulip_bots/bots/, instead
of python-zulip-api/zulip_bots/bots/.
2017-07-18 02:20:32 -02:30
Renamed from integrations/twitter/twitter-bot (Browse further)