<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0mm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#44546A;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='color:#44546A'>I think the current import system imports all the survey scans twice, using different functions.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'>Has anyone else looked at this recently and can tell me what I am misunderstanding ?<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:Consolas;color:#44546A'>databaseReset.py  <b>scans</b>   - calls parsers.surveys.LoadListScans()<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:Consolas;color:#44546A'>databaseReset.py  <b>surveys</b> – calls parsers.surveys.parseSurveys()<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:Consolas;color:#44546A'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='color:#44546A'>scans</span></b><span style='color:#44546A'> just goes for it and walks through all the survey wallets folder by folder. It deletes all the scan object before it runs.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'>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.<br>Ultimately calls LoadListScansFile(survexscansfolder) which calls survexscansingle.save() for the individual scan file this is a method on class SurvexScanSingle.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'>The output page </span><a href="http://expo.survex.com/tunneldata/">http://expo.survex.com/tunneldata/</a> <span style='color:#44546A'>displays the survexscansingle objects and survexscansfolder folders.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'>The output page </span><a href="http://expo.survex.com/survey_scans/">http://expo.survex.com/survey_scans/</a> <span style='color:#44546A'>also displays wallet folder names survexscansfolder. It looks complete.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:Consolas;color:#44546A'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='color:#44546A'>surveys</span></b><span style='color:#44546A'> 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.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#44546A'>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/ .<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'>It explicitly looks at every scanned file which it then (bizarrely) insists on renaming internally.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'> (Oh and it looks for Surveys.csv file first, but this always fails so it calls parseSurveyScans() afterwards)<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'>There are no output pages that I can find that display this data – but maybe I haven’t tried hard enough.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#44546A'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#44546A'>Anyone care to correct my fumblings ?<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'>Philip<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#44546A'>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. </span><a href="http://expo.survex.com/expedition/2018">http://expo.survex.com/expedition/2018</a> , <span style='color:#44546A'>to go alongside the logbook entry and the survex file.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#44546A'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#44546A'><o:p> </o:p></span></p></div></body></html>