diff options
author | msglm <msglm@techchud.xyz> | 2023-01-14 10:33:04 -0600 |
---|---|---|
committer | msglm <msglm@techchud.xyz> | 2023-01-14 10:33:04 -0600 |
commit | 0d05ef1e12314985988e567ac22a179d0f646899 (patch) | |
tree | de702ad5f7550a27a6fb982e617363ccaca4fecf /.local/bin/getberts | |
download | msglm-dotfiles-0d05ef1e12314985988e567ac22a179d0f646899.tar.gz msglm-dotfiles-0d05ef1e12314985988e567ac22a179d0f646899.tar.bz2 msglm-dotfiles-0d05ef1e12314985988e567ac22a179d0f646899.zip |
Inital Commit
Diffstat (limited to '.local/bin/getberts')
-rwxr-xr-x | .local/bin/getberts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/.local/bin/getberts b/.local/bin/getberts new file mode 100755 index 0000000..ca6543d --- /dev/null +++ b/.local/bin/getberts @@ -0,0 +1,16 @@ +#!/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) |