Skip to content

Instantly share code, notes, and snippets.

@agowa
Created January 25, 2020 01:48
Show Gist options
  • Save agowa/f1aa4fd05d2502e1c1a71351d4b5b768 to your computer and use it in GitHub Desktop.
Save agowa/f1aa4fd05d2502e1c1a71351d4b5b768 to your computer and use it in GitHub Desktop.
INDEX to aria2c download file
#! /usr/bin/pwsh
$indexFileURL = "https://cdn.media.ccc.de/INDEX";
$indexFileLines = [System.Net.WebClient]::new().DownloadString($indexURL) -split "`n";
foreach($indexFileLine in $indexFileLines) {
$path = $indexFileLine -split "/";
$indexFileLine | Write-Output;
(" dir=./" + ($path[0..($path.Length-1)] -join "/")) | Write-Output;
(" out=" + $path[-1]) | Write-Output;
} | Out-File -LiteralPath "./INDEX.aria2c.txt" -Encoding default -Force
#cd to download folder
#aria2c -s 16 -x 16 --always-resume true --continue true --auto-file-renaming false --use-head true --input=INDEX.aria2c.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment