From 3954a4cab16b9b90240b6237cf703bfd2f4b3dfc Mon Sep 17 00:00:00 2001 From: Michael Clemens Date: Thu, 9 Feb 2023 19:00:46 +0100 Subject: [PATCH] improved README, switched to waitress --- CloudlogOffline2QRZ.py | 6 ++++-- README.md | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CloudlogOffline2QRZ.py b/CloudlogOffline2QRZ.py index b8bc538..652f255 100644 --- a/CloudlogOffline2QRZ.py +++ b/CloudlogOffline2QRZ.py @@ -6,6 +6,7 @@ import configparser from pathlib import Path from flask import Flask, jsonify, request, Response from flask_restful import Resource, Api +from waitress import serve import requests from requests.structures import CaseInsensitiveDict @@ -47,7 +48,7 @@ class QRZ(): 'url': 'https://logbook.qrz.com/api'} config['general'] = { 'api_key': 'API_KEY_FOR_THIS_API', - 'install_path': '/log/' + 'install_path': '/' } with open(file_name, 'w') as configfile: @@ -164,4 +165,5 @@ if __name__ == '__main__': qrz = QRZ() api.add_resource(ApiTest, qrz.config['general']['install_path'] + 'index.php/api/auth/' ) api.add_resource(UploadQso, qrz.config['general']['install_path'] + 'index.php/api/qso') - app.run(debug=True) + #app.run(debug=True) + serve(app, host='127.0.0.1', port=5000) diff --git a/README.md b/README.md index 8da7aec..f62e816 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,15 @@ API server emulating a [Cloudlog](https://github.com/magicbug/Cloudlog) instance that receives QSOs from [CloudLogOffline](https://github.com/myzinsky/cloudLogOffline) and sends them to a defined QRZ.com logbook. +This enables you to use the fantastic App CloudLogOffline to log QSOs for example with your phone when you are portable and have no cell service. Afterwards you can export all new QSOs via CloudlogOffline2QRZ directly into your QRZ.com logbook. CloudlogOffline2QRZ acts as a middleman by pretendig to be a Cloudlog server, receiving the QSOs and then uploading them via the QRZ.com API to your QRZ logbook. For this you need to execute CloudlogOffline2QRZ for example on a VPS behind a web server. + # Installation -qrzlogger needs Python 3 and the following libraries: +CloudlogOffline2QRZ needs Python 3 and the following libraries: * flask * flask-restful + * waitress Furthermore, you need at least the XML subscription from QRZ.com. @@ -16,6 +19,7 @@ Before installing CloudlogOffline2QRZ, please make sure that the above mentioned ``` # python3 -m pip install flask # python3 -m pip install flask-restful +# python3 -m pip install waitress ``` To download or update qrzlogger, clone the repo: @@ -42,7 +46,6 @@ Configure your web server as a reverse proxy to forward requests sent to a certa * API Key: same as general/api_key (see above). * Station ID: doesn't matter - # License see ![LICENSE](LICENSE)