mirror of
https://github.com/ulbwazhine/MockupEngineer.git
synced 2024-11-10 19:26:34 +03:00
32 lines
986 B
Python
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()
|