Initial commit
This commit is contained in:
commit
59b5283b79
8
README.md
Normal file
8
README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# ia-downloader
|
||||
|
||||
Downloads rom's from ia by providing the script xlm path set.
|
||||
|
||||
Won't download specific roms like
|
||||
- Beta
|
||||
- Prototype
|
||||
- ...
|
25
ia-downloader
Executable file
25
ia-downloader
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# script to quickly download rom sets from internet archive at max speed from its xml with the list of files
|
||||
|
||||
xml_url="$1"
|
||||
base_url=$(dirname $xml_url)
|
||||
|
||||
dl="aria2c -j 16 -s 16 -x 16 -k 5M --file-allocation=none --continue=true"
|
||||
|
||||
# getting roms while removing unneded files and roms like prototypes and betas
|
||||
roms=$(wget -q $xml_url -O - | grep name | cut -d \" -f 2 | sed '/.xml/d' | sed '/.sqlite/d' | sed '/(Proto)/d' | sed '/(Unl)/d' | sed '/(Beta)/d')
|
||||
rom_count=$(printf '%s\n' "${roms}" | wc -l)
|
||||
|
||||
printf '%s\n' "Downloading $rom_count roms"
|
||||
|
||||
count="1"
|
||||
|
||||
while read rom; do
|
||||
# getting the url and making it usable
|
||||
rom_url=$(printf '%s\n' "${base_url}/${rom}")
|
||||
printf '%s\n' "Downloading ${count}. ${rom}"
|
||||
$dl "${rom_url}"
|
||||
printf '%s\n' "Done, left $((${rom_count} - ${count})) roms to download"
|
||||
count=$(($count + 1))
|
||||
done <<< "$roms"
|
Loading…
Reference in New Issue
Block a user