Small wget like mirroring utility.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Format code

rektide 2c2c2b00 a9491524

+14 -5
+14 -5
src/cli.ts
··· 323 323 default: "cache", 324 324 }, 325 325 "strip-host": { type: "boolean", description: "Remove hostname from output paths" }, 326 - "replace-host": { type: "string", description: "Replace hostname in URLs with specified hostname" }, 326 + "replace-host": { 327 + type: "string", 328 + description: "Replace hostname in URLs with specified hostname", 329 + }, 327 330 }, 328 331 async run(ctx) { 329 - const { url, urls, output, predicate, overwrite, "strip-host": stripHost, "replace-host": replacementHost } = ctx.values; 332 + const { 333 + url, 334 + urls, 335 + output, 336 + predicate, 337 + overwrite, 338 + "strip-host": stripHost, 339 + "replace-host": replacementHost, 340 + } = ctx.values; 330 341 const urlList = url ? [url] : (urls ?? []); 331 342 332 343 if (urlList.length === 0) { ··· 344 355 } 345 356 346 357 const linkPredicate = 347 - predicate === "origin" 348 - ? originPredicate(parsedUrls[0]) 349 - : subtreePredicate(parsedUrls[0]); 358 + predicate === "origin" ? originPredicate(parsedUrls[0]) : subtreePredicate(parsedUrls[0]); 350 359 351 360 const queue = new Set<string>(parsedUrls.map((u) => u.href)); 352 361 const processed = new Set<string>();