forked from expo/troggle
new report on tehrion file parsing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user