mirror of
https://codeberg.org/mclemens/qrzlogger.git
synced 2025-01-03 08:46:57 -05:00
simplyfied package structure, removed hamlib support, decided to not use pip anymore
This commit is contained in:
parent
d331e1e0dd
commit
bf622de575
@ -1,6 +0,0 @@
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools>=42",
|
||||
"wheel"
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
@ -36,10 +36,6 @@ from requests.structures import CaseInsensitiveDict
|
||||
from prettytable import PrettyTable
|
||||
import xmltodict
|
||||
import requests
|
||||
try:
|
||||
import Hamlib
|
||||
except ModuleNotFoundError:
|
||||
print("")
|
||||
|
||||
|
||||
class QRZLogger():
|
||||
@ -86,21 +82,6 @@ class QRZLogger():
|
||||
# read colors from config and overwrite default vaulues
|
||||
self.config_colors()
|
||||
|
||||
self.rig = None
|
||||
self.connect_rig()
|
||||
|
||||
def connect_rig(self):
|
||||
# Open a communication channel to the radio.
|
||||
try:
|
||||
Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE)
|
||||
self.rig = Hamlib.Rig(int(self.config['hamlib']['model']))
|
||||
self.rig.set_conf("rig_pathname", self.config['hamlib']['pathname'])
|
||||
self.rig.open()
|
||||
except:
|
||||
print("rig error")
|
||||
return
|
||||
|
||||
|
||||
def print_banner(self):
|
||||
"""print an awesome banner"""
|
||||
ver = self.version
|
||||
@ -143,9 +124,6 @@ class QRZLogger():
|
||||
"time_on", "rst_sent", "rst_rcvd", "comment")'}
|
||||
config['log'] = {
|
||||
'log_file': '/tmp/qrzlogger.log'}
|
||||
config['hamlib'] = {
|
||||
'model': 'RIG_MODEL_IC7300',
|
||||
'pathname': '/dev/ttyUSB0'}
|
||||
config['qso_defaults'] = {
|
||||
'band': '40m',
|
||||
'mode': 'SSB',
|
||||
@ -498,6 +476,7 @@ class QRZLogger():
|
||||
elif bandfreq == "50":
|
||||
return "6m"
|
||||
|
||||
|
||||
def query_qso_data(self, qso):
|
||||
"""Queries QSO specific data from the user via
|
||||
the command line"""
|
||||
@ -519,14 +498,6 @@ class QRZLogger():
|
||||
"tx_pwr": ["Power (in W)", self.config['qso_defaults']['tx_pwr']],
|
||||
"comment": ["Comment", ""]
|
||||
}
|
||||
if self.rig is not None:
|
||||
questions["freq"][1] = "%.3f" % (self.rig.get_freq()/1.0e6)
|
||||
(mode, width) = self.rig.get_mode()
|
||||
questions["mode"][1] = Hamlib.rig_strrmode(mode)
|
||||
questions["band"][1] = self.get_band_from_freq(questions["freq"][1])
|
||||
#questions["tx_pwr"][1] = self.rig.get_level(Hamlib.RIG_LEVEL_RFPOWER)
|
||||
|
||||
|
||||
# if this is not the first try, we pre-fill the
|
||||
# vaulues we got from the last try
|
||||
else:
|
||||
@ -547,7 +518,7 @@ class QRZLogger():
|
||||
if inp != "":
|
||||
questions[question][1] = inp
|
||||
# check if we are asking for the band
|
||||
if question == "band" and questions["freq"][1] != "":
|
||||
if question == "band":
|
||||
# check if the band is in the bandfreqs dictionary
|
||||
try:
|
||||
# populate the frequency with a common freq of this band
|
||||
@ -559,6 +530,7 @@ class QRZLogger():
|
||||
|
||||
return questions
|
||||
|
||||
|
||||
def get_input_callsign(self):
|
||||
"""query a call sign from the user"""
|
||||
call = ""
|
34
setup.cfg
34
setup.cfg
@ -1,34 +0,0 @@
|
||||
[metadata]
|
||||
name = qrzlogger
|
||||
version = 0.7.0
|
||||
author = Michael Clemens
|
||||
author_email = qrzlogger@qrz.is
|
||||
description = A python application to log QSOs directly to QRZ.com from the command line
|
||||
long_description = file: README.md
|
||||
long_description_content_type = text/markdown
|
||||
url = https://codeberg.org/mclemens/qrzlogger
|
||||
project_urls =
|
||||
Bug Tracker = https://codeberg.org/mclemens/qrzlogger/issues
|
||||
classifiers =
|
||||
Programming Language :: Python :: 3
|
||||
License :: OSI Approved :: MIT License
|
||||
Operating System :: OS Independent
|
||||
|
||||
|
||||
[options]
|
||||
package_dir =
|
||||
= src
|
||||
packages = find:
|
||||
python_requires = >=3.6
|
||||
install_requires=
|
||||
xmltodict
|
||||
prettytable
|
||||
colored
|
||||
requests
|
||||
|
||||
[options.packages.find]
|
||||
where = src
|
||||
|
||||
[options.entry_points]
|
||||
console_scripts =
|
||||
qrzlogger = qrzlogger.__main__:main
|
@ -1,3 +0,0 @@
|
||||
from qrzlogger.__main__ import QRZLogger
|
||||
|
||||
__version__ = '0.6.7'
|
Loading…
Reference in New Issue
Block a user