From dfb9d18aa3d7b14c87d238bcb78bd2b1cf5b244c Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Fri, 22 Jan 2021 16:29:25 +0100 Subject: [PATCH] Add a class ID migration script for REAPER --- tools/migration/README.md | 5 +- tools/migration/migrate-reaper.py | 104 ++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletion(-) create mode 100755 tools/migration/migrate-reaper.py diff --git a/tools/migration/README.md b/tools/migration/README.md index 7ea4bf45..786dfd9d 100644 --- a/tools/migration/README.md +++ b/tools/migration/README.md @@ -11,4 +11,7 @@ before that commit will no longer be compatible. As a temporary migration path, there are a few scripts here that you can use to convert old project files to the new format. -TODO: Document further once we add the actual scripts +These scripts won't overwrite any existing files, but remember to always make +more backups than you really need! + +TODO: Document further once we finish the Bitwig, Ardour and Renoise scripts diff --git a/tools/migration/migrate-reaper.py b/tools/migration/migrate-reaper.py new file mode 100755 index 00000000..9f04e3f4 --- /dev/null +++ b/tools/migration/migrate-reaper.py @@ -0,0 +1,104 @@ +#!/usr/bin/env python3 + +import argparse +import os +import re +import textwrap + + +# Yes, you shouldn't try to parse these kinds of things with regular +# expressions. But writing a proper parser takes effort, and this approach will +# catch all VST3 plugins just fine even if the developer somehow included +# quotes in their vendor or plugin names. This regexp will find VST3 plugins in +# a .RPP file and capture its name and class ID. +REAPER_VST3_RE = re.compile(rb'