Skip to content

Instantly share code, notes, and snippets.

View jmatthewturner's full-sized avatar

Jim Turner jmatthewturner

View GitHub Profile
@jmatthewturner
jmatthewturner / kenwood.sh
Last active May 29, 2025 17:59
BASH script to conform MP3 artwork to make the Kenwood Excelon series head units happy
#!/bin/bash
# This script will iterate through a folder and conform the artwork for any MP3s to a standard that is pleasing
# to the Kenwood Excelon series of car audio head units. It assumes all files in the folder are from the same album.
# (Note that this has been tested on a Kenwood Excelon DMX809S, but I assume this will work for all Excelon products.)
#
# This script will look for cover art contained in the folder first. If none is found, it will attempt to extract embedded
# artwork from the alphabetically first MP3.
#
# As far as I can tell, these are the criteria for the Kenwood Excelon to display album artwork:
@jmatthewturner
jmatthewturner / prefix.sh
Last active May 29, 2025 17:58
BASH script for batch renaming FLAC/MP3 files with a given prefix
#!/bin/bash
# This script was written entirely by Claude.ai, with prompts by jmatthewturner.
# It does what I need well enough, so I'm not taking the time to refine it.
# But I still wanted to share in case anyone else finds it useful.
#
# It's purpose is to batch rename a group of music files, as part of a larger
# project to get a Kenwood Excelon head unit working properly with USB MP3s.
# Details of the larger project are here:
# https://jmatthewturner.wordpress.com/2025/05/29/usb-mp3-functionality-on-kenwood-excelon-head-units/
@jmatthewturner
jmatthewturner / id3_fix.sh
Last active May 29, 2025 17:58
BASH script for stripping hidden fields from id3 tags.
#!/bin/bash
# This script was written entirely by Claude.ai, with prompts by jmatthewturner.
# It does what I need well enough, so I'm not taking the time to refine it.
# But I still wanted to share in case anyone else finds it useful.
#
# It's purpose is to strip hidden fields from id3 tags, as part of a larger
# project to get a Kenwood Excelon head unit working properly with USB MP3s.
# Details of the larger project are here:
# https://jmatthewturner.wordpress.com/2025/05/29/usb-mp3-functionality-on-kenwood-excelon-head-units/
@jmatthewturner
jmatthewturner / transcode.sh
Last active May 29, 2025 15:51
Bash Script for using FFMPEG to Transcode Video for DaVinci Resolve or Lightworks
#!/bin/bash
# This script uses ffmpeg to transcode video files into one of a few formats suitable for
# editing in either DaVinci Resolve or Lightworks on a Linux machine. It's purpose is to
# simplify my life and relieve me from having to look up and enter the same very long
# command over and over.
#
# If run with argument "all", the script will prompt for a directory containing video files, and
# transcode all video files in the directory into the selected format. If run with a file as an
# argument, it will transcode only that file, and will provide the additional option of
#!/bin/bash
# PLEASE NOTE: I started learning Bash scripting 4 weeks ago, so if this somehow
# breaks your system and opens a wormhole to the Gamma Quadrant,
# I'm sorry.
#
# This is a setup script for Debian-based computers. It is highly customized
# for my personal use; I made it public because I think it could be a good
# starting point for someone else. It will need to be customized for anyone
# else's use.
@jmatthewturner
jmatthewturner / graphics.sh
Last active January 15, 2021 04:06
Bash Script for Switching Graphics Modes on System 76 Oryx Pro
#!/bin/bash
# This is a script for switching between Intel and NVIDIA graphics modes
# on System 76 Oryx Pros. It was written because I installed KDE Plasma,
# thereby losing the graphics-switching functionality built into Gnome.
# But it should work just fine under Gnome, as well, if you're into that.
#
# It uses a modified version of Dave Miller's excellent ask.sh script,
# which can be found here:
# https://gist.github.com/davejamesmiller/1965569
@jmatthewturner
jmatthewturner / colors.sh
Last active August 25, 2019 11:39
Color Definitions for Bash Scripting
#!/bin/bash
# This is a script that defines a list of basic colors for use with
# text formatting in other scripts. It does not cover all possible colors,
# but it's a solid starting point.
#
# Usage: include this line at the top of any script that uses these colors:
# source [path to script]/colors.sh
# Then format like this:
# echo -e "This color is ${GREEN}green${RESET}."