add bandcamping script
This commit is contained in:
parent
8d51d1a05e
commit
7e6694e97a
23
bandcamping
Executable file
23
bandcamping
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
tag="$1"
|
||||||
|
liked="bandcamping_$tag""_"`date +"%Y%m%d"`
|
||||||
|
visited="$HOME/.bandcamping.visited"
|
||||||
|
|
||||||
|
touch "$visited"
|
||||||
|
|
||||||
|
{ curl "https://bandcamp.com/tag/$tag?tab=all_releases&s=random" 2>/dev/null | grep -oP "https://[a-zA-Z0-9\-äöü]*?.bandcamp.com/album/.*?(?=")" | while read album; do
|
||||||
|
if grep -q "$album" "$visited"; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
surf "$album"
|
||||||
|
echo -n "Like? "
|
||||||
|
read -u 3 like
|
||||||
|
if [ "$like" == "y" ]; then
|
||||||
|
echo "$album" >> "$liked"
|
||||||
|
fi
|
||||||
|
echo "$album" >> "$visited"
|
||||||
|
done; } 3<&0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user