aboutsummaryrefslogtreecommitdiff
path: root/macos.local
diff options
context:
space:
mode:
Diffstat (limited to 'macos.local')
-rw-r--r--macos.local/flake/home/scripts/core.nix.org4
-rw-r--r--macos.local/flake/home/scripts/yt-rss.sh1
-rw-r--r--macos.local/flake/home/scripts/yt-to-rss.org8
-rw-r--r--macos.local/flake/home/scripts/yt-to-rss.py12
-rw-r--r--macos.local/flake/home/scripts/yt-to-rss.py.org19
5 files changed, 12 insertions, 32 deletions
diff --git a/macos.local/flake/home/scripts/core.nix.org b/macos.local/flake/home/scripts/core.nix.org
index f3fd314..47bad2b 100644
--- a/macos.local/flake/home/scripts/core.nix.org
+++ b/macos.local/flake/home/scripts/core.nix.org
@@ -22,6 +22,10 @@ Import various scripts useful on my system.
executable = true;
source = ./manage-system;
};
+ "./.local/bin/yt-to-rss" = {
+ executable = true;
+ source = ./yt-to-rss;
+ };
};
}
#+end_src
diff --git a/macos.local/flake/home/scripts/yt-rss.sh b/macos.local/flake/home/scripts/yt-rss.sh
deleted file mode 100644
index 83be38d..0000000
--- a/macos.local/flake/home/scripts/yt-rss.sh
+++ /dev/null
@@ -1 +0,0 @@
-curl https://www.youtube.com/@CaptainKRB
diff --git a/macos.local/flake/home/scripts/yt-to-rss.org b/macos.local/flake/home/scripts/yt-to-rss.org
new file mode 100644
index 0000000..99d975a
--- /dev/null
+++ b/macos.local/flake/home/scripts/yt-to-rss.org
@@ -0,0 +1,8 @@
+#+title: YouTube Channel to RSS Link
+
+Quick script to get the RSS link for a YouTube channel so I don't have to visit the website.
+#+begin_src sh
+ #!/bin/sh
+
+ curl "$1" 2> /dev/null | pup 'link[title="RSS"] attr{href}'
+#+end_src
diff --git a/macos.local/flake/home/scripts/yt-to-rss.py b/macos.local/flake/home/scripts/yt-to-rss.py
deleted file mode 100644
index c442fb3..0000000
--- a/macos.local/flake/home/scripts/yt-to-rss.py
+++ /dev/null
@@ -1,12 +0,0 @@
-import requests
-from bs4 import BeautifulSoup
-import sys
-
-channel_link = sys.argv[1]
-
-response = requests.get(channel_link)
-soup = BeautifulSoup(response.content, "html.parser")
-rss_link = soup.find("link", title="RSS")
-rss_url = rss_link.get("href")
-
-print(rss_url)
diff --git a/macos.local/flake/home/scripts/yt-to-rss.py.org b/macos.local/flake/home/scripts/yt-to-rss.py.org
deleted file mode 100644
index 619c6dd..0000000
--- a/macos.local/flake/home/scripts/yt-to-rss.py.org
+++ /dev/null
@@ -1,19 +0,0 @@
-#+title: YouTube Channel to RSS Link
-
-Quick script to get the RSS link for a YouTube channel so I don't have to visit the website.
-
-#+begin_src python
- import requests
- from bs4 import BeautifulSoup
- import sys
-
- channel_link = sys.argv[1]
-
- response = requests.get(channel_link)
- soup = BeautifulSoup(response.content, "html.parser")
- rss_link = soup.find("link", title="RSS")
- rss_url = rss_link.get("href")
-
- print(rss_url)
-
-#+end_src