mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
sort output, accept more comma use
This commit is contained in:
parent
861980a8e9
commit
8c8b6966a7
@ -1,6 +1,7 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import os.path
|
import os.path
|
||||||
import re
|
import re
|
||||||
|
import operator
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
import django.db.models
|
import django.db.models
|
||||||
@ -179,12 +180,10 @@ def aliases(request, year):
|
|||||||
year = 1998
|
year = 1998
|
||||||
expo = Expedition.objects.filter(year=year)[0] # returns a set, even though we know there is only one
|
expo = Expedition.objects.filter(year=year)[0] # returns a set, even though we know there is only one
|
||||||
personexpeditions = PersonExpedition.objects.filter(expedition=expo)
|
personexpeditions = PersonExpedition.objects.filter(expedition=expo)
|
||||||
persons = Person.objects.all()
|
persons = list(Person.objects.all().order_by('last_name'))
|
||||||
|
|
||||||
aliases = GetPersonExpeditionNameLookup(expo)
|
aliases = GetPersonExpeditionNameLookup(expo)
|
||||||
|
|
||||||
aliasdict = {key: val for key, val in sorted(aliases.items(), key = lambda ele: ele[0])}
|
|
||||||
|
|
||||||
aliasdict={}
|
aliasdict={}
|
||||||
for i in sorted(aliases):
|
for i in sorted(aliases):
|
||||||
aliasdict[i]=aliases[i]
|
aliasdict[i]=aliases[i]
|
||||||
|
@ -126,7 +126,7 @@ class LoadingSurvex():
|
|||||||
rx_teammem = re.compile(r"(?i)"+instruments+"?(?:es|s)?\s+(.*)$")
|
rx_teammem = re.compile(r"(?i)"+instruments+"?(?:es|s)?\s+(.*)$")
|
||||||
rx_teamold = re.compile(r"(?i)(.*)\s+"+instruments+"?(?:es|s)?$")
|
rx_teamold = re.compile(r"(?i)(.*)\s+"+instruments+"?(?:es|s)?$")
|
||||||
rx_teamabs = re.compile(r"(?i)^\s*("+instruments+")?(?:es|s)?\s*$")
|
rx_teamabs = re.compile(r"(?i)^\s*("+instruments+")?(?:es|s)?\s*$")
|
||||||
rx_person = re.compile(r"(?i) and |/| / |, | & | \+ |^both$|^none$")
|
rx_person = re.compile(r"(?i) and |/| / |, | , |&| & | \+ |^both$|^none$")
|
||||||
rx_qm = re.compile(r'(?i)^\s*QM(\d+)\s+?([a-dA-DxX])\s+([\w\-\_]+)\.([\w\.\-]+)\s+(([\w\-]+)\.([\w\.\-]+)|\-)\s+(.+)$')
|
rx_qm = re.compile(r'(?i)^\s*QM(\d+)\s+?([a-dA-DxX])\s+([\w\-\_]+)\.([\w\.\-]+)\s+(([\w\-]+)\.([\w\.\-]+)|\-)\s+(.+)$')
|
||||||
# does not recognise non numeric suffix survey point ids
|
# does not recognise non numeric suffix survey point ids
|
||||||
rx_qm0 = re.compile(r'(?i)^\s*QM(\d+)\s+(.+)$')
|
rx_qm0 = re.compile(r'(?i)^\s*QM(\d+)\s+(.+)$')
|
||||||
|
Loading…
Reference in New Issue
Block a user