You are not logged in.
I want to convert a HTML file to RSS so I can watch for changes with newsboat. I hacked together a bash script that seems to work but I am unclear how I can get newsboat to consume it.
The script:
#!/bin/bash
target="https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/stable-review/"
mapfile -t items < <(lynx -dump -listonly "$target" | sed "s|.*$target||" | grep xz)
cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>stable review</title>
<link>$target</link>
<description>Stable review patches</description>
EOF
{
for i in "${items[@]}"; do
echo " <item>"
echo " <title>$i</title>"
echo " <link>$target$i</link>"
echo " </item>"
done
echo ' </channel>'
echo '</rss>'
}
My entry in ~/.newsboat/urls
filter:~/.newsboat/stable-review.sh:https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/stable-review
Seems to work as expected!
Last edited by graysky (2020-08-29 19:15:20)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
What line did you add to newsboat?
Last edited by progandy (2020-08-29 18:24:49)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
I figured out my error. I will edit the first post.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline