Skip to content

Maintenance Scripts

3 endpoints.

POST /database/scripts/repair-mojibake — see crate::mojibake’s own docs for why stored

Section titled “POST /database/scripts/repair-mojibake — see crate::mojibake’s own docs for why stored”
POSThttp://localhost:3000/api/database/scripts/repair-mojibake

Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.

The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/scripts.rs:61), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers.


POST /database/scripts/repair-mojibake — see crate::mojibake’s own docs for why stored records can still hold doubly-encoded text long after the importer learned to repair it.

Responses

200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/scripts.rs:41.

This response carries no example body.

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.

POST /database/scripts/subfolders-to-categories — scans the archive folder and creates one

Section titled “POST /database/scripts/subfolders-to-categories — scans the archive folder and creates one”
POSThttp://localhost:3000/api/database/scripts/subfolders-to-categories

Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.

The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/scripts.rs:182), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers.


POST /database/scripts/subfolders-to-categories — scans the archive folder and creates one static Category per subfolder that directly contains archives (FolderToCat.pm::run_script).

Reports its own wall-clock elapsed_ms in the response (directory walk through category creation, inclusive) so it can be directly compared against plugins/script/foldertocat.ts — a real .ts script plugin doing the identical directory walk + grouping logic itself (via Deno.readDir, not host-injected paths — the user wanted a genuine head-to-head, not a contrived one where the plugin is handed pre-walked data), used to gauge the real overhead of running this kind of I/O-heavy whole-library scan through the Deno-subprocess plugin sandbox versus native Rust.

Responses

200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/scripts.rs:33.

This response carries no example body.

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.

POST /database/scripts/subfolders-to-tankoubons — scans only the first-level subfolders

Section titled “POST /database/scripts/subfolders-to-tankoubons — scans only the first-level subfolders”
POSThttp://localhost:3000/api/database/scripts/subfolders-to-tankoubons

Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.

The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/scripts.rs:459), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers.


POST /database/scripts/subfolders-to-tankoubons — scans only the first-level subfolders of the archive folder and creates one Tankoubon per such subfolder. All archives under that first-level subdirectory (including archives in deeper nested subdirectories) are added to the same Tankoubon; nested subdirectories do not create their own Tankoubons. Duplicate names are allowed; this is a non-destructive action and never deletes or deduplicates existing Tankoubons.

When a DeepSeek API key is configured, the endpoint best-effort uses the LLM to infer a better Tankoubon name and an artist:/circle: author tag. Without a key, or when the LLM call fails, it falls back to the raw folder name and skips the author tag.

Responses

200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/scripts.rs:37.

This response carries no example body.

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.