Expand description
ck: a terminal imageboard browser. The binary (main.rs) is a thin shell
around this library, which is also what the fuzz targets in fuzz/ link against.
Modules§
- input_
log CK_INPUT_LOG=<path>: a line for each input event as it’s read, as it’s handled, and for each frame drawn, with the time since ck started. For finding out what happened to a key; off, and free, unless the variable is set.
Structs§
- App
- Config
- Unknown keys are errors, here and in
[[site]]and[[image_search]]: a misspelled setting would otherwise do nothing, without a word. - Disk
Cache - Filters
- Pages
- Store
Enums§
Functions§
- builtin_
sites_ text - The built-in sites, as
[[site]]tables (to copy one and change it). - catching
- Run
f; a panic in it comes back as its message. - choose_
protocol - The image protocol to use: the one
imagesnames, or what the terminal said it can show. Zellij answers for the terminal it runs in, and says sixel whatever that terminal is (most can’t show it, and then nothing would show at all): there, half-blocks, unlessimages = "sixel"says otherwise. - download_
root - Where files go unless
download_dirsays otherwise (in a folder per site, board and thread). - draw
- fresh_
config - A new config file: the default config without its
[[site]]tables, so the built-in sites aren’t frozen in it (they’re added when it loads, and can change with ck). - sandboxed
- Whether ck may reach outside itself: open a browser or player, write the clipboard, send
notifications. Not in tests, nor with
CK_NO_EXTERNALset (the end-to-end fuzzer). - set_
theme - spawn_
detached - Start a program away from the terminal (no stdin, stdout or stderr, and on Unix a process group of its own, so ctrl-c in ck doesn’t reach it), and wait on it in the background so it doesn’t linger once it exits.
- start_
error - Why ck can’t start at
input(ck URL), if it can’t, to say before the terminal is taken over. A link to a site that isn’t one ofsitesis fine: ck asks it, to add it. - theme_
from_ config - The theme the config asks for:
theme = "name", or ck 0.2’s[theme]overrides on the default theme.