Skip to content

Commit

Permalink
update2
Browse files Browse the repository at this point in the history
  • Loading branch information
coulisse committed Nov 30, 2024
1 parent ed624b3 commit b0acb6b
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 29 deletions.
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ keywords:
- dxcluster
- spiderweb
license: GPL-3.0
version: v2.5.4
date-released: 2024-03-31
version: v2.5.5
date-released: 2024-11-30
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[![CodeFactor](https://www.codefactor.io/repository/github/coulisse/spiderweb/badge)](https://www.codefactor.io/repository/github/coulisse/spiderweb)


- **Release:** v2.5.4
- **Release:** v2.5.5
- **Author:** Corrado Gerbaldo - [IU1BOW](https://www.qrz.com/db/IU1BOW)
- **Mail:** <corrado.gerbaldo@gmail.com>
- **Licensing:** Gpl V3.0 see [LICENSE](LICENSE) file.
Expand Down
2 changes: 1 addition & 1 deletion cfg/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.5.4
v2.5.5
8 changes: 8 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
### Change log
___
Date: 30/11/2024
Release: v2.5.5
- merged modified of DocViper666 in order to manage different field name in config.json
- fixed somr security issues
- updated flag-icon css
- fixed issue reading corrupted visit json

Date: 31/03/2024
Release: v2.5.4
- tested with Python 3.12
Expand Down
8 changes: 4 additions & 4 deletions lib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
("timer/interval", "Spot page refresh(ms)_______: "),
("mail", "Mail address________________: "),
("mail_token", "token google 2FA auth_______: "),
("telnet/host", "Telnet host_________________: "),
("telnet/port", "Telnet port_________________: "),
("telnet/user", "Telnet user________________: "),
("telnet/password", "Telnet password (optional)_: "),
("telnet/telnet_host", "Telnet host_________________: "),
("telnet/telnet_port", "Telnet port_________________: "),
("telnet/telnet_user", "Telnet user________________: "),
("telnet/telnet_password", "Telnet password (optional)_: "),
("enable_cq_filter", "Enable cq filter___________: "),
]

Expand Down
4 changes: 4 additions & 0 deletions lib/dxtelnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ def parse_who(lines):

def who(host, port, user, password):

logging.debug("telnet host:" + host)
logging.debug("telnet port:" + port)
logging.debug("telnet user:" + user)

WAIT_FOR = b"dxspider >"
WAIT_PASS = b"password:"

Expand Down
42 changes: 33 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,33 +1,57 @@
blinker==1.7.0
aiofiles==23.2.1
amazon-photos==0.0.97
anyio==4.3.0
astunparse==1.6.3
blinker==1.9.0
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
cramjam==2.8.3
fastparquet==2024.2.0
feedparser==6.0.11
Flask==3.0.2
Flask-Minify==0.42
Flask-WTF==1.2.1
Flask==3.1.0
Flask-Minify==0.48
Flask-WTF==1.2.2
fsspec==2024.3.1
h11==0.14.0
h2==4.1.0
hpack==4.0.0
htmlmin==0.1.12
htmlminf==0.1.13
httpcore==1.0.5
httpx==0.27.0
hyperframe==6.0.1
idna==3.7
itsdangerous==2.1.2
itsdangerous==2.2.0
Jinja2==3.1.4
jsmin==3.0.1
lesscpy==0.15.1
mariadb==1.1.10
mariadb==1.1.11
MarkupSafe==2.1.5
nest-asyncio==1.6.0
numpy==1.26.4
orjson==3.10.0
packaging==24.0
pandas==2.2.1
pandas==2.2.3
ply==3.11
psutil==5.9.8
pyarrow==15.0.2
pyflowchart==0.3.1
python-dateutil==2.9.0.post0
pytz==2024.1
rcssmin==1.1.2
requests==2.32.0
setuptools==70.0.0
sgmllib3k==1.0.0
six==1.16.0
sniffio==1.3.1
speedtest-cli==2.1.3
tqdm==4.67.1
tzdata==2024.1
urllib3==2.2.1
Werkzeug==3.0.6
uvloop==0.19.0
Werkzeug==3.1.3
wheel==0.41.2
WTForms==3.1.2
WTForms==3.2.1
xmltodict==0.13.0
xxhash==3.4.1
2 changes: 1 addition & 1 deletion static/pwa/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "IU1BOW Spiderweb v2.5.4",
"name": "IU1BOW Spiderweb v2.5.5",
"description": "DXCluser for ham radio by IU1BOW",
"short_name": "Spiderweb",
"theme_color": "#f3b221",
Expand Down
2 changes: 1 addition & 1 deletion static/pwa/service-worker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Dichiarazione della costante per il nome della cache
const CACHE_NAME = 'pwa-spiderweb_v2.5.4'
const CACHE_NAME = 'pwa-spiderweb_v2.5.5'

// Dichiarazione della costante per gli URL da mettere in cache
const URLS_TO_CACHE = [
Expand Down
4 changes: 2 additions & 2 deletions templates/_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css"
integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous">
<!-- Flag Icon CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/7.2.0/css/flag-icons.min.css"
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/7.2.3/css/flag-icons.min.css"
integrity="sha512-bZBu2H0+FGFz/stDN/L0k8J0G8qVsAL0ht1qg5kTwtAheiXwiRKyCq1frwfbSFSJN3jooR5kauE0YjtPzhZtJQ=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Tom-Select CSS -->
Expand Down Expand Up @@ -106,7 +106,7 @@
&nbsp;
<a href="https://github.com/coulisse/spiderweb/" target="blank" rel="noopener">IU1BOW - Spiderweb</a>
&nbsp;
<span id="version">v2.5.4</span>
<span id="version">v2.5.5</span>
</div>
</footer>
<script async src="static/js/rel/load-sw.min.js"></script>
Expand Down
24 changes: 16 additions & 8 deletions webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
with open("cfg/config.json") as json_data_file:
cfg = json.load(json_data_file)

logging.debug("CFG:")
logging.debug(cfg)
logger.debug("CFG:")
logger.debug(cfg)
# load bands file
with open("cfg/bands.json") as json_bands:
band_frequencies = json.load(json_bands)
Expand All @@ -78,11 +78,17 @@
# If the file does not exist, create an empty visits dictionary
visits = {}

except json.decoder.JSONDecodeError:
# If the file is not a valid json file
logger.warning("No valid data in visit json")
logger.warning("reset and creation of a new:" + visits_file_path )
visits = {}

#save visits
def save_visits():
with open(visits_file_path, "w") as json_file:
json.dump(visits, json_file)
logging.info('visit saved on: '+ visits_file_path)
logger.info('visit saved on: '+ visits_file_path)

# saving scheduled
def schedule_save():
Expand Down Expand Up @@ -112,10 +118,10 @@ def spotquery(parameters):
try:

if 'callsign' in parameters:
logging.debug('search callsign')
logger.debug('search callsign')
query_string = query_build_callsign(logger,parameters['callsign'] )
else:
logging.debug('search eith other filters')
logger.debug('search eith other filters')
query_string = query_build(logger,parameters,band_frequencies,modes_frequencies,continents_cq,enable_cq_filter)
qm.qry(query_string)
data = qm.get_data()
Expand Down Expand Up @@ -173,12 +179,14 @@ def spotlist():


def who_is_connected():
logger.debug("telnet connection to:" )
host=cfg["telnet"]["telnet_host"]
port=cfg["telnet"]["telnet_port"]
user=cfg["telnet"]["telnet_user"]
logger.debug(host)
password=cfg["telnet"]["telnet_password"]
response = who(host, port, user, password)
logger.debug("list of connected clusters:")
logger.debug("telnet: list of connected clusters:")
logger.debug(response)
return response

Expand Down Expand Up @@ -284,14 +292,14 @@ def propagation():
solar_data={}
url = "https://www.hamqsl.com/solarxml.php"
try:
logging.debug("connection to: " + url)
logger.debug("connection to: " + url)
req = requests.get(url)
logger.debug(req.content)
solar_data = xmltodict.parse(req.content)
logger.debug(solar_data)

except Exception as e1:
logging.error(e1)
logger.error(e1)

response = flask.Response(
render_template(
Expand Down

0 comments on commit b0acb6b

Please sign in to comment.