mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
new report on tehrion file parsing
This commit is contained in:
parent
719e0fe918
commit
75834902f2
@ -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
|
||||
|
@ -24,7 +24,7 @@
|
||||
<li><a href="/pathsreport">Folder paths used</a> -folders settings used by this troggle installation
|
||||
<li><a href="/aliases/2022">Expoer name aliases</a> -short names recognised by troggle
|
||||
<li><a href="/dataissues">Data Issues on Imports</a> - warnings and errors from the recent data import
|
||||
<li><a href="/therionissues">Therion Import issues</a> - warnings from the recent data import
|
||||
<li><a href="/therionissues">Therion Import issues</a> - warnings from the recent data import<br /><br />
|
||||
<li><a href="/admin/">Django admin</a> - Deep magic access to all models and data
|
||||
</ul>
|
||||
<h3>This control panel is being redeveloped</h3>
|
||||
@ -36,13 +36,13 @@
|
||||
<li>We are working on an on-line importer for new survex files - with syntax checking
|
||||
<li>Logbooks can only be <em>exported</em> in the current format.
|
||||
</ol>
|
||||
<p>Today (Dec. 2022) we use the <a href="/handbook/troggle/trogimport.html">databaseReset program</a> 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.
|
||||
<p>Today (Jan. 2023) we use the <a href="/handbook/troggle/trogimport.html">databaseReset program</a> 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.
|
||||
|
||||
<p>Before you even think about doing database imports, you should understand the implications on everyone else. See <a href="/handbook/troggle/trogindex.html">the Troggle documentation</a>.
|
||||
<p>As soon as you can cope, you should read the source code for
|
||||
<a href="http://expo.survex.com/repositories/troggle/.git/tree/databaseReset.py">databaseReset</a> to see what it does, as the details are not documented anywhere else yet. But at least the code is quite well commented.
|
||||
|
||||
<p>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).
|
||||
<p>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).
|
||||
|
||||
<div style="column-count: 2; ">
|
||||
<font style="color: silver">
|
||||
|
@ -4,8 +4,10 @@
|
||||
{% block content %}
|
||||
<h1>Expo Therion import issues report</h1>
|
||||
|
||||
<h3>! Un-parsed image filename</h3>
|
||||
<p style="font-family: Consolas, Lucida Console, monospace;">
|
||||
{% for line in theriondict %}
|
||||
{% for line in therionlog %}
|
||||
{{line}}<br />
|
||||
{% empty %}
|
||||
<b>No Therion parsing output found. Re-import all drawings using databaseReset.py</b>
|
||||
{% endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user