Names quak builds from server data fit in 255 bytes (closes #205)

The default names of `quak get`, `quak get-thumb`, `downloadFile` and
`downloadThumbnail`, and the album folders of `backup-metadata`, could be
over 255 bytes, which a file system refuses. `shortenKeepingExtension` in
`src/filename.ts` cuts a name short, keeping its extension when it fits,
and can put text right before the extension; the backup's `withID` now
calls it instead of doing the same itself. The `get` defaults use it with
`thumb_` counted. A `backup-metadata` folder keeps its `<id>-` and has the
name after it cut short. `safeExtension` gives `.bin` for an extension of
more than 16 letters and digits, so a save path's name always fits.

Model: opus-5-5
This commit is contained in:
2026-10-18 17:03:14 +00:00
parent 982b878d69
commit fd40714a6d
10 changed files with 290 additions and 27 deletions
+14 -3
View File
@@ -17,15 +17,26 @@ pre-1.0
# Next Step
One bug is open: https://git.eeqj.de/sneak/quak/issues/205. The check of quak
against a live Ente account, https://git.eeqj.de/sneak/quak/issues/187, needs an
account only sneak has, so it waits on him.
No bug is open. The check of quak against a live Ente account,
https://git.eeqj.de/sneak/quak/issues/187, needs an account only sneak has, so
it waits on him.
Tagging and releases are decided by sneak alone, and happen only when he
declares one.
# Completed Steps
- 2026-10-18: Names quak builds from an album name or a title fit in a file name
(issue 205). `shortenKeepingExtension` in `src/filename.ts` cuts a name short
to a number of bytes, keeping its extension when it fits, and can put text
right before the extension; the backup's `withID` uses it for an ID. The
default names of `quak get`, `quak get-thumb`, `downloadFile` and
`downloadThumbnail` are cut short with it to 255 bytes, `thumb_` included.
`backup-metadata` cuts an album's name short so that its folder,
`<id>-<name>`, fits in 255 bytes. `safeExtension` gives `.bin` for an
extension of more than 16 letters and digits, so a save path's name always
fits.
- 2026-10-18: `quak collections` no longer waits for the files of every
collection (issue 210). On an empty cache it opened its library with a refresh
that fetched and decrypted the files of each collection in turn, printing