summaryrefslogtreecommitdiffstats
path: root/.local/bin/getberts
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/getberts')
-rwxr-xr-x.local/bin/getberts16
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)