blob: 0ce069d2a52829f8dc76863f6f4a7058b660917b (
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
40
41
|
#!/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 | 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 'YouTube/%(uploader|author)s/%(title)s.%(ext)s' "$url"
;;
website)
wget --mirror --warc-file="echo $url|sed -e '//\//slash/g'"
;;
toyhouse | instagram | twitter | deviantart)
gallery-dl --write-metadata "$url"
;;
*)
gallery-dl --write-metadata "$site":"$url"
;;
esac
done
fi
done
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"
fi
|