diff options
author | jjanzen <jjanzen@jjanzen.ca> | 2025-03-08 16:57:01 -0600 |
---|---|---|
committer | jjanzen <jjanzen@jjanzen.ca> | 2025-03-08 16:57:01 -0600 |
commit | 35e9245577f91692c575748c622c65d289519ce1 (patch) | |
tree | 4f97d5ecebd22f9c420f848885326b8d759d272c | |
parent | 96c0592f432198619ed5c55d6735e197724f6f18 (diff) |
system changes
-rw-r--r-- | macos.local/flake/home/scripts/core.nix.org | 4 | ||||
-rw-r--r-- | macos.local/flake/home/scripts/yt-rss.sh | 1 | ||||
-rw-r--r-- | macos.local/flake/home/scripts/yt-to-rss.org | 8 | ||||
-rw-r--r-- | macos.local/flake/home/scripts/yt-to-rss.py | 12 | ||||
-rw-r--r-- | macos.local/flake/home/scripts/yt-to-rss.py.org | 19 |
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 |