-
Notifications
You must be signed in to change notification settings - Fork 133
Tips
marian-m12l edited this page Apr 23, 2020
·
1 revision
The following batch file (.BAT) allows you to automatically retrieve the security token so that you can see the titles and images of the official Lunii stories when running Studio. First plug in the Lunii box, and run the Luniistore. This will generate a security token. Then run the following batch file (copy in a new file and call it token.bat)
@setlocal enableextensions enabledelayedexpansion
@echo off
set STUDIO_PATH=%~dp0
set DOT_STUDIO=%UserProfile%\.studio
set LOCAL_LUNIITHEQUE=%UserProfile%\AppData\Roaming\Luniitheque
:: Copy token
for /f "tokens=5 delims=:," %%a in ('type %LOCAL_LUNIITHEQUE%\.local.properties^|find "tokens"') do (
set tok=%%a & goto :continue
)
:continue
set tok=%tok:~1%
set tokk=!tok:~0,-2!
SET URL=https://lunii-data-prod.firebaseio.com/packs.json?auth=%tokk%
curl %URL% -o %DOT_STUDIO%\db\official.json
Please note that this batch file requires **curl **which might not be installed by default on your windows platform. If this batch file works for you, you can copy it into studio-windows.bat so that it automatically runs when you launch studio.