0
9
bradfrank

@programming.dev

bradfrank 12 points a year ago

“We have pride flag at home”

I love this so much.

path: 0 17427492, hotness: undefined, score: 12, children: 0
bradfrank 9 points a year ago

I do something very similar. Thanks for sharing cause there's always something to learn by seeing how someone else solved a problem. I'll share mine here too if that's cool:

#!/usr/bin/env bash

music() {
  case $(uname -s) in
    Darwin)
      yt-dlp --format bestaudio --extract-audio --audio-format mp3 \
        --postprocessor-args "-strict experimental" "$1" ;;
    Linux)
      yt-dlp --format bestaudio --extract-audio --audio-format mp3 "$1" ;;
  esac
}

video() {
  yt-dlp \
    --format "bestvideo+bestaudio[ext=m4a]/bestvideo+bestaudio/best" \
    --merge-output-format mp4 \
    -o "%(title)s.%(ext)s" "$1"
}

while getopts ':hm:v:' flag; do
  case "$flag" in
    h) echo "Usage: youtube [-m(usic) <url> | -v(ideo) <url>]" ; exit 0 ;;
    m) music "$OPTARG" ;;
    v) video "$OPTARG" ;;
    *) echo "Invalid argument." >&2 ; exit 1 ;;
  esac
done
path: 0 17508441, hotness: undefined, score: 9, children: 1
bradfrank 8 points a year ago

Depending on how accurate you’re remembering, could be Johnny Mnemonic.

path: 0 19895399, hotness: undefined, score: 8, children: 0
bradfrank 7 points a month ago

April? Paris?

path: 0 25760942 25764363 25766315 25774633, hotness: undefined, score: 7, children: 0
bradfrank 6 points a year ago

Seriously, what a PITA it would be to do this every 6 months (assuming you don’t use a LTS). I looked at this script and just decided to go with Debian.

path: 0 17502792 17506018, hotness: undefined, score: 6, children: 0
bradfrank 4 points a year ago

I thought she was pouring out the bucket water in the tea, and this was some kind of dark commentary.

path: 0 19757541, hotness: undefined, score: 4, children: 0
bradfrank 4 points a year ago

I thought for a few moments that Wired refreshed their feeds or something and I was seeing weeks worth of AI news. Nope. WTF Wired. Someone pop this balloon already I’m so tired of it.

path: 0 20171661, hotness: undefined, score: 4, children: 0
bradfrank 4 points a year ago path: 0 17331448, hotness: undefined, score: 4, children: 0
bradfrank 3 points a year ago

I wish I had more than just internet points to award you. This was beautiful.

path: 0 18670177 18670356 18671931 18702941, hotness: undefined, score: 3, children: 0

thanks for using Leebra!

go to feed...