If you've ever opened DOpus to a list of 20 Empty Tab
s instead of your carefully ordered working folders, or even to an empty list of 1 tab, this script is for you!
It allows you to avoid data loss of your precious tabs by periodically automatically saving opened tabs in a Tab Group.
You can configure
- how often this happens (≝once /
10
min) - max number of groups to save (≝
5
) - the name of the group (but not yet its parent folder, see known issues below) (≝unimaginative
Backup
\TabGroup #
) - whether to close other tabs on restore globally (but this you can change in DOpus settings individually before restoring)
So you'd have something like this
Tab menu
Or settings menu
Known issues:
-
while the script supports multiple listers and saves 1 tab group per lister, as far as I understand there are no permanent lister IDs, so this uses lister's position in a list of listers
that DOpus returns as its ID, which can change across DOpus restarts, so Lister # 1 in a previous backup operation might be different from Lister # 1 in the next one
-
due to this issue I can't hide these autosaved tabs in a folder (ideally each lister would get its own), so unfortunately they pollute the general list instead
-
deletes old tab groups starting with user defined prefix + index, so it's important to pick a prefix not used in other tab groups to avoid them being deleted.
-
while the script exposes a custom command to do the backup, invoking this command "too fast" (a few times / second) results in skipped backups with the risk of deleting older backups
-
also not sure what would happen in the rare case of race conditions when you manually update tab groups and in that very moment the script decides to save its own group.
-
script isn't extensively tested
The script itself:
backup.TabGroupSave🕘.opusscriptinstall (6.0 KB)