#! /bin/zsh # # this file: # https://dataswamp.org/~incal/scripts/tokyo-dl zmodload zsh/mathfunc . ~/public_html/conf/.zsh/dl local dir=~/mm/sport/tokyo/vids mkdir -p $dir cd $dir local -a disps=( "3x3 basketball" "archery" "artistic swimming" "athletics" "badminton" "baseball" "basketball" "beach volleyball" "BMX freestyle" "boxing" "BXM racing" "canoeing slalom" "canoeing sprint" "climbing" "diving" "equestrian dressage" "equestrian eventing" "equestrian jumping" "fencing" "field hockey" "football" "freestyle wrestling" "golf" "Greco-Roman wrestling" "gymnastics artistic" "gymnastics rhythmic" "gymnastics trampoline" "handball" "judo" "kata" "kumite" "marathon swimming" "modern pentathlon" "mountain biking" "pole vault" "road cycling" "rowing" "rugby seven" "sailing" "shooting" "skateboarding" "softball" "surfing" "table tennis" "taekwondo" "tennis" "track cycling" "triathlon" "volleyball" "water polo" "weightlifting" ) local swap local n local k for ((n = ${(w)#disps} + 1 ; n > 0 ; n--)); do ((k = 1 + int(rand48() * n))) swap=$disps[k] disps[k]=$disps[n] disps[n]=$swap done clear local s for d in $disps; do s="Tokyo 2020 Olympic Games Women's $d" echo $d dl-all-both $s 2> /dev/null done cd -