Skip to content

Instantly share code, notes, and snippets.

@chris-peterson
Last active October 13, 2022 00:11
Show Gist options
  • Save chris-peterson/33d46ae51cbe8eedaa66d3eb31a0c89a to your computer and use it in GitHub Desktop.
Save chris-peterson/33d46ae51cbe8eedaa66d3eb31a0c89a to your computer and use it in GitHub Desktop.
openaudible-rename

Overview

OpenAudible is great for taking control over your audible library.

A missing feature (in their backlog) is to customize output filenames. This gist is a script to support different filename formats.

# library can be exported from File -> Export Book List
Get-Content -Raw ./books.json | ConvertFrom-Json
$Books = ./1-load-library.ps1
Set-Location ~/Library/OpenAudible/books
Get-ChildItem -Filter '*.mp3' | ForEach-Object {
$Books | Where-Object filename -eq $_.BaseName
} | ForEach-Object {
"{0} ({1})" -f $_.filename, $_.author
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment