Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config.ini.example
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
;includeFrom="./includes.txt"
;gameListBackup="false"
;cacheFolder="./cache"
;cacheFormat="v2"
;cacheResize="false"
;nameTemplate="%t [%f], %P player(s)"
;jpgQuality="95"
Expand Down
37 changes: 31 additions & 6 deletions docs/CACHE.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,48 @@ Preferred way of editing the cache is via the various [`--cache`](CLIHELP.md#-ca
If you decide to add your own files to the subfolders, you risk them being deleted by Skyscraper later on if it is run with one of the cache cleanup command line options. You've been warned!


**Other cool stuff you CAN DO**: Each subfolder in the `/home/<USER>/.skyscraper/cache/` folder is self-contained and can be copied to other Skyscraper installations at your convenience. Just copy the folder itself over to some other computer that has Skyscraper v1.6 or later installed, and you can make use of the data when generating game lists. If you add it at a non-default location, set the custom folder with `-d <FOLDER>`.
**Other cool stuff you CAN DO**: Each subfolder in the `/home/<USER>/.skyscraper/cache/` folder is self-contained and can be copied to other Skyscraper installations at your convenience. Just copy the folder itself over to some other computer that has Skyscraper v1.6 or later installed, and you can make use of the data when generating game lists. If you add it at a non-default location, set the custom folder with `-d <FOLDER>`. If the other installation is Skyscraper 3.21.1 or older, convert the cache to the `legacy-v1` format first, see below.

### Resource Cache Format

I do not recommend editing the `db.xml` resource cache files manually. But the format is simple, so you certainly can if you want to.

**Resource id**

The database consists of resource entries connected to a unique id. The id is calculated from the rom data or, in special cases, the filename (in cases where the file data is a script or a ROM gets changed by the gameplay). An entry can look like this:
The database consists of resource entries connected to a unique id. The id is calculated from the rom data or, in special cases, the filename (in cases where the file data is a script or a ROM gets changed by the gameplay). The resources of one rom are grouped in a `game` element carrying the id:

```xml
<resource id="<ID KEY>"
type="<RESOURCE TYPE>"
source="<SCRAPING SOURCE>"
timestamp="<UNIX TIMESTAMP IN MSECS>">Resource data</resource>
<resources version="2">
<game id="<ID KEY>">
<resource type="<RESOURCE TYPE>"
source="<SCRAPING SOURCE>"
timestamp="<UNIX TIMESTAMP IN MSECS>">Resource data</resource>
...
</game>
...
</resources>
```

**Format versions**

The layout above is format `v2`, written by default. Skyscraper 3.21.1 and older use format `legacy-v1`, a flat list where each resource carries the id itself:

```xml
<resources>
<resource id="<ID KEY>"
type="<RESOURCE TYPE>"
source="<SCRAPING SOURCE>"
timestamp="<UNIX TIMESTAMP IN MSECS>">Resource data</resource>
...
</resources>
```

Skyscraper reads both formats. A `legacy-v1` cache is rewritten as `v2` the next time Skyscraper saves it.

!!! warning "Going back to an older Skyscraper version"

Skyscraper 3.21.1 and older cannot read the `v2` format and will treat the cache as empty. Before you use the cache with an older version, run [`--cache convert:legacy-v1`](CLIHELP.md#-cache-convertformat). To keep writing `legacy-v1`, for instance when you share a cache with an older installation, set [`cacheFormat="legacy-v1"`](CONFIGINI.md#cacheformat).

#### Resource Types

These resource types contain the provided game data from a scraping
Expand Down
16 changes: 16 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
This page summarizes the changes of each Skyscraper release, a [changlog for
humans](https://keepachangelog.com).

### Version 3.22.0 (2026-TBA)

- Changed: The resource cache is held in memory grouped by game, which makes
game list generation from a large cache several times faster, especially
with multiple threads (`-t`)
- Changed: New resource cache format `v2` for `db.xml`, which groups the
resources by game. Existing caches are read as before and are written as
`v2` on the next save. Skyscraper 3.21.1 and older cannot read `v2`: run
[`--cache convert:legacy-v1`](CLIHELP.md#-cache-convertformat) before going
back to an older version, or set
[`cacheFormat="legacy-v1"`](CONFIGINI.md#cacheformat) to keep writing the
old format. See [Resource Cache Format](CACHE.md#resource-cache-format)
- Added: Cache subcommand
[`--cache convert:<FORMAT>`](CLIHELP.md#-cache-convertformat) and
`config.ini` option [`cacheFormat`](CONFIGINI.md#cacheformat)

### Version 3.21.0 (2026-09-20)

- Added: AppImage support for PC (x64) and ARM (aarch64) architectures (with or
Expand Down
15 changes: 15 additions & 0 deletions docs/CLIHELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,21 @@ Read more about the resource cache at the [cache documentation](CACHE.md).

Outputs a description of all available `--cache` functions.

#### --cache convert:&lt;FORMAT&gt;

Rewrites the resource cache file `db.xml` in the given format, either `v2` (the default) or `legacy-v1`. Use `legacy-v1` before you use the cache with Skyscraper 3.21.1 or older, which cannot read the `v2` format. See [Resource Cache Format](CACHE.md#resource-cache-format).

If _no platform is specified_, the caches of all platforms are converted.

To keep writing the `legacy-v1` format on every run, set [`cacheFormat`](CONFIGINI.md#cacheformat) in your `config.ini`.

**Example(s)**

```
Skyscraper -p snes --cache convert:legacy-v1
Skyscraper --cache convert:legacy-v1
```

#### --cache edit[:new=&lt;TYPE&gt;]

Allows editing of any cached resources connected to your roms. The editing mode will go through each of the files in the queue one by one, allowing you to add and remove resources as needed. Any resource you add manually will be prioritized above all others.
Expand Down
11 changes: 11 additions & 0 deletions docs/CONFIGINI.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ This is an alphabetical index of all configuration options their usage level and
| [brackets](CONFIGINI.md#brackets) | Basic | Y | Y | Y | |
| [cacheCovers](CONFIGINI.md#cachecovers) | Basic | Y | Y | | Y |
| [cacheFolder](CONFIGINI.md#cachefolder) | Basic | Y | Y | | |
| [cacheFormat](CONFIGINI.md#cacheformat) | Advanced | Y | Y | | |
| [cacheMarquees](CONFIGINI.md#cachemarquees) | Basic | Y | Y | | Y |
| [cacheRefresh](CONFIGINI.md#cacherefresh) | Basic | Y | | | Y |
| [cacheResize](CONFIGINI.md#cacheresize) | Basic | Y | Y | | Y |
Expand Down Expand Up @@ -272,6 +273,16 @@ Allowed in sections: `[main]`, `[<PLATFORM>]`

---

#### cacheFormat

Sets the format in which the resource cache file `db.xml` is written. The default format `v2` groups the resources by game. Set this to `"legacy-v1"` to keep writing the format of Skyscraper 3.21.1 and older, for instance if you share the cache with an older installation. Skyscraper reads both formats regardless of this option. To convert a cache once, use [`--cache convert:<FORMAT>`](CLIHELP.md#-cache-convertformat). See also [Resource Cache Format](CACHE.md#resource-cache-format).

Default value: `v2`
Allowed values: `v2`, `legacy-v1`
Allowed in sections: `[main]`, `[<PLATFORM>]`

---

#### cacheResize

By default, to save space, Skyscraper resizes large pieces of artwork before adding them to the resource cache. Setting this option to `"false"` will disable this and save the artwork files with their original resolution. Beware that Skyscraper converts all artwork resources to lossless PNG's when saving them. High resolution images such as covers will take up a lot of space! So set this to `"false"` with caution.
Expand Down
Loading