From bc4d708ea29b9a2119644e5327362d9f115449c2 Mon Sep 17 00:00:00 2001 From: dece Date: Sat, 1 Oct 2022 16:30:03 +0200 Subject: [PATCH] add check-pip-updates and convert-flacs-to-mp3 --- check-pip-updates.sh | 6 ++++++ convert-flacs-to-mp3.sh | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100755 check-pip-updates.sh create mode 100755 convert-flacs-to-mp3.sh diff --git a/check-pip-updates.sh b/check-pip-updates.sh new file mode 100755 index 0000000..7dd7483 --- /dev/null +++ b/check-pip-updates.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e +# Check available updates for manually installed Python packages. +table="$(pip list --user --outdated)" +echo "$table" +list="$(echo "$table" | tail -n +3 | awk '{print $1}' | tr '\n' ' ')" +echo "Update the all with: $ pip install -U $list" diff --git a/convert-flacs-to-mp3.sh b/convert-flacs-to-mp3.sh new file mode 100755 index 0000000..0fc0462 --- /dev/null +++ b/convert-flacs-to-mp3.sh @@ -0,0 +1,7 @@ +#!/bin/bash -ex +# Convert FLACs in a directory to MP3 files (V0, but configure it below). +# Requires fdfind and ffmpeg. +fdfind -t f -e flac . "$1" | while read -r flac; do + mp3="${flac/%flac/mp3}" + ffmpeg -i "$flac" -codec:a libmp3lame -q:a 0 "$mp3" && rm "$flac" +done