diff --git a/core/views/statistics.py b/core/views/statistics.py index 726aebb..28bc721 100644 --- a/core/views/statistics.py +++ b/core/views/statistics.py @@ -3,6 +3,7 @@ import operator import os.path import re from collections import OrderedDict +from pathlib import Path import django.db.models from django.db.models import Max, Min @@ -22,9 +23,22 @@ from troggle.parsers.people import (GetPersonExpeditionNameLookup, #from django.views.generic.list import ListView def therionissues(request): - theriondict = {} + logname = "therionrefs.log" + logpath = (Path(settings.PYTHON_PATH, logname)) + therionlog = [] + newlog = [] - return render(request, 'therionreport.html', {"theriondict":theriondict}) + if Path(logpath).is_file: + with open(logpath, "r") as f: + therionlog = f.readlines() + print(f"{logpath} has {len(therionlog)} entries") + else: + print(f"{logpath} NOT FOUND {len(therionlog)}") + + for line in therionlog: + line = line.replace("! Un-parsed image filename:", "") + newlog.append(line) + return render(request, 'therionreport.html', {"therionlog":newlog}) '''Very simple report pages summarizing data about the whole set of expeditions and of the status of data inconsistencies diff --git a/templates/controlPanel.html b/templates/controlPanel.html index a1a4510..825a664 100644 --- a/templates/controlPanel.html +++ b/templates/controlPanel.html @@ -24,7 +24,7 @@
Today (Dec. 2022) we use the databaseReset program to import from the master files. This is run on the server itself only by nerds who remotely log in to the server using ssh. +
Today (Jan. 2023) we use the databaseReset program to import from the master files. This is run on the server itself only by nerds who remotely log in to the server using ssh.
Before you even think about doing database imports, you should understand the implications on everyone else. See the Troggle documentation.
As soon as you can cope, you should read the source code for databaseReset to see what it does, as the details are not documented anywhere else yet. But at least the code is quite well commented. -
The logbook export capability is used to convert an archaic logbook into the new logbook format. When all the old logbooks have been converted, we won't need this any more. (Neither will we need the old format parser). +
The logbook export capability wass used to convert an archaic logbook into the current logbook format. It exports the logbook entries in the database into a new file, with the entries in date order. But there is no use for this capability now (Jan. 2023).
-{% for line in theriondict %}
+{% for line in therionlog %}
+{{line}}
{% empty %}
No Therion parsing output found. Re-import all drawings using databaseReset.py
{% endfor %}