MockupEngineer/MockupModule/__main__.py

30 lines
878 B
Python
Raw Normal View History

2021-12-29 19:52:41 +03:00
import os
from MockupModule import MockupEngineer
def main():
mockup = MockupEngineer()
2022-01-22 09:17:42 +03:00
2021-12-29 19:52:41 +03:00
i = 0
for template in mockup.templates:
2022-01-22 09:17:42 +03:00
print('[{}] {} {} [{}] ({})'.format(i, template.manufacturer, template.name, template.resolution, template.year))
2021-12-29 19:52:41 +03:00
i += 1
template = mockup.templates[int(input('Choose device: '))]
print('- - - - - - - - - -')
i = 0
for color in template.colors:
print('[{}] {}'.format(i, color.color))
i += 1
color = template.colors[int(input('Choose color: '))].color
print('- - - - - - - - - -')
screenshot = input('Enter path to screenshot: ')
print('- - - - - - - - - -\nWorking...')
mockup = mockup.generate(template, screenshot, color)
print('- - - - - - - - - -\nSuccess: {}'.format(mockup))
os.system('open {}'.format(mockup))
if __name__ == '__main__':
main()