Say the date and the time, and sort by both

The listing gave the time and not the date, which is fine for an
evening's scanning and useless for a directory that has been filling
for a fortnight: two recordings a week apart looked like neighbours.

Every moment in the browser is now written YY-mm-dd hh:mm:ss am/pm --
date first so a column of them reads down in order, twelve-hour so it
reads the way it would be said. Midnight is 12 am and noon is 12 pm,
which is the pair a twelve-hour clock gets wrong when it is done by
subtraction, so both are tested.

The sort is named "date/time" rather than "time" and orders by the
whole moment, with the filename breaking a tie so that the list does
not shuffle itself between one reload and the next. --sort time still
works; it is the sort of thing that lives in a shell alias.

The date costs twelve columns, so the frequency column is now only as
wide as the widest frequency in the list rather than always wide
enough for 1090.000001 MHz. It is fixed for the whole list, not the
screenful, because a column that resizes as the list scrolls under it
makes the whole listing appear to twitch.

--list is left in ISO and twenty-four hours: it is there to be piped
into grep and sort, and those want the format that sorts as text.

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-30 00:53:58 -07:00
parent 3d7f76118e
commit 0f378c4d6c
7 changed files with 178 additions and 27 deletions

View file

@ -55,6 +55,13 @@ is the part you actually want to read; underneath it are the identification,
the bands the frequency falls in, and the list itself. Pressing Enter plays
the recording.
.PP
Each line of the list gives the frequency, the date and time, the mode, how
long it ran and what was said. The moment is written
.BR "YY-mm-dd hh:mm:ss am/pm" ,
date first so that a column of them reads down in order, and on a twelve-hour
clock so that it reads the way you would say it. The list starts in that
order, newest first.
.PP
With no
.I DIRECTORY
it opens the one the scanner writes to, taken from your saved settings, so it
@ -139,8 +146,12 @@ Where the recordings are. Defaults to the scanner's output directory, or to
when that is set.
.TP
.BI \-\-sort " ORDER"
Start in this order: {sorts}. Time is newest first; duration is longest
Start in this order: {sorts}. Date/time is newest first, ordered by the whole
moment \[em] year, month, day, then hour, minute and second; duration is longest
first.
.B time
is accepted as the old name for
.BR date/time .
.TP
.BI \-\-filter " TEXT"
Start with only the recordings matching this, exactly as if it had been typed