From 2c0cc2174a191149f09e1bae1e01249153081ba8 Mon Sep 17 00:00:00 2001 From: msglm Date: Fri, 6 Oct 2023 01:12:38 -0500 Subject: let gallery-dl handle site-figuring; shrink IPFS code --- stashley | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/stashley b/stashley index 3dded85..aa6b956 100755 --- a/stashley +++ b/stashley @@ -12,15 +12,19 @@ do tiktok) yt-dlp --write-info-json --write-description --write-thumbnail --write-annotations --all-subs --ignore-error -f 'bestvideo[height>=720][fps>=60]+bestaudio/bestvideo+bestaudio/best' -o 'TikTok/%(uploader|author)s/%(title)s.%(ext)s' "$url" ;; + linktree) + fixedurlname=$(echo "$url"|sed -e "s/\//∕/g") + wget -e "robots=off" --warc-file="$(date +%s) - $fixedurlname" "$url" + ;; website) fixedurlname=$(echo "$url"|sed -e "s/\//∕/g") wget -e "robots=off" --mirror --warc-file="$(date +%s) - $fixedurlname" "$url" ;; - toyhouse | instagram | twitter | deviantart) - gallery-dl --write-metadata "$url" + misskey) + gallery-dl --write-metadata "misskey:$url" ;; *) - gallery-dl --write-metadata "$site":"$url" + gallery-dl --write-metadata "$url" ;; esac done @@ -31,15 +35,5 @@ fdupes -dIr . if [ "$(tomlq -r '.IPFS' "$1")" = "true" ] then - -## Add new content to personality-archive -personalityName=$(tomlq -r '.name' "$1") -ipfs files mkdir /personality-archive -personalityHash=$(ipfs add --nocopy -Q -r .) -ipfs files rm -r /personality-archive/"$personalityName" -ipfs files cp /ipfs/"$personalityHash" /personality-archive/"$personalityName" - -## Update IPNS with new personality-archive -personalityArchiveLocationHash=$(ipfs files stat --hash /personality-archive) -ipfs name publish "$personalityArchiveLocationHash" +ipfs-archive-manager personality-archive "$(tomlq -r '.name' "$1")" . fi -- cgit v1.2.3