Deal with the recordings, not just read them

A night's scan leaves hundreds of files, most worth nothing and a few of
them the reason it was left running.  Sorting that out meant leaving the
browser and going at the directory with mv and rm.

Five keys, meant to be pressed once each going down the list:

  S I N   file it into saved/, investigate/ or noise/
  u       put the last one filed back
  d       delete it and its sidecars, for good -- asks first
  m       lock the frequency out, so no later scan stops on it

Each of these acts on the whole capture -- the .wav, the JSON sidecar, the
IQ, the transcript and the decoded data -- because a recording in one
directory and its transcript in another is a pair nothing will ever put
back together.  A move that cannot be finished puts back whatever already
moved.  The cursor stays on the row it was on, which is now the next
recording, since a cursor that jumped would make one-key-per-recording
impossible.

m writes to the lock-out list in the settings file, the same one the
scanner's own l key maintains, so a birdie found while reading last night's
recordings is gone from tonight's.  It says "the next scan": one already
running read its settings when it started.

The subdirectories sit under the recordings directory, so a scan writing
there never looks in them, and saunterbrowse ~/bandsaunter/saved reads one
back.

Also here, because this is the first part of the browser that writes:

 - The help screen is back inside eighty by twenty-four.  It had grown past
   the bottom of an ordinary window, which puts "q quit" off the screen.
 - The footer drops keys in a deliberate order when the window is narrow,
   rather than ellipsising whichever happened to be at the end.
 - Moving or deleting what is playing stops the player first.
 - The pty harness accepted an env and ignored it, so a test aimed at a
   throwaway settings directory wrote to the real one.  It honours it now,
   and conftest redirects the settings directory for every test besides.

1014 tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
This commit is contained in:
The Dust Council 2026-08-29 13:21:32 -07:00
parent d6ae6d0c22
commit f9f0d94000
11 changed files with 1162 additions and 44 deletions

View file

@ -1086,6 +1086,10 @@ span is taken exactly as written, since a noisy stretch of spectrum has a
definite width rather than a point with a guess around it. Ranges accept the
same forms as everywhere else — `450M-455M`, `450-455M`, `88M to 108M`.
`saunterbrowse` writes to the same list: pressing `m` over a recording locks
out the frequency it was heard on, which is usually when you find out that a
frequency is not worth listening to.
`--lockout-control` adds each trunking control channel to the list as it is
found. Two runs never write anything back: `--no-config` has no settings file
to write to, since the point of the flag is to leave the saved settings alone;
@ -1129,7 +1133,7 @@ or symbol rate where there is one, and the bands the frequency falls in.
146.88 MHz 13:01:44 nfm 42.8s Alright, moving on. It is… │
│ 146.88 MHz 13:00:44 nfm 35.2s Check out communication o… │
╰───────────────────────────────────────────────────────────────────────╯
↑↓ move ⏎ play space stop / search t read s sort ? keys q
↑↓ move ⏎ play space stop / search t read S I N file d delete m mask q quit
```
| Key | What it does |
@ -1144,8 +1148,46 @@ or symbol rate where there is one, and the bands the frequency falls in.
| `s` | sort by time, frequency or length |
| `r` | re-read the directory, picking up what a running scan has written |
| `o` | print the file's path and quit |
| `S` `I` `N` | file it into `saved/`, `investigate/` or `noise/` |
| `u` | put the last one filed back |
| `d` | delete it and its sidecars, for good — asks first |
| `m` | lock this frequency out, so no later scan stops on it |
| `q` | quit |
### Dealing with what you find
A night's scan leaves hundreds of files, most worth nothing and a few of them
the reason you left it running. Sorting that out is one key per recording,
going down the list:
```
S saved/ keep this one
I investigate/ come back to this one
N noise/ not a signal worth keeping
d delete it outright — asks first
m never record this frequency again
```
Each of `S I N` moves the whole capture — the `.wav`, the JSON sidecar, the
raw IQ if it was kept, the transcript and the decoded data — because a
recording in one directory and its transcript in another is a pair nothing
will ever put back together. If a move cannot be finished, whatever already
moved is put back.
The subdirectories are ordinary directories inside the recordings directory,
so a scan writing there never looks in them, and `saunterbrowse
~/bandsaunter/saved` reads one back. `u` puts the last one filed back — one
step, so that a mistyped key costs nothing. `d` asks first, because nothing
puts that back.
`m` is the other half of the same job. A birdie or a pager transmitter that
fills the directory night after night is a scanning problem, not a recording
one, so this writes the frequency into the lock-out list in your settings —
the same list [the scanner's own `l` key](#lock-outs) writes to. It
takes effect on the next scan; one already running read its settings when it
started. Locking a frequency out does not delete what has already been
recorded on it, so pressing `m` and then `d` is the usual thing to do.
### Detected callsigns
Under the transcript, every callsign heard in it is listed with the name and