use proper folders
This commit is contained in:
parent
317c8acf1e
commit
fe419c5172
12
bandcamping
12
bandcamping
|
@ -3,13 +3,19 @@
|
|||
set -eu
|
||||
|
||||
tag="$1"
|
||||
liked="bandcamping_$tag""_"`date +"%Y%m%d"`
|
||||
visited="$HOME/.bandcamping.visited"
|
||||
|
||||
today=`date +"%Y%m%d"`
|
||||
visitedDir="$HOME/.bandcamping/visited"
|
||||
visited="$visitedDir/$today"
|
||||
likedDir="$HOME/.bandcamping/liked"
|
||||
liked="$likedDir/$today""_$tag"
|
||||
|
||||
mkdir -p "$visitedDir"
|
||||
mkdir -p "$likedDir"
|
||||
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
|
||||
if grep -rq "$album" "$visitedDir"; then
|
||||
continue
|
||||
fi
|
||||
echo "$album"
|
||||
|
|
Loading…
Reference in New Issue
Block a user