Fish: ao3dl

This commit is contained in:
Phantop 2019-12-27 19:52:13 -05:00
parent bbd49a5129
commit 34691683e3
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
# Defined in /tmp/fish.qhqZn9/ao3dl.fish @ line 2
function ao3dl
set dir (sed (math (grep -n '<title>' $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 ..
end