@kecan0406/ttheme 0.1.2 → 0.1.4

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.
package/README.md CHANGED
@@ -178,28 +178,76 @@ rather than the palette painted on one tab.
178
178
  A palette with no background yet can find one: on it in `preview`, tab opens
179
179
  **find**, which searches a booru for the palette's character tag
180
180
  (`meta.booru`) and lays the results out as a grid of thumbnails. It starts on
181
- safebooru; `p` moves to yande.re, then konachan, then back — the three share
182
- one tag vocabulary, so the same tag works on each. The site you are on sits in
183
- a colored badge at the top right, and again at the start of the line above a
184
- picture you try on, next to the site the artwork itself came from when the post
185
- records one (`pixiv.net`, `deviantart.com`). The grid starts
186
- with **cutouts** posts carrying the site's transparency tags
187
- (`transparent_background` or `vector_trace` on safebooru, `transparent_png` on
188
- yande.re, `transparent` or `vector` on konachan) whose PNG header says they have
181
+ safebooru; tab moves to yande.re, then konachan, then danbooru, then back — they
182
+ share one tag vocabulary, so the same tag works on each, and danbooru here is
183
+ `safebooru.donmai.us`, the mirror that carries general-rated posts only. The
184
+ sites sit in a strip of tabs under the query, the one you are on lit in its own
185
+ color, and it comes again as a badge at the start of the line above a picture
186
+ you try on, next to the site the artwork itself came from when the post records
187
+ one (`pixiv.net`, `deviantart.com`). The grid starts
188
+ with every post of the character; `c` narrows it to **cutouts** posts carrying
189
+ the site's transparency tags (`transparent_background` or `vector_trace` on
190
+ safebooru, `transparent_png` on yande.re, `transparent` or `vector` on konachan,
191
+ `transparent_background` on danbooru) whose PNG header says they have
189
192
  an alpha channel; yande.re's `transparent_png` already means exactly that, so
190
193
  its posts skip the header check, which its slow file server would drag out —
191
- and the counter reads shown out of checked, `13/33`. Pictures by the uploader of the backgrounds you already have
192
- in the same series come first and carry `≈`, so a series keeps one hand;
193
- anything under 1600 px on its long edge shows its size in yellow. Enter tries
194
- the picture on: ttheme downloads the original and paints the whole window with
195
- it the way the installed background will look tinted with the palette,
196
- cropped with headroom above the face, at the opacity the contrast gate allows —
197
- over a sample of shell output, with the share of transparent pixels next to its
198
- size (`opaque` when there are none). `←`/`→` try the neighbours, enter installs,
199
- and the preview carries on straight into the tuning panel below. Tab switches to
200
- every post of the character, esc goes back. Only `safe` and `general` posts are
201
- ever shown yande.re and konachan are always asked for `rating:s`, whatever
202
- else is searched and downloads stay in `~/.cache/ttheme/<site>/`. ttheme keeps no
194
+ and the counter reads shown out of checked, `13/33`. find checks only as far as
195
+ the grid reaches and checks more as you scroll; each answer is remembered, so
196
+ coming back to a site or a palette never asks its file server again, and a site
197
+ you have already seen comes back the moment you tab to it. Newer series carry
198
+ few of those tags, so `TTHEME_FIND_CUTOUTS` names the ones to look for, site by
199
+ site.
200
+
201
+ Under each thumbnail is its post id and size, and under that whoever made it:
202
+ the artist where the site names one yande.re, konachan and danbooru answer
203
+ with the tag types, so it costs no extra request — and the uploader as
204
+ `@name` where it does not, which is every safebooru post. A score follows as
205
+ `★22` on the sites that keep one. When the same hand uploads the same picture at
206
+ the same size over and over, find folds that run into one tile marked `×9`;
207
+ space unfolds it and folds it again. Pictures by the uploader of the backgrounds
208
+ you already have in the same series come first and carry `≈`, so a series keeps
209
+ one hand; anything under 1600 px on its long edge shows its size in yellow.
210
+
211
+ `s` opens the settings — the ratings to list, the nudity and underwear tags to
212
+ block, cutouts or all, newest or score, and whether runs fold — with ↑↓ on the
213
+ setting, enter to save them to `config.zsh` and esc to put them back. ←→ change
214
+ a value; on the two rows of checkboxes (rating and block) they move between the
215
+ boxes and space ticks one, so `safe` and `explicit` can be listed without
216
+ `questionable`, or underwear let through while nudity stays blocked. At least
217
+ one rating stays ticked. Whatever is not the default shows next to the query, so
218
+ the screen never hides what it is filtering by.
219
+
220
+ `/` opens the query for editing — type a tag to search for something else, or paste a post url or id
221
+ (`https://yande.re/post/show/214705`, `konachan:244200`, `7159377`) to go
222
+ straight to that one picture. A palette with no `meta.booru` tag at all opens
223
+ find on that empty query, so it can have a background too. `o` opens the post's
224
+ page in a browser.
225
+
226
+ Enter tries the picture on: ttheme downloads the original and paints the whole
227
+ window with it the way the installed background will look — tinted with the
228
+ palette, cropped with headroom above the face, at the opacity the contrast gate
229
+ allows — over a sample of shell output, with the share of transparent pixels
230
+ next to its size (`opaque` when there are none). On macOS an opaque picture is
231
+ cut out first: ttheme asks the system's own Vision framework (macOS 14 or newer,
232
+ through `osascript` — nothing is installed or uploaded) for the character alone,
233
+ marks the picture `cut out`, and `x` switches between the cut-out and the picture
234
+ as it is. When Vision finds no character, or would leave almost nothing or
235
+ remove almost nothing, the picture stays opaque; elsewhere it always does. A post over 25 megapixels is
236
+ fetched as the site's own smaller copy instead — up to 3500 px on yande.re and
237
+ konachan, 850 px on safebooru and danbooru — and its size carries `↓`; those
238
+ copies are JPEGs, so a cutout tried on that way comes out opaque. `←`/`→` try
239
+ the neighbours, which find fetches ahead of you two at a time, enter installs,
240
+ and the preview carries on straight into the tuning panel below. `c` switches
241
+ between every post and the cutouts, esc goes back. Unless the settings say otherwise,
242
+ only `safe` and `general` posts are shown, and none tagged with nudity or
243
+ underwear (`nude`, `panties` and each site's own spelling of them) — with only
244
+ `safe` ticked yande.re and konachan are asked for `rating:s`, whatever else is
245
+ searched; ticking more ratings or unticking a block in the `s` panel widen it. danbooru takes only two tags from a
246
+ signed-out search, so on it a cutout search leaves the score order out and says
247
+ so. Thumbnails and header checks stay in
248
+ `~/.cache/ttheme/<site>/`; the pictures you try on last only while find is open.
249
+ When a site asks ttheme to slow down, find waits as long as it names, up to a
250
+ minute, with a countdown at the bottom. ttheme keeps no
203
251
  list of images — the tag is all it knows about a character.
204
252
 
205
253
  An install writes `<palette>.png` (the tinted figure), `<palette>@fill-<focus>.png`
@@ -279,6 +327,15 @@ still wins:
279
327
  | `TTHEME_ANNOUNCE` | `1` | `0` silences the one-line notice under "Last login:" |
280
328
  | `TTHEME_FX` | `typewriter` | search hint animation — `typewriter`, `decode` or `glitch` |
281
329
  | `TTHEME_SORT` | `abc` | `series` lists series and palettes in the order they were added instead of by name — in `ttheme`, `preview` and, once exported, the `init` picker |
330
+ | `TTHEME_FIND_RATING` | `safe` | the ratings `find` lists, any of `safe`, `questionable` and `explicit` separated by spaces (`"safe explicit"`). Each site is read in its own vocabulary, so danbooru's `s` (sensitive) is not mistaken for yande.re's `s` (safe). The set shows next to the query whenever it is not just `safe` |
331
+ | `TTHEME_FIND_BLOCK` | `nudity underwear` | the posts `find` drops by tag: `nudity` (`nude`, `naked`, `topless`…), `underwear` (`panties`, `bra`, `lingerie`… — each with the site's own spelling), both, or `none` to keep every post. What is let through shows next to the query as `allows …` |
332
+ | `TTHEME_FIND_POSTS` | `all` | what `find` opens on — every post of the character, or only the transparent cutouts (`cutouts`) |
333
+ | `TTHEME_FIND_CUTOUTS` | — | the tags `find` calls a transparent cutout, as `key=tag,tag` pairs separated by spaces, keyed by `safebooru`, `yande`, `konachan` or `danbooru` (`safebooru=transparent_background yande=transparent_png,vector`). A site with several tags matches any of them; `danbooru=` names none, so its cutouts are the posts whose PNG header has an alpha channel. A site named here loses yande.re's shortcut of skipping that header check. Sites left out keep the built-in tags |
334
+ | `TTHEME_FIND_ORDER` | `newest` | the order `find` lists posts in — `newest` or `score` |
335
+ | `TTHEME_FIND_SETS` | `fold` | a run of the same picture at the same size from one uploader: `fold` shows it as one tile marked `×N`, `show` lists every one |
336
+ | `TTHEME_FIND_REMOVE_BG` | `on` | on macOS, `on` cuts the character out of an opaque picture `find` tries on, with the system's Vision framework; `off` leaves it as it is. The row is in the `s` panel as `remove bg` |
337
+ | `TTHEME_FIND_UNBLOCK` | `0` | `1` sends `find`'s own requests through a proxy it runs on `127.0.0.1`, which splits the TLS handshake across two records so a network that blocks boorus by hostname cannot read the name. It is not a VPN: the address you reach is unchanged and nothing else on the machine is affected. Needs node 22.21 or newer, and the query line says `unblock` while it is on |
338
+ | `TTHEME_FIND_HOSTS` | — | send a `find` site somewhere else, as `key=https://host` pairs (`konachan=https://konachan.com danbooru=https://danbooru.donmai.us`). The tab keeps its name and carries `*`. ttheme ships the safe mirrors only; the hosts that serve everything are yours to name, and plenty of networks block them |
282
339
 
283
340
  ## The catalog
284
341