mirror of
https://github.com/Deathemonic/BA-AD.git
synced 2025-07-29 03:37:24 +02:00

- refactored entire codebase - remove --category - remove --version - docs: updated tutorial - docs: readme update - renamed files to proper python style guide - replace old crypto with ba-cy - moved images to .github/resources - moved extractors to its own folder (extractors) - renamed lib to crypto - moved some functions to its own helper - added helper scripts
40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
from rich.console import Console, Group
|
|
from rich.live import Live
|
|
from rich.progress import BarColumn, DownloadColumn, Progress, TextColumn, TimeRemainingColumn, TransferSpeedColumn
|
|
|
|
|
|
def create_progress_group() -> tuple:
|
|
console = Console()
|
|
|
|
print_progress = Progress(TextColumn('{task.description}'), console=console)
|
|
|
|
download_progress = Progress(
|
|
TextColumn('[bold blue]{task.description}', justify='right'),
|
|
BarColumn(bar_width=None, finished_style='green'),
|
|
'[progress.percentage]{task.percentage:>3.1f}%',
|
|
'•',
|
|
DownloadColumn(),
|
|
'•',
|
|
TransferSpeedColumn(),
|
|
'•',
|
|
TimeRemainingColumn(),
|
|
expand=True,
|
|
)
|
|
|
|
extract_progress = Progress(
|
|
TextColumn('[bold green]{task.description}', justify='right'),
|
|
BarColumn(bar_width=None, finished_style='green'),
|
|
'[progress.percentage]{task.percentage:>3.1f}%',
|
|
'•',
|
|
TimeRemainingColumn(),
|
|
expand=True,
|
|
)
|
|
|
|
progress_group = Group(print_progress, download_progress, extract_progress)
|
|
|
|
return progress_group, download_progress, extract_progress, print_progress, console
|
|
|
|
|
|
def create_live_display() -> Live:
|
|
return Live(create_progress_group()[0], refresh_per_second=10)
|