nnnotes 0.1.4__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. nnnotes-0.2.1/.gitignore +11 -0
  2. {nnnotes-0.1.4 → nnnotes-0.2.1}/CHANGELOG.md +36 -0
  3. {nnnotes-0.1.4 → nnnotes-0.2.1}/PKG-INFO +27 -28
  4. {nnnotes-0.1.4 → nnnotes-0.2.1}/README.en.md +4 -6
  5. nnnotes-0.2.1/README.md +156 -0
  6. nnnotes-0.2.1/docs/assets.md +214 -0
  7. nnnotes-0.2.1/docs/commands.md +716 -0
  8. nnnotes-0.2.1/docs/configuration.md +248 -0
  9. nnnotes-0.2.1/docs/contracts.md +252 -0
  10. nnnotes-0.2.1/docs/jp.md +114 -0
  11. nnnotes-0.2.1/docs/music-data.md +489 -0
  12. nnnotes-0.2.1/docs/replay.md +66 -0
  13. nnnotes-0.2.1/docs/stages.md +219 -0
  14. nnnotes-0.2.1/docs/ui.md +66 -0
  15. nnnotes-0.2.1/docs/views.md +678 -0
  16. {nnnotes-0.1.4 → nnnotes-0.2.1}/pyproject.toml +13 -11
  17. nnnotes-0.2.1/scripts/atom_eval.py +1417 -0
  18. nnnotes-0.2.1/scripts/atom_eval_pillow.py +62 -0
  19. nnnotes-0.2.1/scripts/atom_eval_unityrs.py +372 -0
  20. nnnotes-0.2.1/scripts/gen_font_settings.py +52 -0
  21. nnnotes-0.2.1/scripts/gen_typetrees.py +254 -0
  22. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/__init__.py +1 -1
  23. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/advmedia.py +13 -2
  24. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/advui.py +12 -10
  25. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/catalog.py +17 -3
  26. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/cli.py +10 -14
  27. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/contract.py +1 -1
  28. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/export.py +45 -4
  29. nnnotes-0.2.1/src/nnnotes/fontsettings.json +260 -0
  30. nnnotes-0.2.1/src/nnnotes/fontsettings.py +280 -0
  31. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/liveui.py +3 -3
  32. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/musicdata.py +303 -276
  33. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/replaydata.py +43 -2
  34. nnnotes-0.2.1/src/nnnotes/schemas/__init__.py +19 -0
  35. nnnotes-0.2.1/src/nnnotes/schemas/addresses.schema.json +218 -0
  36. nnnotes-0.2.1/src/nnnotes/schemas/artifact.schema.json +149 -0
  37. nnnotes-0.2.1/src/nnnotes/schemas/artifacts.schema.json +57 -0
  38. nnnotes-0.2.1/src/nnnotes/schemas/catalog-diff.schema.json +642 -0
  39. nnnotes-0.2.1/src/nnnotes/schemas/catalog-index.schema.json +681 -0
  40. nnnotes-0.2.1/src/nnnotes/schemas/catalogs.schema.json +132 -0
  41. nnnotes-0.2.1/src/nnnotes/schemas/census.schema.json +393 -0
  42. nnnotes-0.2.1/src/nnnotes/schemas/common.schema.json +245 -0
  43. nnnotes-0.2.1/src/nnnotes/schemas/cost.schema.json +56 -0
  44. nnnotes-0.2.1/src/nnnotes/schemas/coverage.schema.json +84 -0
  45. nnnotes-0.2.1/src/nnnotes/schemas/failures.schema.json +57 -0
  46. nnnotes-0.2.1/src/nnnotes/schemas/layout.schema.json +52 -0
  47. nnnotes-0.2.1/src/nnnotes/schemas/music-data.schema.json +1895 -0
  48. nnnotes-0.2.1/src/nnnotes/schemas/plan.schema.json +188 -0
  49. nnnotes-0.2.1/src/nnnotes/schemas/result.schema.json +202 -0
  50. nnnotes-0.2.1/src/nnnotes/schemas/run.schema.json +235 -0
  51. nnnotes-0.2.1/src/nnnotes/schemas/scripts.schema.json +23 -0
  52. nnnotes-0.2.1/src/nnnotes/schemas/task.schema.json +52 -0
  53. nnnotes-0.2.1/src/nnnotes/schemas/view.schema.json +280 -0
  54. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/storyfonts.py +45 -50
  55. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/storyhost.py +5 -3
  56. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/textstyle.py +9 -12
  57. nnnotes-0.2.1/tests/conftest.py +19 -0
  58. nnnotes-0.2.1/tests/fakeunity.py +382 -0
  59. nnnotes-0.2.1/tests/golden/cri.audio.json +20 -0
  60. nnnotes-0.2.1/tests/golden/cri.movie.json +39 -0
  61. nnnotes-0.2.1/tests/golden/sprite.crop.json +22 -0
  62. nnnotes-0.2.1/tests/golden/unity.export.json +103 -0
  63. nnnotes-0.2.1/tests/synth.py +334 -0
  64. nnnotes-0.2.1/tests/test_advvideo.py +522 -0
  65. nnnotes-0.2.1/tests/test_apkset.py +115 -0
  66. nnnotes-0.2.1/tests/test_atom_eval.py +231 -0
  67. nnnotes-0.2.1/tests/test_atoms_mesh.py +357 -0
  68. nnnotes-0.2.1/tests/test_atoms_sprite.py +235 -0
  69. nnnotes-0.2.1/tests/test_atoms_texture.py +272 -0
  70. nnnotes-0.2.1/tests/test_blob_memo.py +101 -0
  71. nnnotes-0.2.1/tests/test_cache.py +107 -0
  72. nnnotes-0.2.1/tests/test_catalog.py +206 -0
  73. nnnotes-0.2.1/tests/test_catalog_lazy.py +194 -0
  74. nnnotes-0.2.1/tests/test_catalog_versions.py +227 -0
  75. nnnotes-0.2.1/tests/test_catalogdb.py +320 -0
  76. nnnotes-0.2.1/tests/test_census.py +211 -0
  77. nnnotes-0.2.1/tests/test_cli.py +373 -0
  78. nnnotes-0.2.1/tests/test_cli_assets.py +1031 -0
  79. nnnotes-0.2.1/tests/test_compress.py +67 -0
  80. nnnotes-0.2.1/tests/test_config.py +193 -0
  81. nnnotes-0.2.1/tests/test_configfile.py +228 -0
  82. nnnotes-0.2.1/tests/test_contract.py +240 -0
  83. nnnotes-0.2.1/tests/test_crilips.py +199 -0
  84. nnnotes-0.2.1/tests/test_cristages.py +554 -0
  85. nnnotes-0.2.1/tests/test_deckdata.py +495 -0
  86. nnnotes-0.2.1/tests/test_fontsettings.py +119 -0
  87. nnnotes-0.2.1/tests/test_gameapi.py +393 -0
  88. nnnotes-0.2.1/tests/test_goldens.py +125 -0
  89. nnnotes-0.2.1/tests/test_jp.py +461 -0
  90. nnnotes-0.2.1/tests/test_jsonio.py +45 -0
  91. nnnotes-0.2.1/tests/test_layout.py +363 -0
  92. nnnotes-0.2.1/tests/test_link.py +279 -0
  93. nnnotes-0.2.1/tests/test_live_options.py +298 -0
  94. nnnotes-0.2.1/tests/test_live_options_web.py +166 -0
  95. nnnotes-0.2.1/tests/test_master.py +143 -0
  96. nnnotes-0.2.1/tests/test_mesh_texture_guards.py +94 -0
  97. nnnotes-0.2.1/tests/test_modelstages.py +422 -0
  98. nnnotes-0.2.1/tests/test_musicdata.py +1052 -0
  99. nnnotes-0.2.1/tests/test_objexport.py +1016 -0
  100. nnnotes-0.2.1/tests/test_orchestrate.py +305 -0
  101. nnnotes-0.2.1/tests/test_pipeline.py +163 -0
  102. nnnotes-0.2.1/tests/test_plan.py +149 -0
  103. nnnotes-0.2.1/tests/test_player.py +140 -0
  104. nnnotes-0.2.1/tests/test_readsets.py +442 -0
  105. nnnotes-0.2.1/tests/test_regions.py +246 -0
  106. nnnotes-0.2.1/tests/test_replaydata.py +222 -0
  107. nnnotes-0.2.1/tests/test_repo.py +58 -0
  108. nnnotes-0.2.1/tests/test_room.py +392 -0
  109. nnnotes-0.2.1/tests/test_sniff.py +137 -0
  110. nnnotes-0.2.1/tests/test_speed_exact.py +534 -0
  111. nnnotes-0.2.1/tests/test_spot.py +159 -0
  112. nnnotes-0.2.1/tests/test_stages.py +274 -0
  113. nnnotes-0.2.1/tests/test_statscache.py +160 -0
  114. nnnotes-0.2.1/tests/test_store.py +181 -0
  115. nnnotes-0.2.1/tests/test_story_closure.py +137 -0
  116. nnnotes-0.2.1/tests/test_story_fonts.py +809 -0
  117. nnnotes-0.2.1/tests/test_story_host.py +512 -0
  118. nnnotes-0.2.1/tests/test_story_kinds.py +100 -0
  119. nnnotes-0.2.1/tests/test_story_site.py +663 -0
  120. nnnotes-0.2.1/tests/test_story_ui.py +542 -0
  121. nnnotes-0.2.1/tests/test_textstyle.py +227 -0
  122. nnnotes-0.2.1/tests/test_typetrees.py +382 -0
  123. nnnotes-0.2.1/tests/test_ui.py +183 -0
  124. nnnotes-0.2.1/tests/test_views.py +749 -0
  125. nnnotes-0.2.1/tests/test_voices.py +756 -0
  126. nnnotes-0.2.1/tests/test_voices_story.py +541 -0
  127. nnnotes-0.2.1/tests/test_web.py +296 -0
  128. nnnotes-0.2.1/tests/test_webmodel.py +716 -0
  129. nnnotes-0.1.4/rust/Cargo.lock +0 -285
  130. nnnotes-0.1.4/rust/Cargo.toml +0 -24
  131. nnnotes-0.1.4/rust/build.rs +0 -33
  132. nnnotes-0.1.4/rust/rustfmt.toml +0 -2
  133. nnnotes-0.1.4/rust/src/lib.rs +0 -116
  134. {nnnotes-0.1.4 → nnnotes-0.2.1}/LICENSE +0 -0
  135. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/__main__.py +0 -0
  136. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/acb.py +0 -0
  137. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/addressables.py +0 -0
  138. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/adv.py +0 -0
  139. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/advcommand.py +0 -0
  140. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/advscene.py +0 -0
  141. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/advvideo.py +0 -0
  142. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/apkset.py +0 -0
  143. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/atoms/__init__.py +0 -0
  144. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/atoms/astc.py +0 -0
  145. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/atoms/gltf.py +0 -0
  146. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/atoms/mesh.py +0 -0
  147. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/atoms/png.py +0 -0
  148. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/atoms/reader.py +0 -0
  149. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/atoms/sniff.py +0 -0
  150. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/atoms/sprite.py +0 -0
  151. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/atoms/texture.py +0 -0
  152. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/cache.py +0 -0
  153. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/catalogdb.py +0 -0
  154. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/census.py +0 -0
  155. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/cli_assets.py +0 -0
  156. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/compress.py +0 -0
  157. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/config.py +0 -0
  158. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/configfile.py +0 -0
  159. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/cri.py +0 -0
  160. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/crikey.py +0 -0
  161. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/crilips.py +0 -0
  162. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/cristages.py +0 -0
  163. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/deckdata.py +0 -0
  164. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/gameapi.py +0 -0
  165. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/jp.py +0 -0
  166. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/jsonio.py +0 -0
  167. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/languages.py +0 -0
  168. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/layout.py +0 -0
  169. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/link.py +0 -0
  170. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/live.py +0 -0
  171. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/live2d.py +0 -0
  172. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/liveaudio.py +0 -0
  173. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/livenotes.py +0 -0
  174. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/liveoptions.py +0 -0
  175. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/livescene.py +0 -0
  176. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/master.py +0 -0
  177. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/modelstages.py +0 -0
  178. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/motion.py +0 -0
  179. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/nnnotes.example.toml +0 -0
  180. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/objexport.py +0 -0
  181. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/orchestrate.py +0 -0
  182. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/plan.py +0 -0
  183. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/player.py +0 -0
  184. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/room.py +0 -0
  185. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/score.py +0 -0
  186. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/shader.py +0 -0
  187. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/spot.py +0 -0
  188. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/stages.py +0 -0
  189. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/store.py +0 -0
  190. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/story.py +0 -0
  191. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/storysite.py +0 -0
  192. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/storyvoices.py +0 -0
  193. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/tmpfont.py +0 -0
  194. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/typetrees/6000.3.12f1.json +0 -0
  195. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/ui.py +0 -0
  196. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/unity.py +0 -0
  197. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/viewrules.json +0 -0
  198. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/views.py +0 -0
  199. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/voices.py +0 -0
  200. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/web.py +0 -0
  201. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/webaudio.py +0 -0
  202. {nnnotes-0.1.4 → nnnotes-0.2.1}/src/nnnotes/webmodel.py +0 -0
@@ -0,0 +1,11 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .venv/
7
+ nnnotes.toml
8
+ *.local.toml
9
+ .env
10
+ out/
11
+ cache/
@@ -2,6 +2,42 @@
2
2
 
3
3
  All notable changes to this project are listed here. Versions follow [Semantic Versioning](https://semver.org/).
4
4
 
5
+ ## [0.2.1](https://github.com/MetaSekaiLab/nnnotes/compare/v0.2.0...v0.2.1) - 2026-10-13
6
+
7
+ ### Build
8
+
9
+ - **deck:** Ournotes-deck v0.0.8 ([53da36f](https://github.com/MetaSekaiLab/nnnotes/commit/53da36f7b73e4ccf9e1158cd571244d87648aa3f))
10
+
11
+ ## [0.2.0](https://github.com/MetaSekaiLab/nnnotes/compare/v0.1.4...v0.2.0) - 2026-10-13
12
+
13
+ ### Features
14
+
15
+ - **music-data:** Reuse cached chart statistics of unchanged model sources ([1bdbd64](https://github.com/MetaSekaiLab/nnnotes/commit/1bdbd640755e4f49e0ab302c74c1ed871aef7f70))
16
+ - **music-data:** Measure chart statistics with nominal lottery and skill probabilities ([303b850](https://github.com/MetaSekaiLab/nnnotes/commit/303b8503621180a016c41c574a41864ac67f7b1f))
17
+ - **fonts:** Read the game font settings from a built-in table in open-font exports ([dfe3c86](https://github.com/MetaSekaiLab/nnnotes/commit/dfe3c86524ef193361eee751983d8d3b60dddecd))
18
+ - **music-data:** Keep native simulation programs and export Snap labels ([096361a](https://github.com/MetaSekaiLab/nnnotes/commit/096361a5f0f585aa5ee332c5d4997958f3064254))
19
+ - **schemas:** Ship the JSON Schemas with the package as nnnotes.schemas ([7b66c09](https://github.com/MetaSekaiLab/nnnotes/commit/7b66c0923ad7c581ba7cf4ff7318f54bc9c80fb1))
20
+
21
+ ### Documentation
22
+
23
+ - Describe the atoms and the PNG level without measurements ([babe470](https://github.com/MetaSekaiLab/nnnotes/commit/babe4706bb862bb7235b25d6bde1c5e7dec72dc1))
24
+
25
+ ### Build
26
+
27
+ - **deck:** Ournotes-deck v0.0.3 ([c71e8f5](https://github.com/MetaSekaiLab/nnnotes/commit/c71e8f55b2713b9f394f27867f682cc8aecbaffe))
28
+ - **deck:** Ournotes-deck v0.0.4 ([6139e40](https://github.com/MetaSekaiLab/nnnotes/commit/6139e40c189f653e53180f39a3137a1327085e7d))
29
+ - **deck:** Ournotes-deck v0.0.5 ([7f2c950](https://github.com/MetaSekaiLab/nnnotes/commit/7f2c950d4c6008a91be2cbe32f409dc5cddbff82))
30
+ - **deck:** Ournotes-deck v0.0.6 ([a4b9c4e](https://github.com/MetaSekaiLab/nnnotes/commit/a4b9c4ea7c03ce569155ed389a0a2df744b5b849))
31
+ - Ship nnnotes as a pure Python package with the deck model as the extra deck ([5c1e9c6](https://github.com/MetaSekaiLab/nnnotes/commit/5c1e9c6613234418c5b7ece2b2750708f6633d1c))
32
+
33
+ ### CI
34
+
35
+ - **release:** Verify wheels and reuse quality checks ([46cf165](https://github.com/MetaSekaiLab/nnnotes/commit/46cf165d28a4d3dfb44e232c7831a47acb3ba184))
36
+
37
+ ### Miscellaneous
38
+
39
+ - **rust:** Order chartstats imports ([12672e8](https://github.com/MetaSekaiLab/nnnotes/commit/12672e891ca1c06df6d838681325edc9694fe45e))
40
+
5
41
  ## [0.1.4](https://github.com/MetaSekaiLab/nnnotes/compare/v0.1.3...v0.1.4) - 2026-10-06
6
42
 
7
43
  ### Features
@@ -1,32 +1,34 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: nnnotes
3
- Version: 0.1.4
4
- Classifier: Programming Language :: Python :: 3
3
+ Version: 0.2.1
4
+ Summary: Offline data toolkit for BanG Dream! Our Notes game files: catalogs, bundles, master data, stories, Live2D, audio and live charts
5
+ Project-URL: Homepage, https://github.com/MetaSekaiLab/nnnotes
6
+ Project-URL: Source, https://github.com/MetaSekaiLab/nnnotes
7
+ Project-URL: Issues, https://github.com/MetaSekaiLab/nnnotes/issues
8
+ Author: MetaMiku, emptysekai
9
+ License-Expression: MIT
10
+ License-File: LICENSE
5
11
  Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
6
13
  Classifier: Topic :: Multimedia
7
- Requires-Dist: unitypy>=1.25
14
+ Requires-Python: >=3.11
15
+ Requires-Dist: brotli>=1.1
16
+ Requires-Dist: grpcio>=1.49.1
8
17
  Requires-Dist: numpy>=2.0
9
18
  Requires-Dist: pillow>=10.0
10
19
  Requires-Dist: pycryptodome>=3.20
11
- Requires-Dist: grpcio>=1.49.1
12
- Requires-Dist: brotli>=1.1
13
- Requires-Dist: fonttools>=4.50 ; extra == 'fonts'
14
- Requires-Dist: freetype-py>=2.5 ; extra == 'fonts'
15
- Requires-Dist: scipy>=1.13 ; extra == 'fonts'
16
- Requires-Dist: pytest>=8 ; extra == 'test'
17
- Requires-Dist: pyflakes>=3.2 ; extra == 'test'
18
- Requires-Dist: jsonschema>=4.18 ; extra == 'test'
20
+ Requires-Dist: unitypy>=1.25
21
+ Provides-Extra: deck
22
+ Requires-Dist: ournotes-sim==0.0.8; extra == 'deck'
19
23
  Provides-Extra: fonts
24
+ Requires-Dist: fonttools>=4.50; extra == 'fonts'
25
+ Requires-Dist: freetype-py>=2.5; extra == 'fonts'
26
+ Requires-Dist: scipy>=1.13; extra == 'fonts'
20
27
  Provides-Extra: test
21
- License-File: LICENSE
22
- Summary: Offline data toolkit for BanG Dream! Our Notes game files: catalogs, bundles, master data, stories, Live2D, audio and live charts
23
- Author: MetaMiku, emptysekai
24
- License-Expression: MIT
25
- Requires-Python: >=3.11
26
- Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
27
- Project-URL: Homepage, https://github.com/MetaSekaiLab/nnnotes
28
- Project-URL: Issues, https://github.com/MetaSekaiLab/nnnotes/issues
29
- Project-URL: Source, https://github.com/MetaSekaiLab/nnnotes
28
+ Requires-Dist: jsonschema>=4.18; extra == 'test'
29
+ Requires-Dist: pyflakes>=3.2; extra == 'test'
30
+ Requires-Dist: pytest>=8; extra == 'test'
31
+ Description-Content-Type: text/markdown
30
32
 
31
33
  # nnnotes?!
32
34
 
@@ -39,7 +41,7 @@ for configuration and validation limits.
39
41
  nnnotes is an offline data toolkit for the game files of BanG Dream! Our Notes: it reads Addressables catalogs,
40
42
  downloads and decrypts asset bundles, downloads and decodes master data, and exports stories, Live2D models, spots,
41
43
  shaders, CRI audio and live charts as structured JSON and common file formats. The charts, Live2D models and stories `web`
42
- exports are the data that [ournotes-player](https://github.com/empty-sekai/ournotes-player) reads. The naming was inspired by [mos9527/sssekai](https://github.com/mos9527/sssekai).
44
+ exports are the data that [ournotes-player](https://github.com/empty-sekai/ournotes-player) reads. The naming was inspired by sssekai.
43
45
 
44
46
  This is an unofficial fan project, not affiliated with the game's developer or operator. The repository contains no
45
47
  game assets, keys or server addresses: users supply the game files, the keys needed for decryption and the server
@@ -58,7 +60,8 @@ nnnotes config check # each setting's origin and whether it is valid
58
60
  - Scripts and AI agents get no questions: `nnnotes config init --user --no-input --set SECTION.KEY=VALUE ...` writes
59
61
  the file at once, `nnnotes config set SECTION.KEY VALUE` changes one value (VALUE `-` reads it from standard input,
60
62
  so a key need not appear on the command line), and `nnnotes config check --json` reports the states for machines.
61
- - `--fonts game` also needs `pip install 'nnnotes[fonts]'`; the APK, the master data and the external tools are listed
63
+ - `--fonts game` also needs `pip install 'nnnotes[fonts]'`, and the deck statistics of `music-data` need
64
+ `pip install 'nnnotes[deck]'`; the APK, the master data and the external tools are listed
62
65
  under Requirements below.
63
66
 
64
67
  ## Features
@@ -84,7 +87,7 @@ nnnotes config check # each setting's origin and whether it is valid
84
87
  | `ui` (experimental) | APK set and its embedded catalog | an offline serialized prefab library with dependency roots, AnimatorControllers, stable references and PNG/font resources for the optional ournotes-player UI preview ([format and limits](https://github.com/MetaSekaiLab/nnnotes/blob/main/docs/ui.md)) |
85
88
  | `live` | music ID + difficulty | a full chart directory: chart and runtime notes, 3D scene, note and effect assets, BGM and sounds, sound routing |
86
89
  | `web` | `--pair music:difficulty` (repeatable) or `--all`; `--live2d model` (repeatable) or `--all-live2d`; `--story episode` (repeatable) or `--all-stories`; `--region region` (repeatable) or `--all-regions` | an ournotes-player static site: shared player + per-chart / per-model / per-episode manifests + content-addressed assets; the Live2D models of the stories are built first as models, listed in `models.json`, and the story manifests reference them; one site can serve several regions, with listing texts in five languages; a story's interface texts are grouped by language, with TextMeshPro font assets generated from open fonts (the game's fonts with `--fonts game`); compressible assets (JSON, shaders, moc3, ...) are stored gzip encoded by default (`--compress br` / `none`) |
87
- | `music-data` | master data files (`--master-files` directory or `--apk-master`), or decoded master data with its manifest (`--decoded-master`) | one JSON file with every song and chart: titles and credits in five languages, bands, vocal characters, category, tags, release time, score ranks, BGM length; the Gekisou catalog (member cards, snaps and their Gekisou skills and support skills); per difficulty the level, note counts, BPM, chart times, skill events and fever ranges; and the chart statistics the deck model ournotes-deck (built into nnnotes) measures on its whole-live simulation (the no-skill score, the weight of every score-up skill kind at every position), plus single-shape Gekisou aptitude (increments and standard errors, not an optimal deck; omit with `--no-gekisou-aptitude`). `--full` adds the deck model's input: every chart's runtime notes and the master data tables about cards, skills, bonuses, scores and events ([format](https://github.com/MetaSekaiLab/nnnotes/blob/main/docs/music-data.md)) |
90
+ | `music-data` | master data files (`--master-files` directory or `--apk-master`), or decoded master data with its manifest (`--decoded-master`) | one JSON file with every song and chart: titles and credits in five languages, bands, vocal characters, category, tags, release time, score ranks, BGM length; the Gekisou catalog (member cards, snaps and their Gekisou skills and support skills); per difficulty the level, note counts, BPM, chart times, skill events and fever ranges; and the chart statistics the deck model ournotes-deck (installed with `pip install 'nnnotes[deck]'`) measures on its whole-live simulation (the no-skill score, the weight of every score-up skill kind at every position), plus single-shape Gekisou aptitude (increments and standard errors, not an optimal deck; omit with `--no-gekisou-aptitude`). `--full` adds the deck model's input: every chart's runtime notes and the master data tables about cards, skills, bonuses, scores and events ([format](https://github.com/MetaSekaiLab/nnnotes/blob/main/docs/music-data.md)) |
88
91
 
89
92
  Export conventions:
90
93
 
@@ -218,9 +221,6 @@ settings (TOML / environment / flags)
218
221
  Every JSON file is written by one writer (`jsonio`), so encoding, line endings and number formatting are the same
219
222
  everywhere.
220
223
 
221
- See [docs/performance.md](https://github.com/MetaSekaiLab/nnnotes/blob/main/docs/performance.md) for where a
222
- `web` build spends its time and which parts of it run in compiled code.
223
-
224
224
  ## Changelog
225
225
 
226
226
  [CHANGELOG.md](https://github.com/MetaSekaiLab/nnnotes/blob/main/CHANGELOG.md) lists the changes in every version,
@@ -235,4 +235,3 @@ When a `vX.Y.Z` tag is pushed, the release workflow checks the versions and that
235
235
  ## License
236
236
 
237
237
  MIT, see [LICENSE](https://github.com/MetaSekaiLab/nnnotes/blob/main/LICENSE).
238
-
@@ -9,7 +9,7 @@ for configuration and validation limits.
9
9
  nnnotes is an offline data toolkit for the game files of BanG Dream! Our Notes: it reads Addressables catalogs,
10
10
  downloads and decrypts asset bundles, downloads and decodes master data, and exports stories, Live2D models, spots,
11
11
  shaders, CRI audio and live charts as structured JSON and common file formats. The charts, Live2D models and stories `web`
12
- exports are the data that [ournotes-player](https://github.com/empty-sekai/ournotes-player) reads. The naming was inspired by [mos9527/sssekai](https://github.com/mos9527/sssekai).
12
+ exports are the data that [ournotes-player](https://github.com/empty-sekai/ournotes-player) reads. The naming was inspired by sssekai.
13
13
 
14
14
  This is an unofficial fan project, not affiliated with the game's developer or operator. The repository contains no
15
15
  game assets, keys or server addresses: users supply the game files, the keys needed for decryption and the server
@@ -28,7 +28,8 @@ nnnotes config check # each setting's origin and whether it is valid
28
28
  - Scripts and AI agents get no questions: `nnnotes config init --user --no-input --set SECTION.KEY=VALUE ...` writes
29
29
  the file at once, `nnnotes config set SECTION.KEY VALUE` changes one value (VALUE `-` reads it from standard input,
30
30
  so a key need not appear on the command line), and `nnnotes config check --json` reports the states for machines.
31
- - `--fonts game` also needs `pip install 'nnnotes[fonts]'`; the APK, the master data and the external tools are listed
31
+ - `--fonts game` also needs `pip install 'nnnotes[fonts]'`, and the deck statistics of `music-data` need
32
+ `pip install 'nnnotes[deck]'`; the APK, the master data and the external tools are listed
32
33
  under Requirements below.
33
34
 
34
35
  ## Features
@@ -54,7 +55,7 @@ nnnotes config check # each setting's origin and whether it is valid
54
55
  | `ui` (experimental) | APK set and its embedded catalog | an offline serialized prefab library with dependency roots, AnimatorControllers, stable references and PNG/font resources for the optional ournotes-player UI preview ([format and limits](https://github.com/MetaSekaiLab/nnnotes/blob/main/docs/ui.md)) |
55
56
  | `live` | music ID + difficulty | a full chart directory: chart and runtime notes, 3D scene, note and effect assets, BGM and sounds, sound routing |
56
57
  | `web` | `--pair music:difficulty` (repeatable) or `--all`; `--live2d model` (repeatable) or `--all-live2d`; `--story episode` (repeatable) or `--all-stories`; `--region region` (repeatable) or `--all-regions` | an ournotes-player static site: shared player + per-chart / per-model / per-episode manifests + content-addressed assets; the Live2D models of the stories are built first as models, listed in `models.json`, and the story manifests reference them; one site can serve several regions, with listing texts in five languages; a story's interface texts are grouped by language, with TextMeshPro font assets generated from open fonts (the game's fonts with `--fonts game`); compressible assets (JSON, shaders, moc3, ...) are stored gzip encoded by default (`--compress br` / `none`) |
57
- | `music-data` | master data files (`--master-files` directory or `--apk-master`), or decoded master data with its manifest (`--decoded-master`) | one JSON file with every song and chart: titles and credits in five languages, bands, vocal characters, category, tags, release time, score ranks, BGM length; the Gekisou catalog (member cards, snaps and their Gekisou skills and support skills); per difficulty the level, note counts, BPM, chart times, skill events and fever ranges; and the chart statistics the deck model ournotes-deck (built into nnnotes) measures on its whole-live simulation (the no-skill score, the weight of every score-up skill kind at every position), plus single-shape Gekisou aptitude (increments and standard errors, not an optimal deck; omit with `--no-gekisou-aptitude`). `--full` adds the deck model's input: every chart's runtime notes and the master data tables about cards, skills, bonuses, scores and events ([format](https://github.com/MetaSekaiLab/nnnotes/blob/main/docs/music-data.md)) |
58
+ | `music-data` | master data files (`--master-files` directory or `--apk-master`), or decoded master data with its manifest (`--decoded-master`) | one JSON file with every song and chart: titles and credits in five languages, bands, vocal characters, category, tags, release time, score ranks, BGM length; the Gekisou catalog (member cards, snaps and their Gekisou skills and support skills); per difficulty the level, note counts, BPM, chart times, skill events and fever ranges; and the chart statistics the deck model ournotes-deck (installed with `pip install 'nnnotes[deck]'`) measures on its whole-live simulation (the no-skill score, the weight of every score-up skill kind at every position), plus single-shape Gekisou aptitude (increments and standard errors, not an optimal deck; omit with `--no-gekisou-aptitude`). `--full` adds the deck model's input: every chart's runtime notes and the master data tables about cards, skills, bonuses, scores and events ([format](https://github.com/MetaSekaiLab/nnnotes/blob/main/docs/music-data.md)) |
58
59
 
59
60
  Export conventions:
60
61
 
@@ -188,9 +189,6 @@ settings (TOML / environment / flags)
188
189
  Every JSON file is written by one writer (`jsonio`), so encoding, line endings and number formatting are the same
189
190
  everywhere.
190
191
 
191
- See [docs/performance.md](https://github.com/MetaSekaiLab/nnnotes/blob/main/docs/performance.md) for where a
192
- `web` build spends its time and which parts of it run in compiled code.
193
-
194
192
  ## Changelog
195
193
 
196
194
  [CHANGELOG.md](https://github.com/MetaSekaiLab/nnnotes/blob/main/CHANGELOG.md) lists the changes in every version,
@@ -0,0 +1,156 @@
1
+ # nnnotes?!
2
+
3
+ [简体中文](README.md) | [English](README.en.md)
4
+
5
+ nnnotes 是 BanG Dream! Our Notes 游戏文件的离线数据工具包:读取 Addressables catalog、下载并解密资源包、下载与解码 masterdata,再把剧情、Live2D、据点场景、着色器、CRI 音频和谱面导出成结构化的 JSON 与通用格式文件。`web` 导出的谱面、Live2D 模型与剧情站点就是 [ournotes-player](https://github.com/empty-sekai/ournotes-player) 读取的数据。命名灵感来自 sssekai。
6
+
7
+ 本项目为非官方爱好者项目,与游戏的开发和运营方无关。仓库不包含任何游戏资源、密钥或服务器地址:游戏文件、解密所需的密钥和服务器地址都由使用者在配置中自行提供,导出结果只保存在使用者指定的本地目录。
8
+
9
+ ## 安装与初始化
10
+
11
+ ```sh
12
+ pip install nnnotes # Python 3.11+,推荐 3.13
13
+ nnnotes config init --user # 在终端里逐项填写设置(密钥不回显),写入用户配置文件,在任何目录下都会读取
14
+ nnnotes config check # 每项设置的来源和格式是否有效,不显示设置值
15
+ ```
16
+
17
+ - 设置值(密钥、区服的 CDN 与 API 地址、本地数据与工具的路径)都来自使用者自己的游戏客户端,见[配置](#配置)。
18
+ - 在脚本或 AI 代理中不会有交互提问:`nnnotes config init --user --no-input --set 段.键=值 ...` 一次写好,之后用 `nnnotes config set 段.键 值` 修改单项(值写 `-` 时从标准输入读取,密钥不必出现在命令行里),`nnnotes config check --json` 给出机器可读的状态。
19
+ - `--fonts game` 另需 `pip install 'nnnotes[fonts]'`,`music-data` 的组卡统计另需 `pip install 'nnnotes[deck]'`;APK、masterdata 与外部工具见[需要准备](#需要准备)。
20
+
21
+ ## 功能
22
+
23
+ | 命令 | 输入 | 输出 |
24
+ |---|---|---|
25
+ | `catalog` | 区服 catalog | 列出 Addressables 资源键(可按前缀过滤) |
26
+ | `browse` | 已配置的各区服 catalog | 本地网页浏览 catalog 与资源包(`--host` / `--port`) |
27
+ | `pull` | 资源键 | 下载并解密该键依赖闭包中的全部资源包到本地缓存 |
28
+ | `servers` | 引导 API 根地址 `[bootstrap] api` | 游戏 API 的服务器列表:各区服名称、区域 ID 与 CDN / API 根地址(地址仅在 `--show-hosts` 时输出) |
29
+ | `master version` | 区服 | 该区服当前的 masterdata 版本与资源版本(游戏 API 匿名调用) |
30
+ | `master download` | masterdata 版本号,或 `--latest`(区服当前版本) | 该版本的 `MasterManifest.json` 与全部 `.bin` 文件(SHA-256 校验) |
31
+ | `master decode` | masterdata `.bin` 文件或目录 | 每张表一个 JSON(Rijndael-256 CBC 解密 + gzip 解压) |
32
+ | `adv` | 剧情 ID | `episode.json`:命令表、五语台词、语音 / 音效 / 视频索引 |
33
+ | `story` | 剧情 ID | 剧情目录:episode、音频、舞台场景与着色器、剧情 UI、Frame / 粒子特效 / 后处理 / 静帧 / 对话框 / 聊天资源、视频(WebM);用到的 Live2D 模型导出到模型目录(`--models`,默认为剧情目录旁的 `live2d/`),已导出的模型供其他剧情复用 |
34
+ | `live2d` | 模型资源键或模型 ID | Live2D(Cubism)运行时目录:moc3、贴图、motion3、物理、表情、预制体参数 |
35
+ | `spot` | 据点 ID | `spot.json` + Spine 角色 + 房间 `room.glb` + 着色器 |
36
+ | `room` | 背景预制体键 | 房间模型(binary glTF) |
37
+ | `shader` | 资源键或 APK 内资源包 | 着色器各平台变体(GLSL ES 等)与索引 |
38
+ | `audio` | CRI cue sheet | 每个 cue 一个音频文件(FLAC / Ogg / WAV)+ cue 元数据 |
39
+ | `crikey` | APK | 读出游戏启动数据中的 CRI HCA 解码密钥(只显示是否找到,可写成 `.hcakey`) |
40
+ | `player` | APK | 渲染相关的全局设置(色彩空间、画质等级、渲染器)JSON |
41
+ | `ui`(实验性) | APK 集合及内嵌 catalog | 离线序列化预制体库,包含依赖根对象、AnimatorController、稳定引用与 PNG/字体资源,供 ournotes-player 可选 UI 预览使用([格式与边界](https://github.com/MetaSekaiLab/nnnotes/blob/main/docs/ui.md)) |
42
+ | `live` | 曲目 ID + 难度 | 完整谱面目录:谱面与运行时音符、3D 场景、音符与特效资源、BGM 与音效、声音路由 |
43
+ | `web` | `--pair 曲目:难度`(可重复)或 `--all`;`--live2d 模型`(可重复)或 `--all-live2d`;`--story 剧情 ID`(可重复)或 `--all-stories`;`--region 区服`(可重复)或 `--all-regions` | ournotes-player 静态站点:共享播放器 + 每谱 / 每模型 / 每集剧情清单 + 内容寻址资源;剧情用到的 Live2D 模型先按模型构建并列入 `models.json`,剧情清单引用它们;一个站点可服务多个区服,列表文本含五种语言;剧情的界面文字按语言分组,字形由开源字体生成 TextMeshPro 字体资源(`--fonts game` 时用游戏字体);可压缩的资源(JSON、着色器、moc3 等)默认以 gzip 存储,`--compress br` / `none` 可改 |
44
+ | `music-data` | masterdata 文件(`--master-files` 目录或 `--apk-master`),或带清单的解码 masterdata(`--decoded-master`) | 全部歌曲与谱面的单个 JSON:五语标题与作词作曲编曲、乐队、演唱角色、分类、标签、上线时间、评级线、BGM 时长;激走目录(成员卡、小卡及其激走技能与激走支援技能);每个难度的等级、音符数、BPM、谱面时间、技能事件与 fever 区间;以及组卡模型 ournotes-deck(`pip install 'nnnotes[deck]'` 安装)在整场模拟上实测的谱面统计(无技能得分、每种加分技能在每个演出位的权重),以及单个激走技能形状的谱面适性(增量与标准误,不选最佳编成;`--no-gekisou-aptitude` 可跳过)。`--full` 另附组卡模型的输入:每张谱面的运行时音符与卡牌、技能、加成、分数、活动相关的 masterdata 表([格式](docs/music-data.md)) |
45
+
46
+ 导出约定:
47
+
48
+ - 写文件的命令都用 `-o` 指定输出路径(必填);`web` 的站点目录是位置参数。
49
+ - JSON 一律 UTF-8、LF 换行;无穷大写作 `1e999`。
50
+ - 在同一套环境下导出是确定的:同样的输入,在 nnnotes、Python 依赖库(UnityPy、Pillow、numpy 等)和外部工具(vgmstream、FFmpeg)版本都相同时,导出文件逐字节相同。版本不同时,相同内容可能写成不同的字节:例如不同版本的 Pillow 写出的 PNG 像素相同,字节可能不同。
51
+ - 数值保留 Unity 序列化值与字段名(`m_LocalPosition`、`_bandIDs` 等),便于与游戏数据对照。
52
+ - 贴图导出为 PNG,着色器保留游戏自带的编译结果,音频由 CRI 格式解码为通用格式。
53
+
54
+ ## 完成度
55
+
56
+ 日服现已支持匿名版本查询、CDN 认证下载、gzip catalog、资源路径与缓存隔离,以及 Android 分包读取。
57
+ 配置、命令和日服验证范围见 [日服支持](docs/jp.md)。
58
+
59
+ 以下结果基于台服 1.0.1(zh-Hant)的全部数据:
60
+
61
+ | 部分 | 状态 |
62
+ |---|---|
63
+ | catalog / 资源包解密 / 依赖闭包 | 可用 |
64
+ | masterdata 解码 | 可用 |
65
+ | 剧情 `adv` | 946 / 946 集可导出 |
66
+ | 剧情 `story`(完整目录) | 946 / 946 集的资源都在 catalog 中且类型均受支持(资源闭包与游戏自带的每集下载清单一致);946 / 946 集已逐集导出验证:输出中引用的文件、模型与音频均存在,JSON 均可解析,引用的路径均可解析;其中 235 集用到 Frame / Effect / PostEffect / Still / Chat / TalkWindow / 视频资源,两次导出除模型目录路径外逐字节一致 |
67
+ | Live2D 模型 | 239 / 239 个可导出(catalog 中的全部模型,剧情用到其中 185 个) |
68
+ | CRI 音频 | 681 / 681 个 cue sheet 可解码 |
69
+ | 谱面 `live` | 336 / 336 个(曲目, 难度)组合可导出 |
70
+ | 网页站点 `web` | 336 / 336 张谱面,239 / 239 个 Live2D 模型,946 / 946 集剧情(英语、无音频的全量构建两次结果逐字节一致,946 / 946 集通过数据校验);三个区服、五种语言、含 AAC 音频的全量构建(`--all-regions`,用线上 masterdata:85 首曲目的 340 张谱面)两次结果同样逐字节一致,全部通过数据校验 |
71
+ | 据点 `spot` / `room` | 39 / 39 个据点可导出,引用均可解析;catalog 中 20 / 20 个房间背景可由 `room` 导出。生成的 glb 均通过 Khronos glTF-Validator,0 个错误 |
72
+ | 其他区服(en / kr)与其他语言 | 已核对:各区服同一语言的 catalog 相同、资源包相同,密钥通用;谱面用到的 masterdata 表在三个区服间一致,文本表五种语言齐全;抽查的谱面导出与台服一致。多区服整站已全量构建验证(见上一行) |
73
+
74
+ ## 需要准备
75
+
76
+ - Python 3.11+,推荐 3.13(`web` 构建读写大量 JSON,3.13 的标准库 JSON 编码更快);开发时在仓库内 `pip install -e .`
77
+ - 游戏安装包 `base.apk`:APK 内置资源包、CRI 解码密钥、启动设置。`player`、`story`、`live`、`web` 用 nnnotes 自带的类型树读取 APK 启动数据中的 MonoBehaviour,目前支持游戏版本 1.0.1(Unity 6000.3.12f1);其他版本的 APK 若类型不符,这些命令会报错并给出类名、游戏版本和 Unity 版本
78
+ - 解码后的 masterdata 目录(可用 `master download` + `master decode` 生成):`adv`、`story`、`spot`、`live` 和 `web` 的谱面需要;`web` 的 Live2D 模型只用它取角色名(可选)
79
+ - 外部工具:[vgmstream](https://vgmstream.org/)(CRI HCA 解码)、[FFmpeg](https://ffmpeg.org/)(转码,含剧情视频的 WebM 封装与 Opus 音频);`web` 另需 Node.js 20+ 与构建好的 ournotes-player
80
+
81
+ ## 配置
82
+
83
+ 代码中没有任何密钥、服务器地址和默认路径。所有设置按以下顺序读取,后者覆盖前者:
84
+
85
+ 1. 配置文件:`--config <文件>`,否则 `NNNOTES_CONFIG`,否则当前目录的 `nnnotes.toml`,否则用户配置文件(Windows 为 `%APPDATA%\nnnotes\nnnotes.toml`,其他系统为 `~/.config/nnnotes/nnnotes.toml`;`nnnotes config path` 列出查找顺序与实际读取的文件)
86
+ 2. 环境变量:`NNNOTES_<节>_<键>`(如 `NNNOTES_BUNDLE_KEY`、`NNNOTES_SERVERS_TW_CDN`)
87
+ 3. 命令行参数:`--region`、`--language`、`--catalog`、`--cache`、`--master`、`--apk`、`--ffmpeg`、`--vgmstream`、`--node` 写在命令名之前;`--player` 是 `web` 的参数
88
+
89
+ `nnnotes config init` 写出配置模板(每项设置为空,模板随包安装,仓库中为 [`src/nnnotes/nnnotes.example.toml`](src/nnnotes/nnnotes.example.toml)),在终端中会逐项询问;`config set` / `config unset` 修改单项并保留文件中的注释。需要的设置包括:资源包解密密钥与 nonce 种子、masterdata 的密钥与 IV、使用的区服 `[catalog] region` 与 catalog 语言 `[catalog] language`、每个区服的 CDN 地址与 API 根地址(`[servers.<区服>]` 的 `cdn`、`api`)、客户端版本 `[client] version`(未设置时读取 APK 的 versionName)、可选的引导 API 根地址 `[bootstrap] api`(`servers` 使用),以及缓存目录、APK、masterdata 目录、ournotes-player 和 vgmstream / FFmpeg / Node.js 的路径(三个工具未设置时在 `PATH` 中查找)。这些值都来自使用者自己的游戏客户端。
90
+
91
+ 缺少或格式错误的设置会让命令以退出码 2 结束,并用一行说明对应的配置键、环境变量和命令行参数,不会输出任何设置值。`nnnotes.toml` 已在 `.gitignore` 中,请勿提交。
92
+
93
+ 完整说明见 [docs/configuration.md](docs/configuration.md)。
94
+
95
+ ## 使用示例
96
+
97
+ ```bash
98
+ nnnotes catalog --prefix Live/MusicScore/ --limit 20
99
+ nnnotes browse --port 8000
100
+ nnnotes pull Live/MusicScore/0001/0001_03
101
+ nnnotes master version
102
+ nnnotes master download --latest -o work/master-bin
103
+ nnnotes master decode work/master-bin -o work/master
104
+ nnnotes --master work/master adv 10462 -o out/adv_10462.json
105
+ nnnotes story 10462 -o out/story_10462
106
+ nnnotes live 100001 --difficulty expert -o out/live_100001
107
+ nnnotes web out/site --all --player <ournotes-player 目录> --workers 5
108
+ nnnotes web out/site --pair 100001:expert --pair 100001:hard --player <ournotes-player 目录>
109
+ nnnotes web out/site --all --region tw --region en --region kr --player <ournotes-player 目录>
110
+ nnnotes web out/site --live2d adv_live2d_rana_003_casual_spring_01 --player <ournotes-player 目录>
111
+ ```
112
+
113
+ `web` 可以增量构建:清单已存在的谱面和模型会跳过(`--force` 重建),不再被引用的资源会被清理。常用参数:
114
+
115
+ - `--format aac|opus|vorbis|mp3|flac`:BGM 格式,默认 AAC;`--no-audio`:不导出音频
116
+ - `--band` / `--leader-card`:轻量背景与开场时间轴所用乐队;默认取曲目第一位演唱角色的乐队
117
+ - `--workers`:并行处理的曲目进程数(默认为 CPU 数的四分之一,最多 8)与模型进程数(默认最多 4);`--read-workers`:同时运行的谱面读取集(Node.js 进程)数(默认为 CPU 数的一半,最多 16);`--tmp`:临时构建目录(默认 `<站点>.tmp`)
118
+ - `--live2d 模型`(模型 ID 或资源键,可重复)/ `--all-live2d`:加入 Live2D 模型(catalog 中全部模型),可与谱面在同一次构建中加入
119
+ - `--region 区服`(可重复)/ `--all-regions`:站点服务的区服(默认 `[catalog] region`);每个区服的 masterdata 由 `[servers.<区服>] master` 指定。谱面数据相同的区服共用一份清单,列表页用 `?region=&lang=` 切换区服与语言
120
+ - `--player-only`:只重写播放器文件与 `charts.json`、`models.json`;`--reingest-json`:按当前规则重新存储所有谱面与模型的 JSON
121
+
122
+ 各命令的参数与输出目录结构见 [docs/commands.md](docs/commands.md)。
123
+
124
+ ## 架构
125
+
126
+ ```
127
+ 配置(TOML / 环境变量 / 参数)
128
+ └─ 访问层 addressables(catalog 解析、资源包解密、本地浏览)
129
+ catalog(依赖闭包、远端与 APK 内资源、本地缓存)
130
+ master(masterdata 下载与解码)
131
+ gameapi(游戏 API 匿名调用:当前 masterdata 版本、服务器列表)
132
+ └─ 读取层 unity(UnityPy 读取 typetree 与 TextAsset)
133
+ export(预制体 / 组件 / 引用全部解析为 JSON,贴图与着色器随同导出)
134
+ shader、textstyle(文字排版与样式)、tmpfont(TextMesh Pro 字体)、player(启动设置)、cri + crikey(CRI 音频)
135
+ └─ 内容层 剧情:adv、advscene、advmedia(Frame / 特效 / 后处理 / 静帧 / 聊天)、advvideo(USM 视频)、advui、story
136
+ Live2D:live2d、motion
137
+ 据点:spot、room
138
+ 谱面:score(谱面解析与游戏谱面转换器的复现)、livescene、livenotes、liveui、liveaudio、live
139
+ 站点:web、webmodel(ournotes-player 数据)
140
+ ```
141
+
142
+ 所有 JSON 由同一个写出器生成(`jsonio`),保证编码、换行与数值格式一致。
143
+
144
+ ## 版本记录
145
+
146
+ 每个版本的改动见 [CHANGELOG.md](CHANGELOG.md),由 [git-cliff](https://git-cliff.org/) 根据提交生成。发版时,改版本号的那个提交同时重新生成它:
147
+
148
+ ```bash
149
+ git cliff --tag vX.Y.Z -o CHANGELOG.md
150
+ ```
151
+
152
+ 推送 `vX.Y.Z` 标签后,发布流程会核对版本号,并确认 CHANGELOG.md 里有这个版本。
153
+
154
+ ## License
155
+
156
+ MIT,见 [LICENSE](LICENSE)。
@@ -0,0 +1,214 @@
1
+ # Asset export
2
+
3
+ `nnnotes export` writes every object of the selected bundles in a common format: textures and sprites as PNG,
4
+ meshes as binary glTF, text assets and fonts as their stored bytes, prefabs, materials, animations and every other
5
+ class as JSON. It also writes the semantic views of the master data (cards, characters, stamps, …) with the files of
6
+ the objects they name. The work is split into stages ([stages.md](stages.md)); each stage runs one task per subject
7
+ (a bundle, a view, …), and a task's result is stored under a key that covers exactly what its output depends on
8
+ ([contracts.md](contracts.md)). A second run over the same data finds every result in the store and only
9
+ rewrites what changed.
10
+
11
+ ```
12
+ nnnotes export -o out/assets
13
+ nnnotes export -o out/cards --select group:membercard --views cards
14
+ nnnotes plan --select key:Image/Jacket/
15
+ nnnotes plan --check && echo "up to date"
16
+ ```
17
+
18
+ ## Commands
19
+
20
+ ```
21
+ nnnotes export -o OUT [--layout original[,cas]] [--select group:G|key:PREFIX|bundle:GLOB ...] [--views all|none|a,b]
22
+ [--store DIR] [--workers N] [--memory GiB] [--fetch-workers N] [--catalog-version L|SHA]
23
+ [--png-level N] [--flac-level N] [--only-class C,...] [--link auto|clone|hard|copy] [--strict]
24
+ [--dry-run] [--explain]
25
+ nnnotes plan [the selection and parameters of export] [-o OUT] [--json] [--since RUN] [--check] [--census]
26
+ [--emit-tasks DIR] [--why TASK]
27
+ nnnotes run-stage TASK.json|DIR [...] [--store DIR] [--fetch] [--force]
28
+ nnnotes catalogs list [--json] | import FILE [--label L] [--apk-catalog FILE] [--resource-version V] | fetch [--label L]
29
+ | diff OLD NEW [--json]
30
+ nnnotes store verify [--quick]
31
+ ```
32
+
33
+ ### export
34
+
35
+ | Flag | Meaning |
36
+ |---|---|
37
+ | `-o OUT` | output directory |
38
+ | `--select SEL` | what to export (repeatable, the union; default everything): `group:G` the bundles of an Addressables group (the stable bundle name up to `_assets_`, else up to its first `_`), `key:PREFIX` the bundles and raw files the catalog keys under `PREFIX` load, `bundle:GLOB` the bundles and raw files whose stable name matches |
39
+ | `--views` | the semantic views to build ([views.md](views.md)): `all`, `none` or names, comma-separated; default `all` when master data is set, else `none` |
40
+ | `--layout` | `original`, `cas` or both (below) |
41
+ | `--store DIR` | the store (`[paths] store`; default `<cache>/store`) |
42
+ | `--workers N` | worker processes (default: the CPUs the process may run on, its affinity mask as `taskset` or a container's cpuset sets it; `0`: every task in this process) |
43
+ | `--memory GiB` | memory budget (default: 80 % of the physical memory where it can be read, else none) |
44
+ | `--fetch-workers N` | parallel downloads of bundles not in the cache (default 8) |
45
+ | `--catalog-version` | an imported catalog version (`catalogs list`) instead of the current catalog |
46
+ | `--png-level N` | zlib level 0-9 of the PNG files (default 6); part of the task keys |
47
+ | `--flac-level N` | FLAC compression level 0-12 of the CRI audio and the movies' audio (default 8; every level decodes to the same samples; 12 writes files 0.2-1.3 % smaller in about five times the encoding time); part of the task keys |
48
+ | `--only-class C,...` | export only objects of these Unity classes; part of the task keys |
49
+ | `--link` | how the layout files are made from the store (below): `auto` (default; `[export] link`), `clone`, `hard` or `copy` |
50
+ | `--strict` | exit 1 when a view has gaps: a required role whose address names no catalog key or no fitting sub-object (empty values and roles that do not apply are not gaps); in `voices`, a voice whose cue sheet has no catalog key or whose decoded sheet lacks its cue, and a story episode without a catalog key |
51
+ | `--dry-run` | print the plan and stop |
52
+ | `--explain` | print every setting of the run first: store, context, selection, pipeline, stages not installed, parameters, workers, memory budget, recycling, layouts |
53
+
54
+ A run resolves the context (region, language, catalog version) and indexes the catalog, identifies the selected
55
+ bundles (the sha256 of each decrypted bundle, remembered by path, size and modification time; bundles not in the
56
+ cache are fetched), takes the census of each bundle, links the scripts and addresses, exports the bundles, runs the
57
+ stages that need those results (atlas sprites, views), writes the layouts and the reports. The selected raw files
58
+ (CRI audio and movies) not in the cache are fetched while the bundle stages run. The census also covers
59
+ the bundles the selected ones depend on, so script classes and atlas textures in other bundles resolve.
60
+
61
+ Tasks run in spawned worker processes that stay alive between tasks (no more of them start than a stage has tasks to
62
+ run). The longest tasks (by estimated CPU time) start first; a task starts only while the estimated peak memory of
63
+ the running tasks and its own fits the budget, and a task estimated above the budget runs alone. A worker is
64
+ replaced after 500 tasks or when its resident memory after a task is above 3 GiB, or above 40 % of its part of the
65
+ memory budget (the budget divided by the workers) when that is less, but not below 256 MiB: a worker keeps much of
66
+ its largest task's memory, which the budget does not count (`--explain` prints the threshold). The estimates come
67
+ from each stage's cost model, scaled per stage by the costs measured in earlier runs of the store
68
+ (`<store>/costs/calibration.json`, updated after every export; a task's measured peak counts from its worker's
69
+ memory at its start). None of this changes an output: a run with one worker and a run with many write the same store
70
+ and the same files.
71
+
72
+ A failed object is reported with its task's result and stays failed until something in its key changes. A task that
73
+ fails as a whole (an exception, an input that cannot be read, a worker that dies) leaves no result and runs again
74
+ next time.
75
+
76
+ ### plan
77
+
78
+ What `export` with the same flags would do, without running or fetching anything: every task with its status
79
+ (`hit`: its result is stored, `run`, `unknown`: it reads the result of a task that would run first, or of a bundle
80
+ not fetched yet), the reasons it runs (compared with the latest run of the same selection, or `--since RUN`), the
81
+ estimated CPU time and peak memory, and with `-o` the files each layout would write, remove and keep. The text
82
+ gives per stage its counts and its first 20 tasks that are not hits; `--json` has every task.
83
+
84
+ | Flag | Meaning |
85
+ |---|---|
86
+ | `--json` | the plan document (`nnnotes.plan/1`) |
87
+ | `--check` | exit 1 when anything would run or a layout file would change, else 0 |
88
+ | `--census` | first fetch the bundles without a census and take it, so the plan knows every bundle's classes |
89
+ | `--emit-tasks DIR` | write the tasks that can run now as task descriptions `DIR/<key>.json` |
90
+ | `--why TASK` | one task: its status, reasons, and its key parts beside those of the previous run |
91
+
92
+ Reasons: `new-input`, `input-changed`, `stage-version`, `atom-changed`, `params-changed`, `context-changed`,
93
+ `previous-failed`, `result-missing`, `forced`; hits are `unchanged` or `cached` (the result is in the store from
94
+ another run); unknown tasks are `pending` on a task, or on `fetch:<file>` for a bundle whose content is not known
95
+ yet. See [contracts.md](contracts.md#plan-nnnotesplan1).
96
+
97
+ ### run-stage
98
+
99
+ Runs task descriptions (`nnnotes.task/1`, as `plan --emit-tasks` writes them) into a store: each is checked (its key
100
+ is recomputed, its stage must be installed at its version), its inputs are read by content id through their
101
+ locators (the store, the cache, a file, or with `--fetch` the catalog), and its result is stored exactly as `export`
102
+ would store it. Several tasks run one after another in one process; stages that do not read bundles never load
103
+ UnityPy. `--force` runs tasks whose result is stored again (the new result must be identical).
104
+
105
+ ### catalogs
106
+
107
+ The catalog versions of a store: `import` a catalog file (with the APK's catalog from `[paths] apk` or
108
+ `--apk-catalog`), `fetch` the current catalog of the configured region and language, `list` them, and `diff` two of
109
+ them (labels, version ids or sha256 prefixes): keys added, removed and changed, bundles and raw files by stable name,
110
+ the keys that reach a changed file, and, when a run over each version has stored its address table, the objects by
111
+ stable address (an object keeps its stable address while its object id changes with its bundle's content). A version
112
+ is labelled by `--label`, else by its resource version, else by the first 12 hex digits of its sha256. `fetch`
113
+ records the resource version it downloads (none for `main`); `import` takes `--resource-version`, else the JP
114
+ catalog's source version, else the version in a file name `catalog_<version>_<language>.bin` as `fetch` and the
115
+ cache name them (none for `main`). `export` imports the current catalog when it is not imported yet.
116
+
117
+ ### store verify
118
+
119
+ Checks that every stored content has the sha256 its name says (`--quick`: sizes only) and that every result names
120
+ its own key, has the key of its parts and names stored contents of the right size. Exit 1 when a problem is found.
121
+
122
+ ## Layouts
123
+
124
+ A layout places the artifacts of a run as files; it never changes their bytes. With one layout the files are
125
+ written into `OUT`, with several into `OUT/<layout>`. Each layout directory has a `manifest.json`
126
+ (`nnnotes.layout/1`) listing the files it owns; a run writes files atomically, removes the files it owned that are
127
+ no longer wanted, never touches other files, and continues an interrupted write on the next run.
128
+
129
+ `original` uses the game's names:
130
+
131
+ - an object with a container path is written at that path, in the catalog's spelling
132
+ (`Assets/AddressableResources/Image/Jacket/jacket_001.png`), its extension appended unless the path has it
133
+ (`…/prefab_x.prefab.json`);
134
+ - other objects under the same container path: `stem[<name>].<ext>`, the Addressables sub-object form
135
+ (`…/member_full[square].png`);
136
+ - objects without a container path: `_bundles/<stable bundle name>/<Class>/<name>~<pathId>.<ext>`;
137
+ - secondary artifacts beside the primary one: `<path>.<role>.<ext>` (`….meta.json`, `….blob.m_Data.moc3`);
138
+ - a container path present in two bundles: `stem@<stable bundle name>.ext` for each;
139
+ - names Windows refuses, reserved device names and trailing dots are escaped as `%XX`; paths that coincide ignoring
140
+ case get `~<8 hex>` and are listed in the layout report;
141
+ - the outputs of the CRI stages at the catalog names of their content: `Cri/Sound/<sheet>/<stream>.flac` with
142
+ `cues.json` and `streams.json`, `Cri/Video/<name>/…`; a content several names refer to is placed under each
143
+ name and listed in the layout report;
144
+ - the views: `views/<view>.json`, each object entry with the `path` of its file in this layout (`views/voices.json`:
145
+ each stream of a voice).
146
+
147
+ How the files are made (`--link`, or `[export] link`). Every method writes the same files and the same layout
148
+ manifest; the run manifest and the printed summary name the method and why it was chosen.
149
+
150
+ | `--link` | the files | extra space | an edit of a file |
151
+ |---|---|---|---|
152
+ | `clone` | clones (reflinks) of the store objects: Linux FICLONE (Btrfs, XFS, bcachefs, …), macOS APFS `clonefile` | none until a file is written (a quota that counts each file's blocks, such as an XFS project quota, counts them in full) | changes that file only |
153
+ | `hard` | hard links to the store objects (same file system) | none | fails, except for the superuser: the store objects are read-only (on Windows a delete fails too) |
154
+ | `copy` | copies | the whole layout again | changes that file only |
155
+ | `auto` (default) | `clone` where the file system makes clones, else `hard` on the same file system, else `copy` | | |
156
+
157
+ `auto` tries each method once, on a temporary file, before the run starts. An explicit `clone` or `hard` that does
158
+ not work there is a usage error (exit 2) before anything runs; a file that fails with the chosen method is reported
159
+ (summary, layout report, exit 1), left out of the manifest and placed by the next run: no file falls back to
160
+ another method. The store writes its objects read-only; a layout clears the attribute of a file it owns before it
161
+ replaces or removes it where the system needs that (Windows), and the store object stays read-only.
162
+
163
+ `cas` is `assets/<sha256>.<ext>` per distinct content, plus the manifest. Each layout follows from the other: `cas`
164
+ from the `original` manifest alone, `original` from `cas` and the results. The views are the exception: `original`
165
+ has them with the paths of their objects, `cas` the view documents they are made from.
166
+
167
+ ## Reports
168
+
169
+ `OUT/_reports/`:
170
+
171
+ | File | Content |
172
+ |---|---|
173
+ | `run.json` | the run manifest (`nnnotes.run/1`): context, selection, parameters, stage versions, every task with its key and status, the layout manifests, a summary; also stored as `<store>/runs/<id>.json` |
174
+ | `coverage.json` | per class the census total and the count of every item status (`exported`, `contained`, `generic`, `unsupported`, `failed`, and `missing`: objects no task covered; an object two tasks cover, such as a sprite whose image `sprite.crop` makes, counts once); per reason code its count and five examples |
175
+ | `failures.json` | failed tasks and failed objects, with their codes and messages |
176
+ | `sources.json` | files of the selection that could not be read: `source.absent` (a file the catalog names that is not there, or an APK file without `[paths] apk`), `source.error` (the download failed) |
177
+ | `layout-<name>.json` | the paths renamed for collisions, the container paths present in several bundles, the contents placed under several names |
178
+
179
+ The summary printed at the end names the run, the task and item counts, the layouts' write / remove / keep counts
180
+ and the reports directory.
181
+
182
+ ## Exit codes
183
+
184
+ | Command | 0 | 1 | 2 | 3 | 4 |
185
+ |---|---|---|---|---|---|
186
+ | `export` | complete (unsupported objects allowed) | a task, an object or a download failed (reports written); with `--strict` also view gaps | usage or settings | aborted: a setting or tool a task needs is missing, or interrupted; results written so far stay valid | |
187
+ | `plan` | | with `--check`: something would run or change | usage or settings | | |
188
+ | `run-stage` | every task ran or hit | a task failed or its result is partial | usage or settings | | a task is incompatible (edited, unknown stage or version); nothing of the batch runs |
189
+ | `store verify` | no problem | problems found | usage or settings | | |
190
+
191
+ ## Running tasks elsewhere
192
+
193
+ Task descriptions carry everything a task needs; any machine with the same nnnotes version and access to the store
194
+ can run them. A task can only be described once the content of its inputs is known, so the bundles are identified
195
+ first (`plan --census` fetches and hashes them and takes their census). Then plan the tasks that can run now, run
196
+ them in batches on as many workers as you like, and plan again until nothing is left; `export` finally writes the
197
+ layouts and reports (every task is a hit by then).
198
+
199
+ ```sh
200
+ store=/data/nnnotes-store
201
+ nnnotes plan --store "$store" --census > /dev/null
202
+ for round in 1 2 3 4 5 6 7 8; do
203
+ rm -rf tasks
204
+ nnnotes plan --store "$store" --emit-tasks tasks > /dev/null
205
+ ls tasks/*.json > /dev/null 2>&1 || break # nothing left to run
206
+ ls tasks/*.json | xargs -n 50 -P 16 nnnotes run-stage --store "$store" --fetch
207
+ done
208
+ nnnotes export --store "$store" -o out/assets
209
+ ```
210
+
211
+ Each round runs the tasks whose inputs are known: the catalog index and the censuses, then the script and address
212
+ tables, then the bundle exports, then the stages that read their results. A task whose result is already stored is
213
+ a hit, so a batch can be run twice; a task that keeps failing is planned again in every round (the loop above stops
214
+ after eight) and reported by `export`.