assetcat 1.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.
- assetcat-1.0.0/.gitignore +223 -0
- assetcat-1.0.0/CLAUDE.md +76 -0
- assetcat-1.0.0/LICENSE +21 -0
- assetcat-1.0.0/PKG-INFO +419 -0
- assetcat-1.0.0/README.md +381 -0
- assetcat-1.0.0/pyproject.toml +71 -0
- assetcat-1.0.0/skills/assetcat/SKILL.md +133 -0
- assetcat-1.0.0/src/assetcat/__init__.py +3 -0
- assetcat-1.0.0/src/assetcat/ai.py +330 -0
- assetcat-1.0.0/src/assetcat/classify.py +171 -0
- assetcat-1.0.0/src/assetcat/cli.py +1063 -0
- assetcat-1.0.0/src/assetcat/config.py +223 -0
- assetcat-1.0.0/src/assetcat/curation.py +145 -0
- assetcat-1.0.0/src/assetcat/db.py +119 -0
- assetcat-1.0.0/src/assetcat/edit.py +352 -0
- assetcat-1.0.0/src/assetcat/embed.py +417 -0
- assetcat-1.0.0/src/assetcat/extract.py +310 -0
- assetcat-1.0.0/src/assetcat/grids.py +115 -0
- assetcat-1.0.0/src/assetcat/indexer.py +607 -0
- assetcat-1.0.0/src/assetcat/init.py +219 -0
- assetcat-1.0.0/src/assetcat/pull.py +405 -0
- assetcat-1.0.0/src/assetcat/scan.py +268 -0
- assetcat-1.0.0/src/assetcat/server.py +914 -0
- assetcat-1.0.0/src/assetcat/sheets.py +98 -0
- assetcat-1.0.0/src/assetcat/starter/licenses.toml +42 -0
- assetcat-1.0.0/src/assetcat/starter/tags.toml +97 -0
- assetcat-1.0.0/src/assetcat/web/app.js +1418 -0
- assetcat-1.0.0/src/assetcat/web/index.html +17 -0
- assetcat-1.0.0/src/assetcat/web/logo.svg +20 -0
- assetcat-1.0.0/src/assetcat/web/model3d.js +309 -0
- assetcat-1.0.0/src/assetcat/web/style.css +324 -0
- assetcat-1.0.0/src/assetcat/web/vendor/README.md +11 -0
- assetcat-1.0.0/src/assetcat/web/vendor/preact-htm.js +1 -0
- assetcat-1.0.0/src/assetcat/web/vendor/three/LICENSE +21 -0
- assetcat-1.0.0/src/assetcat/web/vendor/three/addons/controls/OrbitControls.js +1972 -0
- assetcat-1.0.0/src/assetcat/web/vendor/three/addons/curves/NURBSCurve.js +155 -0
- assetcat-1.0.0/src/assetcat/web/vendor/three/addons/curves/NURBSUtils.js +532 -0
- assetcat-1.0.0/src/assetcat/web/vendor/three/addons/environments/RoomEnvironment.js +185 -0
- assetcat-1.0.0/src/assetcat/web/vendor/three/addons/libs/fflate.module.js +2672 -0
- assetcat-1.0.0/src/assetcat/web/vendor/three/addons/loaders/FBXLoader.js +4656 -0
- assetcat-1.0.0/src/assetcat/web/vendor/three/addons/loaders/GLTFLoader.js +4925 -0
- assetcat-1.0.0/src/assetcat/web/vendor/three/addons/loaders/MTLLoader.js +593 -0
- assetcat-1.0.0/src/assetcat/web/vendor/three/addons/loaders/OBJLoader.js +955 -0
- assetcat-1.0.0/src/assetcat/web/vendor/three/addons/utils/BufferGeometryUtils.js +1501 -0
- assetcat-1.0.0/src/assetcat/web/vendor/three/addons/utils/SkeletonUtils.js +496 -0
- assetcat-1.0.0/src/assetcat/web/vendor/three/three.core.js +60586 -0
- assetcat-1.0.0/src/assetcat/web/vendor/three/three.module.js +19719 -0
- assetcat-1.0.0/tests/conftest.py +61 -0
- assetcat-1.0.0/tests/make_library.py +344 -0
- assetcat-1.0.0/tests/test_ai.py +160 -0
- assetcat-1.0.0/tests/test_cli_args.py +29 -0
- assetcat-1.0.0/tests/test_embed.py +127 -0
- assetcat-1.0.0/tests/test_index.py +160 -0
- assetcat-1.0.0/tests/test_models.py +125 -0
- assetcat-1.0.0/tests/test_profile.py +186 -0
- assetcat-1.0.0/tests/test_pull.py +179 -0
- assetcat-1.0.0/tests/test_server.py +262 -0
- assetcat-1.0.0/uv.lock +1648 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
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
|
+
*.lcov
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# uv
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs/Zensical documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
201
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
203
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
221
|
+
|
|
222
|
+
# macOS Finder metadata
|
|
223
|
+
.DS_Store
|
assetcat-1.0.0/CLAUDE.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# AssetCat (`assetcat`)
|
|
2
|
+
|
|
3
|
+
An indexer, CLI and local browse UI for big game asset libraries, with licenses and AI provenance
|
|
4
|
+
kept in plain files. MIT open source, built with Claude Code. README.md covers usage; pull
|
|
5
|
+
requests aren't accepted for now (feature requests come in as issues).
|
|
6
|
+
|
|
7
|
+
## Layout
|
|
8
|
+
|
|
9
|
+
- `src/assetcat/`: the package. `config` (user config, library/profile/cache lookup, the write
|
|
10
|
+
guard), `init` (layout detection, starter profile), `scan` (walk, groups, pack tree),
|
|
11
|
+
`classify` (file categories, asset types, variant keys; pure functions), `extract` (per-file
|
|
12
|
+
metadata, runs in worker processes), `grids`, `sheets` (contact sheets), `curation` (reads the
|
|
13
|
+
profile), `edit` (curation writes with tomlkit, shortlists), `indexer` (the pipeline), `db`
|
|
14
|
+
(schema), `cli`, `server` (FastAPI: JSON API, file and thumbnail serving), `pull` (copy
|
|
15
|
+
assets into a project with licenses and a manifest), `ai` (pack tags from a vision model over an
|
|
16
|
+
OpenAI-compatible API, result shards in the profile's `ai/`, tag vocabulary and override layers).
|
|
17
|
+
`embed` (image vectors from a SigLIP 2 model in-process, the optional `ai` extra; shards in
|
|
18
|
+
`ai/<model>/`, search by meaning and "more like this" in NumPy).
|
|
19
|
+
- `src/assetcat/web/`: the UI, a no-build Preact + htm page; `vendor/` is checked in.
|
|
20
|
+
`model3d.js` (three.js viewer and thumbnail renders) is imported only when a 3D model shows.
|
|
21
|
+
- `src/assetcat/starter/`: files `assetcat init` copies into a new profile.
|
|
22
|
+
- `skills/assetcat/SKILL.md`: the generic Claude skill (search, check, pull, credits). Keep it in
|
|
23
|
+
step with the CLI: when a command or flag changes, update the skill too.
|
|
24
|
+
- `tests/`: pytest. `make_library.py` generates the synthetic library every test runs on.
|
|
25
|
+
- `scripts/ui_check.py`: Playwright checks against a running `assetcat serve` (Chrome, headless).
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
- **The library is read-only.** The only place the tool writes inside the library is the
|
|
30
|
+
profile folder; every such write goes through `Config.writable()` (or `ensure_inside` in init).
|
|
31
|
+
`pull` writes only to its destination and manifest, and refuses both inside the library. Tests
|
|
32
|
+
check the library is byte-for-byte unchanged after init, index, edits and pulls.
|
|
33
|
+
- **The database is disposable.** It's a cache built from the library plus the profile, never
|
|
34
|
+
the only home of anything. No migrations: derived tables are rebuilt on every `index`; only
|
|
35
|
+
`files` persists, and changing it means bumping `db.SCHEMA_VERSION` (drop and rebuild).
|
|
36
|
+
`extract.META_VERSION` with `META_MIN` (every file) or `META_MIN_BY_CATEGORY` (one category)
|
|
37
|
+
forces re-extraction; `db.DERIVED_VERSION` (bump it when the derived tables change) makes
|
|
38
|
+
commands ask for an `index` instead of failing on an old one. Anything a human decided or that
|
|
39
|
+
is expensive to compute goes in the profile.
|
|
40
|
+
- **Profile files** carry `format = N` (missing means 1). Read older formats; refuse newer ones.
|
|
41
|
+
Edits must keep the user's comments and layout: an edit followed by its reverse leaves the file
|
|
42
|
+
byte-identical (tested).
|
|
43
|
+
- **No personal data in the repo:** no absolute paths of a real machine, no real purchase
|
|
44
|
+
details, no real curation content. Examples and tests use the synthetic library.
|
|
45
|
+
- **Cross-platform:** macOS, Windows and Linux (CI runs all three). Library paths in the
|
|
46
|
+
database are `/`-separated and relative; use `cfg.abs()` / `cfg.fs()` for file system access
|
|
47
|
+
(`fs()` is long-path safe on Windows). Write text files with `newline="\n"`.
|
|
48
|
+
- The server binds to 127.0.0.1 by default because it can edit curation files, and only serves
|
|
49
|
+
library files that are in the index.
|
|
50
|
+
|
|
51
|
+
## Commands
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
uv sync # dev environment (--extra ai adds PyTorch for embeddings)
|
|
55
|
+
uv run pytest # all tests (a few seconds)
|
|
56
|
+
uv run assetcat ... # the CLI from this checkout
|
|
57
|
+
uv run --with playwright python scripts/ui_check.py http://127.0.0.1:8765/ --shots /tmp/shots
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Use uv for everything Python. To try things on a library without touching your own config, set
|
|
61
|
+
`ASSETCAT_CONFIG` and `ASSETCAT_CACHE` to scratch paths and run `assetcat init` on a library made
|
|
62
|
+
with `tests/make_library.py`.
|
|
63
|
+
|
|
64
|
+
## Releases
|
|
65
|
+
|
|
66
|
+
Bump `version` in `pyproject.toml` and `src/assetcat/__init__.py`, commit, then tag `vX.Y.Z` and
|
|
67
|
+
push the tag. CI tests it on all three systems and publishes it to PyPI (trusted publishing,
|
|
68
|
+
the `publish` job in `ci.yml`; it refuses a tag that doesn't match the version). A published
|
|
69
|
+
version can't be replaced, only yanked: fix forward with the next patch version. Other repos pin
|
|
70
|
+
a version with `uvx assetcat@X.Y.Z`.
|
|
71
|
+
|
|
72
|
+
## Workflow
|
|
73
|
+
|
|
74
|
+
- Commit only when asked.
|
|
75
|
+
- After changing the UI or server, run the UI check against a real `assetcat serve`, not only
|
|
76
|
+
the tests.
|
assetcat-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mirko Froehlich
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|