mirror of
https://github.com/ThomasToka/MarlinFirmware.git
synced 2024-11-16 12:12:44 +00:00
Update E3S1PROFORKBYTT_prusa_v27_thumbnail.py
This commit is contained in:
parent
6de6fbd45d
commit
733d72c93c
@ -64,9 +64,9 @@ def main(source_file):
|
|||||||
lines = [line for line in lines if not line.strip() == ';' and not line.strip() == '']
|
lines = [line for line in lines if not line.strip() == ';' and not line.strip() == '']
|
||||||
thumbnail_jpg_index = next((i for i, line in enumerate(lines) if line.startswith('; thumbnail_JPG begin')), None)
|
thumbnail_jpg_index = next((i for i, line in enumerate(lines) if line.startswith('; thumbnail_JPG begin')), None)
|
||||||
|
|
||||||
if thumbnail_jpg_index is not None:
|
if thumbnail_jpg_index is not None and thumbnail_jpg_index > 0:
|
||||||
# Check and remove the specific line if it exists right before the thumbnail JPG line
|
# Check and remove the specific line if it starts with '; generated by PrusaSlicer'
|
||||||
if thumbnail_jpg_index > 0 and lines[thumbnail_jpg_index - 1].strip() == '; generated by PrusaSlicer 2.7.0+win64 on 2023-12-01 at 23:07:58 UTC':
|
if lines[thumbnail_jpg_index - 1].startswith('; generated by PrusaSlicer'):
|
||||||
del lines[thumbnail_jpg_index - 1]
|
del lines[thumbnail_jpg_index - 1]
|
||||||
|
|
||||||
# Now we remove the newline before the '; thumbnail_JPG begin', if present
|
# Now we remove the newline before the '; thumbnail_JPG begin', if present
|
||||||
|
Loading…
Reference in New Issue
Block a user