diff --git a/earwigbot/commands/afc_pending.py b/earwigbot/commands/afc_pending.py index 6d64f1b..32b1f5d 100644 --- a/earwigbot/commands/afc_pending.py +++ b/earwigbot/commands/afc_pending.py @@ -28,7 +28,7 @@ class AFCPending(Command): commands = ["pending", "pend"] def process(self, data): - msg1 = "pending submissions status page: http://enwp.org/WP:AFC/ST" - msg2 = "pending submissions category: http://enwp.org/CAT:PEND" + msg1 = "Pending submissions status page: http://enwp.org/WP:AFC/ST" + msg2 = "Pending submissions category: http://enwp.org/CAT:PEND" self.reply(data, msg1) self.reply(data, msg2) diff --git a/earwigbot/commands/afc_report.py b/earwigbot/commands/afc_report.py index d26f44b..14ec082 100644 --- a/earwigbot/commands/afc_report.py +++ b/earwigbot/commands/afc_report.py @@ -41,7 +41,7 @@ class AFCReport(Command): return if not data.args: - msg = "what submission do you want me to give information about?" + msg = "What submission do you want me to give information about?" self.reply(data, msg) return @@ -66,7 +66,7 @@ class AFCReport(Command): if page: return self.report(page) - self.reply(data, "submission \x0302{0}\x0F not found.".format(title)) + self.reply(data, "Submission \x0302{0}\x0F not found.".format(title)) def get_page(self, title): page = self.site.get_page(title, follow_redirects=False) diff --git a/earwigbot/commands/afc_status.py b/earwigbot/commands/afc_status.py index 1630946..168c719 100644 --- a/earwigbot/commands/afc_status.py +++ b/earwigbot/commands/afc_status.py @@ -54,17 +54,17 @@ class AFCStatus(Command): action = data.args[0].lower() if action.startswith("sub") or action == "s": subs = self.count_submissions() - msg = "there are \x0305{0}\x0F pending AfC submissions (\x0302WP:AFC\x0F)." + msg = "There are \x0305{0}\x0F pending AfC submissions (\x0302WP:AFC\x0F)." self.reply(data, msg.format(subs)) elif action.startswith("redir") or action == "r": redirs = self.count_redirects() - msg = "there are \x0305{0}\x0F open redirect requests (\x0302WP:AFC/R\x0F)." + msg = "There are \x0305{0}\x0F open redirect requests (\x0302WP:AFC/R\x0F)." self.reply(data, msg.format(redirs)) elif action.startswith("file") or action == "f": files = self.count_redirects() - msg = "there are \x0305{0}\x0F open file upload requests (\x0302WP:FFU\x0F)." + msg = "There are \x0305{0}\x0F open file upload requests (\x0302WP:FFU\x0F)." self.reply(data, msg.format(files)) elif action.startswith("agg") or action == "a": @@ -79,14 +79,14 @@ class AFCStatus(Command): self.reply(data, msg.format(data.args[1])) return aggregate = self.get_aggregate(agg_num) - msg = "aggregate is \x0305{0}\x0F (AfC {1})." + msg = "Aggregate is \x0305{0}\x0F (AfC {1})." self.reply(data, msg.format(agg_num, aggregate)) elif action.startswith("nocolor") or action == "n": self.reply(data, self.get_status(color=False)) else: - msg = "unknown argument: \x0303{0}\x0F. Valid args are 'subs', 'redirs', 'files', 'agg', 'nocolor'." + msg = "Unknown argument: \x0303{0}\x0F. Valid args are 'subs', 'redirs', 'files', 'agg', 'nocolor'." self.reply(data, msg.format(data.args[0])) else: diff --git a/earwigbot/commands/afc_submissions.py b/earwigbot/commands/afc_submissions.py index 16530d3..3c40774 100644 --- a/earwigbot/commands/afc_submissions.py +++ b/earwigbot/commands/afc_submissions.py @@ -42,10 +42,10 @@ class AFCSubmissions(Command): try: number = int(data.args[0]) except ValueError: - self.reply(data, "argument must be a number.") + self.reply(data, "Argument must be a number.") return if number > 5: - msg = "cannot get more than five submissions at a time." + msg = "Cannot get more than five submissions at a time." self.reply(data, msg) return else: diff --git a/earwigbot/commands/calc.py b/earwigbot/commands/calc.py index aead943..de16202 100644 --- a/earwigbot/commands/calc.py +++ b/earwigbot/commands/calc.py @@ -32,7 +32,7 @@ class Calc(Command): def process(self, data): if not data.args: - self.reply(data, "what do you want me to calculate?") + self.reply(data, "What do you want me to calculate?") return query = ' '.join(data.args) diff --git a/earwigbot/commands/chanops.py b/earwigbot/commands/chanops.py index 8b754e6..97c4fb9 100644 --- a/earwigbot/commands/chanops.py +++ b/earwigbot/commands/chanops.py @@ -30,11 +30,11 @@ class ChanOps(Command): def process(self, data): if data.command == "chanops": - msg = "available commands are !voice, !devoice, !op, !deop, !join, and !part." + msg = "Available commands are !voice, !devoice, !op, !deop, !join, and !part." self.reply(data, msg) return if data.host not in self.config.irc["permissions"]["admins"]: - self.reply(data, "you must be a bot admin to use this command.") + self.reply(data, "You must be a bot admin to use this command.") return if data.command == "join": @@ -59,7 +59,7 @@ class ChanOps(Command): if not channel.startswith("#"): channel = "#" + channel else: - msg = "you must specify a channel to join or part from." + msg = "You must specify a channel to join or part from." self.reply(data, msg) return diff --git a/earwigbot/commands/crypt.py b/earwigbot/commands/crypt.py index c432594..d77a8c8 100644 --- a/earwigbot/commands/crypt.py +++ b/earwigbot/commands/crypt.py @@ -34,12 +34,12 @@ class Crypt(Command): def process(self, data): if data.command == "crypt": - msg = "available commands are !hash, !encrypt, and !decrypt." + msg = "Available commands are !hash, !encrypt, and !decrypt." self.reply(data, msg) return if not data.args: - msg = "what do you want me to {0}?".format(data.command) + msg = "What do you want me to {0}?".format(data.command) self.reply(data, msg) return @@ -47,14 +47,14 @@ class Crypt(Command): algo = data.args[0] if algo == "list": algos = ', '.join(hashlib.algorithms) - msg = algos.join(("supported algorithms: ", ".")) + msg = algos.join(("Supported algorithms: ", ".")) self.reply(data, msg) elif algo in hashlib.algorithms: string = ' '.join(data.args[1:]) result = getattr(hashlib, algo)(string).hexdigest() self.reply(data, result) else: - msg = "unknown algorithm: '{0}'.".format(algo) + msg = "Unknown algorithm: '{0}'.".format(algo) self.reply(data, msg) else: @@ -62,7 +62,7 @@ class Crypt(Command): text = " ".join(data.args[1:]) if not text: - msg = "a key was provided, but text to {0} was not." + msg = "A key was provided, but text to {0} was not." self.reply(data, msg.format(data.command)) return diff --git a/earwigbot/commands/dictionary.py b/earwigbot/commands/dictionary.py index 305176c..13f25a5 100644 --- a/earwigbot/commands/dictionary.py +++ b/earwigbot/commands/dictionary.py @@ -32,7 +32,7 @@ class Dictionary(Command): def process(self, data): if not data.args: - self.reply(data, "what do you want me to define?") + self.reply(data, "What do you want me to define?") return term = " ".join(data.args) @@ -40,7 +40,7 @@ class Dictionary(Command): try: defined = self.define(term, lang) except exceptions.APIError: - msg = "cannot find a {0}-language Wiktionary." + msg = "Cannot find a {0}-language Wiktionary." self.reply(data, msg.format(lang)) else: self.reply(data, defined.encode("utf8")) @@ -59,11 +59,11 @@ class Dictionary(Command): return self.define(term.lower(), lang, tries - 1) if term.capitalize() != term and tries: return self.define(term.capitalize(), lang, tries - 1) - return "no definition found." + return "No definition found." level, languages = self.get_languages(entry) if not languages: - return u"couldn't parse {0}!".format(page.url) + return u"Couldn't parse {0}!".format(page.url) result = [] for lang, section in sorted(languages.items()): diff --git a/earwigbot/commands/editcount.py b/earwigbot/commands/editcount.py index 2c6e5b1..2adea14 100644 --- a/earwigbot/commands/editcount.py +++ b/earwigbot/commands/editcount.py @@ -42,7 +42,7 @@ class Editcount(Command): try: count = user.editcount except exceptions.UserNotFoundError: - msg = "the user \x0302{0}\x0F does not exist." + msg = "The user \x0302{0}\x0F does not exist." self.reply(data, msg.format(name)) return diff --git a/earwigbot/commands/geolocate.py b/earwigbot/commands/geolocate.py index 16fee8d..90c02ed 100644 --- a/earwigbot/commands/geolocate.py +++ b/earwigbot/commands/geolocate.py @@ -41,7 +41,7 @@ class Geolocate(Command): def process(self, data): if not data.args: - self.reply(data, "please specify an IP to lookup.") + self.reply(data, "Please specify an IP to lookup.") return if not self.key: diff --git a/earwigbot/commands/git.py b/earwigbot/commands/git.py index a7ba97e..645ed04 100644 --- a/earwigbot/commands/git.py +++ b/earwigbot/commands/git.py @@ -40,14 +40,14 @@ class Git(Command): def process(self, data): self.data = data if data.host not in self.config.irc["permissions"]["owners"]: - msg = "you must be a bot owner to use this command." + msg = "You must be a bot owner to use this command." self.reply(data, msg) return if not data.args or data.args[0] == "help": self.do_help() return if not self.repos: - self.reply(data, "no repos are specified in the config file.") + self.reply(data, "No repos are specified in the config file.") return command = data.args[0] @@ -55,12 +55,12 @@ class Git(Command): repo_name = data.args[1] except IndexError: repos = self.get_repos() - msg = "which repo do you want to work with (options are {0})?" + msg = "Which repo do you want to work with (options are {0})?" self.reply(data, msg.format(repos)) return if repo_name not in self.repos: repos = self.get_repos() - msg = "repository must be one of the following: {0}." + msg = "Repository must be one of the following: {0}." self.reply(data, msg.format(repos)) return self.repo = git.Repo(self.repos[repo_name]) @@ -78,7 +78,7 @@ class Git(Command): elif command == "status": self.do_status() else: # They asked us to do something we don't know - msg = "unknown argument: \x0303{0}\x0F.".format(data.args[0]) + msg = "Ynknown argument: \x0303{0}\x0F.".format(data.args[0]) self.reply(data, msg) def get_repos(self): @@ -94,7 +94,7 @@ class Git(Command): try: return getattr(self.repo.remotes, remote_name) except AttributeError: - msg = "unknown remote: \x0302{0}\x0F.".format(remote_name) + msg = "Unknown remote: \x0302{0}\x0F.".format(remote_name) self.reply(self.data, msg) def get_time_since(self, date): @@ -121,19 +121,19 @@ class Git(Command): for key in sorted(help.keys()): subcommands += "\x0303{0}\x0F ({1}), ".format(key, help[key]) subcommands = subcommands[:-2] # Trim last comma and space - msg = "sub-commands are: {0}; repos are: {1}. Syntax: !git \x0303subcommand\x0F \x0302repo\x0F." + msg = "Sub-commands are: {0}; repos are: {1}. Syntax: !git \x0303subcommand\x0F \x0302repo\x0F." self.reply(self.data, msg.format(subcommands, self.get_repos())) def do_branch(self): """Get our current branch.""" branch = self.repo.active_branch.name - msg = "currently on branch \x0302{0}\x0F.".format(branch) + msg = "Currently on branch \x0302{0}\x0F.".format(branch) self.reply(self.data, msg) def do_branches(self): """Get a list of branches.""" branches = [branch.name for branch in self.repo.branches] - msg = "branches: \x0302{0}\x0F.".format(", ".join(branches)) + msg = "Branches: \x0302{0}\x0F.".format(", ".join(branches)) self.reply(self.data, msg) def do_checkout(self): @@ -141,23 +141,23 @@ class Git(Command): try: target = self.data.args[2] except IndexError: # No branch name provided - self.reply(self.data, "switch to which branch?") + self.reply(self.data, "Wwitch to which branch?") return current_branch = self.repo.active_branch.name if target == current_branch: - msg = "already on \x0302{0}\x0F!".format(target) + msg = "Already on \x0302{0}\x0F!".format(target) self.reply(self.data, msg) return try: ref = getattr(self.repo.branches, target) except AttributeError: - msg = "branch \x0302{0}\x0F doesn't exist!".format(target) + msg = "Branch \x0302{0}\x0F doesn't exist!".format(target) self.reply(self.data, msg) else: ref.checkout() - ms = "switched from branch \x0302{0}\x0F to \x0302{1}\x0F." + ms = "Switched from branch \x0302{0}\x0F to \x0302{1}\x0F." msg = ms.format(current_branch, target) self.reply(self.data, msg) log = "{0} checked out branch {1} of {2}" @@ -169,23 +169,23 @@ class Git(Command): try: target = self.data.args[2] except IndexError: # No branch name provided - self.reply(self.data, "delete which branch?") + self.reply(self.data, "Delete which branch?") return current_branch = self.repo.active_branch.name if current_branch == target: - msg = "you're currently on this branch; please checkout to a different branch before deleting." + msg = "You're currently on this branch; please checkout to a different branch before deleting." self.reply(self.data, msg) return try: ref = getattr(self.repo.branches, target) except AttributeError: - msg = "branch \x0302{0}\x0F doesn't exist!".format(target) + msg = "Branch \x0302{0}\x0F doesn't exist!".format(target) self.reply(self.data, msg) else: self.repo.git.branch("-d", ref) - msg = "branch \x0302{0}\x0F has been deleted locally." + msg = "Branch \x0302{0}\x0F has been deleted locally." self.reply(self.data, msg.format(target)) log = "{0} deleted branch {1} of {2}" logmsg = log.format(self.data.nick, target, self.repo.working_dir) @@ -194,7 +194,7 @@ class Git(Command): def do_pull(self): """Pull from our remote repository.""" branch = self.repo.active_branch.name - msg = "pulling from remote (currently on \x0302{0}\x0F)..." + msg = "Pulling from remote (currently on \x0302{0}\x0F)..." self.reply(self.data, msg.format(branch)) remote = self.get_remote() @@ -205,13 +205,13 @@ class Git(Command): if updated: branches = ", ".join([info.ref.remote_head for info in updated]) - msg = "done; updates to \x0302{0}\x0F (from {1})." + msg = "Done; updates to \x0302{0}\x0F (from {1})." self.reply(self.data, msg.format(branches, remote.url)) log = "{0} pulled {1} of {2} (updates to {3})" self.logger.info(log.format(self.data.nick, remote.name, self.repo.working_dir, branches)) else: - self.reply(self.data, "done; no new changes.") + self.reply(self.data, "Done; no new changes.") log = "{0} pulled {1} of {2} (no updates)" self.logger.info(log.format(self.data.nick, remote.name, self.repo.working_dir)) @@ -227,13 +227,13 @@ class Git(Command): if updated: branches = ", ".join([info.ref.remote_head for info in updated]) - msg = "last local commit was \x02{0}\x0F ago; updates to \x0302{1}\x0F." + msg = "Last local commit was \x02{0}\x0F ago; updates to \x0302{1}\x0F." self.reply(self.data, msg.format(since, branches)) log = "{0} got status of {1} of {2} (updates to {3})" self.logger.info(log.format(self.data.nick, remote.name, self.repo.working_dir, branches)) else: - msg = "last commit was \x02{0}\x0F ago. Local copy is up-to-date with remote." + msg = "Last commit was \x02{0}\x0F ago. Local copy is up-to-date with remote." self.reply(self.data, msg.format(since)) log = "{0} pulled {1} of {2} (no updates)" self.logger.info(log.format(self.data.nick, remote.name, diff --git a/earwigbot/commands/help.py b/earwigbot/commands/help.py index 870d338..7c9bd7f 100644 --- a/earwigbot/commands/help.py +++ b/earwigbot/commands/help.py @@ -60,11 +60,11 @@ class Help(Command): if command.__doc__: doc = command.__doc__.replace("\n", "") doc = re.sub("\s\s+", " ", doc) - msg = 'help for command \x0303{0}\x0F: "{1}"' + msg = 'Help for command \x0303{0}\x0F: "{1}"' self.reply(data, msg.format(target, doc)) return - msg = "sorry, no help for \x0303{0}\x0F.".format(target) + msg = "Sorry, no help for \x0303{0}\x0F.".format(target) self.reply(data, msg) def do_hello(self, data): diff --git a/earwigbot/commands/lag.py b/earwigbot/commands/lag.py index 9f6e272..8435336 100644 --- a/earwigbot/commands/lag.py +++ b/earwigbot/commands/lag.py @@ -48,7 +48,7 @@ class Lag(Command): if len(data.args) > 1: name = " ".join(data.args) - self.reply(data, "unknown site: \x0302{0}\x0F.".format(name)) + self.reply(data, "Unknown site: \x0302{0}\x0F.".format(name)) return name = data.args[0] if "." in name: @@ -59,7 +59,7 @@ class Lag(Command): try: return self.bot.wiki.get_site(name) except exceptions.SiteNotFoundError: - msg = "unknown site: \x0302{0}\x0F.".format(name) + msg = "Unknown site: \x0302{0}\x0F.".format(name) self.reply(data, msg) return return self.get_site_from_proj_and_lang(data, project, lang) @@ -71,7 +71,7 @@ class Lag(Command): try: site = self.bot.wiki.add_site(project=project, lang=lang) except exceptions.APIError: - msg = "site \x0302{0}:{1}\x0F not found." + msg = "Site \x0302{0}:{1}\x0F not found." self.reply(data, msg.format(project, lang)) return return site diff --git a/earwigbot/commands/langcode.py b/earwigbot/commands/langcode.py index 40a08a0..3ab11ac 100644 --- a/earwigbot/commands/langcode.py +++ b/earwigbot/commands/langcode.py @@ -30,7 +30,7 @@ class Langcode(Command): def process(self, data): if not data.args: - self.reply(data, "please specify a language code.") + self.reply(data, "Please specify a language code.") return code = data.args[0] @@ -50,4 +50,4 @@ class Langcode(Command): self.reply(data, msg) return - self.reply(data, "language \x0302{0}\x0F not found.".format(code)) + self.reply(data, "Language \x0302{0}\x0F not found.".format(code)) diff --git a/earwigbot/commands/link.py b/earwigbot/commands/link.py index 32d939b..4147600 100644 --- a/earwigbot/commands/link.py +++ b/earwigbot/commands/link.py @@ -39,7 +39,7 @@ class Link(Command): elif data.command == "link": if not data.args: - self.reply(data, "what do you want me to link to?") + self.reply(data, "What do you want me to link to?") return pagename = " ".join(data.args) link = self.site.get_page(pagename).url.encode("utf8") diff --git a/earwigbot/commands/praise.py b/earwigbot/commands/praise.py index d6c8240..8c6c706 100644 --- a/earwigbot/commands/praise.py +++ b/earwigbot/commands/praise.py @@ -44,5 +44,5 @@ class Praise(Command): if not data.args: msg = "You use this command to praise certain people. Who they are is a secret." else: - msg = "you're doing it wrong." + msg = "You're doing it wrong." self.reply(data, msg) diff --git a/earwigbot/commands/quit.py b/earwigbot/commands/quit.py index 4e6bc70..5d8a1b2 100644 --- a/earwigbot/commands/quit.py +++ b/earwigbot/commands/quit.py @@ -30,7 +30,7 @@ class Quit(Command): def process(self, data): if data.host not in self.config.irc["permissions"]["owners"]: - self.reply(data, "you must be a bot owner to use this command.") + self.reply(data, "You must be a bot owner to use this command.") return if data.command == "quit": self.do_quit(data) @@ -45,7 +45,7 @@ class Quit(Command): reason = " ".join(args) else: if not args or args[0].lower() != data.my_nick: - self.reply(data, "to confirm this action, the first argument must be my name.") + self.reply(data, "To confirm this action, the first argument must be my name.") return reason = " ".join(args[1:]) diff --git a/earwigbot/commands/registration.py b/earwigbot/commands/registration.py index 20477d6..74d2ce0 100644 --- a/earwigbot/commands/registration.py +++ b/earwigbot/commands/registration.py @@ -42,7 +42,7 @@ class Registration(Command): try: reg = user.registration except exceptions.UserNotFoundError: - msg = "the user \x0302{0}\x0F does not exist." + msg = "The user \x0302{0}\x0F does not exist." self.reply(data, msg.format(name)) return @@ -54,7 +54,7 @@ class Registration(Command): elif user.gender == "female": gender = "She's" else: - gender = "They're" # Singluar they? + gender = "They're" # Singular they? msg = "\x0302{0}\x0F registered on {1}. {2} {3} old." self.reply(data, msg.format(name, date, gender, age)) diff --git a/earwigbot/commands/remind.py b/earwigbot/commands/remind.py index e829f56..e8470cb 100644 --- a/earwigbot/commands/remind.py +++ b/earwigbot/commands/remind.py @@ -32,19 +32,19 @@ class Remind(Command): def process(self, data): if not data.args: - msg = "please specify a time (in seconds) and a message in the following format: !remind