diff --git a/.config/fish/functions/ao3dl.fish b/.config/fish/functions/ao3dl.fish deleted file mode 100644 index c3d6725..0000000 --- a/.config/fish/functions/ao3dl.fish +++ /dev/null @@ -1,16 +0,0 @@ -function ao3dl - set dir (sed (math (grep -n '' $argv | cut -d: -f1) + 1)!d $argv | sed -e 's/^[ \t]*//') - mkdir $dir; cd $dir - for i in (grep works/[0-9]\* ../$argv -o | uniq | sed 's/works\///g' | sed '/^$/d') - dl https://download.archiveofourown.org/downloads/$i/\*.epub - end - cd .. - - for i in (lynx -dump -hiddenlinks=listonly out.html | grep '\.epub' | awk 'FNR > 2 {print$2}' | grep http) - dl $i - end - - for i in (find . -maxdepth 2 -printf "%f\n" | sort -f | uniq -di) - mv $i */$i - end -end diff --git a/.local/bin/ao3.1 b/.local/bin/ao3.1 new file mode 100755 index 0000000..b2ffc4c --- /dev/null +++ b/.local/bin/ao3.1 @@ -0,0 +1,5 @@ +#!/bin/bash +for i in $(grep works/[0-9]\* $@ -o | uniq | sed 's/works\///g' | sed '/^$/d') +do + aria2c https://download.archiveofourown.org/downloads/$i/\*.epub +done diff --git a/.local/bin/ao3.2 b/.local/bin/ao3.2 new file mode 100755 index 0000000..4b7d9db --- /dev/null +++ b/.local/bin/ao3.2 @@ -0,0 +1,5 @@ +#!/bin/bash +for i in $(lynx -dump -hiddenlinks=listonly $@ | grep '\.epub' | awk 'FNR > 2 {print$2}' | grep http) +do + aria2c $i +done