@@ -44,11 +44,13 @@ Take this example from the `peas.json` file:
44
44
45
45
!!! tip
46
46
47
- Since Skyscraper 3.13.0 you may also maintain local changes to the `peas.json`
47
+ Since Skyscraper 3.13.0 you should maintain local changes to the `peas.json`
48
48
in a separate file called `peas_local.json` alongside to the `peas.json`. The
49
- format is identical to the `peas.json`. Precedence: Any platform entry from
49
+ format is identical to the `peas.json`. Since Skyscraper 3.15 you can also
50
+ maintain local changes to the `platforms_idmap.csv` in a separate file with a
51
+ `_local` postfix. Note the order of precedence: Any platform entry from
50
52
`peas_local.json` with the same platform name as in `peas.json` overwrites
51
- the one from `peas.json`.
53
+ the one from `peas.json`. The same applies for the platforms ID-mapping.
52
54
53
55
!!! tip
54
56
@@ -93,7 +95,10 @@ Outline:
93
95
block created before, or copy an existing block and adapt to your needs. For
94
96
RetroPie your chosen ` <platform_name> ` must match the folder in
95
97
` ~/RetroPie/roms/<platform_name> ` .
96
- 3 . Use ` <platform_name> ` also in ` platforms_idmap.csv ` (see below for details).
98
+ 3 . Use ` <platform_name> ` also in ` platforms_idmap_local.csv ` . If you need to
99
+ create an ` platforms_idmap_local.csv ` put in the column names
100
+ ` folder,screenscraper_id,mobygames_id,tgdb_id ` (i.e. the first line of
101
+ ` platforms_idmap.csv ` ) . See also below for details of this CSV-file.
97
102
4 . If you use RetroPie do add the platform/system also to your ` es_systems.cfg `
98
103
as documented
99
104
[ here] ( https://retropie.org.uk/docs/Add-a-New-System-in-EmulationStation/ ) .
@@ -106,31 +111,34 @@ can continue with the [hands-on example](PLATFORMS.md#sample-usecase-adding-plat
106
111
These two files are ment to be locally edited and extended for additional
107
112
platforms. Whenever you add a new platform block to the ` peas_local.json ` do also
108
113
lookup the corresponding platform ids and add them to ` platforms_idmap_local.csv ` for
109
- the scraping sites with an API.
114
+ the scraping sites via a web- API.
110
115
111
- From Skyscraper 3.15.0 onwards creating/editing the ` peas_local.json ` and
116
+ ** From Skyscraper 3.15 onwards** creating/editing the ` peas_local.json ` and
112
117
` platforms_idmap_local.csv ` is the preferred way. In any case both files (e.g.
113
118
` peas.json ` and ` peas_local.json ` ) will be evalutated but the ` _local `
114
119
configuration has precedence over the distributed ` peas.json ` . The same rule
115
120
applies to ` platforms_idmap.csv ` and ` platforms_idmap_local.csv ` .
116
121
If you have made local changes before Skyscraper 3.15 to either ` peas.json ` or
117
- ` platforms_idmap.csv ` read the section [ Transferring Local Platform
122
+ ` platforms_idmap.csv ` Skyscraper will inform you with an warning. Read the
123
+ section [ Transferring Local Platform
118
124
Changes] ( PLATFORMS.md#transferring-local-platform-changes ) on how to transfer
119
125
your changes to the corresponding ` *_local.* ` files.
120
126
121
127
To find the platform ids for Screenscraper, Mobygames and The Games DB, please
122
128
consult the files ` screenscraper_platforms.json ` , ` mobygames_platforms.json ` and
123
129
` tgdb_platforms.json ` which are located sibling to your ` config.ini ` of the
124
- Skyscraper installation. If you can not identify an id in these files use ` -1 `
130
+ Skyscraper installation. If you can not identify an ID in these files use ` -1 `
125
131
as value in the CSV. If you add ` -1 ` to CSV, the ` aliases ` from peas are tried
126
132
to find a match upon scraping. Edits in ` screenscraper_platforms.json ` ,
127
- ` mobygames_platforms.json ` and ` tgdb_platforms.json ` are not needed and moreover
128
- they will be overwritten with each Skyscraper update, as these files are only a
129
- reference for finding the id values for the ` platforms_idmap.csv ` .
133
+ ` mobygames_platforms.json ` and ` tgdb_platforms.json ` are not needed. Moreover,
134
+ they will be overwritten with each Skyscraper update as these files are only a
135
+ reference for finding the id values for the ` platforms_idmap[_local] .csv ` .
130
136
131
- For those scraping sites without an API or without exact id match do use the
132
- platform name which is used on the scraping site and put it into the in the ` aliases `
133
- list in the ` peas.json ` for the respective platform/system at ` <platform_name> ` .
137
+ For those scraping sites without a web-API or without exact ID match do use the
138
+ platform name which is used on the respective scraping source site and put it
139
+ into the in the ` aliases ` list in the ` peas_local.json ` for the respective
140
+ platform/system at ` <platform_name> ` . The ` <platform_name> ` is identical to the
141
+ folder on your filesystem where you keep your games.
134
142
135
143
!!! example Use of Aliases
136
144
@@ -190,14 +198,7 @@ Use `-1` as ID when no exact match is provided for the scraping site. Whenever
190
198
an ` -1 ` is encountered Skyscraper tries the ` "aliases": ` from ` peas.json ` (and
191
199
from ` peas_local.json ` if present) to find scraping data.
192
200
193
- Add this information at the end of the CSV file. Why at the end? On rare
194
- occasions the ` platforms_idmap.csv ` may be updated on a new release. On RetroPie
195
- the installed file is then named ` platforms_idmap.csv.rp-dist ` , having changes
196
- at the end may be a less cumbersome manual merge with your local
197
- ` platforms_idmap.csv ` .
198
-
199
- Add this information:
200
-
201
+ Add this information to your ` platforms_idmap_local.csv ` :
201
202
``` csv
202
203
satellaview,107,-1,-1
203
204
```
@@ -239,13 +240,14 @@ additional information on this.
239
240
240
241
!!! note
241
242
242
- If you run a different frontend than EmulationStation, consult the documentation for your frontend on how to add additional systems.
243
+ If you run a different frontend than EmulationStation, consult the
244
+ documentation for your frontend on how to add additional systems.
243
245
244
246
#### Step 4: Happy Scraping
245
247
246
248
1 . Scrape and generate the ` satellaview/gamelist.xml ` as in the [ introductive
247
- use case] ( USECASE.md ) using `Skyscraper -p
248
- satellaview -s screenscraper ` and ` Skyscraper -p satellaview`
249
+ use case] ( USECASE.md ) using ` Skyscraper -p satellaview -s screenscraper ` and
250
+ then ` Skyscraper -p satellaview `
249
251
2 . Restart EmulationStation, respective trigger reload of the gamelist in your
250
252
frontend.
251
253
3 . Smile :)
@@ -258,20 +260,19 @@ satellaview -s screenscraper` and `Skyscraper -p satellaview`
258
260
259
261
This section describes how to transfer your changes from ` peas.json ` and
260
262
` platforms_idmap.csv ` to ` *_local.* ` files with the same format. If you never
261
- changed these files, you can safely ignore this section.
262
- Whenever there is an update and maybe changes to ` peas.json ` and
263
- ` platforms_idmap.csv ` Skyscraper will place the distribution files as
263
+ changed the first two files, you can safely ignore this section.
264
+ Introduction: Whenever there is an update and maybe upstream changes to ` peas.json ` and
265
+ ` platforms_idmap.csv ` Skyscraper will place the upstream/ distribution files as
264
266
` peas.json.rp-dist ` and ` platforms_idmap.csv.rp-dist ` .
265
- Before Skyscraper 3.15.0 you had to manually transfer updates from
266
- ` peas.json.rp-dist ` and ` platforms_idmap.csv.rp-dist ` . With Skyscraper 3.15.0
267
- onwards there is a semi-automated approach.
267
+ Before Skyscraper 3.15 you had to manually transfer updates from
268
+ ` peas.json.rp-dist ` and ` platforms_idmap.csv.rp-dist ` to the actual files. With
269
+ Skyscraper 3.15 onwards there is a semi-automated approach.
268
270
269
271
!!! note Non-RetroPie Users
270
272
271
- If you are using Skyscraper without RetroPie
272
- context these files will have the suffix `.dist`.
273
- The manual will use `.rp-dist` as synonym for both.
274
-
273
+ If you are using Skyscraper in a non-RetroPie
274
+ setup these files will have the suffix `.dist`. The manual will use
275
+ `.rp-dist` as synonym for both.
275
276
276
277
#### Step 1: Transfer Platform Information (` peas ` ) to Local File
277
278
@@ -282,14 +283,15 @@ Install Python Deepdiff: `sudo apt install python3-deepdiff`. Then navigate to
282
283
!!! tip Non-RetroPie Users
283
284
284
285
If you are using Skyscraper without RetroPie
285
- context the you can find the Python script in source in the
286
- `supplementary/scraperdata` folder.
286
+ context the you can find the Python script in the source-tree below
287
+ the `supplementary/scraperdata` folder.
287
288
288
289
The script expects at least two parameters:
289
290
290
291
1 . ` <source_peas.json> ` : The pristiine/baseline file with all platform
291
- information
292
- 2 . ` <dest_peas.json> ` : The file with your local changes
292
+ information (most likely ` peas.json.rp-dist ` )
293
+ 2 . ` <dest_peas.json> ` : The file with your current local changes (most likely
294
+ ` peas.json ` )
293
295
3 . Optionally ` <outfile_peas.json> ` : Once you have reviewed the changes provide
294
296
this file to store the platform "diff" between the pristine file and your
295
297
changes
@@ -306,17 +308,26 @@ Review the diff, then run:
306
308
python3 deepdiff_peas_jsonfiles.py peas.json.rp-dist peas.json peas_local.json
307
309
```
308
310
309
- Backup your ` peas.json ` if needed and when satisfied move
310
- ` peas.json.rp-dist ` to ` peas.json ` .
311
+ Backup your ` peas.json ` if needed and when satisfied with the content of
312
+ ` peas_local.json ` move ` peas.json.rp-dist ` to ` peas.json ` .
311
313
312
314
#### Step 2: Transfer Platform Scraper IDs (` platforms_idmap ` ) to Local File
313
315
314
316
The logic is the same as before and provides an output of the lines you have
315
317
changed in ` platforms_idmap.csv ` in relation to the baseline
316
- ` platforms_idmap.csv.rp-dist ` .
318
+ ` platforms_idmap.csv.rp-dist ` .
319
+
320
+ !!! warning
321
+
322
+ If you already have an existing `platforms_idmap_local.csv` make a
323
+ backup as the following command will create a new one.
324
+ You may also alter the file redirect to a different file to avoid the
325
+ file to be overwritten.
326
+
317
327
Navigate to the folder with the ` platforms_idmap.csv ` . Then run:
318
328
319
329
``` bash
330
+ [[ -e platforms_idmap_local.csv ]] && mv platforms_idmap_local.csv platforms_idmap_local.csv.backup
320
331
diff \
321
332
--new-line-format=" %L" \
322
333
--old-line-format=" " \
@@ -333,20 +344,18 @@ cat - platforms_idmap_local.csv > tmp_piggy.csv && \
333
344
mv tmp_piggy.csv platforms_idmap_local.csv
334
345
```
335
346
336
- Backup your ` platforms_idmap.csv ` if needed and when satisfied move
337
- ` platforms_idmap.csv.rp-dist ` to ` platforms_idmap.csv ` .
347
+ Backup your ` platforms_idmap.csv ` if needed and when satisfied with the content
348
+ of your ` platforms_idmap_local.csv ` move ` platforms_idmap.csv.rp-dist ` to
349
+ ` platforms_idmap.csv ` .
338
350
339
- #### Step 3: Automatically Apply Distribution Updates for Platform Configuration
351
+ #### Finish
340
352
341
- Navigate to the folder with the ` _local.* ` files mentioned before. Create an
342
- empty file names ` .platformcfg_overwrite_ok ` (note the heading dot). If this
343
- file is present Skyscraper will overwrite the existing ` peas.json ` and
344
- ` platforms_idmap.csv ` with the files from the distribution when updating to a
345
- newer version.
346
- If you remove the file ` .platformcfg_overwrite_ok ` , Skyscraper will install the
347
- ` *.rp-dist ` files again on the next install.
353
+ From now on upstream changes will be placed in ` peas.json ` and
354
+ ` platforms_idmap.csv ` and your local additions or changes are kept in the
355
+ ` *_local.* ` counterparts. However, remember when platforms are defined in both
356
+ files the ` *_local.* ` platform configuration wins.
348
357
349
- ### One More Thing...
358
+ #### One More Thing...
350
359
351
360
If you have changes which would be beneficial for the community, feel free to
352
361
file an issue with the proposed additions/changes or table it in the [ RetroPie
@@ -392,7 +401,7 @@ Filenames shown _italic_ are user editable.
392
401
| _ ` platforms_idmap.csv ` _ | 3.9.0 | maps the platform names (handles) from _ ` peas.json ` _ / _ ` peas_local.json ` _ to exact platform IDs used in scrapers MobyGames, Screenscraper or TGDB; do edit to add new platforms |
393
402
| _ ` peas.json ` _ | 3.9.0 | maps platform names (read: ROM folder names) to extensions and aliases for that platform |
394
403
| _ ` peas_local.json ` _ | 3.13.0 | same as usage as ` peas.json ` , the ` _local.json ` file will not be altered by Skyscraper updates. Entries in this file have higher precedence than the distribution file ` peas.json ` |
395
- | _ ` platforms_idmap_local.csv ` _ | 3.15.0 | same as usage as ` platforms_idmap.csv ` , the ` _local.csv ` file will not be altered by Skyscraper updates. Entries in this file have higher precedence than the distribution file ` platforms_idmap.csv ` |
404
+ | _ ` platforms_idmap_local.csv ` _ | 3.15.2 | same as usage as ` platforms_idmap.csv ` , the ` _local.csv ` file will not be altered by Skyscraper updates. Entries in this file have higher precedence than the distribution file ` platforms_idmap.csv ` |
396
405
| ~~ ` screenscraper.json ` ~~ | 3.7.7-2 (@detain ) | IDs formerly used in here are part of ` platforms_idmap.csv ` (3.9.0); superseded by ` screenscraper_platforms.json ` (3.9.0) which is not to be edited |
397
406
| ` tgdb_developers.json ` | 2.5.3 (@muldjord ) | API mapping of 'Developers'; Uses leaner format as before (3.9.0); not to be edited |
398
407
| ` tgdb_genres.json ` | 3.9.0 | API mapping of 'Genres' (3.9.0); not to be edited |
0 commit comments