diff --git a/MANIFEST.in b/MANIFEST.in index 0003b57..59c1edc 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ -global-include *.md *.png *.ini *.txt +global-include *.md *.png *.ini *.txt *.py global-exclude ./generated exclude deploy.py readme-template.md .gitignore \ No newline at end of file diff --git a/MockupEngineer/__init__.py b/MockupEngineer/__init__.py index cb109b1..c99e5bf 100644 --- a/MockupEngineer/__init__.py +++ b/MockupEngineer/__init__.py @@ -7,7 +7,10 @@ from PIL import Image from MockupEngineer import templates from MockupEngineer.templates import Device, ALL_TEMPLATES -from MockupEngineer.utils import random_string +from MockupEngineer.utils import random_string, get_title +from MockupEngineer.utils.about import author + +__author__ = author() generated_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'generated') if not os.path.exists(generated_path): @@ -35,9 +38,12 @@ class MockupEngineerInstance: dicted = dict() for template in self.templates: if template.type in dicted.keys(): - dicted[template.type].append(template) + dicted[template.type]["templates"].append(template) else: - dicted[template.type] = [template] + dicted[template.type] = { + "title": get_title(template.type), + "templates": [template] + } return dicted def generate(self, template_id: str, diff --git a/MockupEngineer/__main__.py b/MockupEngineer/__main__.py index 874f19c..4f3618c 100644 --- a/MockupEngineer/__main__.py +++ b/MockupEngineer/__main__.py @@ -1,29 +1,82 @@ +import os import webbrowser -from MockupEngineer import MockupEngineerInstance +from MockupEngineer import MockupEngineerInstance, Device -def main(): - mockup = MockupEngineerInstance() +def cls(): + os.system('cls' if os.name == 'nt' else 'clear') - 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.id, screenshot, color, external_storage=True) - print('- - - - - - - - - -\nSuccess: {}'.format(mockup)) - webbrowser.open(mockup, new=0, autoraise=True) + +class Main: + def __init__(self): + print('Loading modules...') + self.mockup = MockupEngineerInstance() + cls() + self.select_category() + + def exit(self): + cls() + exit() + + def input(self, placeholder: str, func, args=()): + cls() + return func(input(placeholder), *args) + + def menu(self, **variants): + variants = {a.replace('var', ''): b for a, b in variants.items()} + for a, (b, _, _) in variants.items(): + print(' [{}] {}'.format(a, b)) + val = input('Enter value: ') + if val not in variants: + cls() + print('Invalid value, try again:') + return self.menu(**variants) + else: + variants[val][1](*variants[val][2]) + + def select_category(self): + cls() + print('Select device category:') + self.menu(**{str(num + 1): (a['title'], self.select_template, (b,)) for num, (b, a) in + enumerate(self.mockup.get_templates().items())}, + var0=('Exit', self.exit, ())) + + def select_template(self, category: str): + cls() + print('Choose a device:') + self.menu(**{str(num + 1): ( + '{} {} ({}) [{}]'.format(a.manufacturer, a.name, a.resolution, a.year), self.select_color, (a.id,)) for + num, a + in enumerate(self.mockup.get_templates()[category]['templates'])}, + var0=('Back', self.select_category, ())) + + def select_color(self, template_id): + cls() + print('Choose color:') + template = self.mockup.get_template(template_id) + self.menu( + **{str(num + 1): (a.color, self.enter_path, (a.color, template)) for num, a in enumerate(template.colors)}, + var0=('Back', self.select_template, (template.type,))) + + def enter_path(self, color: str, template: Device): + self.input('Enter the path to the screenshot: ', self.generate, (color, template)) + + def generate(self, path: str, color: str, template: Device): + if not os.path.isfile(path): + return self.input('File does not exist, try again: ', self.generate, (color, template)) + if not (path.lower().endswith('.png') or path.lower().endswith('.jpg') or path.lower().endswith('.jpeg')): + return self.input('MockupEngineer supports .png and .jpeg screenshots, try again: ', self.generate, + (color, template)) + cls() + print('Generating...') + url = self.mockup.generate(screenshot_path=path, template_id=template.id, color=color, external_storage=True) + cls() + print('Success: {}'.format(url)) + webbrowser.open(url) + self.menu(var1=('Back', self.select_category, ()), + var0=('Exit', self.exit, ())) if __name__ == '__main__': - main() + Main() diff --git a/MockupEngineer/templates/__init__.py b/MockupEngineer/templates/__init__.py index f5c7b0b..a956565 100644 --- a/MockupEngineer/templates/__init__.py +++ b/MockupEngineer/templates/__init__.py @@ -1,11 +1,14 @@ +import datetime import hashlib import os -from configparser import ConfigParser +from configparser import ConfigParser, NoOptionError, NoSectionError from dataclasses import dataclass from pathlib import Path from typing import Optional +from MockupEngineer.utils.about import author, author_url + templates_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'templates') @@ -36,6 +39,13 @@ class DeviceImage: rotate: bool +@dataclass(frozen=False) +class About: + author: str + url: str + created: str + + @dataclass(frozen=False) class Device: def __init__(self, path: str): @@ -66,8 +76,45 @@ class Device: mask_path=os.path.join(templates_path, path, 'mask.png') if config.get('image', 'mask') == 'true' else None, rotate=config.get('image', 'rotate') == 'true') + self.__path__ = path + + self.about = About( + author=self.__get_author__(config), + url=self.__get_url__(config), + created=self.__get_creation_date__(config) + ) + def __str__(self): return ''.format(self.manufacturer, self.name, self.year) def __post_init__(self): self.colors = sorted(self.colors, key=lambda a: a.color) + + def __write_config__(self, config: ConfigParser) -> None: + with open(os.path.join(templates_path, self.__path__, 'config.ini'), 'w', encoding='utf8') as f: + config.write(f) + + def __get_author__(self, config: ConfigParser) -> str: + try: + return config.get('about', 'author') + except (NoOptionError, NoSectionError): + if 'about' not in config.sections(): + config.add_section('about') + config['about']['author'] = author() + self.__write_config__(config) + + def __get_url__(self, config: ConfigParser) -> str: + try: + return config.get('about', 'url') + except (NoOptionError, NoSectionError): + if 'about' not in config.sections(): + config.add_section('about') + config['about']['url'] = author_url() + self.__write_config__(config) + + def __get_creation_date__(self, config: ConfigParser) -> str: + dates = [os.path.getmtime(str(os.path.join(templates_path, self.__path__, item))) for _, item in config['colors'].items()] + date = datetime.datetime.utcfromtimestamp(max(dates)) if dates else datetime.datetime.utcnow() + config['about']['created'] = date.strftime('%d.%m.%Y') + self.__write_config__(config) + return config.get('about', 'created') diff --git a/MockupEngineer/templates/galaxys20/config.ini b/MockupEngineer/templates/galaxys20/config.ini index 7e8906b..ff0cdc3 100644 --- a/MockupEngineer/templates/galaxys20/config.ini +++ b/MockupEngineer/templates/galaxys20/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Samsung name = Galaxy S20 @@ -20,3 +18,9 @@ x = 200 y = 200 mask = true rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 31.01.2022 + diff --git a/MockupEngineer/templates/galaxys20ultra/config.ini b/MockupEngineer/templates/galaxys20ultra/config.ini index 4fe59c5..58a75ab 100644 --- a/MockupEngineer/templates/galaxys20ultra/config.ini +++ b/MockupEngineer/templates/galaxys20ultra/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Samsung name = Galaxy S20 Ultra @@ -19,3 +17,9 @@ x = 200 y = 200 mask = true rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 31.01.2022 + diff --git a/MockupEngineer/templates/imac212015/config.ini b/MockupEngineer/templates/imac212015/config.ini index 1be3700..a9e1c2f 100644 --- a/MockupEngineer/templates/imac212015/config.ini +++ b/MockupEngineer/templates/imac212015/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iMac 21" @@ -18,3 +16,9 @@ x = 173 y = 178 mask = false rotate = false + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 31.01.2022 + diff --git a/MockupEngineer/templates/imac242021/config.ini b/MockupEngineer/templates/imac242021/config.ini index 215c450..8e56243 100644 --- a/MockupEngineer/templates/imac242021/config.ini +++ b/MockupEngineer/templates/imac242021/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iMac 24" @@ -24,3 +22,9 @@ x = 235 y = 217 mask = false rotate = false + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 03.02.2022 + diff --git a/MockupEngineer/templates/ipad9/config.ini b/MockupEngineer/templates/ipad9/config.ini index 9a0853e..fd656a8 100644 --- a/MockupEngineer/templates/ipad9/config.ini +++ b/MockupEngineer/templates/ipad9/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPad 9 @@ -20,3 +18,9 @@ x = 150 y = 275 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 31.01.2022 + diff --git a/MockupEngineer/templates/ipadair4/config.ini b/MockupEngineer/templates/ipadair4/config.ini index adf693f..09817e5 100644 --- a/MockupEngineer/templates/ipadair4/config.ini +++ b/MockupEngineer/templates/ipadair4/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPad Air 4 @@ -22,3 +20,9 @@ x = 150 y = 150 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 31.01.2022 + diff --git a/MockupEngineer/templates/ipadmini5/config.ini b/MockupEngineer/templates/ipadmini5/config.ini index b54e12b..a58835d 100644 --- a/MockupEngineer/templates/ipadmini5/config.ini +++ b/MockupEngineer/templates/ipadmini5/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPad Mini 5 @@ -20,3 +18,9 @@ x = 150 y = 330 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 31.01.2022 + diff --git a/MockupEngineer/templates/ipadpro114/config.ini b/MockupEngineer/templates/ipadpro114/config.ini index c4ab0ef..376580e 100644 --- a/MockupEngineer/templates/ipadpro114/config.ini +++ b/MockupEngineer/templates/ipadpro114/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPad Pro 4 11" @@ -19,3 +17,9 @@ x = 200 y = 200 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 31.01.2022 + diff --git a/MockupEngineer/templates/ipadpro134/config.ini b/MockupEngineer/templates/ipadpro134/config.ini index 422cea9..09e94a6 100644 --- a/MockupEngineer/templates/ipadpro134/config.ini +++ b/MockupEngineer/templates/ipadpro134/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPad Pro 4 12.9" @@ -19,3 +17,9 @@ x = 200 y = 200 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 31.01.2022 + diff --git a/MockupEngineer/templates/iphone12/config.ini b/MockupEngineer/templates/iphone12/config.ini index bef513a..c2f2d37 100644 --- a/MockupEngineer/templates/iphone12/config.ini +++ b/MockupEngineer/templates/iphone12/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPhone 12 @@ -22,3 +20,9 @@ x = 180 y = 180 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 31.01.2022 + diff --git a/MockupEngineer/templates/iphone12mini/config.ini b/MockupEngineer/templates/iphone12mini/config.ini index 71b3d15..4a204b7 100644 --- a/MockupEngineer/templates/iphone12mini/config.ini +++ b/MockupEngineer/templates/iphone12mini/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPhone 12 Mini @@ -22,3 +20,9 @@ x = 160 y = 160 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 31.01.2022 + diff --git a/MockupEngineer/templates/iphone12pro/config.ini b/MockupEngineer/templates/iphone12pro/config.ini index 1927a82..eeee33e 100644 --- a/MockupEngineer/templates/iphone12pro/config.ini +++ b/MockupEngineer/templates/iphone12pro/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPhone 12 Pro @@ -21,3 +19,9 @@ x = 180 y = 180 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 31.01.2022 + diff --git a/MockupEngineer/templates/iphone12promax/config.ini b/MockupEngineer/templates/iphone12promax/config.ini index ffd86f5..a890c9a 100644 --- a/MockupEngineer/templates/iphone12promax/config.ini +++ b/MockupEngineer/templates/iphone12promax/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPhone 12 Pro Max @@ -21,3 +19,9 @@ x = 200 y = 200 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 31.01.2022 + diff --git a/MockupEngineer/templates/iphone13/config.ini b/MockupEngineer/templates/iphone13/config.ini index b3b8895..fc7183c 100644 --- a/MockupEngineer/templates/iphone13/config.ini +++ b/MockupEngineer/templates/iphone13/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPhone 13 @@ -22,3 +20,9 @@ x = 200 y = 200 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 19.02.2022 + diff --git a/MockupEngineer/templates/iphone13mini/config.ini b/MockupEngineer/templates/iphone13mini/config.ini index 03be042..154ddef 100644 --- a/MockupEngineer/templates/iphone13mini/config.ini +++ b/MockupEngineer/templates/iphone13mini/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPhone 13 Mini @@ -22,3 +20,9 @@ x = 200 y = 200 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 19.02.2022 + diff --git a/MockupEngineer/templates/iphone13pro/config.ini b/MockupEngineer/templates/iphone13pro/config.ini index 2323b9c..cff767b 100644 --- a/MockupEngineer/templates/iphone13pro/config.ini +++ b/MockupEngineer/templates/iphone13pro/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPhone 13 Pro @@ -21,3 +19,9 @@ x = 200 y = 200 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 19.02.2022 + diff --git a/MockupEngineer/templates/iphone13promax/config.ini b/MockupEngineer/templates/iphone13promax/config.ini index e397443..a8317b3 100644 --- a/MockupEngineer/templates/iphone13promax/config.ini +++ b/MockupEngineer/templates/iphone13promax/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPhone 13 Pro Max @@ -21,3 +19,9 @@ x = 201 y = 202 mask = true rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 19.02.2022 + diff --git a/MockupEngineer/templates/iphonese2020/config.ini b/MockupEngineer/templates/iphonese2020/config.ini index 7bcf4dc..bea44c1 100644 --- a/MockupEngineer/templates/iphonese2020/config.ini +++ b/MockupEngineer/templates/iphonese2020/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPhone SE @@ -20,3 +18,9 @@ x = 150 y = 300 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 31.01.2022 + diff --git a/MockupEngineer/templates/iphonexr/config.ini b/MockupEngineer/templates/iphonexr/config.ini index 0ba9154..3107572 100644 --- a/MockupEngineer/templates/iphonexr/config.ini +++ b/MockupEngineer/templates/iphonexr/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPhone Xr @@ -22,4 +20,10 @@ height = 1792 x = 110 y = 110 mask = false -rotate = true \ No newline at end of file +rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/templates/iphonexs/config.ini b/MockupEngineer/templates/iphonexs/config.ini index fbc82ed..db7478c 100644 --- a/MockupEngineer/templates/iphonexs/config.ini +++ b/MockupEngineer/templates/iphonexs/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPhone Xs @@ -20,3 +18,9 @@ x = 162 y = 142 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/templates/iphonexsmax/config.ini b/MockupEngineer/templates/iphonexsmax/config.ini index a0bc58b..8994369 100644 --- a/MockupEngineer/templates/iphonexsmax/config.ini +++ b/MockupEngineer/templates/iphonexsmax/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = iPhone Xs Max @@ -20,3 +18,9 @@ x = 182 y = 172 mask = false rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/templates/macbook122016/config.ini b/MockupEngineer/templates/macbook122016/config.ini index dc5e66a..dc38831 100644 --- a/MockupEngineer/templates/macbook122016/config.ini +++ b/MockupEngineer/templates/macbook122016/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = MacBook 12" @@ -18,4 +16,10 @@ height = 894 x = 286 y = 180 mask = false -rotate = false \ No newline at end of file +rotate = false + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/templates/macbookair2020/config.ini b/MockupEngineer/templates/macbookair2020/config.ini index 6ff8c0b..1363335 100644 --- a/MockupEngineer/templates/macbookair2020/config.ini +++ b/MockupEngineer/templates/macbookair2020/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = MacBook Air (M1) @@ -18,3 +16,9 @@ x = 252 y = 142 mask = false rotate = false + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 03.02.2022 + diff --git a/MockupEngineer/templates/macbookpro132015/config.ini b/MockupEngineer/templates/macbookpro132015/config.ini index 77d4445..4f39eac 100644 --- a/MockupEngineer/templates/macbookpro132015/config.ini +++ b/MockupEngineer/templates/macbookpro132015/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = MacBook Pro 13" @@ -17,4 +15,10 @@ height = 890 x = 388 y = 176 mask = false -rotate = false \ No newline at end of file +rotate = false + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/templates/macbookpro152015/config.ini b/MockupEngineer/templates/macbookpro152015/config.ini index 6fdb003..4247d81 100644 --- a/MockupEngineer/templates/macbookpro152015/config.ini +++ b/MockupEngineer/templates/macbookpro152015/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = MacBook Pro 15" @@ -17,4 +15,10 @@ height = 906 x = 328 y = 167 mask = false -rotate = false \ No newline at end of file +rotate = false + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/templates/macbookpro162019/config.ini b/MockupEngineer/templates/macbookpro162019/config.ini index d692f7b..d894a71 100644 --- a/MockupEngineer/templates/macbookpro162019/config.ini +++ b/MockupEngineer/templates/macbookpro162019/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = MacBook Pro 16" @@ -17,4 +15,10 @@ height = 1147 x = 340 y = 224 mask = false -rotate = false \ No newline at end of file +rotate = false + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/templates/macbookpro162021/config.ini b/MockupEngineer/templates/macbookpro162021/config.ini index 4209dcb..5e145fa 100644 --- a/MockupEngineer/templates/macbookpro162021/config.ini +++ b/MockupEngineer/templates/macbookpro162021/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = MacBook Pro 16" @@ -19,3 +17,9 @@ x = 406 y = 123 mask = false rotate = false + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/templates/pixel/config.ini b/MockupEngineer/templates/pixel/config.ini index 0224b53..bc442a9 100644 --- a/MockupEngineer/templates/pixel/config.ini +++ b/MockupEngineer/templates/pixel/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Google name = Pixel @@ -19,4 +17,10 @@ height = 1656 x = 149 y = 317 mask = false -rotate = true \ No newline at end of file +rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/templates/pixel4/config.ini b/MockupEngineer/templates/pixel4/config.ini index f45517d..926e2a8 100644 --- a/MockupEngineer/templates/pixel4/config.ini +++ b/MockupEngineer/templates/pixel4/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Google name = Pixel 4 @@ -19,4 +17,10 @@ height = 2280 x = 100 y = 200 mask = false -rotate = true \ No newline at end of file +rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/templates/pixel4xl/config.ini b/MockupEngineer/templates/pixel4xl/config.ini index 791bda6..bcfa2db 100644 --- a/MockupEngineer/templates/pixel4xl/config.ini +++ b/MockupEngineer/templates/pixel4xl/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Google name = Pixel 4 XL @@ -19,4 +17,10 @@ height = 3040 x = 100 y = 250 mask = false -rotate = true \ No newline at end of file +rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/templates/pixel5/config.ini b/MockupEngineer/templates/pixel5/config.ini index 3a20182..40397dc 100644 --- a/MockupEngineer/templates/pixel5/config.ini +++ b/MockupEngineer/templates/pixel5/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Google name = Pixel 5 @@ -18,4 +16,10 @@ height = 2340 x = 200 y = 200 mask = false -rotate = true \ No newline at end of file +rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/templates/pixelbookgo/config.ini b/MockupEngineer/templates/pixelbookgo/config.ini index c923252..aa51ea0 100644 --- a/MockupEngineer/templates/pixelbookgo/config.ini +++ b/MockupEngineer/templates/pixelbookgo/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Google name = Pixelbook Go @@ -18,3 +16,9 @@ x = 236 y = 185 mask = false rotate = false + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/templates/prodisplayxdr/config.ini b/MockupEngineer/templates/prodisplayxdr/config.ini index 7570af2..ee2ecd1 100644 --- a/MockupEngineer/templates/prodisplayxdr/config.ini +++ b/MockupEngineer/templates/prodisplayxdr/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = Pro Display XDR @@ -18,3 +16,9 @@ x = 140 y = 133 mask = false rotate = false + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/templates/watchseries644mm/config.ini b/MockupEngineer/templates/watchseries644mm/config.ini index 46dc9fc..3dbe229 100644 --- a/MockupEngineer/templates/watchseries644mm/config.ini +++ b/MockupEngineer/templates/watchseries644mm/config.ini @@ -1,5 +1,3 @@ -# https://github.com/ulbwazhine/MockupEngineer - [info] manufacturer = Apple name = Watch Series 6 44mm @@ -26,4 +24,10 @@ height = 448 x = 129 y = 241 mask = false -rotate = true \ No newline at end of file +rotate = true + +[about] +author = ulbwa +url = https://ulbwa.xyz +created = 01.02.2022 + diff --git a/MockupEngineer/utils/__init__.py b/MockupEngineer/utils/__init__.py index fbf7679..7444170 100644 --- a/MockupEngineer/utils/__init__.py +++ b/MockupEngineer/utils/__init__.py @@ -3,6 +3,9 @@ import functools import random import string +specified_keys = {"pc": 'Computers', + 'wear': 'Wearable devices'} + def run_sync(func, *args, **kwargs): return asyncio.get_event_loop() \ @@ -14,3 +17,7 @@ def run_sync(func, *args, **kwargs): def random_string(n: int): return ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(n)) + + +def get_title(a: str): + return '{}s'.format(a.title()) if a not in specified_keys.keys() else specified_keys[a] diff --git a/MockupEngineer/utils/about.py b/MockupEngineer/utils/about.py new file mode 100644 index 0000000..10e2686 --- /dev/null +++ b/MockupEngineer/utils/about.py @@ -0,0 +1,10 @@ +import os + + +def author() -> str: + return 'ulbwa' + + +def author_url() -> str: + return 'https://ulbwa.xyz' + diff --git a/deploy.py b/deploy.py index e7d8ec8..b7e0405 100644 --- a/deploy.py +++ b/deploy.py @@ -43,9 +43,7 @@ def create_readme(): mockup = MockupEngineerInstance() with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'readme-template.md'), 'r') as f: - data = Template(f.read()).render(templates=mockup.get_templates(), os=os, - specified_keys={"pc": 'Computers', - 'wear': 'Wearable devices'}) + data = Template(f.read()).render(templates=mockup.get_templates(), os=os, enumerate=enumerate) with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'readme.md'), 'w') as f: f.write(data) @@ -78,7 +76,7 @@ def run_pypi(): if __name__ == '__main__': - # create_readme() + create_readme() # create_examples() - # bump_version() + bump_version() run_pypi() diff --git a/readme-template.md b/readme-template.md index 8a2056f..88ff8b1 100644 --- a/readme-template.md +++ b/readme-template.md @@ -63,7 +63,7 @@ from MockupEngineer import MockupEngineerInstance mockup = MockupEngineerInstance() -mockup.generate(template=mockup.templates[0], +mockup.generate(template_id=mockup.templates[0].id, screenshot_path='/path/to/screenshot', color=mockup.templates[0].colors[0].color) ``` @@ -73,7 +73,7 @@ mockup.generate(template=mockup.templates[0], ``` #### `MockupEngineerInstance.generate` parameters: - * `template`: *Template* — Device template model, must be passed from *MockupEngineerInstance.templates* or *MockupEngineerInstance.get_templates()*. + * `template_id`: *int* — Device template id, must be passed from *MockupEngineerInstance.templates* or *MockupEngineerInstance.get_templates()*. * `screenshot_path`: *str* — Absolute path to the image in **JPG, PNG format**. * `color`: *Optional[str]* — Optional parameter, force device color. Must be passed according to *Template.colors[**n**].color*. * `orientation`: *str* — Optional parameter, force device orientation. Must be *landscape* or *portrait*. @@ -83,10 +83,13 @@ mockup.generate(template=mockup.templates[0], Full list of all currently supported mockups {% for a, b in templates.items() %} -### {{'{}s'.format(a.title()) if a not in specified_keys.keys() else specified_keys[a]}} -{% for c in b %} -* [{{c.manufacturer}} {{c.name}}](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/{{os.path.basename(os.path.dirname(c.preview))}}/preview.png) ({{c.year}}) [{{c.resolution}}] -{% for d in c.colors %} * *{{d.color}}* +### {{b.title}} +{% for c in b.templates %} +* [{{c.manufacturer}} {{c.name}}](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/{{os.path.basename(os.path.dirname(c.preview))}}/preview.png) ({{c.year}}) [{{c.resolution}}] + * Author: [@{{c.about.author}}]({{c.about.url}}) [{{c.about.created}}] + * ID: `{{c.id}}` + * Colors: +{% for d in c.colors %} * * *{{d.color}}* {% endfor %}{% endfor %}{% endfor %} You can help the project by adding support for new mockups by contributing on [GitHub](https://github.com/ulbwazhine/MockupEngineer). diff --git a/readme.md b/readme.md index 17fc627..af0bec4 100644 --- a/readme.md +++ b/readme.md @@ -63,7 +63,7 @@ from MockupEngineer import MockupEngineerInstance mockup = MockupEngineerInstance() -mockup.generate(template=mockup.templates[0], +mockup.generate(template_id=mockup.templates[0].id, screenshot_path='/path/to/screenshot', color=mockup.templates[0].colors[0].color) ``` @@ -73,7 +73,7 @@ mockup.generate(template=mockup.templates[0], ``` #### `MockupEngineerInstance.generate` parameters: - * `template`: *Template* — Device template model, must be passed from *MockupEngineerInstance.templates* or *MockupEngineerInstance.get_templates()*. + * `template_id`: *int* — Device template id, must be passed from *MockupEngineerInstance.templates* or *MockupEngineerInstance.get_templates()*. * `screenshot_path`: *str* — Absolute path to the image in **JPG, PNG format**. * `color`: *Optional[str]* — Optional parameter, force device color. Must be passed according to *Template.colors[**n**].color*. * `orientation`: *str* — Optional parameter, force device orientation. Must be *landscape* or *portrait*. @@ -85,189 +85,291 @@ Full list of all currently supported mockups ### Phones -* [Samsung Galaxy S20](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/galaxys20/preview.png) (2020) [1440 x 3200] - * *Cloud Blue* - * *Cosmic Grey* - * *Pink* +* [Samsung Galaxy S20](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/galaxys20/preview.png) (2020) [1440 x 3200] + * Author: [@ulbwa](https://ulbwa.xyz) [31.01.2022] + * ID: `84b30848f1af25c9a3bff6583bbbe75a` + * Colors: + * * *Cloud Blue* + * * *Cosmic Grey* + * * *Pink* -* [Samsung Galaxy S20 Ultra](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/galaxys20ultra/preview.png) (2020) [1440 x 3200] - * *Cosmic Black* - * *Cosmic Grey* +* [Samsung Galaxy S20 Ultra](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/galaxys20ultra/preview.png) (2020) [1440 x 3200] + * Author: [@ulbwa](https://ulbwa.xyz) [31.01.2022] + * ID: `c4168e005483c3579bef74898a4b0384` + * Colors: + * * *Cosmic Black* + * * *Cosmic Grey* -* [Apple iPhone 12](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone12/preview.png) (2020) [1170 x 2532] - * *Black* - * *Blue* - * *Green* - * *Product Red* - * *White* +* [Apple iPhone 12](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone12/preview.png) (2020) [1170 x 2532] + * Author: [@ulbwa](https://ulbwa.xyz) [31.01.2022] + * ID: `1648990cfee89db1d6cb744c998e783a` + * Colors: + * * *Black* + * * *Blue* + * * *Green* + * * *Product Red* + * * *White* -* [Apple iPhone 12 Mini](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone12mini/preview.png) (2020) [1080 x 2340] - * *Black* - * *Blue* - * *Green* - * *Product Red* - * *White* +* [Apple iPhone 12 Mini](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone12mini/preview.png) (2020) [1080 x 2340] + * Author: [@ulbwa](https://ulbwa.xyz) [31.01.2022] + * ID: `aea792f252c0ba0847741c0a4a6dd3ca` + * Colors: + * * *Black* + * * *Blue* + * * *Green* + * * *Product Red* + * * *White* -* [Apple iPhone 12 Pro](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone12pro/preview.png) (2020) [1170 x 2532] - * *Gold* - * *Graphite* - * *Pacific Blue* - * *Silver* +* [Apple iPhone 12 Pro](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone12pro/preview.png) (2020) [1170 x 2532] + * Author: [@ulbwa](https://ulbwa.xyz) [31.01.2022] + * ID: `b25e4e76e2083e389761d3495a347e58` + * Colors: + * * *Gold* + * * *Graphite* + * * *Pacific Blue* + * * *Silver* -* [Apple iPhone 12 Pro Max](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone12promax/preview.png) (2020) [1284 x 2778] - * *Gold* - * *Graphite* - * *Pacific Blue* - * *Silver* +* [Apple iPhone 12 Pro Max](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone12promax/preview.png) (2020) [1284 x 2778] + * Author: [@ulbwa](https://ulbwa.xyz) [31.01.2022] + * ID: `658c22b16917a70e5e1703f300ef98fe` + * Colors: + * * *Gold* + * * *Graphite* + * * *Pacific Blue* + * * *Silver* -* [Apple iPhone 13](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone13/preview.png) (2021) [1170 x 2532] - * *Blue* - * *Midnight* - * *Pink* - * *Product Red* - * *Starlight* +* [Apple iPhone 13](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone13/preview.png) (2021) [1170 x 2532] + * Author: [@ulbwa](https://ulbwa.xyz) [19.02.2022] + * ID: `e03132ca8b4b0483e9d8f4a1ec1be1f5` + * Colors: + * * *Blue* + * * *Midnight* + * * *Pink* + * * *Product Red* + * * *Starlight* -* [Apple iPhone 13 Mini](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone13mini/preview.png) (2021) [1080 x 2340] - * *Blue* - * *Midnight* - * *Pink* - * *Product Red* - * *Starlight* +* [Apple iPhone 13 Mini](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone13mini/preview.png) (2021) [1080 x 2340] + * Author: [@ulbwa](https://ulbwa.xyz) [19.02.2022] + * ID: `d0346fb29c4c3de9ff70953a7ae3bfee` + * Colors: + * * *Blue* + * * *Midnight* + * * *Pink* + * * *Product Red* + * * *Starlight* -* [Apple iPhone 13 Pro](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone13pro/preview.png) (2021) [1170 x 2532] - * *Gold* - * *Graphite* - * *Sierra Blue* - * *Silver* +* [Apple iPhone 13 Pro](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone13pro/preview.png) (2021) [1170 x 2532] + * Author: [@ulbwa](https://ulbwa.xyz) [19.02.2022] + * ID: `1c6f40f0490c7e0cf35de1c96af5c720` + * Colors: + * * *Gold* + * * *Graphite* + * * *Sierra Blue* + * * *Silver* -* [Apple iPhone 13 Pro Max](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone13promax/preview.png) (2021) [1284 x 2778] - * *Gold* - * *Graphite* - * *Sierra Blue* - * *Silver* +* [Apple iPhone 13 Pro Max](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone13promax/preview.png) (2021) [1284 x 2778] + * Author: [@ulbwa](https://ulbwa.xyz) [19.02.2022] + * ID: `edc57edf104fdba42fdf935986b09ab8` + * Colors: + * * *Gold* + * * *Graphite* + * * *Sierra Blue* + * * *Silver* -* [Apple iPhone SE](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphonese2020/preview.png) (2020) [750 x 1334] - * *Black* - * *Product Red* - * *White* +* [Apple iPhone SE](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphonese2020/preview.png) (2020) [750 x 1334] + * Author: [@ulbwa](https://ulbwa.xyz) [31.01.2022] + * ID: `7ed0bde8cf28335afb6bf7e8fc90806b` + * Colors: + * * *Black* + * * *Product Red* + * * *White* -* [Apple iPhone Xr](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphonexr/preview.png) (2018) [828 x 1792] - * *Blue* - * *Coral* - * *Product Red* - * *Silver* - * *Space Gray* - * *Yellow* +* [Apple iPhone Xr](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphonexr/preview.png) (2018) [828 x 1792] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `5213bfd57a03c81ad4dc702952810ee6` + * Colors: + * * *Blue* + * * *Coral* + * * *Product Red* + * * *Silver* + * * *Space Gray* + * * *Yellow* -* [Apple iPhone Xs](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphonexs/preview.png) (2019) [1125 x 2436] - * *Gold* - * *Silver* - * *Space Gray* +* [Apple iPhone Xs](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphonexs/preview.png) (2019) [1125 x 2436] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `4b17c9428565db596f647b448656b744` + * Colors: + * * *Gold* + * * *Silver* + * * *Space Gray* -* [Apple iPhone Xs Max](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphonexsmax/preview.png) (2019) [1242 x 2688] - * *Gold* - * *Silver* - * *Space Gray* +* [Apple iPhone Xs Max](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphonexsmax/preview.png) (2019) [1242 x 2688] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `2c9c1c6b8c0b598fe1c1aca4c1f334f8` + * Colors: + * * *Gold* + * * *Silver* + * * *Space Gray* -* [Google Pixel](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/pixel/preview.png) (2016) [1080 x 1920] - * *Quite Black* - * *Really Blue* - * *Very Silver* +* [Google Pixel](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/pixel/preview.png) (2016) [1080 x 1920] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `ede34489f377fcc7852a326dd79c2550` + * Colors: + * * *Quite Black* + * * *Really Blue* + * * *Very Silver* -* [Google Pixel 4](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/pixel4/preview.png) (2019) [1080 x 2280] - * *Just Black* - * *Clearly White* - * *Oh So Orange* +* [Google Pixel 4](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/pixel4/preview.png) (2019) [1080 x 2280] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `673398cd2adaadd60506fb0140b83ab9` + * Colors: + * * *Just Black* + * * *Clearly White* + * * *Oh So Orange* -* [Google Pixel 4 XL](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/pixel4xl/preview.png) (2019) [1440 x 3040] - * *Just Black* - * *Clearly White* - * *Oh So Orange* +* [Google Pixel 4 XL](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/pixel4xl/preview.png) (2019) [1440 x 3040] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `c55e7641f3ba76d7b777281b0ba4aa87` + * Colors: + * * *Just Black* + * * *Clearly White* + * * *Oh So Orange* -* [Google Pixel 5](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/pixel5/preview.png) (2020) [1080 x 2340] - * *Just Black* - * *Sorta Sage* +* [Google Pixel 5](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/pixel5/preview.png) (2020) [1080 x 2340] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `870266635f047a49c2eae83f7d46e26e` + * Colors: + * * *Just Black* + * * *Sorta Sage* ### Computers -* [Apple iMac 21"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/imac212015/preview.png) (2015) [4096 x 2304] - * *Silver* +* [Apple iMac 21"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/imac212015/preview.png) (2015) [4096 x 2304] + * Author: [@ulbwa](https://ulbwa.xyz) [31.01.2022] + * ID: `385eb0911d0edb6821c18a2193bdadaf` + * Colors: + * * *Silver* -* [Apple iMac 24"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/imac242021/preview.png) (2021) [4480 x 2520] - * *Green* - * *Yellow* - * *Orange* - * *Pink* - * *Purple* - * *Blue* - * *Silver* +* [Apple iMac 24"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/imac242021/preview.png) (2021) [4480 x 2520] + * Author: [@ulbwa](https://ulbwa.xyz) [03.02.2022] + * ID: `40a349f85ca132c2d6c1444db0be9561` + * Colors: + * * *Green* + * * *Yellow* + * * *Orange* + * * *Pink* + * * *Purple* + * * *Blue* + * * *Silver* -* [Apple MacBook 12"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbook122016/preview.png) (2016) [2304 x 1440] - * *Space Gray* - * *Gold* +* [Apple MacBook 12"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbook122016/preview.png) (2016) [2304 x 1440] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `f74ec99f02ed5fafbe1cb1767763ed91` + * Colors: + * * *Space Gray* + * * *Gold* -* [Apple MacBook Air (M1)](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookair2020/preview.png) (2020) [2560 x 1600] - * *Silver* +* [Apple MacBook Air (M1)](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookair2020/preview.png) (2020) [2560 x 1600] + * Author: [@ulbwa](https://ulbwa.xyz) [03.02.2022] + * ID: `1f3fe3fec5b92861b7958bc75f40fe95` + * Colors: + * * *Silver* -* [Apple MacBook Pro 13"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookpro132015/preview.png) (2015) [2560 x 1600] - * *Silver* +* [Apple MacBook Pro 13"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookpro132015/preview.png) (2015) [2560 x 1600] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `2f15fb3eb0dde3b76771f3090c6ddbb6` + * Colors: + * * *Silver* -* [Apple MacBook Pro 15"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookpro152015/preview.png) (2015) [2880 x 1800] - * *Silver* +* [Apple MacBook Pro 15"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookpro152015/preview.png) (2015) [2880 x 1800] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `ba492b242a78b7f49caa41f61b5b3418` + * Colors: + * * *Silver* -* [Apple MacBook Pro 16"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookpro162019/preview.png) (2019) [3072 x 1920] - * *Space Gray* +* [Apple MacBook Pro 16"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookpro162019/preview.png) (2019) [3072 x 1920] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `0bfe5c7d2a8a4e5398090c3027791ed1` + * Colors: + * * *Space Gray* -* [Apple MacBook Pro 16"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookpro162021/preview.png) (2021) [3456 x 2234] - * *Silver* - * *Space Gray* +* [Apple MacBook Pro 16"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookpro162021/preview.png) (2021) [3456 x 2234] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `80467845e71272f0d8d2bd13490a73f3` + * Colors: + * * *Silver* + * * *Space Gray* -* [Google Pixelbook Go](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/pixelbookgo/preview.png) (2019) [1920 x 1080] - * *Just Black* +* [Google Pixelbook Go](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/pixelbookgo/preview.png) (2019) [1920 x 1080] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `6911ed9934b1c877a0b01c3750c2b79e` + * Colors: + * * *Just Black* -* [Apple Pro Display XDR](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/prodisplayxdr/preview.png) (2019) [6016 x 3384] - * *Silver* +* [Apple Pro Display XDR](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/prodisplayxdr/preview.png) (2019) [6016 x 3384] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `8b728f1faab0389874db4bb0ae6244e5` + * Colors: + * * *Silver* ### Tablets -* [Apple iPad 9](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/ipad9/preview.png) (2021) [2160 x 1620] - * *Gold* - * *Silver* - * *Space Gray* +* [Apple iPad 9](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/ipad9/preview.png) (2021) [2160 x 1620] + * Author: [@ulbwa](https://ulbwa.xyz) [31.01.2022] + * ID: `9c1f043b21ef803bd467135b83105f0b` + * Colors: + * * *Gold* + * * *Silver* + * * *Space Gray* -* [Apple iPad Air 4](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/ipadair4/preview.png) (2020) [2360 x 1640] - * *Green* - * *Rose Gold* - * *Silver* - * *Sky Blue* - * *Space Gray* +* [Apple iPad Air 4](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/ipadair4/preview.png) (2020) [2360 x 1640] + * Author: [@ulbwa](https://ulbwa.xyz) [31.01.2022] + * ID: `569262bc590b30cfb296471c3c8a4af8` + * Colors: + * * *Green* + * * *Rose Gold* + * * *Silver* + * * *Sky Blue* + * * *Space Gray* -* [Apple iPad Mini 5](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/ipadmini5/preview.png) (2021) [2048 x 1536] - * *Gold* - * *Silver* - * *Space Gray* +* [Apple iPad Mini 5](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/ipadmini5/preview.png) (2021) [2048 x 1536] + * Author: [@ulbwa](https://ulbwa.xyz) [31.01.2022] + * ID: `7a8b3c603fe34817d9233e5b6afed174` + * Colors: + * * *Gold* + * * *Silver* + * * *Space Gray* -* [Apple iPad Pro 4 11"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/ipadpro114/preview.png) (2020) [2388 x 1668] - * *Silver* - * *Space Gray* +* [Apple iPad Pro 4 11"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/ipadpro114/preview.png) (2020) [2388 x 1668] + * Author: [@ulbwa](https://ulbwa.xyz) [31.01.2022] + * ID: `e47f6e3bb880a034866f59f97f612abe` + * Colors: + * * *Silver* + * * *Space Gray* -* [Apple iPad Pro 4 12.9"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/ipadpro134/preview.png) (2020) [2732 x 2048] - * *Silver* - * *Space Gray* +* [Apple iPad Pro 4 12.9"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/ipadpro134/preview.png) (2020) [2732 x 2048] + * Author: [@ulbwa](https://ulbwa.xyz) [31.01.2022] + * ID: `9a85db6aeb1d45c896daff67af785936` + * Colors: + * * *Silver* + * * *Space Gray* ### Wearable devices -* [Apple Watch Series 6 44mm](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/watchseries644mm/preview.png) (2020) [368 x 448] - * *Aluminum Case - Blue* - * *Aluminum Case - Gold* - * *Aluminum Case - Space Gray* - * *Aluminum Case - Silver* - * *Aluminum Case - Product Red* - * *Titanium Case - Light* - * *Titanium Case - Dark* - * *Stainless Steel Case - Gold* - * *Stainless Steel Case - Graphite* - * *Stainless Steel Case - Silver* +* [Apple Watch Series 6 44mm](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/watchseries644mm/preview.png) (2020) [368 x 448] + * Author: [@ulbwa](https://ulbwa.xyz) [01.02.2022] + * ID: `e055638cf7325a856ed0369dc8d0dcb1` + * Colors: + * * *Aluminum Case - Blue* + * * *Aluminum Case - Gold* + * * *Aluminum Case - Space Gray* + * * *Aluminum Case - Silver* + * * *Aluminum Case - Product Red* + * * *Titanium Case - Light* + * * *Titanium Case - Dark* + * * *Stainless Steel Case - Gold* + * * *Stainless Steel Case - Graphite* + * * *Stainless Steel Case - Silver* You can help the project by adding support for new mockups by contributing on [GitHub](https://github.com/ulbwazhine/MockupEngineer). diff --git a/setup.py b/setup.py index 6143f2a..2777b63 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages setup( name='MockupEngineer', - version='2022.02.19.1', + version='2022.02.21.8', packages=find_packages(), url='https://github.com/ulbwazhine/MockupEngineer', license='MIT',