Go Back   Cockos Incorporated Forums > REAPER Forums > Dstruct's Casa De Nitpicks

Reply
 
Thread Tools Display Modes
Old 07-22-2021, 11:11 PM   #81
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

So, it is similar to this:


Quote:
Originally Posted by Phazma View Post
I would actually prefer that over the workaround of a custom save action as proposed by amagalma.
This can be done too, and be light-weight but I personally do not like having too many deferred scripts running...
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-22-2021, 11:14 PM   #82
Phazma
Human being with feelings
 
Join Date: Jun 2019
Posts: 2,872
Default

Quote:
Originally Posted by X-Raym View Post
@Phazma
It is not a defered script cause this would be less efficient (it would run 30 time per second and check files which is "slow"). It is just a script action to put on CTRL+S shortcut, which wrapes the usual save action.
Ah ok, I understand, so pretty similar to amagalma in that regard. I figured it might be faster than delete a lot of backups at once (I have them each minute and sometimes work for an hour without saving).
Phazma is online now   Reply With Quote
Old 07-22-2021, 11:17 PM   #83
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Quote:
Originally Posted by Phazma View Post
...might be faster than delete a lot of backups at once (I have them each minute and sometimes work for an hour without saving).

Deleting a few hundreds backups does not take more than a few milliseconds on an SSD...
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-22-2021, 11:24 PM   #84
Phazma
Human being with feelings
 
Join Date: Jun 2019
Posts: 2,872
Default

Quote:
Originally Posted by amagalma View Post
Deleting a few hundreds backups does not take more than a few milliseconds on an SSD...
Ok, I indeed have them on SSD. Just will keep workig with your action hoping there won’t be unexpected issues
Phazma is online now   Reply With Quote
Old 07-22-2021, 11:33 PM   #85
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

The name matching in the script is very strict, so do not worry at all about loosing something that you would like to keep
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-23-2021, 12:23 AM   #86
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

The main diff with amagalma version is that amagalma version can be run without saving, but can be wrapped in custom action.
X-Raym is offline   Reply With Quote
Old 07-23-2021, 03:45 AM   #87
Phazma
Human being with feelings
 
Join Date: Jun 2019
Posts: 2,872
Default

Ok I think for now I will keep using amagalma's version then, since I have already set it up.

Yet I hope there will be a native implementation soon as I'd like to have it work in a way that Reaper currently doesn't allow and a script probably can't work around Reaper's limitations.
Phazma is online now   Reply With Quote
Old 07-23-2021, 05:00 AM   #88
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Well, I released my script!


https://forum.cockos.com/showpost.ph...2&postcount=83


See you in this thread if you need to talk about it :P


I leave this one for amagalma approach


Cheers !
X-Raym is offline   Reply With Quote
Old 07-23-2021, 05:09 AM   #89
Phazma
Human being with feelings
 
Join Date: Jun 2019
Posts: 2,872
Default

Thanks for sharing it X-Raym. I think many people who missed out on this thread will be happy to discover a solution in the FR thread. I will compare both scripts and see which one I find more useful.

Also good idea to have both threads dedicated to one of the approaches so there is no confusion with mixed up information.

I think we all agree that despite having these scripts a native implementation is still an important thing that should absolutely happen but I want to thank you both for the effort and for coming up with a useful solution that will work until the devs decide to address this!
Phazma is online now   Reply With Quote
Old 07-23-2021, 07:24 AM   #90
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
Default

After running Script: amagalma_Keep x number of most recent timestamped backups of current project file (deletes older ones - no undo!).lua

with
local files_to_keep = 5

__________________
Track Freezing Scripts

Coachz Repo
Coachz is offline   Reply With Quote
Old 07-23-2021, 07:43 AM   #91
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-23-2021, 07:52 AM   #92
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
Default

hmm, it seems the script resets on updates. That's troubling because when I sync packages I'll have to really focus to make sure when I get a new update I'll have to go edit it back to false. yes ?
__________________
Track Freezing Scripts

Coachz Repo
Coachz is offline   Reply With Quote
Old 07-23-2021, 10:18 AM   #93
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

The current is the final version, so you don't have to worry any more
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-24-2021, 12:56 PM   #94
JonLinnarson
Human being with feelings
 
JonLinnarson's Avatar
 
Join Date: Jul 2020
Posts: 724
Default

Quote:
Originally Posted by amagalma View Post
To whom may find it useful:

Keep x number of most recent timestamped backups of current project file (deletes older ones - no undo!)

Scans the current project directory (and all its sub-directories) for backups (.rpp-bak) of the current project. Keeps the set number of backups and deletes all older ones. Action cannot be undone.

- Number of backups to keep is set inside the script (default=5)
- Keeps one backup per different date no matter what
- Works with timestamped backups only
- Can be combined with Save action (40026) into a custom action, so that it tides things up each time you save.**
- Requires JS_ReaScriptAPI


in ReaPack

**
Love the idea of this script, but it doesn't work for me. I think it has to do with the fact that I keep all of my auto-backups in a separate folder on a external drive. Is there some lines I can change to make it work even though the backups aren't saved to the project folder?
JonLinnarson is offline   Reply With Quote
Old 07-24-2021, 01:46 PM   #95
Sound asleep
Human being with feelings
 
Sound asleep's Avatar
 
Join Date: Nov 2009
Location: Montreal, Canada
Posts: 9,048
Default

Sounds promising. How does this work exacty?
Sound asleep is offline   Reply With Quote
Old 07-24-2021, 01:58 PM   #96
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
Default

Delete all your backups and keeps X number of your most recent backups as set in the script file
__________________
Track Freezing Scripts

Coachz Repo
Coachz is offline   Reply With Quote
Old 07-25-2021, 07:25 AM   #97
Sound asleep
Human being with feelings
 
Sound asleep's Avatar
 
Join Date: Nov 2009
Location: Montreal, Canada
Posts: 9,048
Default

Quote:
Originally Posted by Coachz View Post
Delete all your backups and keeps X number of your most recent backups as set in the script file
Right, but what triggers it? How does it look for backups, and how does it decide which are most recent ones? it just periodically goes into your current project folder and deletes the backups in the backup folder? Or it searches the backup folder location for filenames of current project and periodically deletes the oldest backups? Does it do this every time a backup is made? Or how does it work exactly, if you know what I mean?
Sound asleep is offline   Reply With Quote
Old 07-25-2021, 07:31 AM   #98
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
Default

Quote:
Originally Posted by Sound asleep View Post
Right, but what triggers it? How does it look for backups, and how does it decide which are most recent ones? it just periodically goes into your current project folder and deletes the backups in the backup folder? Or it searches the backup folder location for filenames of current project and periodically deletes the oldest backups? Does it do this every time a backup is made? Or how does it work exactly, if you know what I mean?
It's a script that you run that does two things, it saves your current project and deletes the X number of backups keeping the most recent ones. You can run the script from a toolbar button or a shortcut key combination such as control s which is used to save the project. It's up to you how often you run it. You could also put it in a project startup script
__________________
Track Freezing Scripts

Coachz Repo
Coachz is offline   Reply With Quote
Old 07-25-2021, 08:20 AM   #99
Sound asleep
Human being with feelings
 
Sound asleep's Avatar
 
Join Date: Nov 2009
Location: Montreal, Canada
Posts: 9,048
Default

Quote:
Originally Posted by Coachz View Post
It's a script that you run that does two things, it saves your current project and deletes the X number of backups keeping the most recent ones. You can run the script from a toolbar button or a shortcut key combination such as control s which is used to save the project. It's up to you how often you run it. You could also put it in a project startup script
Ok, cool. Ctrl+S is a good idea. So it cleans up all backups in the backups folder? Or just the ones that are the same filename as the current project you're working on, do you know?

I often manually save incremental projects.

How do you set how many most recent ones it keeps?
Sound asleep is offline   Reply With Quote
Old 07-25-2021, 08:47 AM   #100
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
Default

I only have backups from Prefs in my folder so that's what I see being deleted. Script settings are:

limit = 5
console = false
do_automatic_backup_dir = true



__________________
Track Freezing Scripts

Coachz Repo
Coachz is offline   Reply With Quote
Old 07-25-2021, 01:38 PM   #101
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

I have removed my script and replaced it with a new script pack that offers all features one may wish.

Check it here
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-25-2021, 01:41 PM   #102
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,769
Default

Quote:
Originally Posted by amagalma View Post
I have removed my script and replaced it with a new script pack that offers all features one may wish.

Check it here
Final version The Sequel !
__________________
Track Freezing Scripts

Coachz Repo
Coachz is offline   Reply With Quote
Old 07-25-2021, 01:52 PM   #103
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

:P


That was the final version of that script.. Now, there is a script pack.. Just check the link for the features.. It has everything, automatic limiting, settings script etc...
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.