Importer
Command line
Report on a game, export it to an SD card or upload it to the Switch, from a terminal.
On this page
importer/rsl_import.py needs Python 3.9+ and nothing else. On macOS, the system /usr/bin/python3 works.
Usage
Report only:
python3 importer/rsl_import.py SOURCEReport and export to an SD card (macOS, then Windows):
python3 importer/rsl_import.py SOURCE --out /Volumes/SDpy importer\rsl_import.py SOURCE --out E:\Report and upload to the Switch over FTP:
python3 importer/rsl_import.py SOURCE --out ftp://192.168.1.20:5000SOURCE is a game folder (the distribution root, an SDK project, or the game/ folder itself), or a .zip, .7z or .rar file. Every option is listed in Importer CLI options.
Exit status
| Code | Meaning |
|---|---|
0 | OK |
1 | Refused: an unsafe archive, not a Ren’Py game, an unsupported game, or the export already exists |
2 | Bad arguments |
What gets exported
Only the game directory is copied, and it is always named game/ in the export:
switch/renpy-loader/games/<id>/
├── game/
├── manifest.json
├── cover.jpg when the importer could make one
└── backdrop.jpgNot copied: renpy/, lib/ and the .exe/.app/.sh launchers (the runtime has its own engine), game/saves/ (the developer’s local saves), symlinks, .DS_Store, ._* and __MACOSX.
Updating a game
Without --replace, the importer refuses when games/<id> exists. With it:
- the new
game/is staged next to the export and swapped in by rename; - an existing
game/saves/is moved into the newgame/; - a cover or background chosen earlier is kept, unless this export chooses one too;
switch/renpy-loader/saves/is never touched.
Game id and title
- Title:
config.namefromgame/options.rpy; if missing, the folder or archive name. - Id: made from the title, or from the folder name if the title has no ASCII letters or digits. It is lowercased;
a-zand0-9are kept, every other run of characters becomes one-; it is capped at 63 characters (the loader skips folder names of 64 bytes or more). If nothing is left, it becomesgame.
| Title | Id |
|---|---|
The Question | the-question |
ドキドキ | game |
The id is the folder name, and so also the save and log folder name. If two games end up with the same id, use --id for the second one.
Tools it looks for
7z, ffprobe and ffmpeg are searched for in this order:
- the
--toolsfolder; PATH(on Windows, with.exeadded);/opt/homebrew/bin,/usr/local/binandC:\Program Files\7-Zip. An app started from the macOS Finder only gets/usr/bin:/bin:/usr/sbin:/sbinasPATH, so Homebrew tools are found through these.
| Missing | Effect |
|---|---|
| 7-Zip | Only .7z and .rar files cannot be read. |
ffprobe | Videos are left unchecked, with a warning. |
ffmpeg | --optimize copies videos unchanged and says so; no cover or background is made. |