markup: add spreadsheet writing
This commit is contained in:
@ -20,6 +20,7 @@ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'procat2.settings')
|
||||
django.setup()
|
||||
|
||||
from markup.matching import find_marked_products
|
||||
from markup.spreadsheet import write_spreadsheet
|
||||
|
||||
|
||||
def main(argv):
|
||||
@ -43,7 +44,8 @@ def main(argv):
|
||||
catname = re.sub(r'[^\w]', '_', catname)
|
||||
|
||||
matches = find_marked_products(fname, subdir, catname, debug=0)
|
||||
print(matches)
|
||||
print(f'{len(matches)} product matches')
|
||||
write_spreadsheet(matches, subdir, catname, path.stem)
|
||||
|
||||
|
||||
if __name__ == '__main__': sys.exit(main(sys.argv))
|
||||
|
||||
Reference in New Issue
Block a user