Commit graph

151 commits

Author SHA1 Message Date
Anders Kaseorg 953709fdd5 log2zulip: Adjust for zulip setup_path_on_import → setup_path change.
687553a661

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg d68437d5f5 Rewrite some strings using raw string syntax.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 15:04:36 -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 f47559e68d bridge_between_zulips: Replace "subject" with "topic" in doc. 2020-04-07 16:20:19 -07:00
rht ceda54b50c bridge_between_zulips: Add explanation of --stream to README.md. 2020-04-07 16:20:19 -07:00
rht 439c096eac Remove all remaining six imports. 2020-04-03 08:18:08 -04:00
rht 9ee8461b9d bridges: Remove sender field from message data.
For the reason why, see
https://chat.zulip.org/#narrow/stream/127-integrations/topic/bridge.20between.20zulips
2020-04-03 06:19:22 -04: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
orientor d8157d6b80 bridge_with_irc: Initialize IRC bot after checking Zulip bot.
Confirm whether Zulip bot is subscribed to the required stream
first and then Initialize IRC bot object.
2020-03-30 17:41:14 -04:00
orientor de40005f5e bridge_with_irc: Improve user-friendliness.
Edit error and success messages of zulip-irc bridge to be more
user friendly.
2020-03-30 17:41:14 -04:00
rht b771bacac0 bridge_with_irc: Check if bot is subscribed to stream at startup. 2020-03-27 06:59:29 -04:00
neiljp (Neil Pilgrim) 60984ab2fa mypy: Add type ignores for mixing of str & bytes in zephyr mirror.
In principle these should be fixed properly, but the zephyr code is
difficult to test except in a production setting and is unlikely to be
heavily developed in future.
2020-03-24 21:25:45 -07:00
neiljp (Neil Pilgrim) 436b619021 integrations: Use universal_newlines in check_output to output as str.
Picked up by mypy; otherwise output is in bytes (at least on python 3).
2020-03-24 21:25:45 -07:00
neiljp (Neil Pilgrim) f81843f189 mypy: Clarify type hints in zulip/integrations/. 2020-03-24 21:25:45 -07: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
orientor 731eb23c9a bridge_with_irc: Print message on successful connection. 2020-03-02 05:51:54 -05: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
Kreyren 3e155ecf93 rss-bot: Updated link pointing to .zuliprc
I believe that rss-bot is pointing to wrong page on documentation, this MR should fix it.

Signed-off-by: Jacob Hrbek <werifgx@gmail.com>
2019-09-08 16:51:54 -07:00
Puneeth Chaganti 1231da46bf log2zulip: Remove unnecessary loop and fix incorrect variable name. 2019-07-13 11:09:36 -07:00
rht 6368b63e6c interrealm: Fix the msg formatting with special prefixes.
Tweaked by tabbott to cover all code blocks, not just quote blocks.

See https://chat.zulip.org/#narrow/stream/127-integrations/topic/cross.20realm.20bridge/near/695907
2019-02-15 16:43:36 -08:00
rht 4773370cc1 bridge_with_irc: Tell people to subscribe their bots to the stream. 2019-01-23 12:40:47 -08:00
Eeshan Garg f2eaf80b9e integrations/rss: Pass config_file to zulip.Client.
Fixes #499.
2019-01-22 22:16:20 -03:30
rht 5b7f0c24bb bridge_with_irc: Implement nickserv password. 2019-01-17 14:19:46 -08:00
rht 5b704b7c1c bridge_with_irc: Prefix zulip->irc message with sender full name. 2019-01-17 14:19:46 -08:00
rht 836a51a8bf bridge_with_irc: Only forward stream messages at the specified topic. 2019-01-17 14:19:46 -08:00
rht 8ef0aba74a bridge_with_irc: Add command line arg to specify topic. 2019-01-16 16:27:52 -08:00
rht 8e69598a46 bridge_with_irc: Add a brief documentation. 2019-01-16 16:27:52 -08:00
rht 9efa0feaaf bridge_with_irc: Bump irc requirements version. 2019-01-16 16:27:52 -08:00
rht e14bb510cb bridge_with_irc: Remove obsolete comment. 2019-01-16 16:27:52 -08:00
rht 116a1228ae bridge_with_irc: Disable echo on Zulip -> IRC. 2019-01-16 16:27:52 -08:00
rht edcf1fd8e9 bridge_with_irc: Fix sending from Zulip to IRC and enable it by default. 2019-01-16 16:27:52 -08:00
rht 910f83ee8e bridge_with_irc: Use async client to avoid timeout. 2019-01-16 16:27:52 -08:00
rht 9be5ec33b3 bridge_with_irc: Relay msg instead of forge msg on IRC -> Zulip. 2019-01-16 16:27:52 -08:00
rht a5bc4b716c bridge_with_irc: Add command line arg to specify stream. 2019-01-16 16:27:52 -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
Eeshan Garg 6e443b6d23 zulip_trello.py: Print error if requests isn't installed. 2018-09-25 22:28:25 -02:30
Eeshan Garg 71a15bd89e integrations/trello: Make the zulip_trello script self-contained.
A few users have complained about how hard it is to find the
Trello script on their systems after installing the `zulip`
package. Rishi and I decided that we should instead just ask
the users to download the script directly and run it without
having to install the `zulip` package.

This commit also ensures that the script can be run on both
py2 and py3.
2018-09-25 22:28:25 -02:30
Eeshan Garg 5210e79dbd integrations/trello: Stop logging to CSV file in Trello script.
The information logged to the CSV file is largely redundant, since
the ID of the webhook is already printed to the screen once a
webhook is setup correctly.

Since this is a script that the user is required to run
once, we should minimize its reliance on external files as much
as possible. This makes it easier to run the script when one
is SSH-ing into a server and doesn't really care about where
the script lives, for instance.
2018-09-25 22:28:25 -02:30
Eeshan Garg 1de6613825 integrations/trello: Stop using config files in the Trello script.
A few users have complained about how hard it is to find the
Trello script on their systems after installing the `zulip`
package. One way to solve this issue is to make the Trello
script a part of the exported console scripts in the zulip
package, which would mean that the user would not have to
navigate to a particular directory in order to find the script,
but could run it from a terminal directly.

However, to make this happen, we need to minimize the script's
reliance on external configuration files, because we don't want
the user to have to figure out where the config file lives.
2018-09-25 22:28:25 -02:30
neiljp (Neil Pilgrim) 39fb287fba matrix tests: tweak import and add __init__.py to ensure tests run. 2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim) 28f05676f2 matrix: Use six.moves.configparser. 2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim) f007fc9aaa matrix tests: Add test for case that zuliprc file does not exist. 2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim) 1d01308caf matrix tests: Add test for writing sample config using zuliprc. 2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim) 8999f0a352 matrix bridge: Separate print output from sys.exit calls.
This appears to be necessary for acquiring the text for testing.
2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim) 71b405e95d zulip bridge: Use python instead of python3 in script.
This script moved from the bots package to the API package, and does not
explicitly require python3.
2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim) 617e16cebb bridges: Bring inter-realm (zulip) bridge into zulip/ & rename others. 2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim) ec9f72f516 matrix bridge: Add optional from-zuliprc to use with write-sample-config.
If specified, the new option uses the information to pre-populate the
sample configuration file.
2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim) 8b4f23d6aa matrix tests: Add test for zulip-to-matrix messages. 2018-08-03 16:16:40 -07:00