Scripting Emulator/Validator/Tester?

Tags: #<Tag:0x00007f510b840220> #<Tag:0x00007f510b840130>

Is there some sort of tool (or method) for testing out file naming scripts?

I currently have a fairly nice renaming script that I cobbled together from bits and pieces of code found on these forums. I want to add tweaks to deal with edge cases, but to do so means editing the actual code from the Config screen. I have it saved to text file as backup, but I’d rather not have to modify the actual configuration just to test and debug some new code.

Does something like this exist or is there a method that folks use when coding scripts?

I’m on macOS Catalina with Picard 2.5.6.

The simplest test is to just make some duplicates of your own files. If you test on your own duplicates then you can pick test examples that best fit the code you need to test.

That also lets you make up your own fake test data by manually changing tags in the test files to trigger your edge cases.

I have suggested that we make the current and proposed path & filename visible in the metadata list.

That would help with this a lot I think.

2 Likes

It’s not the music files that I am concerned with. I have a directory of some random albums with intentionally incorrect tags applied to make sure that my scripting works.

The issue I am having is that I don’t have a way to test out new file naming scripts without editing the live configuration. To test things out, I need to copy the script I have to a text file to back it up, then replace it with my new code to test things out. If all works, I then have to reintegrate my original code to see if everything worked as expected. It’s these potentially confusing steps I am trying to avoid.

To put it another way, a tool like Regex101 would be ideal to try out new code without having to tamper with existing code especially when you just want to try something out

That’s a good suggestion, but not related to my question.

I’m interested in some sort of tool like a script validator, or debug environment or even input/output to/from stdio so I can “see” what the variables contain as the program is executed. There are some variables like _multiartist (boolean) that are not tags so it becomes difficult to troubleshoot a malfunctioning script.

I also want to do this in a way that doesn’t require me to edit my current config.

There is a plugin which enables you to see hidden metadata values.

1 Like

Thanks for this. The View Script Variables plug-in is an excellent tool, but unfortunately, that one variable that I need, _multiartist (found in the Basic Variables), is not provided. :slightly_frowning_face: