Say what the terms are, and how to install under them

The program had no licence file at all, and pyproject claimed MIT into
the void.  It is now the GNU General Public License, version 3 or later:
LICENSE holds the text verbatim, pyproject declares it with the OSI
classifier, both .deb builds write /usr/share/doc/<pkg>/copyright in the
machine-readable format Policy requires, both manuals carry a COPYING
section, and --version prints the GNU notice on both programs.

INSTALL.md is the step-by-step: what you need, the Debian package, the
virtual environment for everywhere else, how to check it worked, every
optional dependency with what it buys and what happens without it, and
the errors people actually hit first -- PEP 668 at the top, because on
Debian a plain "pip install ." refuses and reads as a broken program.

Speech transcription gets its own four steps, because it is the only
part with a real download in it: the recogniser into the environment
bandsaunter runs from, checking it took, the model (base.en, 148 MB,
from Hugging Face into ~/.cache/huggingface, fetched deliberately rather
than in the middle of a scan), then turning it on.  With the sizes of
every model, the offline routes, and what to do when --engines says no
although pip says yes.

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-09-03 22:58:18 -07:00
parent eae60cb04d
commit 4239635f74
14 changed files with 1390 additions and 11 deletions

360
INSTALL.md Normal file
View file

@ -0,0 +1,360 @@
# Installing bandsaunter
Step by step, from nothing to a scan running. The whole of it is four
dependencies and one C library; there is nothing to compile and no model to
download unless you want speech transcription.
If you are on Debian, Ubuntu or Mint, [build the package](#a-debian-ubuntu-mint-the-package)
— it is two commands and apt does the rest. Anywhere else, use
[a virtual environment](#b-anywhere-else-a-virtual-environment).
**You can try the whole program before buying or plugging in a receiver.**
`--simulate` runs the scanner against a synthetic band, and `bandsaunter adsb
--simulate` flies imaginary aircraft past an imaginary receiver. Neither needs
hardware or a network.
---
## What you need
| | |
|---|---|
| **Python** | 3.10 or newer |
| **A receiver** | any RTL2832U dongle (RTL-SDR Blog v3/v4, NESDR, generic) — *optional*, everything except live scanning works without one |
| **An aerial** | whatever came with the dongle to start; a band-cut aerial for anything serious |
| **Disk** | ~250 MB for the program and its dependencies; recordings are what actually fill a disk |
| **Network** | only for installing, and for callsign and aircraft lookups afterwards |
Operating systems: developed and packaged on Debian; runs on any Linux with
Python 3.10+, and on macOS with `brew install librtlsdr`. On Windows it will
run under WSL2 with USB passthrough, which is more trouble than it is worth —
a Raspberry Pi is the easier answer.
---
## A. Debian, Ubuntu, Mint: the package
```bash
git clone <the repository> bandsaunter
cd bandsaunter
./packaging/build-deb.sh # writes dist/bandsaunter_<version>_all.deb
sudo apt install ./dist/bandsaunter_*.deb
```
That is the whole of it. `build-deb.sh` needs only `dpkg-deb` and `fakeroot`,
both already present on a normal system; apt then pulls in numpy, scipy, rich,
PyYAML and librtlsdr itself.
The package also does the one piece of system setup that a `pip` install
cannot: it blacklists the DVB-T television driver, which claims these dongles
on sight. Read what it prints — if a receiver was plugged in during the
install, unplug and replug it, or run `sudo rmmod dvb_usb_rtl28xxu` once.
Uninstall with `sudo apt remove bandsaunter`, which also removes the blacklist.
### For several machines: your own apt repository
`./packaging/build-repo.sh` builds the application, a speech recogniser and a
model into a small apt repository under `dist/repo`, so that `apt install
bandsaunter` on every other machine brings transcription with it. See
**Install → From your own apt repository** in the README.
---
## B. Anywhere else: a virtual environment
**Debian, Ubuntu and Fedora refuse `pip install` outside a virtual
environment** (PEP 668: *"externally-managed-environment"*). That is the error
most people hit first, and a virtual environment is the answer:
```bash
sudo apt install librtlsdr0 # Debian/Ubuntu/Mint
# sudo dnf install rtl-sdr # Fedora
# sudo pacman -S rtl-sdr # Arch
# brew install librtlsdr # macOS
git clone <the repository> bandsaunter
cd bandsaunter
python3 -m venv .venv
. .venv/bin/activate
pip install . # a few wheels; under a minute
```
That installs four wheels — numpy, scipy, rich, PyYAML — and puts two commands
on the path, `bandsaunter` and `saunterbrowse`. Nothing is built from source.
Use `pip install -e .` instead if you intend to change the code.
The commands only exist while the environment is active. To have them always,
install with [pipx](https://pipx.pypa.io) instead, which keeps its own
environment and puts the commands on your path permanently:
```bash
sudo apt install pipx && pipx install /path/to/bandsaunter
```
As a last resort — a throwaway machine, a container — `pip install
--break-system-packages .` overrides the refusal. It puts the dependencies in
among the system ones, which is what the warning is about.
---
## Check that it worked
```bash
bandsaunter --version
bandsaunter bands # the built-in US band plan; no hardware needed
bandsaunter scan -b 2m --simulate # a whole scan against a synthetic band
bandsaunter adsb --simulate --seconds 30
bandsaunter flights # draws what the last command heard
```
With a receiver plugged in:
```bash
bandsaunter devices # should list the dongle
bandsaunter devices --test # opens it and captures a block
bandsaunter # interactive setup, then scanning
```
`bandsaunter devices` is the command to run when something is wrong: it says
whether librtlsdr loaded, whether a dongle was found, and what to do about it
if not.
---
## Optional dependencies
Everything below is genuinely optional. The program starts, scans, records,
identifies, decodes Morse and draws waterfalls with none of it, and says
plainly when a feature is unavailable rather than failing.
| Install | Gives you | Without it |
|---|---|---|
| `sudo apt install espeak-ng` | clearer spoken timestamps on combined recordings, rendered about three times faster | a built-in formant synthesiser does the same job, less clearly |
| `sudo apt install ffmpeg` | `bandsaunter flights --out sky.mp4` writes a video | a GIF is written instead, and it says so |
| `sudo apt install rtl-sdr` | `rtl_test`, `rtl_sdr` and friends, for diagnosing hardware | nothing missing from bandsaunter itself |
| `pip install faster-whisper` | speech transcription of recorded voice — see [the step-by-step below](#speech-transcription-step-by-step) (~250 MB installed, plus a 148 MB model) | transcription is off; scans report that no recogniser is installed |
| `pip install vosk` | a smaller, weaker recogniser (~10 MB plus a 40 MB model) | as above |
| `pip install pyte` | the terminal-resize tests | those tests skip |
**Aircraft and callsign lookups need no installation**, only a network. They
ask public registers about a callsign or a 24-bit address and cache the
answers for a month; `--no-lookup` turns them off, and what the address and
the callsign say on their own is worked out offline either way.
---
## Speech transcription, step by step
This is the only part with a real download in it, and the only part Debian
cannot supply, so it gets its own section. Two pieces are needed: the
**recogniser** (a Python package) and the **model** it loads (the weights).
Scanning, recording, identifying and CW decoding all work without either.
### Step 1 — install the recogniser where bandsaunter can see it
The recogniser must go into the same environment bandsaunter itself runs
from, or bandsaunter will not find it.
If you installed into a virtual environment:
```bash
. .venv/bin/activate # the same one bandsaunter is in
pip install faster-whisper
```
If you installed for your user with `pip install --user` (the layout this
project was developed with, everything under `~/.local`):
```bash
pip install --user --break-system-packages faster-whisper
```
`--break-system-packages` is what gets past the PEP 668 refusal described
above; with `--user` it writes to `~/.local/lib/python3.x/site-packages` and
touches nothing the distribution owns.
This pulls in `ctranslate2`, `av`, `huggingface-hub`, `tokenizers` and
`onnxruntime` — about 250 MB installed, no compiler needed, all wheels.
### Step 2 — check bandsaunter can see it
```bash
bandsaunter transcribe --engines
```
```
engine installed how to get it
faster-whisper yes pip install faster-whisper (best on radio audio)
whisper no pip install openai-whisper
whisper-cli no whisper.cpp, no Python dependencies
vosk no pip install vosk (small, weaker on noisy audio)
pocketsphinx no pip install pocketsphinx (tiny, poor on radio audio)
auto would use faster-whisper
```
`installed: yes` against `faster-whisper` and a last line naming it is the
whole test. If it says `no` while pip says the package is there, they are in
different environments — see [When it does not work](#when-it-does-not-work).
### Step 3 — get the model
The model is **not** in the pip package. By default `base.en` is used, and
the first transcription downloads it from Hugging Face
(`Systran/faster-whisper-base.en`) into `~/.cache/huggingface/hub/`, about
140 MB. Everything after that is offline.
You can leave it to happen by itself, but a scan that appears to hang for a
minute on its first voice capture is unnerving, so it is better to fetch it
deliberately:
```bash
python3 -c "from faster_whisper import WhisperModel; WhisperModel('base.en', device='cpu', compute_type='int8')"
du -sh ~/.cache/huggingface # about 140 MB when it has finished
```
To watch what any engine is doing, including a download in progress:
```bash
BANDSAUNTER_ENGINE_OUTPUT=1 bandsaunter transcribe recording.wav --stdout
```
Model sizes, measured from the repository listings:
| Model | Download | Notes |
|---|---|---|
| `tiny.en` | 78 MB | fastest; misses words on noisy radio audio |
| `base.en` | 148 MB | **the default**; keeps up comfortably on an ordinary machine |
| `small.en` | 486 MB | noticeably better on weak signals, several times slower |
| `medium.en` | 1.5 GB | better again; wants a fast machine and patience |
| `large-v3` | 3.1 GB | multilingual, and slow on a CPU |
Everything runs **on the CPU**, at int8 — no GPU, no CUDA, no nvidia
packages, on purpose: a scanner should not need a graphics card, and int8 on
a CPU keeps up with a scan.
### Step 4 — turn it on
```bash
bandsaunter transcribe recording.wav --stdout # one file, straight away
bandsaunter transcribe ~/bandsaunter # a whole directory
bandsaunter scan -b 2m --transcribe # during a scan
bandsaunter config transcribe=true # or make that the default
bandsaunter config transcribe_model=small.en # and choose the model
```
During a scan, transcription runs on its own thread after each recording is
written, so it never holds up the sweep. Transcripts land beside the audio as
`<recording>_transcription.txt`, and `saunterbrowse` shows them.
### Doing it without a network, or on many machines
`./packaging/build-repo.sh` collects the recogniser and the model into two
Debian packages, so no machine you install on ever reaches the network:
```bash
MODEL=base.en ./packaging/build-repo.sh # any size from the table above
```
That produces `bandsaunter-transcribe` (the wheels, unpacked into
`/usr/lib/bandsaunter/vendor`) and `bandsaunter-model-base-en` (the weights,
in `/usr/share/bandsaunter/models/base.en`), and an apt repository serving
them alongside `bandsaunter` itself. Both are `Recommends`, so a plain `apt
install bandsaunter` from that repository brings the lot.
For a machine that is not using apt, copy the model directory anywhere and
point at it:
```bash
export BANDSAUNTER_MODEL_DIR=/opt/models # holds base.en/, small.en/ ...
bandsaunter config transcribe_model=/opt/models/base.en # or an outright path
```
A model name that matches a directory under `BANDSAUNTER_MODEL_DIR` is used
from disk; anything else is left to the recogniser to download.
### A smaller alternative
`vosk` is a tenth of the size and much weaker on the noisy, clipped audio
radio produces. It is worth it on a Raspberry Pi and not otherwise:
```bash
pip install vosk # ~10 MB
bandsaunter config transcribe_engine=vosk
```
It fetches its own small model on first use, by language; point
`transcribe_model` at an unpacked model directory to use a specific one.
---
## When it does not work
**`externally-managed-environment` from pip.** Use a virtual environment or
pipx, as above. This is the distribution protecting its own Python, not a
problem with bandsaunter.
**`bandsaunter transcribe --engines` says `no` although pip installed it.**
The recogniser went into a different environment from bandsaunter. Ask each
of them where it is and compare:
```bash
python3 -c "import bandsaunter, sys; print(sys.executable); print(bandsaunter.__file__)"
python3 -c "import faster_whisper; print(faster_whisper.__file__)"
```
Install the recogniser with the same `pip` that owns the first path — the
venv's `pip` for a venv install, `pip install --user --break-system-packages`
for a `~/.local` one. On a `.deb` install, bandsaunter runs as the system
`python3` and looks in `/usr/lib/bandsaunter/vendor` as well, which is what
the `bandsaunter-transcribe` package fills.
**The first transcription takes a minute and prints nothing.** It is
downloading the model. `BANDSAUNTER_ENGINE_OUTPUT=1` shows the progress, and
Step 3 above fetches it deliberately instead.
**`librtlsdr was not found`.** Install it: `librtlsdr0` on Debian/Ubuntu,
`rtl-sdr` on Fedora and Arch, `brew install librtlsdr` on macOS. Everything
that does not touch the receiver keeps working without it.
**`bandsaunter devices` finds nothing, or cannot open the dongle.** Almost
always the DVB-T driver, which claims these dongles the moment they are
plugged in:
```bash
echo 'blacklist dvb_usb_rtl28xxu' | sudo tee /etc/modprobe.d/blacklist-rtl.conf
sudo rmmod dvb_usb_rtl28xxu
```
Then unplug and replug the receiver. The `.deb` does this for you.
**Permission denied opening the device.** On Debian and Ubuntu the
`librtlsdr0` package installs the udev rule that grants access, so this is
rare; if you built librtlsdr yourself, you need the rule from its source tree
in `/etc/udev/rules.d`, then `sudo udevadm control --reload` and a replug.
**Nothing is recorded.** That is usually correct behaviour rather than a
fault: captures are kept only when they carry voice, decodable CW or an
identified digital scheme. `bandsaunter scan -b 2m --simulate` proves the
whole path end to end without an aerial.
---
## Running the tests
```bash
pip install pytest pyte
python3 -m pytest tests/ -q
```
About 1500 tests and around fifteen minutes; they need no hardware and no
network.
---
## Licence
GNU General Public License, version 3 or later. The full text is in
[LICENSE](LICENSE), and in an installed package at
`/usr/share/doc/bandsaunter/copyright`.

674
LICENSE Normal file
View file

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View file

@ -32,6 +32,9 @@ transcripts, identifications and playback, in one screen.
## Install
**[INSTALL.md](INSTALL.md) has the step-by-step version**, including the
optional dependencies and what goes wrong first. The short forms:
### From a package (Debian, Ubuntu, Mint)
```bash
@ -1848,3 +1851,14 @@ Receiving is not the same as being allowed to use or divulge what you hear. In
the US, the ECPA prohibits intercepting cellular and other private
communications, and rebroadcasting or acting on what you receive is separately
restricted. Check your local rules.
## Licence
Copyright © 2026 The Dust Council.
bandsaunter is free software: you can redistribute it and modify it under the
terms of the **GNU General Public License, version 3 or later**, as published
by the Free Software Foundation. It is distributed in the hope that it will be
useful, but with no warranty whatsoever — not even the implied warranty of
merchantability or fitness for a particular purpose. The full text is in
[LICENSE](LICENSE), and at <https://www.gnu.org/licenses/>.

View file

@ -9,12 +9,29 @@ and transcribing speech.
# 2026-08-21_02 is the second build made on the 21st. The revision is padded
# to two digits so versions sort as text.
VERSION_DATE = "2026-09-03"
VERSION_REVISION = 3
VERSION_REVISION = 5
__version__ = f"{VERSION_DATE}_{VERSION_REVISION:02d}"
__all__ = ["__version__", "VERSION_DATE", "VERSION_REVISION",
"pep440_version", "debian_version"]
"pep440_version", "debian_version", "version_notice"]
COPYRIGHT = "Copyright (C) 2026 The Dust Council"
def version_notice(program: str = "bandsaunter") -> str:
"""What ``--version`` prints: the version and the terms it comes under.
The GNU form, and for the GNU reason: the licence tells whoever is running
the program what they are allowed to do with it, and the program is the
only thing in front of them.
"""
return (f"{program} {__version__}\n"
f"{COPYRIGHT}\n"
"License GPLv3+: GNU GPL version 3 or later "
"<https://gnu.org/licenses/gpl.html>\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.")
def pep440_version() -> str:

View file

@ -37,7 +37,7 @@ from rich.panel import Panel
from rich.table import Table
from rich.text import Text
from . import __version__
from . import version_notice
from .bandplan import band_names, fmt_hz, shorten_band
from .callsign import CallsignBook, HEADING, find_callsigns
from .config import DEFAULT_CONFIG_DIR, load_default, remember_lockouts
@ -1763,6 +1763,9 @@ def build_parser() -> argparse.ArgumentParser:
p = argparse.ArgumentParser(
prog="saunterbrowse",
description="Read and listen to what a bandsaunter scan collected.",
# Raw, so the licence notice --version prints keeps its line breaks
# instead of being reflowed into a paragraph.
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog="Arrow keys move, Enter plays, / searches what was said.")
p.add_argument("directory", nargs="?", default=None,
help="where the recordings are "
@ -1792,7 +1795,7 @@ def build_parser() -> argparse.ArgumentParser:
help="do not contact the licence database; callsigns are "
"still found, and described from their prefix alone")
p.add_argument("-V", "--version", action="version",
version=f"saunterbrowse {__version__}")
version=version_notice("saunterbrowse"))
return p

View file

@ -18,7 +18,7 @@ from rich.panel import Panel
from rich.table import Table
from rich.text import Text
from . import __version__
from . import version_notice
from .bandplan import CATEGORIES, PRESETS, fmt_hz, in_category, search
from .config import (DEFAULT_CONFIG_DIR, DEFAULT_CONFIG_PATH, ScanConfig,
is_first_run, list_profiles, load_config, load_default,
@ -60,7 +60,11 @@ examples:
bandsaunter flights --out sky.gif animate what they did
bandsaunter scan -b 2m --simulate try it without hardware
""")
p.add_argument("--version", action="version", version=f"bandsaunter {__version__}")
# The GNU form: the version, then who holds the copyright and what the
# licence is, because the licence tells the person running it what they
# are allowed to do with it and the program is the only thing in front
# of them.
p.add_argument("--version", action="version", version=version_notice())
sub = p.add_subparsers(dest="command")
# -- scan ------------------------------------------------------------

View file

@ -1,5 +1,5 @@
.\" Generated by packaging/make-man.py -- do not edit by hand.
.TH BANDSAUNTER 1 "2026-09-03" "bandsaunter 2026-09-03_03" "User Commands"
.TH BANDSAUNTER 1 "2026-09-03" "bandsaunter 2026-09-03_05" "User Commands"
.SH NAME
bandsaunter \- scan, record and identify radio signals with an RTL-SDR
.SH SYNOPSIS
@ -1481,6 +1481,20 @@ transcripts and their identifications, on one screen.
.PP
The README shipped with the package covers the same ground at greater length,
including why the detection thresholds are what they are.
.SH COPYING
Copyright \(co 2026 The Dust Council.
.PP
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version. It is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY \[em] without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for the full
terms, in
.I /usr/share/doc/bandsaunter/copyright
or at
.UR https://www.gnu.org/licenses/
.UE .
.SH BUGS
The DVB-T television driver claims these dongles on sight. If the receiver
cannot be opened, that is almost always why: the package blacklists the

View file

@ -19,8 +19,23 @@ mkdir -p "$site/bandsaunter" "$pkgdir/usr/bin" "$pkgdir/DEBIAN" \
"$pkgdir/usr/share/doc/bandsaunter"
cp "$here"/bandsaunter/*.py "$site/bandsaunter/"
cp "$here/README.md" "$pkgdir/usr/share/doc/bandsaunter/"
cp "$here/README.md" "$here/INSTALL.md" "$pkgdir/usr/share/doc/bandsaunter/"
gzip -9n "$pkgdir/usr/share/doc/bandsaunter/README.md"
gzip -9n "$pkgdir/usr/share/doc/bandsaunter/INSTALL.md"
# Debian Policy requires the licence verbatim, at this exact path, in every
# package. The header above it is the machine-readable format apt tools read.
{
echo "Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/"
echo "Upstream-Name: bandsaunter"
echo
echo "Files: *"
echo "Copyright: 2026 The Dust Council"
echo "License: GPL-3.0-or-later"
echo
echo "License: GPL-3.0-or-later"
sed 's/^$/./; s/^/ /' "$here/LICENSE"
} > "$pkgdir/usr/share/doc/bandsaunter/copyright"
# Regenerated from the settings table rather than copied, so the manual
# cannot describe a version of the settings that no longer exists.

View file

@ -40,7 +40,7 @@ pip download --quiet --only-binary=:all: --dest "$wheels" faster-whisper >&2
pkg="$stage/bandsaunter-transcribe_${version}-${revision}_${arch}"
vendor="$pkg/usr/lib/bandsaunter/vendor"
mkdir -p "$vendor" "$pkg/DEBIAN"
mkdir -p "$vendor" "$pkg/DEBIAN" "$pkg/usr/share/doc/bandsaunter-transcribe"
for w in "$wheels"/*.whl; do
python3 -m zipfile -e "$w" "$vendor/"
done
@ -53,6 +53,22 @@ rm -rf "$vendor"/numpy "$vendor"/numpy-* "$vendor"/yaml "$vendor"/PyYAML-* \
rm -f "$vendor"/*.pth
find "$vendor" -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
# The packaging is this project's; the wheels inside keep their own terms.
{
echo "Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/"
echo "Upstream-Name: bandsaunter"
echo
echo "Files: *"
echo "Copyright: 2026 The Dust Council"
echo "License: GPL-3.0-or-later"
echo " The packaging in this file is under the GNU General Public License,"
echo " version 3 or later, whose full text is in the bandsaunter package at"
echo " /usr/share/doc/bandsaunter/copyright. The Python wheels vendored"
echo " under /usr/lib/bandsaunter/vendor are third-party works distributed"
echo " under their own licences, each carried in that package's own"
echo " dist-info directory beside it."
} > "$pkg/usr/share/doc/bandsaunter-transcribe/copyright"
cat > "$pkg/DEBIAN/control" <<EOF
Package: bandsaunter-transcribe
Version: ${version}-${revision}
@ -78,6 +94,8 @@ say "collecting the $model model"
modelpkg="$stage/bandsaunter-model-$(echo "$model" | tr '._' '--')_${version}-${revision}_all"
modeldir="$modelpkg/usr/share/bandsaunter/models/$model"
mkdir -p "$modeldir" "$modelpkg/DEBIAN"
modeldoc="$modelpkg/usr/share/doc/bandsaunter-model-$(echo "$model" | tr '._' '--')"
mkdir -p "$modeldoc"
PYTHONPATH="$stage/wheels-unused" python3 - "$hf_repo" "$modeldir" <<'PY' >&2
import shutil, sys
from pathlib import Path
@ -92,6 +110,20 @@ for item in src.iterdir():
shutil.copy2(item.resolve(), target)
PY
{
echo "Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/"
echo "Upstream-Name: bandsaunter"
echo
echo "Files: *"
echo "Copyright: 2026 The Dust Council"
echo "License: GPL-3.0-or-later"
echo " The packaging is under the GNU General Public License, version 3 or"
echo " later, whose full text is in the bandsaunter package at"
echo " /usr/share/doc/bandsaunter/copyright. The model weights under"
echo " /usr/share/bandsaunter/models are a third-party work, redistributed"
echo " under the terms the model was published with."
} > "$modeldoc/copyright"
cat > "$modelpkg/DEBIAN/control" <<EOF
Package: bandsaunter-model-$(echo "$model" | tr '._' '--')
Version: ${version}-${revision}

View file

@ -485,6 +485,14 @@ The same thing as a map, to open in Google Earth.
not exist or there is no terminal to draw on.
.SH SEE ALSO
.BR bandsaunter (1)
.SH COPYING
Copyright \(co 2026 The Dust Council. Free software under the GNU General
Public License, version 3 or later; see
.I /usr/share/doc/bandsaunter/copyright
or
.UR https://www.gnu.org/licenses/
.UE .
There is no warranty, to the extent permitted by law.
.SH BUGS
The list is read when the browser opens. Press
.B r

View file

@ -874,6 +874,20 @@ transcripts and their identifications, on one screen.
.PP
The README shipped with the package covers the same ground at greater length,
including why the detection thresholds are what they are.
.SH COPYING
Copyright \(co 2026 The Dust Council.
.PP
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version. It is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY \[em] without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for the full
terms, in
.I /usr/share/doc/bandsaunter/copyright
or at
.UR https://www.gnu.org/licenses/
.UE .
.SH BUGS
The DVB-T television driver claims these dongles on sight. If the receiver
cannot be opened, that is almost always why: the package blacklists the

View file

@ -1,5 +1,5 @@
.\" Generated by packaging/make-browse-man.py -- do not edit by hand.
.TH SAUNTERBROWSE 1 "2026-09-03" "bandsaunter 2026-09-03_03" "User Commands"
.TH SAUNTERBROWSE 1 "2026-09-03" "bandsaunter 2026-09-03_05" "User Commands"
.SH NAME
saunterbrowse \- read and listen to what a bandsaunter scan collected
.SH SYNOPSIS
@ -473,6 +473,14 @@ The same thing as a map, to open in Google Earth.
not exist or there is no terminal to draw on.
.SH SEE ALSO
.BR bandsaunter (1)
.SH COPYING
Copyright \(co 2026 The Dust Council. Free software under the GNU General
Public License, version 3 or later; see
.I /usr/share/doc/bandsaunter/copyright
or
.UR https://www.gnu.org/licenses/
.UE .
There is no warranty, to the extent permitted by law.
.SH BUGS
The list is read when the browser opens. Press
.B r

View file

@ -8,7 +8,12 @@ dynamic = ["version"]
description = "Signal scanner, recorder and identifier for RTL-SDR receivers"
readme = "README.md"
requires-python = ">=3.10"
license = {text = "MIT"}
license = {text = "GPL-3.0-or-later"}
classifiers = [
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Topic :: Communications :: Ham Radio",
"Environment :: Console",
]
dependencies = [
"numpy>=1.22",
"scipy>=1.8",

211
tests/test_licence.py Normal file
View file

@ -0,0 +1,211 @@
"""The licence, and the instructions for installing under it.
Both are files a person reads rather than code that runs, which is exactly why
they are worth a test: nothing else notices when a licence file goes missing
from a package, when the version notice stops naming the terms, or when the
install instructions describe a command that no longer exists.
"""
import re
import subprocess
import sys
from pathlib import Path
import pytest
import bandsaunter
ROOT = Path(__file__).resolve().parent.parent
LICENCE = ROOT / "LICENSE"
INSTALL = ROOT / "INSTALL.md"
README = ROOT / "README.md"
# ---------------------------------------------------------------------------
# The licence itself
# ---------------------------------------------------------------------------
def test_the_licence_is_there_and_is_the_gnu_gpl():
assert LICENCE.is_file(), "no LICENSE file"
text = LICENCE.read_text()
assert "GNU GENERAL PUBLIC LICENSE" in text
assert "Version 3, 29 June 2007" in text
def test_the_licence_is_the_whole_of_it():
"""A truncated licence is not a licence. The GPL ends with the notice it
tells you to attach to a program, so if that is present, so is the rest."""
text = LICENCE.read_text()
assert "TERMS AND CONDITIONS" in text
assert "How to Apply These Terms to Your New Programs" in text
assert len(text.splitlines()) > 600
def test_the_packaging_metadata_says_the_same_licence():
body = (ROOT / "pyproject.toml").read_text()
assert 'license = {text = "GPL-3.0-or-later"}' in body
assert "GNU General Public License v3 or later" in body
def test_the_readme_says_which_licence_and_points_at_the_file():
body = README.read_text()
assert "GNU General Public License" in body
assert "[LICENSE](LICENSE)" in body
# ---------------------------------------------------------------------------
# What the programs say for themselves
# ---------------------------------------------------------------------------
@pytest.mark.parametrize("program", ["bandsaunter", "saunterbrowse"])
def test_the_version_notice_names_the_version_and_the_terms(program):
notice = bandsaunter.version_notice(program)
lines = notice.splitlines()
assert lines[0] == f"{program} {bandsaunter.__version__}"
assert "Copyright (C)" in notice
assert "GNU GPL version 3 or later" in notice
assert "NO WARRANTY" in notice
def test_the_command_prints_it():
out = subprocess.run([sys.executable, "-m", "bandsaunter", "--version"],
capture_output=True, text=True, timeout=60)
assert bandsaunter.__version__ in out.stdout
assert "GPLv3+" in out.stdout
# Four lines under the version, not reflowed into a paragraph by argparse.
assert len(out.stdout.strip().splitlines()) == 5
# ---------------------------------------------------------------------------
# The manuals
# ---------------------------------------------------------------------------
@pytest.mark.parametrize("page", ["bandsaunter.1", "saunterbrowse.1"])
def test_both_manuals_have_a_copying_section(page):
body = (ROOT / "packaging" / page).read_text()
assert ".SH COPYING" in body
assert "General\nPublic License" in body or "General Public License" in body
# ---------------------------------------------------------------------------
# The Debian package carries the licence where policy says it must
# ---------------------------------------------------------------------------
def test_the_package_ships_the_licence_at_the_path_policy_requires():
script = (ROOT / "packaging" / "build-deb.sh").read_text()
assert "usr/share/doc/bandsaunter/copyright" in script
assert '"$here/LICENSE"' in script
def test_the_package_ships_the_install_instructions_too():
assert 'INSTALL.md' in (ROOT / "packaging" / "build-deb.sh").read_text()
# ---------------------------------------------------------------------------
# The install instructions
# ---------------------------------------------------------------------------
def test_the_install_file_exists_and_is_pointed_at_from_the_readme():
assert INSTALL.is_file(), "no INSTALL.md"
assert "[INSTALL.md](INSTALL.md)" in README.read_text()
def test_the_install_file_covers_both_ways_of_installing():
body = INSTALL.read_text()
assert "./packaging/build-deb.sh" in body
assert "python3 -m venv" in body
assert "pip install ." in body
def test_it_warns_about_the_thing_every_debian_user_hits_first():
"""pip refuses to install outside a virtual environment on Debian and
Fedora. Someone who has not met PEP 668 reads that error as a broken
program."""
body = INSTALL.read_text()
assert "externally-managed-environment" in body
assert "PEP 668" in body
def test_it_lists_the_optional_dependencies_and_what_each_one_buys():
body = INSTALL.read_text()
for optional in ("espeak-ng", "ffmpeg", "faster-whisper", "vosk",
"rtl-sdr"):
assert optional in body, optional
assert "Optional dependencies" in body
def test_it_says_how_to_install_the_recogniser_and_the_model():
"""The one part with a real download in it, and the part that has to be
put in the same environment bandsaunter runs from."""
body = INSTALL.read_text()
assert "pip install faster-whisper" in body
assert "--user --break-system-packages" in body # the ~/.local layout
assert "bandsaunter transcribe --engines" in body # how to check it took
assert "Systran/faster-whisper-base.en" in body # what gets downloaded
assert "~/.cache/huggingface" in body # and where it lands
assert "WhisperModel('base.en'" in body # fetching it on purpose
def test_the_model_the_instructions_name_is_the_one_the_program_asks_for():
"""The instructions download base.en because that is the default; if the
default moves, they are downloading the wrong thing."""
from bandsaunter.config import ScanConfig
assert ScanConfig().transcribe_model in INSTALL.read_text()
def test_it_names_the_ways_a_model_can_be_supplied_without_a_network():
body = INSTALL.read_text()
assert "BANDSAUNTER_MODEL_DIR" in body
assert "/usr/share/bandsaunter/models" in body
assert "build-repo.sh" in body
def test_it_says_where_the_engine_output_switch_is():
"""A silent minute on the first transcription reads as a hang."""
assert "BANDSAUNTER_ENGINE_OUTPUT=1" in INSTALL.read_text()
def test_the_environment_variables_it_names_are_the_ones_the_code_reads():
from bandsaunter import transcribe as tr
body = INSTALL.read_text()
for variable in ("BANDSAUNTER_MODEL_DIR", "BANDSAUNTER_ENGINE_OUTPUT"):
assert variable in body
assert str(tr.MODEL_DIR) in body or "BANDSAUNTER_MODEL_DIR" in body
def test_the_settings_it_tells_you_to_change_exist():
from bandsaunter.config import ScanConfig
fields = set(ScanConfig().__dict__)
told = set(re.findall(r"bandsaunter config ([a-z_]+)=", INSTALL.read_text()))
assert told, "the instructions change no settings at all"
assert told <= fields, told - fields
def test_it_says_what_to_do_when_the_dongle_is_not_found():
body = INSTALL.read_text()
assert "dvb_usb_rtl28xxu" in body
assert "librtlsdr" in body
def test_every_bandsaunter_command_it_tells_you_to_run_exists():
"""An instruction to run a command that was renamed is worse than none."""
from bandsaunter.cli import build_parser
known = set()
for action in build_parser()._subparsers._group_actions:
known.update(action.choices)
told = set(re.findall(r"^\s*(?:\$ )?bandsaunter ([a-z]+)",
INSTALL.read_text(), re.MULTILINE))
assert told, "the instructions run no commands at all"
assert told <= known | {"--version"}, told - known
def test_the_flags_it_tells_you_to_use_are_real():
from bandsaunter.cli import build_parser
parser = build_parser()
for line in ("scan -b 2m --simulate", "adsb --simulate --seconds 30",
"devices --test", "transcribe --engines"):
parser.parse_args(line.split()) # raises SystemExit if not