Skip to content

Commit

Permalink
added section about changed config files
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemba committed Oct 20, 2023
1 parent 27d806b commit dba3790
Showing 1 changed file with 30 additions and 13 deletions.
43 changes: 30 additions & 13 deletions docs/PLATFORMS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
### Supported platforms and how to add new platforms for scraping

Get a list of supported platforms with `Skyscraper --help`
Get a list of supported platforms with `Skyscraper --help`

After the initial PR from torresflo @ GitHub it is possible to add new platforms
by editing the `platforms.json` file. Since version 3.9.0 onwards this file is
replaced by `peas.json` (short for platforms, extensions/formats, aliases and
scrapers) in the same folder.

Take this example from the `peas.json`:

```json
[...]
"megadrive": {
Expand All @@ -32,17 +33,17 @@ Take this example from the `peas.json`:
[...]
```

- `megadrive`: this key reflects the platform/folder name (or more generally the
handle), usually provided with `-p` on the command line.
- `aliases`: these aliases can be used to allow additional hits for a search.
The use of aliases is handy especially for scraping websites which do _not_
provide a web API. Currently Screenscraper, Mobygames or The Games DB are
providing an web API. See also section about `platforms_idmap.csv` below.
- `formats`: set of ROM file extensions which will be included in scraping if
a ROM file is not provided explicitly via command line.
- `scrapers`: Denotes the possible scrapers if not overridden by `-s` command
line flag. Will be deprecated in some later versions as it is not used in the
codebase.
- `megadrive`: this key reflects the platform/folder name (or more generally the
handle), usually provided with `-p` on the command line.
- `aliases`: these aliases can be used to allow additional hits for a search.
The use of aliases is handy especially for scraping websites which do _not_
provide a web API. Currently Screenscraper, Mobygames or The Games DB are
providing an web API. See also section about `platforms_idmap.csv` below.
- `formats`: set of ROM file extensions which will be included in scraping if
a ROM file is not provided explicitly via command line.
- `scrapers`: Denotes the possible scrapers if not overridden by `-s` command
line flag. Will be deprecated in some later versions as it is not used in the
codebase.

**Note**: If you need a specific folder name for a platform (on your setup or
due to an EmulationStation theme) use a symbolic link (see `megadrive` (folder)
Expand Down Expand Up @@ -98,7 +99,7 @@ However, if you have local changes in these files you can transfer your local
changes to the new files. The new `peas.json` is the `platforms.json` but in a
more compact form which has less visual overhead and also allows faster parsing.
The `platforms_idmap.csv` maps the former `screenscraper.json` platform ids plus
the platform ids of two more web API sites.
the platform ids of two more web API sites.

Use the script `convert_platforms_json.py` (sibling to the Skyscraper
executable) to convert the `platforms.json` to a `peas_mine.json` which you can
Expand All @@ -108,3 +109,19 @@ Use the script `check_screenscraper_json_to_idmap.py` to identify differences
from your `screenscraper.json`. Then use the three `<scraper>_platforms.json`
files to identify the matching platform ids to be entered in
`platform_idmap.csv`. Use `-1` if there is no matching platform id.

#### Summary of changes in the config files

Filenames shown ~~strikethrough~~ are superseeded.
Filenames shown _italic_ are user editable.

| File | Introduced | Notes (version) |
| ------------------------ | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| ~~`mobygames.json`~~ | 3.8.0 | superseeded by `mobygames_platforms.json` (v3.9.0); not to be edited; IDs are used in `platforms_idmap.csv` |
| ~~`platforms.json`~~ | 3.7.7-2 (@detain) | superseeded by _`peas.json`_ (3.9.0); do edit to add new platforms; uses leaner format than `platforms.json` |
| _`platforms_idmap.csv`_ | 3.9.0 | maps the platform names (handles) from _`peas.json`_ to exact platform IDs used in Moby, Screenscraper or TGDB; do edit to add new platforms |
| ~~`screenscraper.json`~~ | 3.7.7-2 (@detain) | IDs formerly used in here are part of `platforms_idmap.csv` (3.9.0); superseeded by `screenscraper_platforms.json` (3.9.0) which is not to be edited |
| `tgdb_developers.json` | 2.5.3 (@muldjord) | uses leaner format (3.9.0); not to be edited |
| `tgdb_genres.json` | 3.9.0 | uses leaner format (3.9.0); not to be edited |
| `tgdb_platforms.json` | 3.9.0 | uses leaner format (3.9.0); not to be edited; IDs are used in `platforms_idmap.csv` |
| `tgdb_publishers.json` | 2.5.3 (@muldjord) | uses leaner format (3.9.0); not to be edited |

0 comments on commit dba3790

Please sign in to comment.