rewog 3.0.0__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 (172) hide show
  1. rewog-3.0.0/.coveragerc +25 -0
  2. rewog-3.0.0/.dockerignore +21 -0
  3. rewog-3.0.0/.editorconfig +14 -0
  4. rewog-3.0.0/.env.example +45 -0
  5. rewog-3.0.0/.github/ISSUE_TEMPLATE/bug_report.md +40 -0
  6. rewog-3.0.0/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
  7. rewog-3.0.0/.github/ISSUE_TEMPLATE/protocol_drift.md +36 -0
  8. rewog-3.0.0/.github/PULL_REQUEST_TEMPLATE.md +17 -0
  9. rewog-3.0.0/.github/workflows/docker.yml +64 -0
  10. rewog-3.0.0/.github/workflows/docs.yml +44 -0
  11. rewog-3.0.0/.github/workflows/release.yml +73 -0
  12. rewog-3.0.0/.gitignore +170 -0
  13. rewog-3.0.0/CHANGELOG.md +661 -0
  14. rewog-3.0.0/CODE_OF_CONDUCT.md +132 -0
  15. rewog-3.0.0/CONTRIBUTING.md +390 -0
  16. rewog-3.0.0/Dockerfile +33 -0
  17. rewog-3.0.0/LICENSE +21 -0
  18. rewog-3.0.0/PKG-INFO +518 -0
  19. rewog-3.0.0/README.md +453 -0
  20. rewog-3.0.0/SUPPORT.md +193 -0
  21. rewog-3.0.0/assets/feature-01-dark.svg +8 -0
  22. rewog-3.0.0/assets/feature-01-light.svg +8 -0
  23. rewog-3.0.0/assets/feature-02-dark.svg +8 -0
  24. rewog-3.0.0/assets/feature-02-light.svg +8 -0
  25. rewog-3.0.0/assets/feature-03-dark.svg +8 -0
  26. rewog-3.0.0/assets/feature-03-light.svg +8 -0
  27. rewog-3.0.0/assets/hero-dark.svg +8 -0
  28. rewog-3.0.0/assets/hero-light.svg +8 -0
  29. rewog-3.0.0/blender-addon/README.md +33 -0
  30. rewog-3.0.0/blender-addon/blender_manifest.toml +15 -0
  31. rewog-3.0.0/blender-addon/wog_dump_addon/__init__.py +213 -0
  32. rewog-3.0.0/blender-addon/wog_dump_addon/wog_client.py +79 -0
  33. rewog-3.0.0/docker-compose.yml +16 -0
  34. rewog-3.0.0/docs/api/catalog.md +3 -0
  35. rewog-3.0.0/docs/api/decrypt_keys.md +11 -0
  36. rewog-3.0.0/docs/api/download.md +3 -0
  37. rewog-3.0.0/docs/api/export_viewer.md +11 -0
  38. rewog-3.0.0/docs/api/overview.md +19 -0
  39. rewog-3.0.0/docs/api/probe_auth.md +11 -0
  40. rewog-3.0.0/docs/api/scene.md +15 -0
  41. rewog-3.0.0/docs/api/support.md +27 -0
  42. rewog-3.0.0/docs/api/unpack.md +3 -0
  43. rewog-3.0.0/docs/architecture.md +151 -0
  44. rewog-3.0.0/docs/benchmarks-download.md +46 -0
  45. rewog-3.0.0/docs/configuration.md +143 -0
  46. rewog-3.0.0/docs/database.md +95 -0
  47. rewog-3.0.0/docs/images/banner.jpg +0 -0
  48. rewog-3.0.0/docs/index.md +14 -0
  49. rewog-3.0.0/docs/mitm-capture.md +162 -0
  50. rewog-3.0.0/docs/plugins.md +78 -0
  51. rewog-3.0.0/docs/quickstart.md +52 -0
  52. rewog-3.0.0/docs/research-disassembly-data.md +103 -0
  53. rewog-3.0.0/docs/usage.md +35 -0
  54. rewog-3.0.0/examples/plugin-sprite/pyproject.toml +15 -0
  55. rewog-3.0.0/examples/plugin-sprite/src/wog_plugin_sprite/__init__.py +47 -0
  56. rewog-3.0.0/mkdocs.yml +55 -0
  57. rewog-3.0.0/pyproject.toml +162 -0
  58. rewog-3.0.0/scripts/audit_duplicates.py +46 -0
  59. rewog-3.0.0/scripts/bench_download.py +152 -0
  60. rewog-3.0.0/scripts/build_addon.py +52 -0
  61. rewog-3.0.0/scripts/compile_locales.py +138 -0
  62. rewog-3.0.0/scripts/extract_keys.py +134 -0
  63. rewog-3.0.0/scripts/refresh_protocol_fixtures.py +109 -0
  64. rewog-3.0.0/src/wog_dump/__init__.py +27 -0
  65. rewog-3.0.0/src/wog_dump/cli/__init__.py +1 -0
  66. rewog-3.0.0/src/wog_dump/cli/auth.py +128 -0
  67. rewog-3.0.0/src/wog_dump/cli/cache.py +123 -0
  68. rewog-3.0.0/src/wog_dump/cli/catalog.py +167 -0
  69. rewog-3.0.0/src/wog_dump/cli/convert.py +59 -0
  70. rewog-3.0.0/src/wog_dump/cli/decrypt.py +118 -0
  71. rewog-3.0.0/src/wog_dump/cli/download.py +214 -0
  72. rewog-3.0.0/src/wog_dump/cli/errors.py +76 -0
  73. rewog-3.0.0/src/wog_dump/cli/info.py +197 -0
  74. rewog-3.0.0/src/wog_dump/cli/main.py +250 -0
  75. rewog-3.0.0/src/wog_dump/cli/pipeline.py +152 -0
  76. rewog-3.0.0/src/wog_dump/cli/print_export.py +110 -0
  77. rewog-3.0.0/src/wog_dump/cli/render.py +210 -0
  78. rewog-3.0.0/src/wog_dump/cli/scene.py +248 -0
  79. rewog-3.0.0/src/wog_dump/cli/serve.py +57 -0
  80. rewog-3.0.0/src/wog_dump/cli/unpack.py +120 -0
  81. rewog-3.0.0/src/wog_dump/core/__init__.py +1 -0
  82. rewog-3.0.0/src/wog_dump/core/anim.py +99 -0
  83. rewog-3.0.0/src/wog_dump/core/api.py +154 -0
  84. rewog-3.0.0/src/wog_dump/core/auth.py +471 -0
  85. rewog-3.0.0/src/wog_dump/core/catalog.py +118 -0
  86. rewog-3.0.0/src/wog_dump/core/config.py +373 -0
  87. rewog-3.0.0/src/wog_dump/core/database.py +368 -0
  88. rewog-3.0.0/src/wog_dump/core/decrypt.py +317 -0
  89. rewog-3.0.0/src/wog_dump/core/download.py +688 -0
  90. rewog-3.0.0/src/wog_dump/core/export.py +643 -0
  91. rewog-3.0.0/src/wog_dump/core/glb.py +657 -0
  92. rewog-3.0.0/src/wog_dump/core/http.py +72 -0
  93. rewog-3.0.0/src/wog_dump/core/key_import.py +502 -0
  94. rewog-3.0.0/src/wog_dump/core/keys.py +295 -0
  95. rewog-3.0.0/src/wog_dump/core/paths.py +59 -0
  96. rewog-3.0.0/src/wog_dump/core/printprep.py +249 -0
  97. rewog-3.0.0/src/wog_dump/core/probe.py +187 -0
  98. rewog-3.0.0/src/wog_dump/core/render.py +319 -0
  99. rewog-3.0.0/src/wog_dump/core/scene.py +1393 -0
  100. rewog-3.0.0/src/wog_dump/core/scene_states.py +440 -0
  101. rewog-3.0.0/src/wog_dump/core/scene_steps.py +73 -0
  102. rewog-3.0.0/src/wog_dump/core/transforms.py +240 -0
  103. rewog-3.0.0/src/wog_dump/core/unpack.py +846 -0
  104. rewog-3.0.0/src/wog_dump/core/viewer.py +125 -0
  105. rewog-3.0.0/src/wog_dump/core/webapp/__init__.py +1 -0
  106. rewog-3.0.0/src/wog_dump/core/webapp/app.py +218 -0
  107. rewog-3.0.0/src/wog_dump/core/webapp/static/app.js +66 -0
  108. rewog-3.0.0/src/wog_dump/core/webapp/static/index.html +26 -0
  109. rewog-3.0.0/src/wog_dump/core/webapp/static/weapon-view.js +130 -0
  110. rewog-3.0.0/src/wog_dump/core/webapp/static/weapon.html +46 -0
  111. rewog-3.0.0/src/wog_dump/resources/__init__.py +0 -0
  112. rewog-3.0.0/src/wog_dump/resources/blender_setup.py +182 -0
  113. rewog-3.0.0/src/wog_dump/resources/locales/ru/LC_MESSAGES/wog_dump.po +52 -0
  114. rewog-3.0.0/src/wog_dump/resources/render_turntable.py +111 -0
  115. rewog-3.0.0/src/wog_dump/resources/render_video.py +133 -0
  116. rewog-3.0.0/src/wog_dump/resources/viewer/template.html +84 -0
  117. rewog-3.0.0/src/wog_dump/resources/viewer/vendor/LICENSE +21 -0
  118. rewog-3.0.0/src/wog_dump/resources/viewer/vendor/PATCHES.md +8 -0
  119. rewog-3.0.0/src/wog_dump/resources/viewer/vendor/addons/controls/OrbitControls.js +1523 -0
  120. rewog-3.0.0/src/wog_dump/resources/viewer/vendor/addons/loaders/GLTFLoader.js +4727 -0
  121. rewog-3.0.0/src/wog_dump/resources/viewer/vendor/addons/utils/BufferGeometryUtils.js +1373 -0
  122. rewog-3.0.0/src/wog_dump/resources/viewer/vendor/three.module.min.js +6 -0
  123. rewog-3.0.0/src/wog_dump/resources/viewer/viewer.js +350 -0
  124. rewog-3.0.0/src/wog_dump/utils/__init__.py +1 -0
  125. rewog-3.0.0/src/wog_dump/utils/i18n.py +78 -0
  126. rewog-3.0.0/src/wog_dump/utils/logging.py +603 -0
  127. rewog-3.0.0/src/wog_dump/utils/normal_map.py +345 -0
  128. rewog-3.0.0/src/wog_dump/utils/progress.py +97 -0
  129. rewog-3.0.0/tests/__init__.py +1 -0
  130. rewog-3.0.0/tests/conftest.py +150 -0
  131. rewog-3.0.0/tests/fixtures/protocol/anonymous_query.json +6 -0
  132. rewog-3.0.0/tests/fixtures/protocol/login_shape_synthetic.json +6 -0
  133. rewog-3.0.0/tests/fixtures/protocol/weapon_list_head.json +6 -0
  134. rewog-3.0.0/tests/integration/test_cli.py +288 -0
  135. rewog-3.0.0/tests/integration/test_live.py +92 -0
  136. rewog-3.0.0/tests/integration/test_scene_integration.py +270 -0
  137. rewog-3.0.0/tests/integration/test_states_steps.py +108 -0
  138. rewog-3.0.0/tests/unit/test_addon.py +114 -0
  139. rewog-3.0.0/tests/unit/test_anim.py +170 -0
  140. rewog-3.0.0/tests/unit/test_annotations.py +182 -0
  141. rewog-3.0.0/tests/unit/test_api.py +145 -0
  142. rewog-3.0.0/tests/unit/test_auth.py +508 -0
  143. rewog-3.0.0/tests/unit/test_catalog.py +171 -0
  144. rewog-3.0.0/tests/unit/test_cli_coverage.py +324 -0
  145. rewog-3.0.0/tests/unit/test_config.py +121 -0
  146. rewog-3.0.0/tests/unit/test_database.py +136 -0
  147. rewog-3.0.0/tests/unit/test_decrypt.py +339 -0
  148. rewog-3.0.0/tests/unit/test_download.py +441 -0
  149. rewog-3.0.0/tests/unit/test_export.py +249 -0
  150. rewog-3.0.0/tests/unit/test_glb.py +205 -0
  151. rewog-3.0.0/tests/unit/test_http.py +74 -0
  152. rewog-3.0.0/tests/unit/test_i18n.py +110 -0
  153. rewog-3.0.0/tests/unit/test_key_import.py +279 -0
  154. rewog-3.0.0/tests/unit/test_key_import_parsers.py +223 -0
  155. rewog-3.0.0/tests/unit/test_keys_flows.py +130 -0
  156. rewog-3.0.0/tests/unit/test_logging.py +305 -0
  157. rewog-3.0.0/tests/unit/test_normal_map.py +365 -0
  158. rewog-3.0.0/tests/unit/test_paths.py +89 -0
  159. rewog-3.0.0/tests/unit/test_plugin_loading.py +153 -0
  160. rewog-3.0.0/tests/unit/test_printprep.py +121 -0
  161. rewog-3.0.0/tests/unit/test_probe_checks.py +167 -0
  162. rewog-3.0.0/tests/unit/test_progress.py +158 -0
  163. rewog-3.0.0/tests/unit/test_protocol_fixtures.py +109 -0
  164. rewog-3.0.0/tests/unit/test_render.py +340 -0
  165. rewog-3.0.0/tests/unit/test_scene.py +122 -0
  166. rewog-3.0.0/tests/unit/test_scene_states.py +315 -0
  167. rewog-3.0.0/tests/unit/test_scene_steps.py +97 -0
  168. rewog-3.0.0/tests/unit/test_security_regressions.py +426 -0
  169. rewog-3.0.0/tests/unit/test_unpack.py +579 -0
  170. rewog-3.0.0/tests/unit/test_viewer.py +101 -0
  171. rewog-3.0.0/tests/unit/test_webapp.py +246 -0
  172. rewog-3.0.0/uv.lock +1848 -0
@@ -0,0 +1,25 @@
1
+ # Coverage configuration (pytest-cov reads this file first)
2
+ [run]
3
+ source = ["src/wog_dump"]
4
+ omit =
5
+ */tests/*
6
+ */test_*
7
+ */__pycache__/*
8
+ # Blender templates: run only inside Blender, never importable here
9
+ */resources/blender_setup.py
10
+ */resources/render_turntable.py
11
+ */resources/render_video.py
12
+
13
+ [report]
14
+ fail_under = 85
15
+ exclude_lines =
16
+ pragma: no cover
17
+ def __repr__
18
+ if self.debug:
19
+ if settings.DEBUG
20
+ raise AssertionError
21
+ raise NotImplementedError
22
+ if 0:
23
+ if __name__ == .__main__.:
24
+ class .*\bProtocol\):
25
+ if TYPE_CHECKING:
@@ -0,0 +1,21 @@
1
+ # Build context hygiene: the local runtime cache alone is ~5 GB
2
+ runtime/
3
+ .venv/
4
+ .env
5
+ .git/
6
+ .github/
7
+ .mypy_cache/
8
+ .pytest_cache/
9
+ .ruff_cache/
10
+ .coverage
11
+ htmlcov/
12
+ dist/
13
+ build/
14
+ *.egg-info/
15
+ # Repo-only material, not needed inside the image
16
+ docs/
17
+ tasks/
18
+ assets/
19
+ docker-compose.yml
20
+ Dockerfile
21
+ .dockerignore
@@ -0,0 +1,14 @@
1
+ root = true
2
+
3
+ [*]
4
+ end_of_line = lf
5
+ insert_final_newline = true
6
+ trim_trailing_whitespace = true
7
+
8
+ [*.py]
9
+ indent_style = space
10
+ indent_size = 4
11
+
12
+ [*.sls, *.yaml, *.yml]
13
+ indent_style = space
14
+ indent_size = 2
@@ -0,0 +1,45 @@
1
+ # WOG Dump - local configuration template.
2
+ # Copy this file to .env and fill in the values you have.
3
+ # .env is gitignored: never commit real credentials or keys.
4
+
5
+ # --- Auth, option 1: captured session from your own traffic ---
6
+ # Capture the game client once with mitmproxy and import everything:
7
+ # uv run python scripts/extract_keys.py capture.flows --identity --merge
8
+ # or copy the values it prints. See docs/mitm-capture.md.
9
+ WOG_AUTH_ID=
10
+ WOG_AUTH_SESSION=
11
+ # Optional: the API accepts any device id; one is generated when omitted
12
+ WOG_DEVICE_ID=
13
+
14
+ # --- Auth, option 2: game account (email login, fresh session each run) ---
15
+ # Run `wog-dump register` to create an account, or create it in the
16
+ # game client first.
17
+ WOG_ACCOUNT_EMAIL=
18
+ WOG_ACCOUNT_PASSWORD=
19
+
20
+ # --- Storage ---
21
+ # Per-user SQLite database location (defaults to the OS user data dir)
22
+ # WOG_DB_PATH=/home/USER/.local/share/wog_dump/wog_dump.db
23
+
24
+ # --- Network defaults (current as of the protocol capture, Nov 2026) ---
25
+ # WOG_API_BASE_URL=https://eu1.ultimate-disassembly.com/v/query2026.php
26
+ # WOG_DATA_BASE_URL=https://data1eu.ultimate-disassembly.com/uni2018
27
+ # WOG_GAME_VERSION=2.2.3t6
28
+ # WOG_UNITY_VERSION=6000.0.84f1
29
+ # WOG_LANG=en
30
+
31
+ # --- Rate limiting (seconds between requests; raise on 429 errors) ---
32
+ # WOG_API_REQUEST_DELAY=0.25
33
+ # WOG_REQUEST_DELAY=0.1
34
+
35
+ # --- Logging ---
36
+ # Log file: one rotating wog.log next to the database (or WOG_LOG_DIR).
37
+ # The file always captures INFO+; set DEBUG to include debug output.
38
+ # WOG_LOG_LEVEL=INFO
39
+ # WOG_LOG_DIR=/home/USER/.local/share/wog_dump/logs
40
+
41
+ # --- Performance ---
42
+ # WOG_MAX_THREADS=4
43
+
44
+ # --- Live tests ---
45
+ # With either auth option filled in, run: pytest -m live
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: Bug report
3
+ about: Something does not work as documented
4
+ title: ""
5
+ labels: bug
6
+ assignees: ""
7
+ ---
8
+
9
+ **Description**
10
+
11
+ A clear and concise description of what is broken.
12
+
13
+ **Steps to Reproduce**
14
+
15
+ 1. Run `...`
16
+ 2. ...
17
+
18
+ **Expected behavior**
19
+
20
+ What you expected to happen.
21
+
22
+ **Actual behavior**
23
+
24
+ What happened instead. Paste the full error output, including the traceback.
25
+
26
+ ```
27
+ (paste here)
28
+ ```
29
+
30
+ **Environment**
31
+
32
+ - OS:
33
+ - Python version:
34
+ - WOG Dump version (`wog-dump --version`):
35
+ - Installation method (pip / uv / git clone):
36
+ - Output of `wog-dump info`:
37
+
38
+ **Additional context**
39
+
40
+ Add any other context here. If available, attach `wog.log` (find the location with `wog-dump info`).
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ""
5
+ labels: enhancement
6
+ assignees: ""
7
+ ---
8
+
9
+ **Problem**
10
+
11
+ What problem does this solve? Describe what you were trying to do when the tool fell short.
12
+
13
+ **Proposed solution**
14
+
15
+ What you would like to happen.
16
+
17
+ **Alternatives considered**
18
+
19
+ Any alternative solutions or workarounds you have tried.
20
+
21
+ **Additional context**
22
+
23
+ Anything else to add: screenshots, examples from other tools, links to related issues.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: Protocol drift
3
+ about: The tool broke after a game update (login fails, downloads or keys stop working)
4
+ title: "Protocol drift: <what broke>"
5
+ labels: protocol-drift
6
+ ---
7
+
8
+ A protocol drift report needs the probe output first: everything else
9
+ guesses.
10
+
11
+ ## 1. Probe output
12
+
13
+ ```
14
+ wog-dump info --protocol-probe
15
+ ```
16
+
17
+ Paste the full table (or run with `--probe-json` for machine output).
18
+ Any FAIL line is the interesting part.
19
+
20
+ ## 2. Environment
21
+
22
+ - WOG Dump version (`wog-dump --version`):
23
+ - Game version installed:
24
+ - OS:
25
+
26
+ ## 3. What happened
27
+
28
+ - Which command broke: (login / download-assets / decrypt-assets / ...)
29
+ - The exact error message:
30
+ - Did the game update recently? (Steam build number if visible)
31
+
32
+ ## 4. Captures (optional but decisive)
33
+
34
+ If you can run mitmproxy against the standalone game client, attach the
35
+ capture per docs/mitm-capture.md. **Scrub credentials** before
36
+ attaching: remove `pass=`, `hash=`, `session=`, `acc_id=` values.
@@ -0,0 +1,17 @@
1
+ **Summary**
2
+
3
+ What does this PR change and why? Link the issue this solves, if any (`Fixes #123`).
4
+
5
+ **Changes**
6
+
7
+ -
8
+
9
+ **Checklist**
10
+
11
+ - [ ] Tests added or updated (`pytest`)
12
+ - [ ] `black`, `isort`, `mypy` and `flake8` pass
13
+ - [ ] Documentation updated (README / `docs/` / docstrings)
14
+ - [ ] CHANGELOG.md entry added under `[Unreleased]`
15
+ - [ ] For user-facing changes: the change works end to end with real data
16
+
17
+ For a small fix, some boxes do not apply. Say so in the description.
@@ -0,0 +1,64 @@
1
+ name: Docker
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ pull_request:
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - uses: docker/setup-buildx-action@v3
16
+
17
+ - name: Build (no push on pull requests)
18
+ uses: docker/build-push-action@v6
19
+ with:
20
+ context: .
21
+ load: true
22
+ tags: rewog:smoke
23
+ cache-from: type=gha
24
+ cache-to: type=gha,mode=max
25
+
26
+ - name: Smoke test
27
+ run: |
28
+ docker run --rm rewog:smoke --help > /dev/null
29
+ docker run --rm rewog:smoke info --help > /dev/null
30
+
31
+ publish:
32
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
33
+ needs: build
34
+ runs-on: ubuntu-latest
35
+ permissions:
36
+ contents: read
37
+ packages: write
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+
41
+ - uses: docker/setup-buildx-action@v3
42
+
43
+ - uses: docker/metadata-action@v5
44
+ id: meta
45
+ with:
46
+ images: ghcr.io/${{ github.repository }}
47
+ tags: |
48
+ type=semver,pattern={{version}}
49
+ type=semver,pattern={{major}}.{{minor}}
50
+ type=raw,value=latest,enable={{is_default_branch}}
51
+
52
+ - uses: docker/login-action@v3
53
+ with:
54
+ registry: ghcr.io
55
+ username: ${{ github.actor }}
56
+ password: ${{ secrets.GITHUB_TOKEN }}
57
+
58
+ - uses: docker/build-push-action@v6
59
+ with:
60
+ context: .
61
+ push: true
62
+ tags: ${{ steps.meta.outputs.tags }}
63
+ labels: ${{ steps.meta.outputs.labels }}
64
+ cache-from: type=gha
@@ -0,0 +1,44 @@
1
+ name: Docs
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ permissions:
10
+ contents: read
11
+ pages: write
12
+ id-token: write
13
+
14
+ jobs:
15
+ build:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - uses: actions/setup-python@v5
21
+ with:
22
+ python-version: "3.12"
23
+
24
+ - name: Install docs stack
25
+ run: |
26
+ pip install -e . mkdocs-material "mkdocstrings[python]"
27
+
28
+ - name: Build (strict)
29
+ run: mkdocs build --strict --site-dir site
30
+
31
+ - uses: actions/upload-pages-artifact@v3
32
+ with:
33
+ path: site
34
+
35
+ deploy:
36
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
37
+ needs: build
38
+ runs-on: ubuntu-latest
39
+ environment:
40
+ name: github-pages
41
+ url: ${{ steps.deployment.outputs.page_url }}
42
+ steps:
43
+ - id: deployment
44
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,73 @@
1
+ name: Publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - uses: actions/setup-python@v5
15
+ with:
16
+ python-version: "3.12"
17
+
18
+ - name: Build sdist and wheel
19
+ run: |
20
+ python -m pip install --upgrade build
21
+ python -m build --outdir dist/
22
+
23
+ - name: Smoke test the wheel in a clean environment
24
+ run: |
25
+ python -m venv /tmp/smoke
26
+ /tmp/smoke/bin/pip install dist/*.whl
27
+ /tmp/smoke/bin/wog-dump --help > /dev/null
28
+ /tmp/smoke/bin/wog-dump info --help > /dev/null
29
+ /tmp/smoke/bin/python -c "
30
+ import wog_dump
31
+ print('wog-dump', wog_dump.__version__)
32
+ from wog_dump.core.viewer import render_viewer_html
33
+ from wog_dump.core.export import convert_format
34
+ print('resources import OK')
35
+ "
36
+
37
+ - uses: actions/upload-artifact@v4
38
+ with:
39
+ name: dist
40
+ path: dist/
41
+
42
+ addon:
43
+ runs-on: ubuntu-latest
44
+ steps:
45
+ - uses: actions/checkout@v4
46
+
47
+ - uses: actions/setup-python@v5
48
+ with:
49
+ python-version: "3.12"
50
+
51
+ - name: Build addon zip
52
+ run: python scripts/build_addon.py --out dist
53
+
54
+ - uses: actions/upload-artifact@v4
55
+ with:
56
+ name: wog_dump_addon
57
+ path: dist/wog_dump_addon.zip
58
+
59
+ publish:
60
+ needs: build
61
+ runs-on: ubuntu-latest
62
+ environment: pypi
63
+ permissions:
64
+ # Trusted publishing: no API token involved
65
+ id-token: write
66
+ steps:
67
+ - uses: actions/download-artifact@v4
68
+ with:
69
+ name: dist
70
+ path: dist/
71
+
72
+ - name: Publish to PyPI
73
+ uses: pypa/gh-action-pypi-publish@release/v1
rewog-3.0.0/.gitignore ADDED
@@ -0,0 +1,170 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+ db.sqlite3-shm
64
+ db.sqlite3-shm-wal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+
76
+ # PyBuilder
77
+ .pybuilder/
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ # For a library or package, you might want to ignore these files since the code is
89
+ # intended to run in multiple environments; otherwise, check them in:
90
+ # .python-version
91
+
92
+ # pipenv
93
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+ # install all needed dependencies.
97
+ #Pipfile.lock
98
+
99
+ # poetry
100
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
101
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
102
+ # commonly ignored for libraries.
103
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
104
+ #poetry.lock
105
+
106
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
107
+ __pypackages__/
108
+
109
+ # Celery stuff
110
+ celerybeat-schedule
111
+ celerybeat.pid
112
+
113
+ # SageMath parsed files
114
+ *.sage.py
115
+
116
+ # Environments
117
+ .env
118
+ .venv
119
+ env/
120
+ venv/
121
+ ENV/
122
+ env.bak/
123
+ venv.bak/
124
+
125
+ # Spyder project settings
126
+ .spyderproject
127
+ .spyproject
128
+
129
+ # Rope project settings
130
+ .ropeproject
131
+
132
+ # mkdocs documentation
133
+ /site
134
+
135
+ # mypy
136
+ .mypy_cache/
137
+ .dmypy.json
138
+ dmypy.json
139
+
140
+ # Pyre type checker
141
+ .pyre/
142
+
143
+ # pytype static type analyzer
144
+ .pytype/
145
+
146
+ # Cython debug symbols
147
+ cython_debug/
148
+
149
+ # PyCharm
150
+ # JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
151
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
152
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
153
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
154
+ .idea/
155
+ db.sqlite3-wal
156
+ *.env
157
+ *.sqlite3-*
158
+
159
+ runtime/assets/
160
+ runtime/decrypted/
161
+ runtime/encrypted/
162
+ runtime/unpacked/
163
+ runtime/scenes/
164
+ runtime/*.json
165
+ runtime/*.txt
166
+ runtime/*.bak
167
+ # local databases
168
+ *.db
169
+ *.db-journal
170
+ site/