[Expo-tech] Troggle importing.. duplicate function?
Philip Sargent (Gmail)
philip.sargent at gmail.com
Mon Apr 27 21:32:12 BST 2020
I think the current import system imports all the survey scans twice, using
different functions.
Has anyone else looked at this recently and can tell me what I am
misunderstanding ?
databaseReset.py scans - calls parsers.surveys.LoadListScans()
databaseReset.py surveys - calls parsers.surveys.parseSurveys()
scans just goes for it and walks through all the survey wallets folder by
folder. It deletes all the scan object before it runs.
It does "surveyscans/smkhs" first (which no longer exists), then the 4-digit
folders, e.g. 2002, then it does do all the other folders too. Don't know
why this order.
Ultimately calls LoadListScansFile(survexscansfolder) which calls
survexscansingle.save() for the individual scan file this is a method on
class SurvexScanSingle.
The output page http://expo.survex.com/tunneldata/ displays the
survexscansingle objects and survexscansfolder folders.
The output page http://expo.survex.com/survey_scans/ also displays wallet
folder names survexscansfolder. It looks complete.
surveys goes through the expeditions list, looking for scans in each year of
an expo. So unless "people" is run first (which loads up the expo "years")
it can't find any "years", it doesn't do anything and gives no error message
that it hasn't.
But if run *after* people, then it searches through the subfolders of the
form '\d\d\d\d#(X?)0*(\d+) ' - so it misses out all the 1990s data with
folder names like /1995-96kh/ .
It explicitly looks at every scanned file which it then (bizarrely) insists
on renaming internally.
(Oh and it looks for Surveys.csv file first, but this always fails so it
calls parseSurveyScans() afterwards)
Ultimately it calls scanObj.save() for the individual scan file. scanObj
is of class ScannedImage which understands whether it is a plan, elev or
notes image and is presumably intended to be used in tracking work to be
done.
There are no output pages that I can find that display this data - but maybe
I haven't tried hard enough.
So it appears that the current troggle system only uses data input by the
"scans" option, but all the unused code is kept around because it has a lot
of code which eventually would do what wallets.py does, and is waiting to be
repurposed into the current main line of work. I think.
Anyone care to correct my fumblings ?
Philip
PS Neither method captures the date the scans were done, or the date written
on the scanned "notes", which is what we need if we want to add a "wallets"
column to the date-order table at the bottom of, e.g.
http://expo.survex.com/expedition/2018 , to go alongside the logbook entry
and the survex file.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wookware.org/pipermail/expo-tech/attachments/20200427/2edfb304/attachment.htm>
More information about the Expo-tech
mailing list