2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-14 19:37:13 +00:00

reducing clutter in output

This commit is contained in:
Philip Sargent
2020-04-28 01:18:57 +01:00
parent a8460065a4
commit 4be8c81291
4 changed files with 55 additions and 78 deletions

View File

@@ -75,24 +75,22 @@ def import_QMs():
import parsers.QMs
# import process itself runs on qm.csv in only 3 caves, not 264!
def import_survex():
def import_survexblks():
import parsers.survex
print("Importing Survex Blocks")
parsers.survex.LoadAllSurvexBlocks()
print("Importing Survex Positions")
parsers.survex.LoadPos()
def import_survexpos():
import parsers.survex
print("Importing Survex Positions")
print("Importing Survex x/y/z Positions")
parsers.survex.LoadPos()
def import_surveys():
def import_surveyimgs():
"""This appears to store data in unused objects. The code is kept
for future re-working to manage progress against notes, plans and elevs.
"""
import parsers.surveys
print("Importing surveys")
print("Importing survey images")
parsers.surveys.parseSurveys(logfile=settings.LOGFILE)
def import_surveyscans():
@@ -170,8 +168,8 @@ class JobQueue():
self.results = {}
self.results_order=[
"date","runlabel","reinit", "caves", "people",
"logbooks", "scans", "QMs", "survex",
"tunnel", "surveys", "test", "dirsredirect", "syncuser", "survexpos" ]
"logbooks", "scans", "QMs", "survexblks",
"tunnel", "surveyimgs", "test", "dirsredirect", "syncuser", "survexpos" ]
for k in self.results_order:
self.results[k]=[]
self.tfile = "import_profile.json"
@@ -288,8 +286,8 @@ def usage():
QMs - read in the QM csv files (older caves only)
reinit - clear database (delete everything) and make empty tables. Import nothing.
scans - the survey scans in all the wallets
survex - read in the survex files - all the survex blocks
survexpos - just the Pos out of the survex files (not part of reset)
survex - read in the survex files - all the survex blocks and the x/y/z positions
survexpos - just the x/y/z Pos out of the survex files
tunnel - read in the Tunnel files - which scans the survey scans too
@@ -298,7 +296,7 @@ def usage():
autologbooks - read in autologbooks (what are these?)
dumplogbooks - write out autologbooks (not working?)
syncuser - needed after reloading database from SQL backup
surveys - read in scans by expo, must run after "people". Not used.
surveyimgs - read in scans by expo, must run after "people". Not used.
test - testing...
and [runlabel] is an optional string identifying this run of the script
@@ -328,7 +326,8 @@ if __name__ == "__main__":
jq.enq("reinit",reinit_db)
jq.enq("dirsredirect",dirsredirect)
jq.enq("caves",import_caves)
#jq.enq("people",import_people)
jq.enq("people",import_people)
jq.enq("survex",import_survexblks)
#jq.enq("logbooks",import_logbooks)
elif "caves" in sys.argv:
jq.enq("caves",import_caves)
@@ -348,16 +347,18 @@ if __name__ == "__main__":
jq.enq("scans",import_surveyscans)
jq.enq("logbooks",import_logbooks)
jq.enq("QMs",import_QMs)
jq.enq("survex",import_survex)
jq.enq("survexblks",import_survexblks)
jq.enq("survexpos",import_survexpos)
jq.enq("tunnel",import_tunnelfiles)
elif "scans" in sys.argv:
jq.enq("scans",import_surveyscans)
elif "survex" in sys.argv:
jq.enq("survex",import_survex)
jq.enq("survexblks",import_survexblks)
jq.enq("survexpos",import_survexpos)
elif "survexpos" in sys.argv:
jq.enq("survexpos",import_survexpos)
elif "surveys" in sys.argv:
jq.enq("surveys",import_surveys)
jq.enq("surveyimgs",import_surveyimgs)
elif "tunnel" in sys.argv:
jq.enq("tunnel",import_tunnelfiles)
elif "help" in sys.argv:
@@ -365,7 +366,7 @@ if __name__ == "__main__":
elif "resetend" in sys.argv:
jq.enq("QMs",import_QMs)
jq.enq("tunnel",import_tunnelfiles)
jq.enq("surveys",import_surveys)
jq.enq("surveyimgs",import_surveyimgs)
#import_descriptions() # no longer present
#parse_descriptions() # no longer present
# elif "writeCaves" in sys.argv: