2022.02.03.4
|
@ -1,2 +1,3 @@
|
||||||
global-include *.md *.png *.txt
|
global-include *.md *.png *.ini
|
||||||
global-exclude generated/*.png
|
global-exclude ./generated
|
||||||
|
exclude deploy.py readme-template.md .gitignore
|
Before Width: | Height: | Size: 223 KiB After Width: | Height: | Size: 223 KiB |
Before Width: | Height: | Size: 225 KiB After Width: | Height: | Size: 227 KiB |
Before Width: | Height: | Size: 357 KiB After Width: | Height: | Size: 370 KiB |
BIN
MockupEngineer/templates/imac242021/blue.png
Normal file
After Width: | Height: | Size: 2.0 MiB |
26
MockupEngineer/templates/imac242021/config.ini
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# https://github.com/ulbwazhine/MockupEngineer
|
||||||
|
|
||||||
|
[info]
|
||||||
|
manufacturer = Apple
|
||||||
|
name = iMac 24"
|
||||||
|
type = pc
|
||||||
|
year = 2021
|
||||||
|
width = 4480
|
||||||
|
height = 2520
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
green = green.png
|
||||||
|
yellow = yellow.png
|
||||||
|
orange = orange.png
|
||||||
|
pink = pink.png
|
||||||
|
purple = purple.png
|
||||||
|
blue = blue.png
|
||||||
|
silver = silver.png
|
||||||
|
|
||||||
|
[image]
|
||||||
|
width = 3529
|
||||||
|
height = 1984
|
||||||
|
x = 235
|
||||||
|
y = 217
|
||||||
|
mask = false
|
||||||
|
rotate = false
|
BIN
MockupEngineer/templates/imac242021/green.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
MockupEngineer/templates/imac242021/orange.png
Normal file
After Width: | Height: | Size: 2.0 MiB |
BIN
MockupEngineer/templates/imac242021/pink.png
Normal file
After Width: | Height: | Size: 2.0 MiB |
BIN
MockupEngineer/templates/imac242021/preview.png
Normal file
After Width: | Height: | Size: 367 KiB |
BIN
MockupEngineer/templates/imac242021/purple.png
Normal file
After Width: | Height: | Size: 2.1 MiB |
BIN
MockupEngineer/templates/imac242021/silver.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
MockupEngineer/templates/imac242021/yellow.png
Normal file
After Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 321 KiB After Width: | Height: | Size: 324 KiB |
Before Width: | Height: | Size: 372 KiB After Width: | Height: | Size: 364 KiB |
Before Width: | Height: | Size: 296 KiB After Width: | Height: | Size: 296 KiB |
Before Width: | Height: | Size: 365 KiB After Width: | Height: | Size: 359 KiB |
Before Width: | Height: | Size: 372 KiB After Width: | Height: | Size: 376 KiB |
Before Width: | Height: | Size: 245 KiB After Width: | Height: | Size: 258 KiB |
Before Width: | Height: | Size: 274 KiB After Width: | Height: | Size: 269 KiB |
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 256 KiB |
Before Width: | Height: | Size: 248 KiB After Width: | Height: | Size: 244 KiB |
Before Width: | Height: | Size: 263 KiB After Width: | Height: | Size: 265 KiB |
Before Width: | Height: | Size: 316 KiB After Width: | Height: | Size: 320 KiB |
Before Width: | Height: | Size: 287 KiB After Width: | Height: | Size: 284 KiB |
Before Width: | Height: | Size: 282 KiB After Width: | Height: | Size: 283 KiB |
Before Width: | Height: | Size: 251 KiB After Width: | Height: | Size: 283 KiB |
20
MockupEngineer/templates/macbookair2020/config.ini
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# https://github.com/ulbwazhine/MockupEngineer
|
||||||
|
|
||||||
|
[info]
|
||||||
|
manufacturer = Apple
|
||||||
|
name = MacBook Air (M1)
|
||||||
|
type = pc
|
||||||
|
year = 2020
|
||||||
|
width = 2560
|
||||||
|
height = 1600
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
silver = silver.png
|
||||||
|
|
||||||
|
[image]
|
||||||
|
width = 1297
|
||||||
|
height = 814
|
||||||
|
x = 252
|
||||||
|
y = 142
|
||||||
|
mask = false
|
||||||
|
rotate = false
|
BIN
MockupEngineer/templates/macbookair2020/preview.png
Normal file
After Width: | Height: | Size: 328 KiB |
BIN
MockupEngineer/templates/macbookair2020/silver.png
Normal file
After Width: | Height: | Size: 206 KiB |
Before Width: | Height: | Size: 245 KiB After Width: | Height: | Size: 238 KiB |
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 254 KiB |
Before Width: | Height: | Size: 236 KiB After Width: | Height: | Size: 251 KiB |
Before Width: | Height: | Size: 282 KiB After Width: | Height: | Size: 284 KiB |
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 239 KiB |
Before Width: | Height: | Size: 239 KiB After Width: | Height: | Size: 236 KiB |
Before Width: | Height: | Size: 221 KiB After Width: | Height: | Size: 215 KiB |
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 253 KiB |
Before Width: | Height: | Size: 272 KiB After Width: | Height: | Size: 272 KiB |
Before Width: | Height: | Size: 321 KiB After Width: | Height: | Size: 328 KiB |
Before Width: | Height: | Size: 334 KiB After Width: | Height: | Size: 339 KiB |
13
deploy.py
|
@ -12,8 +12,7 @@ from MockupEngineer import MockupEngineerInstance, generated_path
|
||||||
def create_examples():
|
def create_examples():
|
||||||
mockup = MockupEngineerInstance()
|
mockup = MockupEngineerInstance()
|
||||||
|
|
||||||
max_height = 1000
|
max_size = 1000
|
||||||
max_width = 1000
|
|
||||||
|
|
||||||
for template in mockup.templates:
|
for template in mockup.templates:
|
||||||
screenshot_path = FluentImage(
|
screenshot_path = FluentImage(
|
||||||
|
@ -26,13 +25,13 @@ def create_examples():
|
||||||
background_img = Image.new('RGBA', mockup_img.size, (255, 255, 255, 255))
|
background_img = Image.new('RGBA', mockup_img.size, (255, 255, 255, 255))
|
||||||
background_img.paste(mockup_img, (0, 0), mockup_img)
|
background_img.paste(mockup_img, (0, 0), mockup_img)
|
||||||
|
|
||||||
if background_img.size[0] > max_width or background_img.size[1] > max_height:
|
if background_img.size[0] > max_size or background_img.size[1] > max_size:
|
||||||
if background_img.size[0] > background_img.size[1]:
|
if background_img.size[0] > background_img.size[1]:
|
||||||
width = max_width
|
width = max_size
|
||||||
height = int(background_img.size[1] * (max_width / background_img.size[0]))
|
height = int(background_img.size[1] * (max_size / background_img.size[0]))
|
||||||
else:
|
else:
|
||||||
width = int(background_img.size[0] * (max_height / background_img.size[1]))
|
width = int(background_img.size[0] * (max_size / background_img.size[1]))
|
||||||
height = max_height
|
height = max_size
|
||||||
|
|
||||||
background_img = background_img.resize((width, height), Image.ANTIALIAS)
|
background_img = background_img.resize((width, height), Image.ANTIALIAS)
|
||||||
background_img.save(template.preview)
|
background_img.save(template.preview)
|
||||||
|
|
12
readme.md
|
@ -167,10 +167,22 @@ Full list of all currently supported mockups
|
||||||
* [Apple iMac 21"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/imac212015/preview.png) (2015) [4096 x 2304]
|
* [Apple iMac 21"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/imac212015/preview.png) (2015) [4096 x 2304]
|
||||||
* *Silver*
|
* *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 MacBook 12"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbook122016/preview.png) (2016) [2304 x 1440]
|
* [Apple MacBook 12"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbook122016/preview.png) (2016) [2304 x 1440]
|
||||||
* *Space Gray*
|
* *Space Gray*
|
||||||
* *Gold*
|
* *Gold*
|
||||||
|
|
||||||
|
* [Apple MacBook Air (M1)](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookair2020/preview.png) (2020) [2560 x 1600]
|
||||||
|
* *Silver*
|
||||||
|
|
||||||
* [Apple MacBook Pro 13"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookpro132015/preview.png) (2015) [2560 x 1600]
|
* [Apple MacBook Pro 13"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookpro132015/preview.png) (2015) [2560 x 1600]
|
||||||
* *Silver*
|
* *Silver*
|
||||||
|
|
||||||
|
|
2
setup.py
|
@ -3,7 +3,7 @@ from setuptools import setup, find_packages
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='MockupEngineer',
|
name='MockupEngineer',
|
||||||
version='2022.02.02.3',
|
version='2022.02.03.4',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
url='https://github.com/ulbwazhine/MockupEngineer',
|
url='https://github.com/ulbwazhine/MockupEngineer',
|
||||||
license='MIT',
|
license='MIT',
|
||||||
|
|