Additionally, note that if you run this script without modifying the logic, note that songs that have not been marked as loved will be lowered by a half-star rating. This is so that songs that were marked as loved will have an even rating, and songs that were not will have an odd one. This is possible because iTunes has 5 possible rating options and Strawberry has 10. If you do not want this behavior, please change it when you run it!
In case you need step-by-step directions to run it (Linux, not sure about mac or windows):
Download and install node.js Make a directory and CD into it Save this code into a .js file Export your iTunes Library.xml file and copy it into the folder (or somewhere nearby. You'll need to specify its path) Install dependencies: npm i plist better-sqlite3 file-url Edit the javascript file! Change all of the constants at the top to those that fit your needs. If those aren't right, it can lead to unexpected behavior. As I explained at the top of this post, make sure you like the rating conversion logic or change it if you don't Back up your strawberry database Run (node ./script.js) and hope this doesn't break your libraryFeel free to suggest edits / comments / concerns