mbridak / not1mm

Not1MM != N1MM, An amateur radio contest logger for Linux.
GNU General Public License v3.0
100 stars 24 forks source link

Callsign lookup in QRZ database #104

Closed cbspidi closed 3 weeks ago

cbspidi commented 3 months ago

not1mm would be a very good general logger if there was a possibility to look up a callsign in the QRZ database. This functionality helps a lot when working portable, and when reception is not so great, it helps validate the callsign and speeds the QSO by quite a bit.

Describe the solution you'd like When typing the callsign we can have a special function to capture if the input ends with ?, if yes run a wildcard search in QRZ database. The QRZ database will return all possible matches of the callsigns registered with qrz.com

Example: User input in callsign box (you can create a validation there to check if a special character is used; it must be a minimum 4 characters long; otherwise, you will receive hundreds of callsigns) m0so? or m0so* we run qrz.com search for m0so*

Output: Return from qrz is 15 possible matches, like the list below.

M0SOT   Andrew Cowan Southampton
M6LZP   J Barry Lovelock The Lizard (alias match)
M0SOA   Gary McCourty Eaton, TARPORLEY
M0SOE   Bruce MacMillan Deal
M0SOO   Jason A Barker Scarborough
M0SOP   Harry Weston I Also Have The Call-sign M1ETU
M0SOX   GEL Galliver Odiham, HOOK
M0SOL   SOLWAY DX GROUP. C/O C.E.WOLF, G6LSO. CARLISLE
M0SOM   Mike Childs Chippenham
M0SOF   Standish Amateur Radio Society Standish
M0SOY   Gary Sawyer Tyne and Wear
M0SON   jason r i searle gosport
2E0SOY  Gary Sawyer Washington. Tyne and Wear (alias match)
M0SOC   Dr. Ryan Pike Nr. Aylesbury, Buckinghamshire
M7SOY   Gary Sawyer Washington. Tyne and Wear (alias match)

I have not found a logger for Linux that would have such great functionality.

An example of CURL request to qrz.com(unfortunately, qrz API is very, very limited, and it provides logbook functionality only)

---CURL---

curl 'https://www.qrz.com/db' \
  -H 'Cookie: COOKIE-DATA]' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'Sec-Fetch-User: ?1' \
  --data-raw 'query=m0so*&cs=m0so*&sel=&cmd=Search&mode=callsign'

This will spit out HTML doc, you looking for this section below (its table)

<td id="qrzcenter" valign="top"><div style="margin-top:1em;padding:1em">
<p>Page 1 of 1, of 15 matches for: <span class="bor" style="padding:0px 3px;background-color:#ffffcc">M0SO*</span>
    <span class="ml1 fi f9"></span>
    </p>
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td class="rt w1"><a href="/db/M0SOF">M0SOF</a></td><td style="padding-left:4px;">Standish Amateur Radio Society Standish   </td></tr>
<tr><td class="rt w1"><a href="/db/M0SOM">M0SOM</a></td><td style="padding-left:4px;">Mike Childs Chippenham   </td></tr>
<tr><td class="rt w1"><a href="/db/M0SOX">M0SOX</a></td><td style="padding-left:4px;">GEL Galliver Odiham, HOOK   </td></tr>
<tr><td class="rt w1"><a href="/db/M0SOL">M0SOL</a></td><td style="padding-left:4px;">SOLWAY DX GROUP. C/O C.E.WOLF, G6LSO. CARLISLE   </td></tr>
<tr><td class="rt w1"><a href="/db/M0SOP">M0SOP</a></td><td style="padding-left:4px;">Harry Weston I Also Have The Call-sign M1ETU   </td></tr>
<tr><td class="rt w1"><a href="/db/M0SOO">M0SOO</a></td><td style="padding-left:4px;">Jason A Barker Scarborough   </td></tr>
<tr><td class="rt w1"><a href="/db/M6LZP">M6LZP</a></td><td style="padding-left:4px;">J Barry Lovelock The Lizard   <span class="fi red f8" style="margin-left:0.5em">(alias match)</span></td></tr>
<tr><td class="rt w1"><a href="/db/M0SOA">M0SOA</a></td><td style="padding-left:4px;">Gary McCourty Eaton, TARPORLEY   </td></tr>
<tr><td class="rt w1"><a href="/db/M0SOT">M0SOT</a></td><td style="padding-left:4px;">Andrew Cowan Southampton   </td></tr>
<tr><td class="rt w1"><a href="/db/M0SOE">M0SOE</a></td><td style="padding-left:4px;">Bruce MacMillan Deal   </td></tr>
<tr><td class="rt w1"><a href="/db/M7SOY">M7SOY</a></td><td style="padding-left:4px;">Gary Sawyer Washington. Tyne and Wear   <span class="fi red f8" style="margin-left:0.5em">(alias match)</span></td></tr>
<tr><td class="rt w1"><a href="/db/M0SOC">M0SOC</a></td><td style="padding-left:4px;">Dr. Ryan Pike Nr. Aylesbury, Buckinghamshire   </td></tr>
<tr><td class="rt w1"><a href="/db/2E0SOY">2E0SOY</a></td><td style="padding-left:4px;">Gary Sawyer Washington. Tyne and Wear   <span class="fi red f8" style="margin-left:0.5em">(alias match)</span></td></tr>
<tr><td class="rt w1"><a href="/db/M0SON">M0SON</a></td><td style="padding-left:4px;">jason r i searle gosport   </td></tr>
<tr><td class="rt w1"><a href="/db/M0SOY">M0SOY</a></td><td style="padding-left:4px;">Gary Sawyer Tyne and Wear   </td></tr>
</table>
mbridak commented 3 months ago

Hmm. I'll look into it. I just got back from vacation. I'll clear my backlog of field day logger fixes, and then check if the qrz api supports multiple or batch lookups.

On Wed, Jun 26, 2024, 12:04 AM Piotr @.***> wrote:

not1mm would be a very good general logger if there was a possibility to look up a callsign in the QRZ database. This functionality helps a lot when working portable, and when reception is not so great, it helps validate the callsign and speeds the QSO by quite a bit.

Describe the solution you'd like When typing the callsign we can have a special function to capture if the input ends with ?, if yes run a wildcard search in QRZ database. The QRZ database will return all possible matches of the callsigns registered with qrz.com

Example: User input in callsign box (you can create a validation there to check if a special character is used; it must be a minimum 4 characters long; otherwise, you will receive hundreds of callsigns) m0so? or m0so we run qrz.com search for m0so

Output: Return from qrz is 15 possible matches, like the list below.

M0SOT Andrew Cowan Southampton M6LZP J Barry Lovelock The Lizard (alias match) M0SOA Gary McCourty Eaton, TARPORLEY M0SOE Bruce MacMillan Deal M0SOO Jason A Barker Scarborough M0SOP Harry Weston I Also Have The Call-sign M1ETU M0SOX GEL Galliver Odiham, HOOK M0SOL SOLWAY DX GROUP. C/O C.E.WOLF, G6LSO. CARLISLE M0SOM Mike Childs Chippenham M0SOF Standish Amateur Radio Society Standish M0SOY Gary Sawyer Tyne and Wear M0SON jason r i searle gosport 2E0SOY Gary Sawyer Washington. Tyne and Wear (alias match) M0SOC Dr. Ryan Pike Nr. Aylesbury, Buckinghamshire M7SOY Gary Sawyer Washington. Tyne and Wear (alias match)

I have not found a logger for Linux that would have such great functionality

Additional context Add any other context or screenshots about the feature request here.

— Reply to this email directly, view it on GitHub https://github.com/mbridak/not1mm/issues/104, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALWVLRLYJS7CRTJIM6HIAO3ZJJRXDAVCNFSM6AAAAABJ5HU43OVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3TINJSGY3TGOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

cbspidi commented 3 months ago

Hello, Thanks, I do not think the API will not support lookups; from what I can see, it only does logbook operations, not DB lookups.

Your way into it will be via HTTP request on the search

Question? How did you do the QRZ lookup on callsigns from contest tables, when field where you show grid locators etc ... Do you log in to qrz.com already, I suppose you do to fetch that data

mbridak commented 3 months ago

They have a lookup API. We use a generic library called requests to pass in our/your username and password to their API URL. They spit back a session key. We then use the session key to make lookup requests which returns the data in an XML format.

On Fri, Jun 28, 2024 at 1:40 PM Piotr @.***> wrote:

Hello, Thanks, I do not think the API will not support lookups; from what I can see, it only does logbook operations, not DB lookups.

Your way into it will be via HTTP request on the search

Question? How did you do the QRZ lookup on callsigns from contest tables, when field where you show grid locators etc ... Do you log in to qrz.com already, I suppose you do to fetch that data

— Reply to this email directly, view it on GitHub https://github.com/mbridak/not1mm/issues/104#issuecomment-2197628144, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALWVLRKCJGMJTFZNMVLXYKTZJXC3JAVCNFSM6AAAAABJ5HU43OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJXGYZDQMJUGQ . You are receiving this because you commented.Message ID: @.***>