summaryrefslogtreecommitdiffstats
path: root/databaseReset.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip@Muscogee.localdomain>2020-04-28 01:18:57 +0100
committerPhilip Sargent <philip@Muscogee.localdomain>2020-04-28 01:18:57 +0100
commit4be8c8129183888c8a0d62536ee6009a99dc53fb (patch)
tree6ae5de060a1b5b81c0aa8706f6682664b71391c6 /databaseReset.py
parenta8460065a41a76ea2ea59ce09daff8e5bff51aea (diff)
downloadtroggle-4be8c8129183888c8a0d62536ee6009a99dc53fb.tar.gz
troggle-4be8c8129183888c8a0d62536ee6009a99dc53fb.tar.bz2
troggle-4be8c8129183888c8a0d62536ee6009a99dc53fb.zip
reducing clutter in output
Diffstat (limited to 'databaseReset.py')
-rw-r--r--databaseReset.py33
1 files changed, 17 insertions, 16 deletions
diff --git a/databaseReset.py b/databaseReset.py
index dadb2dc..cc5e20f 100644
--- a/databaseReset.py
+++ b/databaseReset.py
@@ -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: