I've created an extensible program that uses scriptlets to manipulate, and do work based on, MC fields. This allows you to select a set of files in MC, run the scriptlet, and have the new calculated values automatically stored back into one or more MC fields. Think of it like MC's expression language on steroids. It also allows you to perform additional actions based on values collected from the selected files.
The scriptlets are written in Perl, as is the main program pscriptor.pl. This means pscriptor.pl is cross-platform - it can be used on Windows, Mac OS X, or Linux. The Perl script can be written on the command line, or stored for later in a file (especially useful for more complex scripts).
I've included a some example scriptlets:
- sample scriptlets that explain how to code a scriptlet (simple and complex cases)
- get a music file's embedded cover art dimensions
- convert names in the form of Last, First into First Last
- uppercase the first letter of a name, except for those sub-names in an exception list
- swap values of the form role:Artist into Artist:role
- reports on fields with case differences
- creates m3u playlists from files in a view
- randomly fills Playback Range with a given range for true random track sampling
- acoustic fingerprint audio analysis for track detection and musicality information
- detect and retrieve dates from arbitrary fields
- copy the topmost field from an arbitrary grouping of files, and push it downward in the group
- copy and merge all the values in a field, removing duplicates
- provide a sequence of numbers
- make a random playlist of N files and start playback to a specified zone
- obtains a list of each file's full playlist paths
- test / verify a media file
- copy files with flexible folder and file names (including sequence #'s) and create M3U8 playlists
- makes particles and chapters from ripped Blu-ray discs with metadata lookups from ChapterDB.org
I'll add more samples as requested, the idea being that the body of scriptlets will increase over time. If you know Perl, you're free to experiment, create and share your own.
I've had the idea of doing this for a while, but was prompted by a request in
another thread. The problem in that thread was to globally reverse a list of role:Artist values to Artist:role. Since MC doesn't have global substitution with regular expressions, pscriptor.pl has been born of necessity to get the job done.
Download the attached zip file, and unzip the items to a folder (right-click > Extract All). See the README files inside the folder. Refer to the instructions inside. The instructions and descriptions that follow this post while perhaps useful will often be inaccurate as new releases or pscriptor are posted.
MC19 is required currently.
Here are a couple of quick screen movies showing it in action:
- - See the Demo movies at the download site in the Instructions