mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 08:47:07 +00:00
Replace Python globbing library.
This was motivated by the need to recurse down paths.
This commit is contained in:
@@ -9,7 +9,7 @@ database.
|
||||
"""
|
||||
|
||||
import os
|
||||
from glob import glob
|
||||
import pathlib
|
||||
import re
|
||||
import configuration
|
||||
import p111
|
||||
@@ -43,8 +43,8 @@ if __name__ == '__main__':
|
||||
print(f"Path prefix: {fileprefix}")
|
||||
|
||||
for globspec in final_p111["globs"]:
|
||||
fullglob = os.path.join(fileprefix, globspec)
|
||||
for filepath in glob(fullglob):
|
||||
for filepath in pathlib.Path(fileprefix).glob(globspec):
|
||||
filepath = str(filepath)
|
||||
print(f"Found {filepath}")
|
||||
|
||||
if not db.file_in_db(filepath):
|
||||
|
||||
@@ -9,7 +9,7 @@ database.
|
||||
"""
|
||||
|
||||
import os
|
||||
from glob import glob
|
||||
import pathlib
|
||||
import re
|
||||
import configuration
|
||||
import p190
|
||||
@@ -43,8 +43,8 @@ if __name__ == '__main__':
|
||||
print(f"Path prefix: {fileprefix}")
|
||||
|
||||
for globspec in final_p190["globs"]:
|
||||
fullglob = os.path.join(fileprefix, globspec)
|
||||
for filepath in glob(fullglob):
|
||||
for filepath in pathlib.Path(fileprefix).glob(globspec):
|
||||
filepath = str(filepath)
|
||||
print(f"Found {filepath}")
|
||||
|
||||
if not db.file_in_db(filepath):
|
||||
|
||||
@@ -9,7 +9,7 @@ database.
|
||||
"""
|
||||
|
||||
import os
|
||||
from glob import glob
|
||||
import pathlib
|
||||
import re
|
||||
import configuration
|
||||
import p111
|
||||
@@ -43,8 +43,8 @@ if __name__ == '__main__':
|
||||
print(f"Path prefix: {fileprefix}")
|
||||
|
||||
for globspec in raw_p111["globs"]:
|
||||
fullglob = os.path.join(fileprefix, globspec)
|
||||
for filepath in glob(fullglob):
|
||||
for filepath in pathlib.Path(fileprefix).glob(globspec):
|
||||
filepath = str(filepath)
|
||||
print(f"Found {filepath}")
|
||||
|
||||
if not db.file_in_db(filepath):
|
||||
|
||||
@@ -9,7 +9,7 @@ database.
|
||||
"""
|
||||
|
||||
import os
|
||||
from glob import glob
|
||||
import pathlib
|
||||
import re
|
||||
import configuration
|
||||
import p190
|
||||
@@ -43,8 +43,8 @@ if __name__ == '__main__':
|
||||
print(f"Path prefix: {fileprefix}")
|
||||
|
||||
for globspec in raw_p190["globs"]:
|
||||
fullglob = os.path.join(fileprefix, globspec)
|
||||
for filepath in glob(fullglob):
|
||||
for filepath in pathlib.Path(fileprefix).glob(globspec):
|
||||
filepath = str(filepath)
|
||||
print(f"Found {filepath}")
|
||||
|
||||
if not db.file_in_db(filepath):
|
||||
|
||||
Reference in New Issue
Block a user