1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-08 16:04:37 +00:00
dotfiles/.config/fish/functions/ao3dl.fish

10 lines
365 B
Fish
Raw Normal View History

2019-12-28 00:52:13 +00:00
# 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