feat: import IMVU products into a catalog
The importer from t5de-hub's docs/imports.md: says hello to the hub with its key pair, follows the console's config (paused, rate, jobs at a time, IMVU accounts, whose sealed passwords it keeps), claims jobs, finds each product's newest revision on IMVU's CDN, converts it (originals for placeholders, no _contents.json, ProductRating from IMVU's rating), checks it by t5de-api's pack rules and uploads it to the catalog with an import token. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
2b0d27831e
commit
e8578e4a71
26 files changed
+2345
-1
No files matched your search
@@ -1,3 +1,48 @@
|
||||
# t5de-importer
|
||||
|
||||
Imports IMVU products into a T5DE catalog, with their creators' permission.
|
||||
Imports IMVU products into a T5DE catalog, with their creators' permission. Creators grant a catalog leave to import
|
||||
their shop (or chosen products) on T5DE's hub; the hub queues the products, and this program, run beside the
|
||||
catalog ([t5de-catalog](https://git.t5de.dev/t5de/t5de-catalog)), fetches each one from IMVU's CDN, converts it to a
|
||||
T5 product and uploads it to the catalog. The design is t5de-hub's
|
||||
[docs/imports.md](https://git.t5de.dev/t5de/t5de-hub/src/branch/main/docs/imports.md).
|
||||
|
||||
Unofficial: not made by or affiliated with IMVU.
|
||||
|
||||
## Running it
|
||||
|
||||
Turn imports on for the catalog on the hub's console (the catalog's Imports page): it shows the importer key once.
|
||||
Then run the importer with:
|
||||
|
||||
| Variable | |
|
||||
| --- | --- |
|
||||
| `HUB_URL` | the hub's API, e.g. `https://api.t5de.dev` |
|
||||
| `CATALOG_ID` | the catalog's ID on the hub |
|
||||
| `IMPORTER_KEY` | the importer key |
|
||||
| `IMPORTER_DATA` | its folder (default `./data`; `/data` in the image): its key pair and the IMVU accounts' passwords |
|
||||
|
||||
```
|
||||
docker run -v importer-data:/data -e HUB_URL=https://api.t5de.dev -e CATALOG_ID=... -e IMPORTER_KEY=... \
|
||||
git.t5de.dev/t5de/t5de-importer:latest
|
||||
```
|
||||
|
||||
Everything else is set on the console: pausing, how many requests a second it makes to IMVU, how many products it
|
||||
imports at once, and the IMVU accounts it may use. Keep `IMPORTER_DATA`: a new key pair (a new install) means the
|
||||
accounts' passwords must be entered again.
|
||||
|
||||
## What it does
|
||||
|
||||
- Says hello to the hub with its version and public key (RSA 3072, made on first start). The catalog's team seals
|
||||
IMVU account passwords for that key in their browser; the hub never holds them readable, and drops its copy once
|
||||
the importer has it.
|
||||
- Polls its config every minute and claims jobs (each an IMVU product to import or re-check).
|
||||
- For each job, finds the product's newest revision on IMVU's CDN (probing revision numbers after the last one
|
||||
imported), downloads its CFL, swaps the placeholder textures for the originals, drops `_contents.json`, sets
|
||||
`ProductRating` from IMVU's rating, checks the result by t5de-api's `pack` rules, and uploads it to the catalog
|
||||
with a one-off import token; the catalog registers it with the hub. The parent product stays on IMVU.
|
||||
|
||||
Not yet: signing in to IMVU with the accounts (needed for Access Pass products, which IMVU hides from the signed
|
||||
out), and reporting what they see to the hub.
|
||||
|
||||
## Development
|
||||
|
||||
`go test ./...` (tests fake the hub, the catalog and IMVU's CDN; product files are made in code, never IMVU's).
|
||||
Reference in new issue
Block a user