getparty

package module
v1.29.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: BSD-3-Clause Imports: 38 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

getparty

Build status Lint status

HTTP Download Manager with multi-parts

showcase

Installation

Homebrew
$ brew install getparty
AUR
$ paru -S getparty
From source
$ git clone --depth 1 https://github.com/vbauerster/getparty.git
$ cd getparty/cmd/getparty && go build

Usage

Usage:
  getparty [OPTIONS] [<url>]

Application Options:
  -p, --parts=n                                    number of parts (default: 1)
  -r, --max-retry=n                                max retries per each part, 0 for infinite (default: 10)
      --max-follow=n                               max redirections to follow, 0 for infinite (default: 10)
  -t, --timeout=sec                                timeout to read 64KiB; on exceed chunk size is reduced (default: 5)
  -l, --speed-limit=[1|2|3|4|5]                    speed limit (default: 0 = no limit; 5 = max limit)
  -s, --session=FILE                               json file of previous incomplete download session
  -U, --user-agent=[chrome|firefox|safari|edge]    User-Agent header (default: getparty/ver)
      --username=                                  basic http auth username
      --password=                                  basic http auth password
  -H, --header=key:value                           http header, can be specified more than once
  -x, --proxy=<[scheme://]host[:port]>             proxy to use, if scheme is empty http is assumed
  -q, --quiet                                      quiet mode, progress bars are disabled
  -d, --debug                                      debug mode, output debug info to stderr
  -v, --version                                    show version

Https Options:
  -c, --certs-file=certs.crt                       root certificates to use when verifying server certificates
      --no-check-cert                              don't verify the server's certificate chain and host name

Output Options:
  -o, --output.name=FILE                           output file name
  -f, --output.overwrite                           overwrite existing file silently
      --output.use-path                            resolve name from url path first (default: Content-Disposition header)

Best-mirror Options:
  -m, --mirror.list=FILE|-                         mirror list input
      --mirror.method=[HEAD|GET]                   http method to use (default: HEAD)
      --mirror.doget=KiB                           get first n KiB, implies method=GET
  -w, --mirror.workers=n                           max concurrent workers (default: number of logical CPUs)
      --mirror.top=n                               list top n mirrors without downloading unless n=1 (default: 1)
      --mirror.pass=n                              query each mirror n times to get average result (default: 1)
      --mirror.timeout=sec                         query timeout (default: 5)
      --mirror.no-warn                             suppress any warnings

Expose progress (host:port/debug/vars):
      --expose.host=host                           host (optional)
      --expose.port=port                           port (required)

Help Options:
  -h, --help                                       Show this help message

Arguments:
  <url>:                                           http location
Best mirror example:

read mirrors.txt from a file and proceed to download from the best mirror:

getparty -m mirrors.txt

read mirrors.txt from a stdin and proceed to download from the best mirror:

cat mirrors.txt | getparty -m -

just list top 3 mirrors without any download:

getparty -m mirrors.txt --mirror.top 3

License

BSD 3-Clause

Documentation

Index

Constants

View Source
const (
	ErrCanceledByUser      = ExpectedError("Canceled by user")
	ErrMaxRetry            = ExpectedError("Retry limit exceeded")
	ErrMaxRedirect         = ExpectedError("Follow limit exceeded")
	ErrZeroParts           = ExpectedError("Need at least one part to continue")
	ErrTooFragmented       = ExpectedError("Too fragmented, reduce number of parts maybe?")
	ErrInteractionRequired = ExpectedError("Interaction required, run without --queit maybe?")
	ErrMirrorStop          = ExpectedError("More than one mirror requested, stop processing")
	ErrMirrorNone          = ExpectedError("None of the mirror responded with valid result")
)
View Source
const (
	DBUG = iota
	INFO
	WARN
	ERRO
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	Ctx context.Context
	Out io.Writer
	Err io.Writer
	// contains filtered or unexported fields
}

Cmd type used to manage download session

func (*Cmd) Exit

func (m *Cmd) Exit(err error) (status int)

func (*Cmd) Run

func (m *Cmd) Run(args []string, version, commit string) (err error)

type ContentMismatchError added in v1.26.2

type ContentMismatchError[T any] struct {
	// contains filtered or unexported fields
}

func (ContentMismatchError[T]) Error added in v1.26.2

func (e ContentMismatchError[T]) Error() string

type ExpectedError

type ExpectedError string

func (ExpectedError) Error

func (e ExpectedError) Error() string

type Part

type Part struct {
	Id      uint
	Start   int64
	Stop    int64
	Written int64
	// contains filtered or unexported fields
}

Part represents state of each download part

type Session

type Session struct {
	URL            string
	OutputName     string
	AcceptRanges   string
	ContentType    string
	ContentLength  int64
	Elapsed        time.Duration
	Headers        map[string]string
	Parts          []*Part
	ExplicitOutput bool
	// contains filtered or unexported fields
}

Session represents download session state

type UnexpectedHttpStatusError added in v1.26.2

type UnexpectedHttpStatusError int

func (UnexpectedHttpStatusError) Error added in v1.26.2

Directories

Path Synopsis
cmd
getparty command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址