MockupEngineer/MockupModule/__main__.py
2022-01-22 13:00:56 +05:00

32 lines
986 B
Python

import os
from MockupModule import MockupEngineer
def main():
mockup = MockupEngineer()
mockup.__create_examples__('/Users/ulbwa/Documents/MockupEngineer/MockupModule/templates/example.jpg')
i = 0
for template in mockup.templates:
print('[{}] {} {} [{}] ({})'.format(i, template.manufacturer, template.name, template.resolution, template.year))
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()