Skip to content

Commit 4e40ef7

Browse files
authored
Merge branch 'master' into PR_174
2 parents 8739d59 + 674c80b commit 4e40ef7

57 files changed

Lines changed: 1660 additions & 710 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

VERSION.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION="3.17.5"
1+
VERSION="3.18.0-dev"

batocera-artwork.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- Just the screenshot without any decorations or scaling -->
3+
<artwork>
4+
<output type="screenshot"/>
5+
</artwork>

config.ini.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
;frontend="emulationstation"
4747
;emulator=""
4848
;launch=""
49+
;fanarts="false"
4950
;manuals="false"
5051
;videos="false"
5152
;videoSizeLimit="42"
@@ -189,3 +190,6 @@
189190
cacheRefresh="true"
190191
; https://github.com/RetroPie/RetroPie-Setup/pull/3704
191192
cacheScreenshots="false"
193+
194+
[batocera]
195+
artworkXml="batocera-artwork.xml"

docs/CACHE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Preferred way of editing the cache is via the various [`--cache`](CLIHELP.md#-ca
3535
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!
3636

3737

38-
**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 1.6.0 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>`.
38+
**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>`.
3939

4040
### Resource Cache Format
4141

@@ -52,10 +52,6 @@ The database consists of resource entries connected to a unique id. The id is ca
5252
timestamp="<UNIX TIMESTAMP IN MSECS>">Resource data</resource>
5353
```
5454

55-
!!! note
56-
57-
Pre-3.3.0 versions of Skyscraper used `sha1` as the name of the unique id key. Later versions use `id`.
58-
5955
#### Resource Types
6056

6157
##### title
@@ -124,4 +120,8 @@ A video file filename for a game (file exists in `videos` subfolder)
124120

125121
##### manual
126122

127-
A manual (PDF) file filename for a game (file exists in `manuals` subfolder)
123+
(Since v3.12) A manual (PDF) file filename for a game (file exists in `manuals` subfolder)
124+
125+
##### fanart
126+
127+
(Since v3.18) A background image displayed in some frontends (e.g. Batocera) and themes for a game (file exists in `fanarts` subfolder)

docs/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ humans](https://keepachangelog.com).
55

66
### Version 3.18.0 (2025-TBA)
77

8+
- Added: Support for [Batocera gamelists](FRONTENDS.md#batocera) incl. fanart
9+
output
10+
- Added: Support for fanart gamelist output for some [EmulationStation
11+
variants](CONFIGINI.md#gamelistvariants)
12+
- Added: Fanart scraping with Screenscraper-, TGDB- and Import-scraper. See flag
13+
and config option [`fanarts`](CLIHELP.md#fanarts)
14+
- Added: Accept also singular for media flags, e.g. `--flags video` additionally
15+
to `--flags videos`. However, in the config file accept only plural as before.
816
- Added: Allow more relaxed extension syntax in config options. In addition to
917
`'*.ext'` also allow `'.ext'` and `'ext'`
1018
- Added: Option to force Screenscraper scrapes to use the stem of the game

docs/CLIHELP.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Sets a non-default location for the storing and loading of cached game resources
5656

5757
!!! note
5858

59-
If you wish to _always_ use a certain location as base folder for your resource cache ((for instance if you want your cache to reside on a USB drive), it is _strongly_ recommended to set this in the `config.ini` file instead. Read more about the relevant [`config.ini` option](CONFIGINI.md#cachefolder).
59+
If you wish to _always_ use a certain location as base folder for your resource cache (for instance if you want your cache to reside on a USB drive), it is _strongly_ recommended to set this in the `config.ini` file instead. Read more about the relevant [`config.ini` option](CONFIGINI.md#cachefolder).
6060

6161
**Example(s)**
6262

@@ -448,6 +448,10 @@ From Skyscraper 3.5.0 all command-line options that change the scraping behaviou
448448

449449
To enable multiple flags separate them by commas (eg. `--flags FLAG1,FLAG2`) or apply `--flags` option multiple times.
450450

451+
#### fanarts
452+
453+
By default Skyscraper doesn't scrape and cache game fanart resources because not all scraping sites provide this data and also only some frontends support fanart display. You can enable it by using this flag. Consider setting this in [`config.ini`](CONFIGINI.md#fanarts) instead.
454+
451455
#### forcefilename
452456

453457
This flag forces Skyscraper to use the filename (excluding extension) instead of the cached titles when generating a game list. Consider setting this in [`config.ini`](CONFIGINI.md#forcefilename) instead.
@@ -540,6 +544,10 @@ Only relevant when generating an EmulationStation, a Retrobat or a Pegasus game
540544

541545
When generating gamelists, skip processing covers that already exist in the media output folder.
542546

547+
#### skipexistingfanarts
548+
549+
When generating gamelists, skip copying fanart files that already exist in the media output folder.
550+
543551
#### skipexistingmanuals
544552

545553
When generating gamelists, skip copying manuals that already exist in the media output folder.

docs/CONFIGINI.md

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,16 @@ Settings in the `[main]` section will always be set regardless of selected platf
2020

2121
### Order of Precedence
2222

23-
Each section can have overlapping parameters. In case where a certain option exists in several sections they are prioritized as scraping module first, then frontend, then platform and lastly main. Any commandline (CLI) option which relates to an configuration setting in `config.ini` has highest precedence, regardless of the other four levels respective sections.
23+
Each section can have overlapping parameters. In case where a certain option exists in several sections they are prioritized as scraping module first, then frontend, then platform and lastly main. Any commandline interface (CLI) option which relates to an configuration setting in `config.ini` has highest precedence, aces out each scraping module section and other lower prioritized sections (frontend, platform and main). If a configuration option is neither set via CLI nor via configuration file, its default value is applied. In summary:
2424

25-
You can find an example config file at `/home/<USER>/.skyscraper/config.ini.example`. This file contains all available options. Just copy the file to `config.ini` and uncomment and edit the ones you wish to use by removing the `#` or `;` in front of the variables. Remember to also uncomment the section the option relates to such as `[main]` or `[amiga]`.
25+
1. CLI
26+
↳ 2. `[<scraper>]`
27+
&nbsp;&nbsp; ↳ 3. `[<frontend>]`
28+
&nbsp;&nbsp;&nbsp;&nbsp; ↳ 4. `[<platform>]`
29+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ↳ 5. `[main]`
30+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ↳ 6. built-in default
31+
32+
You can find an example config file at `/home/<USER>/.skyscraper/config.ini.example`. This file contains all available options. Just copy the file to `config.ini` and uncomment and edit the ones you wish to use by removing the `#` or `;` in front of the variables. Remember to also uncomment the `[<section>]` line which the option relates to such as `[main]` or `[amiga]`.
2633

2734
!!! note
2835

@@ -81,6 +88,7 @@ This is an alphabetical index of all configuration options their usage level and
8188
| [excludeFrom](CONFIGINI.md#excludefrom) | Advanced | Y | Y | | |
8289
| [excludePattern](CONFIGINI.md#excludepattern) | Advanced | Y | Y | Y | |
8390
| [extensions](CONFIGINI.md#extensions) | Expert | | Y | | |
91+
| [fanarts](CONFIGINI.md#fanarts) | Basic | Y | | | |
8492
| [forceFilename](CONFIGINI.md#forcefilename) | Advanced | Y | Y | Y | |
8593
| [frontend](CONFIGINI.md#frontend) | Basic | Y | | | |
8694
| [gameBaseFile](CONFIGINI.md#gamebasefile) | Expert | | Y | | |
@@ -291,7 +299,8 @@ Cleans up some misformatting in scraped description:
291299
2. Multiple spaces between sentences are reduced to one space
292300
3. Bulletpoint beginning with \* or ● are replaced with a dash
293301
4. Stylized ellipsis (… Unicode:`&#8230;`) is replaced with three dot characters
294-
5. Multiple exclamation marks are reduced to one, unless for game titles are explicitly typed like that, like 'Super Punch-Out!!'.
302+
5. Multiple exclamation marks are reduced to one, unless for game titles are
303+
explicitly typed like that, like 'Super Punch-Out!!'.
295304

296305
!!! quote
297306

@@ -425,7 +434,7 @@ Allowed in sections: `[main]`, `[<PLATFORM>]`, `[<FRONTEND>]`
425434

426435
#### videos
427436

428-
By default Skyscraper doesn't scrape and cache video resources because of the significant disk space required to save them. You can enable videos using this option.
437+
By default Skyscraper doesn't scrape and cache video resources because of the significant disk space required to save them. You can enable videos using this option. If your frontend supports video display also explicitly set this option to true. See also the option to [symlink video files](#symlink) instead of copying, if space is a premium.
429438

430439
Default value: `false`
431440
Allowed in sections: `[main]`, `[<PLATFORM>]`, `[<FRONTEND>]`, `[<SCRAPER>]`
@@ -1076,9 +1085,32 @@ Allowed in sections: Only for frontends `[emulationstation]`, `[esde]` or `[retr
10761085

10771086
---
10781087

1088+
#### fanarts
1089+
1090+
By default Skyscraper doesn't scrape and cache game fanart resources because not
1091+
all scraping sites provide this data and also only some frontends support fanart
1092+
display. If enabled Skyscraper will collect game manuals for the scraping
1093+
modules that provide this data. For frontend Batocera no further option must be
1094+
set to enable the output of fanart in the gamelist and into the appropriate
1095+
folder during gamelist creation. For other EmulationStation forks where themes
1096+
support the display of fanart, see also option
1097+
[gameListVariants](CONFIGINI.md#gamelistvariants).
1098+
1099+
Default value: false
1100+
Allowed in sections: `[main]`, `[<PLATFORM>]`
1101+
1102+
---
1103+
10791104
#### manuals
10801105

1081-
By default Skyscraper doesn't scrape and cache game manuals resources because not all scraping sites provide this data and also only some frontends support PDF display of these game manuals. If enabled Skyscraper will collect game manuals for the scraping modules that provide this data. For frontend ES-DE no further option must be set to enable the output of the PDF manuals to the appropriate folder. For other EmulationStation forks see also option [gameListVariants](CONFIGINI.md#gamelistvariants).
1106+
By default Skyscraper doesn't scrape and cache game manuals resources because
1107+
not all scraping sites provide this data and also only some frontends support
1108+
PDF display of these game manuals. If enabled Skyscraper will collect game
1109+
manuals for the scraping modules that provide this data. For frontend ES-DE and
1110+
Batocera no further option must be set to enable the output of the PDF manuals
1111+
to the appropriate folder during gamelist creation. For other EmulationStation
1112+
forks which support PDF manual display, see also option
1113+
[gameListVariants](CONFIGINI.md#gamelistvariants).
10821114

10831115
Default value: false
10841116
Allowed in sections: `[main]`, `[<PLATFORM>]`

docs/FRONTENDS.md

Lines changed: 116 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,121 @@ file will be preserved: For these on top is the `folderlink` element is preserve
106106

107107
This is modeled after EmualtionStation as it uses it with slight differences.
108108

109+
### Batocera
110+
111+
Over time the fork of EmulationStation in Batocera has diverted stark from the
112+
initial EmulationStation. Thus, the gamelist format is somewhat different, but
113+
the textual scraping elements are still the same. Most notably Batocera
114+
EmulationStation stores a lot of additional information in the gamelist, and the
115+
set of information may differ for each game.
116+
Skyscraper aims to cover the most frequent used elements for scraping, currently
117+
fanarts, manuals and videos. See the [scraping
118+
modules](SCRAPINGMODULES.md#capabilities-of-scrapers) for support of these
119+
mediafiles.
120+
121+
This is the complete set of scraping binary data supported by Skyscraper:
122+
123+
| Batocera Gamelist XML-Element | Skyscraper support |
124+
| :---------------------------- | :----------------: |
125+
| boxart ||
126+
| fanart ||
127+
| image (in game Screenshot) ||
128+
| manual ||
129+
| marquee ||
130+
| video ||
131+
| wheel ||
132+
133+
ROMs are expected to be in the input folder `/userdata/roms/<PLATFORM>` for
134+
every `<PLATFORM>` you scrape.
135+
136+
- Default game list location: `/userdata/roms/<PLATFORM>`
137+
- Default game list filename: `gamelist.xml`
138+
- Default media file location: `/userdata/roms/<PLATFORM>/{images,videos,manuals}`
139+
140+
#### Metadata preservation
141+
142+
These extra elements are preserved.
143+
144+
| Batocera Gamelist XML-Element | When present in Gamelist |
145+
| :---------------------------- | :-----------------------: |
146+
| `bezel` | Preserved |
147+
| `boxback` | Preserved |
148+
| `cartridge` | Preserved |
149+
| `magazine` | Preserved |
150+
| `map` | Preserved |
151+
| `mix` | Preserved |
152+
| `music` | Preserved |
153+
| `thumbnail` | Preserved |
154+
| `titleshot` | Preserved |
155+
156+
Also all other non scrapable elements are preserved (Batocera EmulationStation
157+
adds those on occasion) like: `cheevosHash`, `cheevosId`, `scrap`, ...
158+
159+
#### Usage of Skyscraper for Batocera
160+
161+
It is possible to compile Skyscraper on Batocera supported systems but you will
162+
need the build-toolchain (at least GCC, make and Qt). Additionally, the
163+
configuration files must be installed in a defined location (see the `PREFIX`
164+
option in the top-level `README.md`, if you are keen to compile Skyscraper on
165+
Batocera).
166+
167+
A more convienient way is to use Skyscraper from you Desktop system: Below you
168+
can find a step-by-step guide for Linux systems, macOS should be similar.
169+
Windows desktop users can use SMB shares and can adapt the following steps.
170+
171+
1. For a pass-through of the screenshot without any artwork do copy the
172+
[`batocera-artwork.xml`](https://github.com/Gemba/skyscraper/blob/master/batocera-artwork.xml)
173+
alongside to your `config.ini`. Add the artwork file in your configuration
174+
file as seen in the
175+
[`config.ini.example`](https://github.com/Gemba/skyscraper/blob/b8ca88f908b384c31148deccb8599ed439b81043/config.ini.example#L191-L192).
176+
1. Mount the root folder of Batocera in your Desktop system. Let the mountpoint
177+
be `/home/mylogin/bato_sshfs` in this example:
178+
```bash
179+
mount -t sshfs root@<batocera-IP-address>:/ /home/mylogin/bato_sshfs
180+
```
181+
2. Change to the platform folder (in this case `snes`) you want to scrape:
182+
```bash
183+
cd /home/mylogin/bato_sshfs/userdata/roms/snes
184+
```
185+
3. Then run on your Desktop system to scrape data from screenscraper and put it
186+
into the Skyscraper cache on your Desktop system:
187+
```bash
188+
Skyscraper -s screenscraper -p snes --flags fanarts,manuals,videos -i "$(pwd)"
189+
-g "$(pwd)" -o "$(pwd)"
190+
```
191+
You can also set the values for [input-](CONFIGINI.md#inputfolder) (`-i`),
192+
[gamelist-](CONFIGINI.md#gamelistfolder) (`-g`) und
193+
[media-folder](CONFIGINI.md#mediafolder) (`-o`) permanently in the Skyscraper
194+
config file.
195+
4. Afterwards run the gamelist creation and media file deployment from
196+
cache:
197+
```bash
198+
Skyscraper -f batocera -p snes --flags videos -i "$(pwd)" -g "$(pwd)" -o
199+
"$(pwd)"
200+
```
201+
5. Do a SSH login to your Batocera system and restart the EmulationStation
202+
```bash
203+
batocera-es-swissknife --restart && emulationstation-standalone
204+
```
205+
Leave the SSH shell open to reload EmulationStation with ++ctrl+c++ for
206+
subsequent gamelist reloads. You can also restart the whole system, however
207+
it takes longer.
208+
6. Navigate to the system/platform you just scraped to review the scraping
209+
result.
210+
211+
!!! tip "New to Skyscraper?"
212+
213+
For starters I suggest to enable (set `true`) these settings:
214+
[`unattended`](CONFIGINI.md#unattend),
215+
[`unattendedSktip`](CONFIGINI.md#unattendSkip) and most importantly
216+
[`gameListBackup`](CONFIGINI.md#gamelistbackup). If you have precious media
217+
files which you may want to keep make also a manual backup of the media folders
218+
of. Also you will have to add your credentials for Screenscraper for example in
219+
the [config file of Skyscraper](CONFIGINI.md#usercreds).
220+
221+
For general advise on SSH usage see the [Batocera
222+
documentation](https://wiki.batocera.org/security).
223+
109224
### Attract-Mode
110225

111226
- Default game list location: `/home/<USER>/.attract/romlists`
@@ -140,4 +255,4 @@ You need to add the individual platform rom directories to Pegasus (if they are
140255

141256
#### Metadata preservation
142257

143-
Skyscraper will preserve any metadata key-value pairs added to the header and / or individual game list entries.
258+
Skyscraper will preserve any metadata key-value pairs added to the header and / or individual game list entries.

docs/IMPORT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ The following describes how to import your own custom textual, artwork and / or
1010

1111
Be sure to also check the [`--cache edit` option](CLIHELP.md#-cache-editnewtype).
1212

13-
### Images, Videos and Game Manuals
13+
### Images, Videos, Fanarts and Game Manuals
1414

1515
To import videos or images into the resource cache, use the following procedure:
1616

1717
- Name your image or video file with the _exact_ base name of the rom you wish to connect it to. Example: `Bubble Bobble.nes` will import images with a filename of `Bubble Bobble.jpg` or `Bubble Bobble.png` or other well-known image formats. As long as the base name is an _exact_ match. Same goes for video files. I recommend only making use of well-known video formats since Skyscraper imports them directly without conversion (unless you [convert them](CONFIGINI.md#videoconvertcommand)), so they need to be supported directly by the frontend you plan to use.
1818
- Game manuals are expected to use PDF format and have the extension `.pdf`. The base name must match the ROM file, thus the game manual of the example is `Bubble Bobble.pdf`.
19-
- Place all of your images, videos or game manuals in the `/home/<USER>/.skyscraper/import/<PLATFORM>/screenshots`, `covers`, `wheels`, `marquees`, `videos` or `manuals` folders.
19+
- Place all of your images, fanarts, videos or game manuals in the `/home/<USER>/.skyscraper/import/<PLATFORM>/screenshots`, `covers`, `wheels`, `marquees`, `fanarts`, `videos` or `manuals` folders.
2020
- Now run Skyscraper with `Skyscraper -p <PLATFORM> -s import`. If you named your files correctly, they will now be imported. Look for the green 'YES' in the output at the rom(s) you've placed files for. This will tell you if it succeeded or not.
2121
- The data is now imported into the resource cache. To make use of it read the section [How to actually use the data?](#how-to-actually-use-the-data) below.
2222

0 commit comments

Comments
 (0)