• Original Version: July 21, 2022
  • Most Recent Version (3.0): September 11, 2023

Click the button above to view the project on Github. Below is some background info on the bot. Taken from the “README.md” file in the repo.

I created this program as a way to trim the info files that come with many concert tapes and bootlegs (the kind traded around on sites like etree, lossless legs, and the like). These trimmed files can then be used with a program like MP3Tag to tag the audio files with proper song titles. When you download a show, it usually comes with a info file like this:

Grateful Dead
Jai-Alai Fronton
Miami, FL
June 22, 1974

...

*Matrix* 

----------------------------------------------------
SBD (shnid=90200): 

Recording Info:
SBD -> Master Reel -> Cassette -> Dat -> CD

...

Set I
-----
d1t01 - Tuning
d1t02 - Promised Land ->
d1t03 - Bertha ->
d1t04 - Greatest Story Ever Told

It contains all the info on the tape you just downloaded, the lineage of the various tapes involved, and a tracklist. Now, for most people, the tracklist is the only important info in the info file (along with the artist, date, and venue). The rest means nothing. So I created a script to trim all that info out and just leave the tracklist.

Well, I created a few actually. The first was a collection of sed commands to extract the tracklist from the info file. It worked, but it was only a shell script, and while it would output to a txt file, it needed to create temporary files first to complete all the sed commands (it wouldn’t work for me without these). Also, no file picker support. It would only work with files named “info.txt”, and would only work in the folder the script file was in. Unless a filepath was supplied manually, but this isn’t super user friendly unless you know bash scripting.

So, to the drawing board it was. I had to find a method to create this program, that would also be able to do everything the bash script did plus anything extra. The bulk of the script relies on regular expressions (REGEX), so whatever language I chose needed to be able to use that.

I have experience in a few programming languages, and while these languages have functions to match regex, none of them are able to output the matches (note from future me, yes some of them can) just a boolean flag for true or false (it either matches or doesn’t match). Another feature I wanted is a file picker, which would open a windows explorer dialog to pick files (which is much easier than the shell script). Java has one but its pretty bad, imagine something like this. Kinda like the file choosers in linux.

image

While this would make it crossplatform, it is again pretty user unfriendly. You’d have to manually navigate to the path of the txt file, which if you store tapes on an external drive and several folders deep, it’s a huge pain.

So, it left me with learning Powershell. Which supports native file choosers, and regex matching and outputting. So that crosses off the two checkboxes. Much of the code was found from searching around the internet on how to get several features I wanted implemented in PS. Much was from Microsofts documentation, but I used this to fix an issue with Windows not liking paths with hard brackets in them.

In this repo is the Powershell script, and an EXE which is the script compiled into an executable file using PS2EXE. One small issue I’ve found is that if you have Powertoys installed, an error will pop up with the enhanced file preview PT includes with it. This might stop the program from proceeding, but closing and opening again fixes that. It won’t stop the code from running to my knowledge.

This script works with basically every kind of info file I have thrown at it. It might match some extraneous lines, which can be removed manually, since I don’t know of a way to trim those out without impacting the tracklist.

Script works with most files that i’ve tested. I’m going through my show collection and any needed fixes are added as I go. Can’t catch everything and some things might need manual editing, but it works no issue on most things.