Skip to content

Tracking Git progress with ProgressBar #5858

Closed Answered by noonedeadpunk
noonedeadpunk asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, after switching over multiple AI models, I finally figured out how to do that. The working example is below:

import asyncio
import git
from git import RemoteProgress

from textual.app import App, ComposeResult
from textual.widgets import ProgressBar, Static, Footer
from textual.containers import Center, Middle
from textual.reactive import reactive

import os
import shutil

REPO_URL = "https://github.com/Textualize/textual"
REPO_PATH = "/tmp/textual"
BRANCH = "main"


class GitCloneProgress(RemoteProgress):
    def __init__(self, update_callback):
        super().__init__()
        self.update_callback = update_callback

    def update(self, op_code, cur_count, max_count=None, message=…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by noonedeadpunk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant