Preferences and the command line
Outcome: you can drive TQSL from scripts for the jobs scripts are good at — checking for news, signing a folder of logs — and you know which dialogs the batch mode cannot replace.
The preferences worth knowing
File → Display or Modify Preferences… holds TQSL's settings.
The one a new user should meet first is the behaviour of the
automatic .tbk backups on exit (chapter 9): the folder they
are written to and how many dated copies are retained. The
File menu also holds a Diagnostic Mode toggle, which
makes TQSL log verbosely — the first thing to switch on when
chapter 12's recipes are not enough and you are writing to the
ARRL for help. A Language submenu switches the interface
language where a translation is installed.
The command line, honestly surveyed
tqsl -h prints eighteen options (transcript t02 keeps the
full list with the manual's wording). Grouped by job:
- Ask the program things:
-v(version),-h(help),-n(news: new releases, new configuration files, expiring or pending certificates). - Work with certificates:
-iimports a.p12or.tq6file;-csets the default callsign for signing. (Exporting a certificate is a GUI job — chapter 9's Save action.) - Station locations:
-screates a location, or edits the one-lnames;-lselects a location by name for signing. - Sign: a bare log filename signs it;
-usigns and uploads;-onames the output file instead of the default;-achooses how QSOs that are already uploaded or out of the date range are handled (abort,compliant,all, orask— the default);-band-ebound the QSO date range and-dsuppresses the date-range dialog;-fchooses the QSO verification action (ignore,report,update). - Housekeeping, handle with care:
-wwipes TQSL's uploads database — the memory that powers duplicate warnings — and-tnames a file for a diagnostic tracking log. - Batch control:
-xexits after processing instead of staying open (-q, quiet mode, behaves the same), so a script never blocks on the window, and-psupplies the passphrase for a signing key when one is set.
Three behaviours, all measured in the lab, define batch use:
- A display is still required — every command in this
chapter runs under
xvfb-runon a headless box (chapter 3). - The Final Status line is the contract. Scripts should
read the timestamped status output and its code, not the
process exit status alone: batch signing mirrors its code
into the exit status, but query commands like
-vand-nexit 255 even when they work (transcriptt01). - Missing prerequisites fail fast with a sentence, not a
crash —
No certificates available,The selected station location could not be found(transcriptt05). In a script, those sentences are the error handling.
A realistic script use, once a real certificate exists:
$ xvfb-run -a tqsl -n
A new TQSL release (V2.8.7) is available.
A new TrustedQSL configuration file (V11.34) is available.
— a weekly cron job that only speaks when there is something to do, exactly like the news run the lab actually made.
The check. tqsl -n under a display prints either news or
silence, and tqsl -s -x on a machine without a certificate
prints No certificates available. If you can predict both
outputs before you run them, the command line holds no more
surprises for you.