Borg/pkg/ui/progressbar.go
google-labs-jules[bot] 8e82bada06 feat: Add recursive website downloader and progress bar
This commit introduces a new `collect website` command that recursively downloads a website to a specified depth.

- A new `pkg/website` package contains the logic for the recursive download.
- A new `pkg/ui` package provides a progress bar for long-running operations, which is used by the website downloader.
- The `collect pwa` subcommand has been restored to be PWA-specific.
2025-10-31 21:35:53 +00:00

15 lines
422 B
Go

package ui
import (
"github.com/schollz/progressbar/v3"
)
// NewProgressBar creates a new progress bar with the specified total and description.
func NewProgressBar(total int, description string) *progressbar.ProgressBar {
return progressbar.NewOptions(total,
progressbar.OptionSetDescription(description),
progressbar.OptionSetWidth(15),
progressbar.OptionShowCount(),
progressbar.OptionClearOnFinish(),
)
}