-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from jamesgecko/rust
Rewrite it in Rust
- Loading branch information
Showing
12 changed files
with
378 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1 @@ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
parts | ||
bin | ||
var | ||
sdist | ||
develop-eggs | ||
.installed.cfg | ||
lib | ||
lib64 | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
.tox | ||
nosetests.xml | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
/target/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[package] | ||
name = "save-central" | ||
version = "2.0.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
junction = "=1.0" | ||
winapi = "=0.3.9" | ||
csv="1.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,27 @@ | ||
# Save Central | ||
|
||
PC games put saves [all over the place](http://www.rockpapershotgun.com/2012/01/23/stop-it-put-save-games-in-one-place/). `%userprofile%/Saved Games` is the | ||
official be all, end all location. Microsoft said so! You should just be able | ||
to back up that folder and have a copy of all your saved games. But _noooo_. Some games clutter even up your `~/Documents` folder with their stupid junk. | ||
It's super obnoxious and there's no reason for it. | ||
PC games put saves [all over the place](http://www.rockpapershotgun.com/2012/01/23/stop-it-put-save-games-in-one-place/). | ||
|
||
It's time to fight back. Save Central finds saved games, moves the saves to | ||
`~/Saved Games`, and makes a hidden junction. Your games will still able to | ||
find their saves, but they'll all be stored where they belong. | ||
This utility moves game save files into `%userprofile%/Saved Games` and creates a hidden junction from the original location. Games will still work correctly, but they won't clutter up your Documents folder with save files. | ||
|
||
As a side effect, it's slightly easier to back up your saves. | ||
|
||
### Requirements | ||
|
||
* Python 3.3 | ||
|
||
pip3 install -r requirements.txt | ||
|
||
### Moving and linking | ||
|
||
Just run the script! | ||
|
||
``` | ||
python3 save-central.py | ||
``` | ||
This also makes it easier to back up saves for games that don't have cloud sync. | ||
|
||
### Restoring backed up saves on a new computer | ||
|
||
This is left as an exercise to the reader. Pull requests welcome! (If you're | ||
absolutely up the creek without a paddle, just look at `list.csv` and manually | ||
copy the folder to the correct location.) | ||
Just run the utility again and save-central will create junctions for all the save files in `%userprofile%/Saved Games` | ||
|
||
### FAQ | ||
### Plausible questions | ||
|
||
#### It didn't move some folders? | ||
|
||
Edit `list.csv` to add the correct path. The first item on a line is the | ||
source, relative to `%userprofile%`. The second item is the destination, relative to | ||
`%userprofile%/Saved Games`. Please send a pull request, too. Note the alphabetical order. | ||
|
||
#### What about games that use `~/Documents/My Games`? | ||
|
||
That is acceptable. I feel no ill will towards games which use what was the | ||
recommended save game location a decade ago, when XP roamed the earth. | ||
But times have changed. | ||
`%userprofile%/Saved Games`. Pull requests welcome! Note the alphabetical order. | ||
|
||
#### What about games that use Steam Cloud? | ||
#### What about games that use `~/Documents/My Games`? Or cloud save? | ||
|
||
What about them? Those saves are backed up automatically, so we only care about | ||
them if they're living some place inappropriate in `~`. | ||
Both are nice, but I still want a clean Documents directory. Into `%userprofile%/Saved Games` they go! | ||
|
||
#### What about games that don't put their save files anywhere in `%userprofile%`? | ||
|
||
The only modern titles I've encountered that do this use UPlay. Not _all_ UPlay games. But at | ||
least one. The paths for these games are in `unqualified_list.csv`. A lot of older games may | ||
do this, also. My gaming library is such that I haven't encountered them. Pull requests | ||
welcome! Or buy the GOG.com versions, which put save files in `~/AppData/Local/GOG.com`. ;-) | ||
There's a few of these. I'm keeping track of them in `unqualified_files.csv` and `unqualified_directories.csv`. Support coming eventually. |
Oops, something went wrong.