05-10-2022, 10:41 PM | #1 |
Human being with feelings
Join Date: Nov 2009
Posts: 2,232
|
exporting reascripts from 'export configuration'
i hope this is a legal posting. i made it originally in 'tips and tricks' but was afraid my questions were starting to become too linux-centric for other users so i'm starting again here.
over time i've made a mess of my reascripts collection and want to reorganize them. it seems that, if i open the preferences window and go to 'export configuration' and only select the 'reascripts' checkbox, reaper gathers all of my loaded the scripts and saves them to a '.ReaperConfigZip' file. over time i've acquired or written quite a number of scripts and not been good about keeping them well organized. i now want to correct that. to that end, i tried a test export of my reascripts. it seems to only have gathered the scripts that are in my ~./.config/REAPER folder, though. any scripts that i loaded into the actions window from other locations, like a subdirectory of my Documents or Downloads folders, do not seem to be included in the export. can anyone confirm this? also, is there an efficient way to isolate these externally located scripts in bulk so i could copy them and reload them from the proper location? is there a way to replace a loaded script with a copy from a new location? suggestions most welcome. thanks, babag thanks, babag |
05-10-2022, 11:21 PM | #2 |
Human being with feelings
Join Date: Mar 2015
Location: Mainland China
Posts: 157
|
I don't really use "export config" in REAPER anymore after I switch to Linux. And I keep backup my all "$HOME/.config" weekly. $HOME/.config/REAPER is a part of my backup plan. Or I just backup $HOME/.config/REAPER, I think it is the same as export config function.
If ReaScript files is outside of $HOME/.config/REAPER, I personally use Python to do things like manager file or replace script path. You can see all ReaScript path in $HOME/.config/REAPER/reaper-kb.ini, then you can manage them yourself. These are no build in function like "block outside script path" in REAPER. |
05-11-2022, 11:55 AM | #3 |
Human being with feelings
Join Date: Nov 2009
Posts: 2,232
|
thanks, wastee.
if you change a path in the kb.ini file, does that break anything, like custom actions that use the script as a component? also, what about renaming? i have a lot of scripts that were named before i had nearly as many scripts as i now do. now i'd like to set up a naming protocol and change the names of these scripts as well as their location. if i do a search and replace in the kb.ini file, will that break anything? i do realize that one has to be careful with such things. and that brings up a last question, is reverting as simple as keeping a backup, somethnig like 'reaper-kb.iniBAK' and replacing the ini with the BAK version? thanks, babag |
05-11-2022, 07:42 PM | #4 |
Human being with feelings
Join Date: Mar 2015
Location: Mainland China
Posts: 157
|
Hi babag.
Yes, you may break "reaper-kb.ini" file if you type wrong name or save as wrong encoding. Back up first is necessary. In common, I only change path name or file name in "reaper-kb.ini" file, and save as utf-8 encoding (by default), it's OK. IMPORTANT: Close REAPER before modify "reaper-kb.ini", back up it first. ---------- Reascript in Custom action is recorded by script's ID. For example, I load a Lua file outside REAPER config path in Main action list. "reaper-kb.ini" file will add a line like: Code:
SCR 4 0 RS7055d2f37ff4bcb8c17b82781025cc2b2fa6215b "Custom: 111.lua" /home/tee/temp/rs/111.lua Then a custom action contain this script (111.lua), in "reaper-kb.ini" shows like: Code:
ACT 0 0 "44a849a9579020e2dd5941a0e215cac8" "Custom: my combo action" _RS7055d2f37ff4bcb8c17b82781025cc2b2fa6215b _ and RS7055d2f37ff4bcb8c17b82781025cc2b2fa6215bSo, if you want to change Reascript's path or name, Custom actions will be fine. Custom action only looking for ID, no need to do anything to Custom actions. ---------- Yes, revert is easy. If you only modify "reaper-kb.ini" and want to revert it, just replace it with backup file. If you want to make sure everything is absolutely reverted, then back up the whole REAPER config path is good enough. ---------- In my workflow, I will make sure all script path + script name is exist. Then modify what I want and check them again. Last edited by wastee; 05-11-2022 at 07:47 PM. |
05-12-2022, 10:20 AM | #5 |
Human being with feelings
Join Date: Nov 2009
Posts: 2,232
|
thanks, wastee.
this looks familiar from some work i did a while back. i'll have to give it some thought. with hundreds of scripts to address, i'm thinking that a bash script using something like awk or sed might be a good way to go through the ini file making changes. something like: create holding folder for scripts being moved get script file and path from ini copy script file to holding folder change script file path in ini go to next file you'd have to add in things like making a backup ini file and a place for the user to put in the new path but it seems that, with a LOT of files, having it automated like this might be good. thanks again, babag |
Thread Tools | |
Display Modes | |
|
|