MockupEngineer/readme-template.md
2022-02-24 13:49:22 +05:00

4.4 KiB

MockupEngineer

A simple library for creating beautiful screenshots.

Navigation

Example

Apple iPhone 12 Pro Max Mockup

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
Usage as a standalone application

In Python console:

from MockupEngineer import MockupEngineerInstance

mockup = MockupEngineerInstance()

mockup.generate(template_id=mockup.templates[0].id,
                screenshot_path='/path/to/screenshot',
                color=mockup.templates[0].colors[0].color)
>>> /path/to/mockup

MockupEngineerInstance.generate parameters:

  • 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.
  • 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() %}

{{b.title}}

{% for c in b.templates %}

  • {{c.manufacturer}} {{c.name}} ({{c.year}}) [{{c.resolution}}] - {{c.id}} {% 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.