def generate_scrum_report(): """ Generate scrum report based on scrum report template Also copy the report in clipboard if wanted """ settings = ScrumReportSettings() settings_data = settings.get() echo_info("Loaded from `{}`".format(settings.get_path())) data = {} for idx, question in enumerate(settings_data["questions"]): echo_info(question) answers = [] while True: line = input() if line == "": break answers.append(line) data["q{}".format(idx)] = question data["a{}".format(idx)] = "\n".join(answers) template = Template("\n".join(settings_data["template"])) data["today"] = today_str() if "${github_report}" in template.template: data["github_report"] = _get_github_report() report = template.safe_substitute(data) echo_info(report) if click.confirm("Copy to clipboard?", prompt_suffix=" "): try: pyperclip.copy(report) echo_info("Copied!") except pyperclip.PyperclipException: echo_info( "Not supported on your system, please `sudo apt-get install xclip`" )
def print(self): """ Print result """ echo_info(self._response)
def print(self): echo_info( tabulate(self.data, headers=["REPO", "BRANCH", "PULL REQUEST"]))
def print(self): echo_info(self.tabulate())
def print(self): echo_info( tabulate([x[1:] for x in self.data], headers=["CREATED", "URL", "TITLE"]))
def print(self): echo_info("{}/{} until {}".format(self.remaining, self.limit, self.reset_at))
def print(self): echo_info(tabulate(self.data, headers=["REPO", "URL"]))