#!/bin/zsh #Description: Downloads as many strips from the comic "dilbert" as it can get its hands on. I primarily use it for data science. #Axioms: ULTRASPECIFIC #Dependencies: https://packages.debian.org/sid/parallel https://packages.debian.org/sid/tor https://packages.debian.org/sid/wget https://packages.debian.org/sid/curl https://github.com/ericchiang/pup getbert() { echo $1 url=$(curl "$1"|pup 'img[class="img-responsive img-comic"] attr{src}') || exit 1 torsocks wget --continue --directory-prefix="/home/$USER/Documents/ComputerScience/programs/lightweight_gan/data/dilbert/" $url } env_parallel --jobs 3 getbert {} ::: $(for year in {1999..2023}; do for month in {01..12}; do for day in {01..31};do echo https://dilbert.com/strip/$year-$month-$day;done;done;done)