class

Pomtex::Seed::ArilFetcher

Inherits Reference < Object

Downloads arils concurrently and pipes each finished archive to an unpacking stage, so extraction overlaps with the remaining downloads:

packages ─▶ [jobs] ─▶ N download fibers ─▶ [ready] ─▶ unpack fibers ─▶ [results]

Constants

ATTEMPTS = 3

mirror.ctan.org sends each request to a mirror of its choosing, so a retry usually lands on a different one when the first is broken.

MAX_REDIRECTS = 8
UNPACKERS = 2
USER_AGENT = "pomtex/#{VERSION} (+https://ctan.org)"

Constructors

new(jobs : Int32 = Config::DEFAULT_JOBS, texmf : Path = Config.texmf_dir)
Source

Class methods

stream(url : String, dest : Path, sha512 : String | Nil = nil, progress : Proc(Int64, Int64 | Nil, Nil) | Nil = nil) : Int64

Streams url to dest (via a .part file), following redirects and verifying the SHA-512 when one is given; retries from url on failure. Returns the byte count.

Source

Instance methods

fetch_all(packages : Array(Package), & : Outcome -> ) : Array(Outcome)
Source
jobs
Source

Nested types