Episode: 4644
Title: Response to comments on HPR4424: Newsboat...
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr4644/hpr4644.mp3
Transcribed: 2026-07-31 16:15:50 (official HPR transcript)

---

This is Hacker Public Radio Episode 4644, for 2026-05-21
Today's show is entitled, "Response to comments on HPR4424: Newsboat.."
The host is Archer72 and the duration is 00:07:08
The flag is Clean, and the license is CC-BY-SA
The summary is "Archer72 shares a fix to the Newsboat question about 'ccdn.php'"
Hi, this is your host Archer 72 for Hacker Public Radio.
In this episode I share some of my findings about a problem with newsboat naming of the
HPR feeds, which is brought up in comments about my show HPR 4424 regarding newsboat
and Reddit.
I already had some findings of his own about the CCDN.Phb extension in the feed.
I thought that this might be able to be fixed on an individual basis and I set up to ask
Cloud the AI a few questions.
But first, some collaboration from Dave Morris about a good renaming format.
This was definitely more on Dave's side than mine, but came up with this and I'll leave
the script in the show notes.
You can tell Dave's handy work from the short variable names, which stem from his extensive
experience on Unix type machines and university days.
All I or so I thought he said he just likes to keep his file, he said he just likes to keep
his variable short to save on typing.
At first, the question was about something simple.
The input was Aquarian, one of the lines from Kevin's HPR 4398 command line fund downloading
a podcast, particularly the section on how to get the latest episode of Touch Jam, which
is a WGET in curl command, which I rewrote to a WGET with adding the flag dash NC, which
is for no clobber, just in case the podcast is already downloaded and HP for where you want
to put the podcast in which directory.
The reason for the dollar sign and open and close parentheses instead of the backtick,
to enclose a command was the former was being deprecated in GNU bash reference manual 3.5.4 command
substitution.
On the next query, I went in a different direction than downloading Touch Jam and asked
to download the last two HPR shows, but head minus two did not work as expected, it turned
out to be an issue with placement of Xars, joining all URLs and passing them to WGET
all at once, and then I'll show the original and the rewritten one from Cloud in the show notes.
The key fixes in Cloud Code were to remove the premature Xars before head minus two, so I had to
actually limits the list to two URLs. Moving Xars, WGET to the end after the list is already trimmed,
and the other fix was to clean up the HTTPS, the Astrix to HTTP, HTTPS,
question mark, the original would also match HTTPS, SSS, et cetera.
Now I wanted the downloaded file to go to the Q file located until the slash.local slash share slash
newsboat slash Q. After several iterations in Cloud, it was determined that the audio of
URL was not being expanded by the percent you in the download macro. The solution was to add
slash temp file to hold the actual audio URL, and then the next is what I got help writing a macro,
and it's set the browser macro D, which is using your comma and then D, and set browser echo D,
percent you to slash temp slash HPR URL, TXT, double ampersand,
tilde slash bin slash download and rename HPR, dash Dave, open in browser, set browser to your normal
browser. A few Cloud questions later after asking to add a function to the macro in order to add
the resulting downloaded file to the Q, the file name HPR1234 was being added to the Q instead of
the rename file. The next thing from Cloud was two things to fix, the rename file,
the rename file isn't being found because LS-T runs before the rename has fully settled,
or the glob isn't matching the new file name format, which includes spaces and semicolons.
The other thing to fix is that the existing Q entry show the correct format
in the form, in quotes URL, and in quotes path downloaded, we need to match that with downloaded
status and full rename path including extension and the Cloud comment. I'll include in the show
notes the resulting rename script. The key point in the new rename script is using comma minus 13
spelled COMM minus 13 on sorted before after file list, which is a more reliable than using
LS-T, it finds exactly which file is new regardless of timing. Check slash temp slash HPRD bug log
after the next run to see what downloaded and renamed show, and the information about using
comma dash 13 is in the GNU Core Utils comma invocation. If I use the leader key, which is the comma
and lowercase D, then the podcast will be downloaded and renamed automatically to the correct format.
Well that's all I have. I'm going to put the Cloud conversation on archive.org and link to it from
the show notes. That's all I have. I hope this helps on the newsbook question that was brought
up in the comments for my previous show. Bye bye.
You have been listening to the Hacker Public Radio podcast, at hackerpublicradio.org.
Today's show was contributed by a HPR listener like yourself.
If you ever thought of recording a podcast, then visit the HPR site to find out how easy it really is.
Hosting for HPR has been kindly provided by anhonesthost.com, the Internet Archive, rsync.net, and the HPR Community Content Delivery Network.
Unless otherwise stated, today's show is released under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.
