From 4a990b7a0f5c48cf6c7eea7fac31d0640de7d04c Mon Sep 17 00:00:00 2001
From: msglm <msglm@techchud.xyz>
Date: Sat, 15 Jul 2023 04:08:54 -0500
Subject: readme added

---
 README.md            | 37 +++++++++++++++++++++++++++++++++++++
 personality-archiver | 39 ---------------------------------------
 stashley             | 39 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 76 insertions(+), 39 deletions(-)
 create mode 100644 README.md
 delete mode 100755 personality-archiver
 create mode 100755 stashley

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..faa8f54
--- /dev/null
+++ b/README.md
@@ -0,0 +1,37 @@
+# Stashley
+
+Stashley is a program used for archiving personalities using TOML files, and if IPFS is installed, pushing them to IPFS.
+
+The format for files is as follows:
+
+```
+name=PersonalityName
+
+[socialMedia]
+urls=["example.com", "example.org"]
+```
+
+A filled example is as follows:
+
+```
+name="Sashley"
+
+[toyhouse]
+urls=["https://toyhou.se/sashley/art"]
+
+[instagram]
+urls=["https://www.instagram.com/sxshley"]
+
+[misskey]
+urls=["https://fedi.fazbear.lol/@sxshely"]
+
+[youtube]
+urls = ["https://www.youtube.com/channel/UCO86mBfqBTsfEUnPvJ4s1bg", "https://www.youtube.com/channel/UC35UExRBy6pkawgvClaws2Q"]
+
+[twitter]
+urls=["https://twitter.com/sxshely", "https://twitter.com/BUNNIIYE", "https://twitter.com/_atsukix"]
+```
+
+## Supported Websites
+
+stashley uses [yt-dlp](https://github.com/yt-dlp/yt-dlp), [gallery-dl](https://github.com/mikf/gallery-dl/), and GNU's wget to do the actual archiving work. Because of this, anything supported by those programs is something stashley will support. More extractors will be added as needed.
diff --git a/personality-archiver b/personality-archiver
deleted file mode 100755
index 9afce6d..0000000
--- a/personality-archiver
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-tomlq -r '.|keys_unsorted[]' "$1"  | while IFS= read -r site; 
-do 
-    tomlq -r ".$site.urls[]" "$1" | while IFS= read -r url;
-do
-    if [ "$site" = "youtube" ]
-    then
-        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"
-    elif [ "$site" = "twitter" ]
-    then
-        gallery-dl --write-metadata "$url"
-    elif [ "$site" = "instagram" ]
-    then
-        gallery-dl --write-metadata "$url"
-    elif [ "$site" = "toyhouse" ]
-    then
-        gallery-dl --write-metadata "$url"
-    else
-        gallery-dl --write-metadata "$site":"$url"
-    fi
-done
-
-done
-
-fdupes -dIr .
-
-if [[ ipfs --help == 0 ]]
-then
-    ## Add new content to personality-archive
-    personalityName=$(tomlq -r '.name' $1)
-    ipfs files mkdir /personality-archive
-    personalityHash=$(ipfs add -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
diff --git a/stashley b/stashley
new file mode 100755
index 0000000..9afce6d
--- /dev/null
+++ b/stashley
@@ -0,0 +1,39 @@
+#!/bin/sh
+tomlq -r '.|keys_unsorted[]' "$1"  | while IFS= read -r site; 
+do 
+    tomlq -r ".$site.urls[]" "$1" | while IFS= read -r url;
+do
+    if [ "$site" = "youtube" ]
+    then
+        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"
+    elif [ "$site" = "twitter" ]
+    then
+        gallery-dl --write-metadata "$url"
+    elif [ "$site" = "instagram" ]
+    then
+        gallery-dl --write-metadata "$url"
+    elif [ "$site" = "toyhouse" ]
+    then
+        gallery-dl --write-metadata "$url"
+    else
+        gallery-dl --write-metadata "$site":"$url"
+    fi
+done
+
+done
+
+fdupes -dIr .
+
+if [[ ipfs --help == 0 ]]
+then
+    ## Add new content to personality-archive
+    personalityName=$(tomlq -r '.name' $1)
+    ipfs files mkdir /personality-archive
+    personalityHash=$(ipfs add -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
-- 
cgit v1.2.3