added --size flag back into calls classify

quietlight
May 5, 2026, 12:49 AM
XNCKPSQERHNFZ6R4HHLDYJJUZEAPCKI4NXZITXVOMJOQXSUD6QQAC

Dependencies

  • [2] DD3LCTLZ tidy up lat lng timezone api for calls classify and push certainty
  • [3] AVQ66WO4 tools/ refactor
  • [4] KZKLAINJ run out of space on nest, cleaned out
  • [5] NS4TDPLN cyclomatic complexity

Change contents

  • edit in cmd/calls_classify.go at line 42
    [2.1854]
    [2.1854]
    fmt.Fprintf(os.Stderr, " --size <int> Spectrogram image size in pixels (224-896, default: config img_dims or 448)\n")
  • edit in cmd/calls_classify.go at line 76
    [4.8122]
    [4.8122]
    size int
  • replacement in cmd/calls_classify.go at line 85
    [4.8382][4.8382:8428]()
    a := classifyArgs{certainty: -1, sample: -1}
    [4.8382]
    [4.1145510]
    a := classifyArgs{certainty: -1, sample: -1, size: 0}
  • edit in cmd/calls_classify.go at line 109
    [4.8812]
    [4.1147282]
    i += 2
    case "--size":
    a.size = a.requireIntRange(args, i, "--size", 224, 896)
  • edit in cmd/calls_classify.go at line 248
    [4.11484]
    [4.11484]
    // classifyImageSize returns the effective image size: CLI flag overrides config.
    // Zero from both means use the default (448, handled downstream).
    func classifyImageSize(cliSize, configSize int) int {
    if cliSize > 0 {
    return cliSize
    }
    return configSize
    }
    // RunCallsClassify handles the "calls classify" subcommand
  • replacement in cmd/calls_classify.go at line 309
    [4.1152005][4.1152005:1152048]()
    ImageSize: cfg.Classify.ImgDims,
    [4.1152005]
    [4.1152048]
    ImageSize: classifyImageSize(a.size, cfg.Classify.ImgDims),
  • edit in CHANGELOG.md at line 4
    [4.1198010]
    [3.30288]
    ## [2026-05-05] Restore `--size` flag to `calls classify`
    Re-added the `--size` CLI flag to `skraak calls classify` for controlling
    spectrogram display size. Removed earlier as a complexity reduction, but
    needed back because the default 448px is too small on Retina displays.
    The flag overrides `img_dims` from config when specified (224-896px range).
    No complexity increase — reuses existing `requireIntRange` and a trivial
    `classifyImageSize` helper (complexity 2).
  • edit in CHANGELOG.md at line 15
    [3.30289]
    [3.30289]
    - `cmd/calls_classify.go` — Added `--size` flag to `classifyArgs`, parse switch,
    and `classifyImageSize()` override helper
    - No changes to `tools/calls_classify.go` or `tui/classify.go` (already wired)