mirror of
https://github.com/ulbwazhine/MockupEngineer.git
synced 2025-02-18 18:30:33 +03:00
4.4 KiB
4.4 KiB
MockupEngineer
A simple library for creating beautiful screenshots.
Navigation
Example

Apple iPhone 12 Pro Max Mockup
Notice
The quality of all examples is much worse than real mockups, this is due to the project size limit on PyPI.
Install
$ python3 -m pip install MockupEngineer
Update
$ python3 -m pip install MockupEngineer --upgrade
Usage
As a standalone application:
$ python3 -m MockupEngineer

In Python console:
from MockupEngineer import MockupEngineerInstance
mockup = MockupEngineerInstance()
mockup.generate(template=mockup.templates[0],
screenshot_path='/path/to/screenshot',
color=mockup.templates[0].colors[0].color)
>>> /path/to/mockup
MockupEngineerInstance.generate
parameters:
template
: Template — Device template model, 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.external_storage
: Optional[bool] — Optional parameter, true if you need to upload mockup on TemporaryStorage (0x0.st etc)
List of supported mockups
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}} ({{c.year}}) [{{c.resolution}}] {% 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.