コード例 #1
0
ファイル: scrum_report.py プロジェクト: genygilles/yogit
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`"
            )
コード例 #2
0
ファイル: queries.py プロジェクト: genygilles/yogit
 def print(self):
     """ Print result """
     echo_info(self._response)
コード例 #3
0
ファイル: queries.py プロジェクト: genygilles/yogit
 def print(self):
     echo_info(
         tabulate(self.data, headers=["REPO", "BRANCH", "PULL REQUEST"]))
コード例 #4
0
ファイル: queries.py プロジェクト: genygilles/yogit
 def print(self):
     echo_info(self.tabulate())
コード例 #5
0
ファイル: queries.py プロジェクト: genygilles/yogit
 def print(self):
     echo_info(
         tabulate([x[1:] for x in self.data],
                  headers=["CREATED", "URL", "TITLE"]))
コード例 #6
0
ファイル: queries.py プロジェクト: genygilles/yogit
 def print(self):
     echo_info("{}/{} until {}".format(self.remaining, self.limit,
                                       self.reset_at))
コード例 #7
0
ファイル: queries.py プロジェクト: genygilles/yogit
 def print(self):
     echo_info(tabulate(self.data, headers=["REPO", "URL"]))