Skip to content

Commit

Permalink
make PRINTERS importable (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarkafa authored Sep 13, 2024
1 parent c1d435c commit c72c210
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 7 deletions.
4 changes: 2 additions & 2 deletions gcode_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from .metadata import MetaData, FDMMetaData, SLMetaData, get_metadata, \
UnknownGcodeFileType, estimated_to_seconds, get_preview, get_icon, \
get_meta_class
get_meta_class, PRINTERS

__version__ = "0.2.0"
__date__ = "5 May 2024" # version date
Expand All @@ -18,5 +18,5 @@
__all__ = [
"MetaData", "FDMMetaData", "SLMetaData", "get_metadata",
"UnknownGcodeFileType", "estimated_to_seconds", "get_preview", "get_icon",
"get_meta_class"
"get_meta_class", "PRINTERS"
]
42 changes: 37 additions & 5 deletions gcode_metadata/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,44 @@
r"((?P<hours>[0-9]+)h\s*)?"
r"((?P<minutes>[0-9]+)m\s*)?"
r"((?P<seconds>[0-9]+)s)?")

PRINTERS = [
'MK4IS', 'MK4MMU3', 'MK4', 'MK4S', 'MK4SMMU3', 'MK3SMMU3', 'MK3MMU3',
'MK3SMMU2S', 'MK3MMU2', 'MK3S', 'MK3', 'MK2.5SMMU2S', 'MK2.5MMU2',
'MK2.5S', 'MK2.5', 'MK3.5', 'MK3.9', 'MINI', 'MINIIS', 'XL5', 'XL4', 'XL3',
'XL2', 'XL', 'iX', 'SL1', 'SHELF', 'EXTRACTOR', 'HARVESTER'
'HT90',
'MK2.5',
'MK2.5S',
'MK2.5MMU2',
'MK2.5SMMU2S',
'MK3',
'MK3S',
'MK3MMU2',
'MK3SMMU2S',
'MK3MMU3',
'MK3SMMU3',
'MK3.9', # no IS in name as it shipped with IS FW
'MK3.9MMU3',
'MK3.9S',
'MK3.9SMMU3',
'MK3.5',
'MK3.5MMU3',
'MK3.5S',
'MK3.5SMMU3',
'MK4',
# 'MK4MMU3', # MMU3 for MK4 only for MK4IS
'MK4ISMMU3',
'MK4IS',
'MK4S',
'MK4SMMU3', # no IS in name as it shipped with IS FW
'MINI',
'MINIIS',
'XL',
'XL2',
'XL5',
'XLIS',
'XL2IS',
'XL5IS',
'SL1',
'SL1S',
'M1',
'iX',
]

PRINTERS.sort(key=len, reverse=True)
Expand Down

0 comments on commit c72c210

Please sign in to comment.