Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make PRINTERS importable #51

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading