summaryrefslogtreecommitdiffstats
path: root/stashley
blob: aa6b956e867c1c4e27cae4cedf82b6237f86a317 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
tomlq -r '.|keys_unsorted[]' "$1"  | while IFS= read -r site; 
do 
    if [ "$site" != "name" ] && [ "$site" != "IPFS" ]
    then
        tomlq -r ".$site.urls[]" "$1" | while IFS= read -r url;
    do
        case "$site" in
            youtube)
                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 'YouTube/%(uploader|author)s/%(title)s.%(ext)s' "$url"
                ;;
            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"
                ;;
            misskey)
                gallery-dl --write-metadata "misskey:$url"
                ;;
            *)
                gallery-dl --write-metadata "$url"
                ;;
        esac
    done
    fi
done

fdupes -dIr .

if [ "$(tomlq -r '.IPFS' "$1")" = "true" ]
then
ipfs-archive-manager personality-archive "$(tomlq -r '.name' "$1")" .
fi