You are not logged in.

#1 2020-08-29 18:16:21

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,098
Website

Unable to get newsboat to read a local RSS file [SOLVED]

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 packagesZsh and other configs

Offline

#2 2020-08-29 18:24:25

progandy
Member
Registered: 2012-05-17
Posts: 3,874

Re: Unable to get newsboat to read a local RSS file [SOLVED]

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

#3 2020-08-29 18:36:23

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,098
Website

Re: Unable to get newsboat to read a local RSS file [SOLVED]

I figured out my error.  I will edit the first post.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB