Sunday, August 8. 2021Messing with CQRLOG data behind the application![]() ![]() Currently, in CQRLOG 2.5.1 of Ubuntu 21.04, QSL export for label printing is broken due to a FreePascal bug: TRegExpr exec: empty input string. Version 2.5.2 contains a fix, though. Now I had the choice between these unpleasent options:
Couldn’t I somehow work around that bug? After all, I just wanted to dump certain log entries to a CSV. This could be done using an ordinary MySQL client! And this is the procedure to do so: Start CQRLOG, this launches a MySQL (MariaDB) server instance in the CQRLOG data directory, which is ~/.config/cqrlog/database by default, listening on port 64000. Now, simply connect to it: $ mysql -h 127.0.0.1 -P 64000
Use the desired database: > use cqrlog001;
Query, using the columns you usually export: > select qsodate, time_on, callsign, mode, freq,
rst_s, qsl_via, remarks, stx, stx_string
into outfile ’/path/to/qsl_test.csv’
fields terminated by ’,’
from cqrlog_main
where qsl_s in (’SM
The resulting CSV is already almost in the usual format, except for the date. In Vim, I did these transformations: :%s/^\(\d\+\)-\(\d\+\)-\(\d\+\)/\3-\2-\1
:%s/-05-/-May-
:%s/-06-/-Jun-
:%s/-07-/-Jul- etc. As soon as I was satisfied with the result (in gLabels), I marked these QSL as sent: > update cqrlog_main set qsl_s = ’B’ where qsl_s = ’SB’;
> update cqrlog_main set qsl_s = ’M
Querying around in that table is also a good opportunity for one’s own statistics.
Posted by Stephan Paukner
in GNU/Linux, Ham Radio
at
17:51
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: software
(Page 1 of 1, totaling 1 entries)
|
AboutCalendar
ArchivesCategoriesShow tagged entriesandroid antenna anti-spam apache astronomy austria automobile ballooning bash bluetooth bug career cloud collecting comic cooking cw debian dreams education electronics event fail fashion finance flickr fuerteventura fun gentoo geography german gnu-linux gnucash google google earth graphics guitar hardware history image processing internet kernel kids language lanzarote lhc lifestyle linkroll literature ltd machine learning making mallorca mathematics matlab microsoft migration movies music numismatics octave pdf perl philately philosophy phone photo gear photography physics podcast politics postfix private programming public transport rant religion review samsung science security shtf social web software statistics storage sustainability symbian tablet time lapse transceiver tv usenet video virtualization wordplay work www yahoo youtube
Syndicate This BlogFollow meBookmarks
Powered by |