Package: save-scummer
Save ScummerFeaturesInstallationAutocompletionUsageAddBackupListRestoreBackup specifiersRestore ExamplesSave-Scummer is a simple CLI utility to backup and restore game saves.
This is intended for rogue-lite games likeRogue Legacy,FTLandDon't Starve,
but it could also be applied to other games or non-game applications.I made this because I enjoy roguelike/rogue-lite games, but when one starts to get too difficult,
I may resort tosave-scummingas an
option to make the game a bit easier. When doing that manually, I find myself wasting precioussecondsof time copying files back and forth, so naturally I decided to wastehoursmaking it (semi-)automated
instead.A full backup utility (likeDuplicati) or sync utility
(likersync) will obviously havemanymore features, but for the
basic case of handling game saves, I wanted something simpler with concise command line usage.FeaturesJust provide a save directory (or glob pattern) to configure a new gameEasily make backups, and restore them by most recent (default), time expressions
(to indicate how far back in time you want to go), or choose from a listTab autocompletionInstallationInstall withpipx(recommended):pipxinstallsave-scummerOr with pip:pipinstallsave-scummerAutocompletion (optional)Tab autocompletion is available for most common shells:bash, fish, zshand WindowsPowerShell.
To install, run:ssc--install[shellname]UsageSave-scummer provides the commandsave-scummer(also aliased asssc) with the following subcommands:sh:sscCOMMAND[ARGS]...

Options:--helpShowthismessageandexit.

Commands:addAddagameanditssavedirectorybackupCreateabackupofone,multiple,orallgameslsListallcurrentlyconfiguredgamesrestoreRestoreabackupofthespecifiedgameAddUsessc addto add (or update) a game and its save directory.Relative paths, user paths, andglob patternsare supported:sscaddgame1~/Games/game1# Add a dir (including any subdirs)sscaddgame1'~/Games/game1/**'# Equivalent glob pattern (quotes required)sscaddgame2'C:\Games\game2\*.sav'# Add files ending in .savBackupUsessc backupto create a new backup. Just specify the game title, and an optional description:sscbackupgame1-d'level 10 with full health'Or just backup everything:sscbackup--allListUsessc lsto show a summary of all configured games:╒════════╤═════════════════╤═════════════════════════════════╕
│Title│Totalbackups│Lastsaved│
╞════════╪═════════════════╪═════════════════════════════════╡
│game1│0│never│
├────────┼─────────────────┼─────────────────────────────────┤
│game2│7(94.96KB)│2021-01-1915:20(23hoursago)│
╘════════╧═════════════════╧═════════════════════════════════╛Or usessc ls [game title]to show more details on a specific game and its backups:Game:game2
Totalbackups:7(94.96KB)Lastsaved:2021-01-1915:20(23hoursago)Lastbackedup:2021-01-1916:24(22hoursago)Sourcedirectory:/home/user/game2/saves
Backupdirectory:/home/user/.local/share/save-scummer/backups/game2
Backupfiles:0:game2-2021-01-26T19:23:26.zip1:game2-2021-01-20T16:33:42-pre-restore.zip2:game2-2021-01-19T19:26:10.zip3:game2-2021-01-19T18:31:58.zip4:game2-2021-01-18T12:17:52.zip5:game2-2021-01-17T16:18:09.zip6:game2-2021-01-17T15:01:58.zipNote that "Last saved" is the time that the source files were created/modified.RestoreUsessc restoreto restore a backup. A specific backup can be indicated by backupindex, age, date/time, or filename. Otherwise, the most recent backup is restored.Usage:sscrestore[OPTIONS][TITLE]Options:-i,--indexINTEGERBackupnumber(startingat0,fromnewesttooldest)-a,--ageTEXTMinimumage(relativetocurrenttime)-d,--dateTEXTMaximumdate/time(absolute)-fTEXTBackupfilename;eitherabsoluteorrelativetobackupdirBackup specifiersIndex:The backup index, sorted from newest to oldest, e.g."Restore the save from x backups ago."0 is the latest backup, 1 is the
backup made before that, etc.
Negative values can also be given; -1 would give you the oldest backup.
Seelscommand for full list of available backups.Age:Minimum age of the save to restore, e.g"I want to go back in time by 1 hour."Amounts of time can be specified in 'HH:MM' format, or with a number followed by a unit.
Examples:'1:30' (an hour and a half ago)'30m' (or '30 minutes')'6h' (or '6 hours')'9 hours, 15 minutes' (or '9:15')'2d' (or '2 days')Seepytimeparsefor more formatsDate/Time:Maximum date/time of the save to restore, e.g.,"I want to go back in
time to 1:30 yesterday."Most date/time formats are supported.
Examples:'16:30' or '4:30 PM' (today)'2021-01-20''August 3 2020'Most date/time formats are supported; seedateutilfor more examples.Filename:Either a full path or just the filename (relative to the backup dir)Restore Examples# Just restore the most recent backupsscrestoregame1# Restore the backup made 2 backups ago (aka the 3rd most recent)sscrestoregame1-i2# Restore a backup from (at least) an hour and a half agosscrestoregame1-a'1:30'# Restore a backup from (at least) 2 days agosscrestoregame1-a2d# Restore a backup from 4:00 PM today or earliersscrestoregame1-d'4:00 PM'# Restore a backup from March 22 or earliersscrestoregame1-d'Mar 22 2021'# Restore a backup by filenamesscrestoregame1-fgame1-2021-01-20T00:09:10.zipDevelopment setupTo set up for local development:gitclonehttps://github.com/JWCook/save-scummer&&cdsave-scummer
pipinstall-Ue'.[dev]'To run linting, formatting, etc.:pre-commitrun-a