diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-05-04 20:57:16 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-05-04 20:57:16 +0100 |
commit | 1638f97d0c785832ad9c6456f109971d5171c5e7 (patch) | |
tree | 9f222e86fde21a90374574e2f3258a5c0ae7e6fe /parsers/scans.py | |
parent | b3fcd7765e4b8cc55ec9b4f433d34cd89ae3bce9 (diff) | |
download | troggle-1638f97d0c785832ad9c6456f109971d5171c5e7.tar.gz troggle-1638f97d0c785832ad9c6456f109971d5171c5e7.tar.bz2 troggle-1638f97d0c785832ad9c6456f109971d5171c5e7.zip |
moved functions between files
Diffstat (limited to 'parsers/scans.py')
-rw-r--r-- | parsers/scans.py | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/parsers/scans.py b/parsers/scans.py index e43ddc4..9c0d28a 100644 --- a/parsers/scans.py +++ b/parsers/scans.py @@ -12,7 +12,7 @@ from functools import reduce import settings from troggle.core.models.survex import SingleScan, Wallet, DrawingFile from troggle.core.models.troggle import DataIssue -from troggle.core.utils import save_carefully +from troggle.core.utils import save_carefully, GetListDir '''Searches through all the survey scans directories (wallets) in expofiles, looking for images to be referenced. ''' @@ -39,24 +39,6 @@ def listdir(*directories): folders = urllib.request.urlopen(url.replace("#", "%23")).readlines() return [folder.rstrip(r"/") for folder in folders] - -# handles url or file, so we can refer to a set of scans (not drawings) on another server -def GetListDir(sdir): - res = [ ] - if sdir[:7] == "http://": - # s = urllib.request.urlopen(sdir) - message = f"! Requesting loading from http:// NOT IMPLEMENTED. [{sdir}]" - print(message) - DataIssue.objects.create(parser='Drawings', message=message) - sdir[:7] = "" - - for f in os.listdir(sdir): - if f[0] != ".": - ff = os.path.join(sdir, f) - res.append((f, ff, os.path.isdir(ff))) - return res - - def LoadListScansFile(wallet): gld = [ ] # flatten out any directories in these wallet folders - should not be any |