templates and FileManagement config

This commit is contained in:
matmair committed 2021-05-15 00:57:18 +02:00
1 parent 307a097ab4
commit 8effdffe6f
5 files changed
+296

No files matched your search

+21
View File
@@ -109,6 +109,27 @@ class FileManager:
# Update headers
self.update_headers()
if self.name == 'part':
self.REQUIRED_HEADERS = [
'Name',
'Description',
]
self.OPTIONAL_HEADERS = [
'Keywords',
'IPN',
'Revision',
'Link',
'default_expiry',
'minimum_stock',
'Units',
'Notes',
]
# Update headers
self.update_headers()
def guess_header(self, header, threshold=80):
""" Try to match a header (from the file) to a list of known headers