diff --git a/integrations/asana/zulip_asana_mirror b/integrations/asana/zulip_asana_mirror index ca7ac2a..c68b985 100644 --- a/integrations/asana/zulip_asana_mirror +++ b/integrations/asana/zulip_asana_mirror @@ -36,6 +36,7 @@ import urllib2 import sys sys.path.insert(0, os.path.dirname(__file__)) import zulip_asana_config as config +VERSION = "0.9" if config.ZULIP_API_PATH is not None: sys.path.append(config.ZULIP_API_PATH) @@ -47,7 +48,7 @@ else: logging.basicConfig(level=logging.INFO) client = zulip.Client(email=config.ZULIP_USER, api_key=config.ZULIP_API_KEY, - site=config.ZULIP_SITE) + site=config.ZULIP_SITE, client="asana " + VERSION) def fetch_from_asana(path): """ diff --git a/integrations/basecamp/zulip_basecamp_mirror b/integrations/basecamp/zulip_basecamp_mirror index 7f51976..ff7ab0b 100755 --- a/integrations/basecamp/zulip_basecamp_mirror +++ b/integrations/basecamp/zulip_basecamp_mirror @@ -37,6 +37,7 @@ from HTMLParser import HTMLParser sys.path.insert(0, os.path.dirname(__file__)) import zulip_basecamp_config as config +VERSION = "0.9" if config.ZULIP_API_PATH is not None: sys.path.append(config.ZULIP_API_PATH) @@ -46,7 +47,8 @@ import zulip client = zulip.Client( email=config.ZULIP_USER, site=config.ZULIP_SITE, - api_key=config.ZULIP_API_KEY) + api_key=config.ZULIP_API_KEY, + client="basecamp " + VERSION) user_agent = "Basecamp To Zulip Mirroring script (support@zulip.com)" htmlParser = HTMLParser() diff --git a/integrations/codebase/zulip_codebase_mirror b/integrations/codebase/zulip_codebase_mirror index babe13c..8570983 100755 --- a/integrations/codebase/zulip_codebase_mirror +++ b/integrations/codebase/zulip_codebase_mirror @@ -41,6 +41,7 @@ import dateutil.parser sys.path.insert(0, os.path.dirname(__file__)) import zulip_codebase_config as config +VERSION = "0.9" if config.ZULIP_API_PATH is not None: sys.path.append(config.ZULIP_API_PATH) @@ -49,7 +50,8 @@ import zulip client = zulip.Client( email=config.ZULIP_USER, site=config.ZULIP_SITE, - api_key=config.ZULIP_API_KEY) + api_key=config.ZULIP_API_KEY, + client="codebase " + VERSION) user_agent = "Codebase To Zulip Mirroring script (support@zulip.com)" # find some form of JSON loader/dumper, with a preference order for speed. diff --git a/integrations/git/post-receive b/integrations/git/post-receive index 0cb5ffe..7ab76d8 100755 --- a/integrations/git/post-receive +++ b/integrations/git/post-receive @@ -36,6 +36,7 @@ import os.path sys.path.insert(0, os.path.dirname(__file__)) import zulip_git_config as config +VERSION = "0.9" if config.ZULIP_API_PATH is not None: sys.path.append(config.ZULIP_API_PATH) @@ -44,7 +45,8 @@ import zulip client = zulip.Client( email=config.ZULIP_USER, site=config.ZULIP_SITE, - api_key=config.ZULIP_API_KEY) + api_key=config.ZULIP_API_KEY, + client="git " + VERSION) # check_output is backported from subprocess.py in Python 2.7 def check_output(*popenargs, **kwargs): diff --git a/integrations/rss/rss-bot b/integrations/rss/rss-bot index ad2dd70..9bfdd42 100755 --- a/integrations/rss/rss-bot +++ b/integrations/rss/rss-bot @@ -36,7 +36,7 @@ import urlparse import feedparser import zulip - +VERSION = "0.9" RSS_DATA_DIR = os.path.expanduser(os.path.join('~', '.cache', 'zulip-rss')) OLDNESS_THRESHOLD = 30 # days @@ -164,7 +164,7 @@ except IOError: log_error_and_exit("Unable to read feed file at %s." % (opts.feed_file,)) client = zulip.Client(email=opts.email, api_key=opts.api_key, - site=opts.site) + site=opts.site, client="rss " + VERSION) first_message = True diff --git a/integrations/svn/post-commit b/integrations/svn/post-commit index f790711..28f3315 100755 --- a/integrations/svn/post-commit +++ b/integrations/svn/post-commit @@ -36,6 +36,7 @@ import pysvn sys.path.insert(0, os.path.dirname(__file__)) import zulip_svn_config as config +VERSION = "0.9" if config.ZULIP_API_PATH is not None: sys.path.append(config.ZULIP_API_PATH) @@ -44,7 +45,8 @@ import zulip client = zulip.Client( email=config.ZULIP_USER, site=config.ZULIP_SITE, - api_key=config.ZULIP_API_KEY) + api_key=config.ZULIP_API_KEY, + client="svn " + VERSION) svn = pysvn.Client() path, rev = sys.argv[1:] diff --git a/integrations/trac/zulip_trac.py b/integrations/trac/zulip_trac.py index e726be7..67aad24 100644 --- a/integrations/trac/zulip_trac.py +++ b/integrations/trac/zulip_trac.py @@ -40,6 +40,7 @@ import sys import os.path sys.path.insert(0, os.path.dirname(__file__)) import zulip_trac_config as config +VERSION = "0.9" if config.ZULIP_API_PATH is not None: sys.path.append(config.ZULIP_API_PATH) @@ -48,7 +49,8 @@ import zulip client = zulip.Client( email=config.ZULIP_USER, site=config.ZULIP_SITE, - api_key=config.ZULIP_API_KEY) + api_key=config.ZULIP_API_KEY, + client="trac " + VERSION) def markdown_ticket_url(ticket, heading="ticket"): return "[%s #%s](%s/%s)" % (heading, ticket.id, config.TRAC_BASE_TICKET_URL, ticket.id) diff --git a/integrations/twitter/twitter-bot b/integrations/twitter/twitter-bot index a8857fb..7c89c41 100755 --- a/integrations/twitter/twitter-bot +++ b/integrations/twitter/twitter-bot @@ -29,7 +29,7 @@ import optparse import ConfigParser import zulip - +VERSION = "0.9" CONFIGFILE = os.path.expanduser("~/.zulip_twitterrc") def write_config(config, since_id, user): @@ -129,6 +129,7 @@ client = zulip.Client( email=options.email, api_key=options.api_key, site=options.site, + client="twitter " + VERSION, verbose=True) if since_id < 0 or options.twitter_id != user_id: diff --git a/integrations/twitter/twitter-search-bot b/integrations/twitter/twitter-search-bot index ee302df..404666e 100755 --- a/integrations/twitter/twitter-search-bot +++ b/integrations/twitter/twitter-search-bot @@ -29,7 +29,7 @@ import optparse import ConfigParser import zulip - +VERSION = "0.9" CONFIGFILE = os.path.expanduser("~/.zulip_twitterrc") def write_config(config, since_id): @@ -146,6 +146,7 @@ client = zulip.Client( email=opts.email, api_key=opts.api_key, site=opts.site, + client="twitter search " + VERSION, verbose=True) search_query = " OR ".join(opts.search_terms.split(","))