Lately, I've been thinking about a wrapper script for MPV that tries to find a copy of the video on disk before it lets MPV use yt-dlp to stream it. This would be used in conjunction with another program that grabs a list of articles in Newsboat with a specific tag to filter videos from non-videos. Videos marked unread are queued for download with yt-dlp if there isn't already a local copy. Videos marked unread are deleted if there is a local copy. I think this could be done by interacting with Newsboat's database directly, but that isn't preferable.
How does ybeuter work? Is the source available?
Lately, I've been thinking about a wrapper script for MPV that tries to find a copy of the video on disk before it lets MPV use yt-dlp to stream it. This would be used in conjunction with another program that grabs a list of articles in Newsboat with a specific tag to filter videos from non-videos.
Videos marked unread are queued for download with yt-dlp if there isn't already a local copy. Videos marked read are deleted if there is a local copy. I think this could be done by interacting with Newsboat's database directly, but that isn't preferable.
How does ybeuter work? Is the source available?
Lately, I've been thinking about a wrapper script for MPV that tries to find a copy of the video on disk before it lets MPV use yt-dlp to stream it. This would be used in conjunction with another program that grabs a list of articles in Newsboat with a specific tag to filter videos from non-videos. Videos marked unread are queued for download with yt-dlp if there isn't already a local copy. Videos marked read are deleted if there is a local copy. I think this could be done by interacting with Newsboat's database directly, but that isn't preferable.
How does ybeuter work? Is the source available?
I'll bet it's nice to have an offline copy of your videos. I've been thinking about a program that interfaces with Newsboat's database directly, getting the URLs of all unread articles with a specific tag.
When it runs, it would queue new videos for download with yt-dlp and delete any videos in the cache directory that I've marked read in Newsboat. From there, I'd just need a wrapper script to look for the video in the local cache before letting MPV stream it.
I was working on a prototype of this system a few weeks ago, but my implementation was just too hacky and I got sidetracked.
Also, what program are you using for the syntax highlighting in the article? I've been thinking of doing that for my site.
When starting
ybeuter
, it actually enqueues all non-downloaded entries automatically. So I just have to press s
to start downloading. But at the moment I usually just dequeue all and reenqueue a few selected ones, because there are so many entries. :-/I bet a program to get all URLs from unread articles out of _~/.newsboat/cache.db_ would be super simple. The only thing is, lately I do not want to watch all videos anymore, so this would leave me with a bunch of wasted traffic and disk space. So I don't mind the extra manual work. Sounds like you're not as picky or have a better set of channels to follow. :-) Launching MPV would also happen from within Newsboat, right? Otherwise marking articles as read becomes cumbersome I imagine, when the matching article needs to be found in the article list first. This program, that downloads all required videos found in Newsboat's SQLite database and removes them once marked read, that would be a cronjob? No user interaction required, did I get this right? Sounds like a cool idea.
For syntax highlighting I used Kate. Just selected the appropriate language and then exported to HTML. It works well, but requires a bit of clicking around in Kate and copying over into Vim. That's exactly what I have already done 15 years ago. For your use case, where you publish articles regularly, something scriptable like Pygments might be better suited, though._~
After I update my feeds, I do a lot of manual filtering, marking videos I don't want to watch as read. This would stop the cache system from downloading or storing videos I don't want to watch.
> This program, that downloads all required videos found in Newsboat’s SQLite database and removes them once marked read, that would be a cronjob? No user interaction required, did I get this right?
It could definitely be a cron job, but I think I'd rather have it as a hotkey in my window manager. That way, I could run a video cache update after I'm done marking unwanted videos as read. Other than that, there would be no interaction required.
ybeuter
also easily interfacable with other input sources. Like when getting a video suggestion by IRC, e-mail or whatever. But I actually never got that far. Atom feeds are just by large THE biggest ingestion source.