While I obviously prefer my approach for my use case. There are a few other projects that I found while trying to figure out if I really had to write my own program to do this. My use case is a Raspberry Pi 3 that already has limited memory. While a Raspberry Pi is surprisingly fast for what it is, it is quite slow.
One of these projects might be better suited to your use case, so I'm sharing what I've found.
iTunes Export home page
This is stable software and includes a number of useful features like support for playlist output formats: .wpl, .zpl and .mpl in addition to .m3u.
For my purposes, the command-line version runs under Java. A Raspberry Pi 3 can do this, but it requires a fairly large footprint on such a slim device.
I was able to reach the author via Twitter, who suggested that the Kodi forums is the only web page where the software was released.
This is a .NET executable, so should work under Mono. As with Java, Mono is a fairly large footprint for such a slim device.
reapPlaylist.ooc github Gist
I saw this twice before writing my program, but I didn't know what the OOC language was. This runs and could be batched to pull one playlist at a time.
I am relatively sure that this would work, though because it has to re-read the iTunes XML file for each run, it would definitely be a bit slower for more than one playlist. Also, now that I have written mine, I'm way to lazy to install an OOC implementation to test it.
batchexportplaylists home page.
This is an applet that runs on macOS along-side of iTunes.
This is the furthest from meeting my needs, as it won't run on Raspberry Pi. It is included here for completeness.
I think this does the export, but in French and only interactively. I can't read the descriptions, but the export code is entirely written in the VB form.
I can't tell for sure if this would do what I expect. Visual Basic, so again, the executable MIGHT run in Mono, but seems unsuitable for a Pi 3.
iTunesXMLtoM3U github page.
Doesn't do what I want.
Let me know what I'm missing here, I'll add your favorite project too.