From 35e9245577f91692c575748c622c65d289519ce1 Mon Sep 17 00:00:00 2001 From: jjanzen Date: Sat, 8 Mar 2025 16:57:01 -0600 Subject: system changes --- macos.local/flake/home/scripts/core.nix.org | 4 ++++ macos.local/flake/home/scripts/yt-rss.sh | 1 - macos.local/flake/home/scripts/yt-to-rss.org | 8 ++++++++ macos.local/flake/home/scripts/yt-to-rss.py | 12 ------------ macos.local/flake/home/scripts/yt-to-rss.py.org | 19 ------------------- 5 files changed, 12 insertions(+), 32 deletions(-) delete mode 100644 macos.local/flake/home/scripts/yt-rss.sh create mode 100644 macos.local/flake/home/scripts/yt-to-rss.org delete mode 100644 macos.local/flake/home/scripts/yt-to-rss.py delete mode 100644 macos.local/flake/home/scripts/yt-to-rss.py.org 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 -- cgit v1.2.3