From 0d05ef1e12314985988e567ac22a179d0f646899 Mon Sep 17 00:00:00 2001 From: msglm Date: Sat, 14 Jan 2023 10:33:04 -0600 Subject: Inital Commit --- .local/bin/getberts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 .local/bin/getberts (limited to '.local/bin/getberts') 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) -- cgit v1.2.3