Lunii Pack Manager is a Proof of Concept application to demonstrate management of stories in a Lunii Storyteller.
This is a simple CLI application that allows basic operations like export/import/remove.
📣 Communauté Discord autour de Lunii
(nothing)
update official db file, fetch db in homedir if not present + flag to refresh on demandupdate structure with v2 v3 supportvalidate cipher / decipher on v2v3 specificsread keys from bin file (optionnal)validate keys
validate cipher / decipher on v3import pycryptdome
update all exports to .mp3 .bmp .plain (v2 only) -> .plain.pkupdate import to support directoryupdate import to cipherv2 : with xxxteav3 : with aes using .md_btadd support for .v2.pkadd support for prev .zip
if v3 bin key file, allowexport for v3 (if keys available), as plain ?
- ADD CHECK stories
- for v2, check bt, parse ri si, check all files present, check bmp size, check mp3 size
- validate plain.pk before import
- ri, si, li, ni present
- check contents (rf sf files present)
- check rf sf sizes ?
- Lunii - Pack Manager (CLI)
- Links / Similar repos
$ python .\src\lunii-pm.py --version
Lunii Storyteller - Pack Manager (CLI), version 2.0.2
$ python .\src\lunii-pm.py --help
Usage: lunii-pm.py [OPTIONS]
Options:
--version Show the version and exit.
-v, --verbose Verbose mode
-f, --find Identifying all Lunii storytellers connected
-d, --dev DIRECTORY Specifies which drives letter to use for Lunii
Storyteller
-r, --refresh Refresh official db from Lunii
-i, --info Prints informations about the storyteller
-l, --list List all stories available in Lunii Storyteller
-k, --key FILE Device Key file for Lunii v3
-pe, --pack-export TEXT Export selected story to an archive (or use ALL)
-pi, --pack-import PATH Import a story archive in the Lunii
-pr, --pack-remove TEXT Remove a story from the Lunii
--help Show this message and exit.
Prepare a Vitrual environment for your project and install requirements
$ python -m venv venv
Switch to your venv
- on Linux
$ source venv/bin/activate
- on Windows
$ .\venv\Scripts\activate.bat
Install dependencies
$ python -m pip install -r requirements.txt
$ pyinstaller lunii-pm.spec
...
$ dist\lunii-pm.exe
Filename : story_name.8B_UUID.plain.pk
Ciphering : None / Plain
Structure :
uuid.bin
ni
li.plain
ri.plain
si.plain
rf/000/XXYYXXYY.bmp
sf/000/XXYYXXYY.mp3
Filename :
LONG_UUID.v2.pk
LONG_UUID.v2.pk
LONG_UUID.pk
Ciphering : Generic Key
Structure :
00000000000000000000000000000000/ni
00000000000000000000000000000000/li
00000000000000000000000000000000/ri
00000000000000000000000000000000/si
00000000000000000000000000000000/rf/000/XXYYXXYY
00000000000000000000000000000000/sf/000/XXYYXXYY
Filename : 8B_UUID - story_name.zip
Ciphering : Generic Key
Structure :
uuid.bin
ni
li
ri
si
rf/000/XXYYXXYY
sf/000/XXYYXXYY
Filename : AGE+] story_title DASHED_UUID.7z
Ciphering : Generic Key
Structure :
00000000-0000-0000-0000-000000000000/ni
00000000-0000-0000-0000-000000000000/li
00000000-0000-0000-0000-000000000000/ri
00000000-0000-0000-0000-000000000000/si
00000000-0000-0000-0000-000000000000/rf/000/XXYYXXYY
00000000-0000-0000-0000-000000000000/sf/000/XXYYXXYY
> .\lunii-pm.exe -f
Found 1 connected device(s)
"D:\" - 15 stories
> .\lunii-pm.exe -i
INFO : using Lunii device on D:\
Lunii device on "D:\"
- firmware : v2.22
- snu : b'00 11 22 33 44 55 66 77'
- dev key : b'00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 77'
- stories : 4x
Or with device specified :
> .\lunii-pm.exe -d D:\ -i
Lunii device on "D:\"
- firmware : v2.22
- snu : b'00 11 22 33 44 55 66 77'
- dev key : b'00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 77'
- stories : 4x
> .\lunii-pm.exe -i
Lunii device on "D:\"
- firmware : v3.1.3
- snu : b'23 02 30 11 22 33 44'
- dev key : b''
- dev iv : b''
- stories : 4x
> .\lunii-pm.exe -l
INFO : using Lunii device on D:\
Lunii device on "D:\"
- firmware : v2.22
- snu : b'00 11 22 33 44 55 66 77'
- dev key : b'00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 77'
- stories : 4x
> 4058B612 - Oh les pirates !
> 4CDF38C6 - Suzanne et Gaston
> B4D11DC9 - Panique aux 6 Royaumes
> FFB5D68A - Suzanne et Gaston fêtent Pâques
Or using vebose mode
> .\lunii-pm.exe -l -v
INFO : using Lunii device on D:\
Lunii device on "D:\"
- firmware : v2.22
- snu : b'00 11 22 33 44 55 66 77'
- dev key : b'00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 77'
- stories : 4x
UUID | Name | Source
------------------------------------ | ------------------------------------------------------------ | ------
D56A4975-417E-4D04-AEB3-21254058B612 | Oh les pirates ! |
C4139D59-872A-4D15-8CF1-76D34CDF38C6 | Suzanne et Gaston |
03933BA4-4FBF-475F-9ECC-35EFB4D11DC9 | Panique aux 6 Royaumes |
9D9521E5-84AC-4CC8-9B09-8D0AFFB5D68A | Suzanne et Gaston fêtent Pâques |
> .\lunii-pm.exe -pe FFB
INFO : using Lunii device on D:\
[FFB5D68A - Suzanne et Gaston fêtent Pâques]
> Zipping story ...
Processing sf\000\FC9905BB: 100%|██████████████████████████████████████| 81/81 [00:08<00:00]
> Adding UUID ...
Successfully exported to :
FFB5D68A - Suzanne et Gaston fêtent Pâques.zip
> python .\src\lunii-pm.py -d D:\ -pe CF1
[6C8D9CF1 - Les Aventures de Zoé – Les 6 Royaumes]
ERROR: Lunii v3 requires Device Key for genuine story export.
ERROR: Failed to export
> python .\src\lunii-pm.py -d D:\ -pe CF1 -k .\test\_v3\odaneel.keys
[6C8D9CF1 - Les Aventures de Zoé – Les 6 Royaumes]
> Zipping story ...
Processing rf\000\1475EA27: 100%|███████████████████████████████████████| 65/65 [00:07<00:00]
> Adding UUID ...
Successfully exported to :
Les Aventures de Zoe Les 6 Royaumes.6C8D9CF1.plain.pk
> .\lunii-pm.exe -pe all
INFO : using Lunii device on D:\
1/3 [FFB5D68A - Suzanne et Gaston fêtent Pâques]
> Zipping story ...
Processing sf\000\FC9905BB: 100%|██████████████████████████████████████| 33/33 [00:00<00:00]
> Adding UUID ...
2/3 [9A2D7E89 - Au Pays des Loups]
> Zipping story ...
Processing sf\000\EAC43510: 100%|██████████████████████████████████████| 65/65 [00:01<00:00]
> Adding UUID ...
3/3 [4CDF38C6 - Suzanne et Gaston]
> Zipping story ...
Processing sf\000\43FA0451: 100%|██████████████████████████████████████| 32/32 [00:00<00:00]
> Adding UUID ...
Successfully exported to :
FFB5D68A - Suzanne et Gaston fêtent Pâques.zip
9A2D7E89 - Au Pays des Loups.zip
4CDF38C6 - Suzanne et Gaston.zip
> .\lunii-pm.exe -pr FFB
INFO : using Lunii device on D:\
Removing ffb5d68a - Suzanne et Gaston fêtent Pâques...
Are you sure ? [y/N] y
Story removed.
NOTE : No need to type full ID given in list command. Just enough to avoid confusion.
> .\lunii-pm.exe -pi '.\FFB5D68A - Suzanne et Gaston fêtent Pâques.zip'
INFO : using Lunii device on D:\
Processing sf/000/FC9905BB: 100%|██████████████████████████████████████| 82/82 [00:29<00:00]
INFO : Authorization file creation...
Story imported.
If a story already exists, import will fail
> .\lunii-pm.exe -pi '.\FFB5D68A - Suzanne et Gaston fêtent Pâques.zip'
INFO : using Lunii device on D:\
ERROR: This story is already loaded, aborting !
ERROR: Failed to import
> .\lunii-pm.exe -pi ./packs
INFO : using Lunii device on D:\
Importing 4 archives...
1/4 > U:\Lunii\plain.pk\1+\Promenons-nous avec les chiffres !.70FFDD7E.plain.pk
Processing sf/000/E3E6340F.mp3: 100%|██████████████████████████████████| 31/31 [00:00<00:00]
INFO : Authorization file creation...
2/4 > U:\Lunii\plain.pk\1+\Promenons-nous dans les bruits - L'intégrale.75F16A2F.plain.pk
Processing sf/000/FBB8714C.mp3: 100%|████████████████████████████████| 120/120 [00:02<00:00]
INFO : Authorization file creation...
3/4 > U:\Lunii\plain.pk\1+\Promenons-nous dans l’hiver !.FF6364AF.plain.pk
Processing sf/000/ED6CF27E.mp3: 100%|██████████████████████████████████| 35/35 [00:00<00:00]
INFO : Authorization file creation...
4/4 > U:\Lunii\plain.pk\1+\Promenons-nous à la ferme !.43019489.plain.pk
Processing sf/000/F9C27A67.mp3: 100%|██████████████████████████████████| 35/35 [00:00<00:00]
INFO : Authorization file creation...
Stories imported.
- Lunii v3 - Reverse Engineering
- STUdio - Story Teller Unleashed
- (GitHub) STUdio, Story Teller Unleashed
- Studio-Pack-Generator
- Lunii Admin (a GO implementation to create custom stories)