Skip to content

Commit

Permalink
Merge pull request #5 from jamesgecko/rust
Browse files Browse the repository at this point in the history
Rewrite it in Rust
  • Loading branch information
jamesgecko authored Sep 26, 2023
2 parents c601921 + a304927 commit d5bde58
Show file tree
Hide file tree
Showing 12 changed files with 378 additions and 259 deletions.
36 changes: 1 addition & 35 deletions .gitignore
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/
144 changes: 144 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Cargo.toml
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"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013 James D
Copyright (c) 2023 JamesGecko

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
49 changes: 9 additions & 40 deletions README.md
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.
Loading

0 comments on commit d5bde58

Please sign in to comment.