this post was submitted on 18 Mar 2024
1 points (66.7% liked)

Skate Park

82 readers
3 users here now

So it goes that if one were to learn a kick flip alone it would take much longer than if they went to the skate park.

This community is for asking questions, sharing recommendations and experiences, and helping each other figure things out and get stuff done.

founded 1 year ago
MODERATORS
1
newsboat + yt-dlp (board.minimally.online)
submitted 3 months ago* (last edited 3 months ago) by [email protected] to c/[email protected]
 

This line in ~/.newsboat/config will allow for hitting ",d" to download the current link with dl.sh which wraps yt-dlp.

macro d set browser "~/bin/dl.sh %u 2>&1 >/dev/null &" ; open-in-browser ; set browser "xdg-open %u"

Here's an example dl.sh file that uses notify-send so you know something is going to happen in the background and as a chance to cancel the operation. It downloads videos to ~/Videos/Downloads. Modify to taste!

#!/bin/bash
if [[ "no" != $(notify-send --app-name="yt-dlp" \
                            --urgency=low \
                            --transient "Starting download for $1" \
                            --action=no="Nevermind!") ]]; then
  yt-dlp --sponsorblock-remove all \
         --live-from-start \
         --output "~/Videos/Downloads/%(title)s - %(channel)s (%(id)s).%(ext)s" "$1"
  else
    printf "Aborted.\n"
    exit 1
fi

NOTE: if you close newsboat it will also stop the yt-dlp process.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here