<filename>dler/downloader/progress.py<gh_stars>0
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: <EMAIL>
"""

"""
import signal
from threading import Event

from rich.progress import (
    BarColumn,
    DownloadColumn,
    FileSizeColumn,
    Progress,
    TaskID,
    TextColumn,
    TimeRemainingColumn,
    TransferSpeedColumn,
)

progress = Progress(
    TextColumn("[bold blue]{task.fields[filename]}", justify="right"),
    BarColumn(bar_width=None),
    "[progress.percentage]{task.percentage:>3.1f}%",
    "•",
    "{task.completed}/{task.total}",
    #  "•",
    #  DownloadColumn(),
    #  "•",
    #  TransferSpeedColumn(),
    "•",
    TimeRemainingColumn(),
)


done_event = Event()

def handle_sigint(signum, frame):
    done_event.set()

signal.signal(signal.SIGINT, handle_sigint)


<filename>dler/downloader/progress.py<gh_stars>0
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: <EMAIL>
"""

"""
import signal
from threading import Event

from rich.progress import (
    BarColumn,
    DownloadColumn,
    FileSizeColumn,
    Progress,
    TaskID,
    TextColumn,
    TimeRemainingColumn,
    TransferSpeedColumn,
)

progress = Progress(
    TextColumn("[bold blue]{task.fields[filename]}", justify="right"),
    BarColumn(bar_width=None),
    "[progress.percentage]{task.percentage:>3.1f}%",
    "•",
    "{task.completed}/{task.total}",
    #  "•",
    #  DownloadColumn(),
    #  "•",
    #  TransferSpeedColumn(),
    "•",
    TimeRemainingColumn(),
)


done_event = Event()

def handle_sigint(signum, frame):
    done_event.set()

signal.signal(signal.SIGINT, handle_sigint)


#!/usr/bin/env python # -*- coding:utf-8 -*- # Author: <EMAIL> #  "•", #  DownloadColumn(), #  "•", #  TransferSpeedColumn(),