Software Engineering in WordPress, PHP, and Backend Development

Category: Projects (Page 2 of 33)

Posts introducing, updating, and covering various projects to which I’ve contributed or that I maintain.

Fetch Album Artwork for Apple Music Playlists

TL;DR: I often create playlists for entire albums within my Apple Music library. This means that if an artist releases an album, I’ll still add it to my library, but I like to have a playlist of just that album. Unfortunately, Apple Music doesn’t use the album’s artwork as the image for the playlist.

So I wrote a Python script to fetch album artwork for Apple Music playlists when given an artist and an album. This makes it a little bit easier to make sure album playlists have better looking artwork.


Fetch Album Artwork for Apple Music

Whenever we create playlists within the current version of Apple Music, it gives us the ability to create playlist art that seems to be inspired by the Microsoft WordArt of decades past.

It’s certainly a choice. And for whatever reason, Apple Music doesn’t default to the album artwork for the album in the playlist if it’s just a single album.

Apple Music does allow us to add custom artwork, though. So if I want to add the album artwork for a given album in a playlist, then I can search the web for a high-resolution image and drop it into the editor for the playlist.

Perhaps a better option, though, is to grab the image artwork from the iTunes API. So I wrote a Python script that makes it trivially easy.

After it’s installed, all you need to do is issue the following in your terminal:

$ python fetch-album-art.py --artist="Pink Floyd" --album="The Dark Side of the Moon"

This will grab a high-resolution image of The Dark Side of the Moon and drop it into the script’s directory after which you can add it to Apple Music.

Future State

Assuming Apple doesn’t actually address this in a future version of Apple Music (which, if history is any indication, happens with each official macOS update), then this is something that’ll prove useful [at least for me] for the next little while.

That said, I’d still like to find ways to enhance the functionality so:

  • album artwork is added to its own directory,
  • considering combing through an Apple Music playlist library to determine what albums don’t have artwork (this is subject to the limitation of the API, obviously),
  • provide better visual feedback when the script is searching and downloading the album artwork,
  • and small tweaks like that.

Given that it’s a hobby project, though, it’s one of those that’s subject to the whims of when I want to work on it.

For now, though, this is still one step better than having to find an image via a web browser, download it, then drag it into Apple Music.

Dracula Theme for Preformatted WordPress Blocks

When working on the articles for the Backend Engineer Learns to Build Block Editor Blocks series, I wasn’t happy with how the code samples were looking within the articles.

Previously, I’ve written – here and here – about my being a fan of the work done by Zeno Rocha in the Dracula Theme. Ideally, I wanted to be able to have the color scheme of the code in my articles match the theme. Something like a Dracula Theme for WordPress Blocks.

That’s when I found highlight.js and a Dracula theme for it. So I wrote a small plugin for WordPress that works with the existing Preformatted block and changes the color scheme to match that of Dracula.

I call it WP Dracula Highlight.js or, more simply, Dracula Highlight.

Continue reading

WP Plugin Scaffold: Easily Start a Composer-based WordPress Plugin

TL;DR: The WP Plugin Scaffold repository contains a a very basic set of files that are needed to spin up a Composer-based WordPress Plugin.


Over the years, I’ve written or contributed to a number of different projects that have been aimed at making WordPress plugin development easier. At this point, there are a variety of ways people are creating WordPress plugins such that there isn’t really a way to create a boilerplate to capture all of them.

So I’m not aiming to do that.

But over the last few months (or maybe a year?), I’ve been working with the same structure for creating plugins. It normally grows into something larger based on if I’m taking an object-oriented approach or a procedural approach. It also changes based on how large the plugin is, what its purpose is, who is going to use it, or how it’s going to be used.

To that end, I’ve ended up with a very basic set of files that every project incorporates regardless of the size.

As such, I thought I’d share it.

Continue reading

Building Backcast: Hit Pause

On the whole, writing a post about other posts – aside being very meta – isn’t something I’m fond of doing.

But here I am.

At the beginning of this year, I started working on a podcast backup utility called Backcast and I’ve been documenting the project throughout the year in a series of posts.

But given that I was making steady progress on this and given that it’s something I want to continue working on since it’s something I have use for, it seemed worth commenting on it if for no other reason than posterity.

Continue reading

Building Backcast, Part 6

TL;DR: I’m tired of writing code without consistent standards (I often work on code that changes between WordPress or PSR2) so this is how I installed PHP Coding Standards via Composer and a few extra extensions for the project. This also details how to automatically format the code on save.

Continue reading
« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑