MockupEngineer/readme.md

278 lines
11 KiB
Markdown
Raw Normal View History

2022-01-22 11:26:39 +03:00
<div align="center">
<h1>MockupEngineer</h1>
2022-01-23 12:06:02 +03:00
<p>
<img src="https://img.shields.io/pypi/dm/MockupEngineer">
<img src="https://img.shields.io/pypi/v/MockupEngineer?label=version">
<img src="https://img.shields.io/pypi/l/MockupEngineer">
<img src="https://img.shields.io/github/repo-size/ulbwazhine/MockupEngineer">
</p>
2022-01-25 14:34:25 +03:00
<p>A simple library for creating beautiful screenshots.</p>
2022-01-22 11:42:24 +03:00
</div>
2022-01-23 12:09:23 +03:00
## Navigation
2022-02-02 17:52:19 +03:00
2022-01-23 12:13:18 +03:00
* [Example](https://github.com/ulbwazhine/MockupEngineer#example)
* [Install](https://github.com/ulbwazhine/MockupEngineer#install)
2022-01-25 14:32:04 +03:00
* [Update](https://github.com/ulbwazhine/MockupEngineer#update)
2022-01-23 12:13:18 +03:00
* [Usage](https://github.com/ulbwazhine/MockupEngineer#usage)
* [As a standalone application](https://github.com/ulbwazhine/MockupEngineer#as-a-standalone-application)
2022-01-25 13:41:02 +03:00
* [In Python console](https://github.com/ulbwazhine/MockupEngineer#in-python-console)
2022-01-25 13:42:35 +03:00
* [MockupEngineerInstance.generate parameters](https://github.com/ulbwazhine/MockupEngineer#mockupengineerinstancegenerate-parameters)
2022-01-23 12:13:18 +03:00
* [List of supported mockups](https://github.com/ulbwazhine/MockupEngineer#list-of-supported-mockups)
* [Phones](https://github.com/ulbwazhine/MockupEngineer#phones)
* [Tablets](https://github.com/ulbwazhine/MockupEngineer#tablets)
* [Computers](https://github.com/ulbwazhine/MockupEngineer#computers)
* [Wearable devices](https://github.com/ulbwazhine/MockupEngineer#wearable-devices)
* [Links](https://github.com/ulbwazhine/MockupEngineer#links)
2022-01-23 12:09:23 +03:00
2022-01-22 11:42:24 +03:00
## Example
2022-01-23 11:52:10 +03:00
<div align="center">
2022-02-02 17:15:27 +03:00
<img width="375px" src="https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone12promax/preview.png" alt="Apple iPhone 12 Pro Max Mockup">
2022-01-23 11:52:10 +03:00
<p>Apple iPhone 12 Pro Max Mockup</p>
</div>
2022-01-22 12:07:17 +03:00
2022-02-02 17:52:19 +03:00
### Notice
The quality of all examples is much worse than real mockups, this is due to the project size limit on PyPI.
2022-01-22 12:07:17 +03:00
## Install
2022-01-24 16:37:07 +03:00
```console
$ python3 -m pip install MockupEngineer
2022-01-22 12:07:17 +03:00
```
2022-01-25 14:32:04 +03:00
### Update
```console
$ python3 -m pip install MockupEngineer --upgrade
```
2022-01-22 11:42:24 +03:00
## Usage
2022-01-25 13:41:02 +03:00
#### As a standalone application:
```console
$ python3 -m MockupEngineer
```
2022-01-31 11:01:06 +03:00
<div align="center">
2022-02-02 17:16:40 +03:00
<img width="70%" src="https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/console_example.png" alt="Usage as a standalone application">
2022-01-31 11:01:06 +03:00
</div>
2022-01-23 12:10:56 +03:00
#### In Python console:
2022-01-23 17:06:12 +03:00
2022-01-22 11:42:24 +03:00
```python
2022-01-23 17:06:12 +03:00
from MockupEngineer import MockupEngineerInstance
2022-01-22 11:42:24 +03:00
2022-01-23 17:06:12 +03:00
mockup = MockupEngineerInstance()
2022-01-22 11:42:24 +03:00
2022-01-23 17:06:12 +03:00
mockup.generate(template=mockup.templates[0],
2022-01-22 11:42:24 +03:00
screenshot_path='/path/to/screenshot',
color=mockup.templates[0].colors[0].color)
```
2022-01-24 16:35:18 +03:00
```console
2022-01-22 11:42:24 +03:00
>>> /path/to/mockup
```
2022-01-25 14:37:12 +03:00
#### `MockupEngineerInstance.generate` parameters:
2022-01-25 13:41:02 +03:00
* `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**.
2022-02-02 17:16:40 +03:00
* `color`: *Optional[str]* — Optional parameter, force device color. Must be passed according to *Template.colors[**n**].color*.
2022-01-25 13:41:02 +03:00
* `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](https://github.com/ulbwazhine/TemporaryStorage) (0x0.st etc)
2022-01-22 11:42:24 +03:00
2022-01-23 11:52:10 +03:00
## List of supported mockups
Full list of all currently supported mockups
### Phones
2022-02-02 17:12:05 +03:00
* [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 Ultra](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/galaxys20ultra/preview.png) (2020) [1440 x 3200]
* *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 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 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 Max](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone12promax/preview.png) (2020) [1284 x 2778]
* *Gold*
* *Graphite*
* *Pacific Blue*
* *Silver*
2022-02-19 20:10:04 +03:00
* [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 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 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 Max](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphone13promax/preview.png) (2021) [1284 x 2778]
* *Gold*
* *Graphite*
* *Sierra Blue*
* *Silver*
2022-02-02 17:12:05 +03:00
* [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 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 Xs](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/iphonexs/preview.png) (2019) [1125 x 2436]
* *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*
* [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 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 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 5](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/pixel5/preview.png) (2020) [1080 x 2340]
* *Just Black*
* *Sorta Sage*
2022-01-23 11:52:10 +03:00
2022-01-25 14:27:41 +03:00
### Computers
2022-02-02 17:12:05 +03:00
* [Apple iMac 21"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/imac212015/preview.png) (2015) [4096 x 2304]
* *Silver*
2022-02-03 18:52:17 +03:00
* [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*
2022-02-02 17:12:05 +03:00
* [Apple MacBook 12"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbook122016/preview.png) (2016) [2304 x 1440]
* *Space Gray*
* *Gold*
2022-02-03 18:52:17 +03:00
* [Apple MacBook Air (M1)](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookair2020/preview.png) (2020) [2560 x 1600]
* *Silver*
2022-02-02 17:12:05 +03:00
* [Apple MacBook Pro 13"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookpro132015/preview.png) (2015) [2560 x 1600]
* *Silver*
2022-01-30 18:34:14 +03:00
2022-02-02 17:12:05 +03:00
* [Apple MacBook Pro 15"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookpro152015/preview.png) (2015) [2880 x 1800]
* *Silver*
2022-01-25 14:27:41 +03:00
2022-02-02 17:12:05 +03:00
* [Apple MacBook Pro 16"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookpro162019/preview.png) (2019) [3072 x 1920]
* *Space Gray*
2022-01-25 14:27:41 +03:00
2022-02-02 17:12:05 +03:00
* [Apple MacBook Pro 16"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/macbookpro162021/preview.png) (2021) [3456 x 2234]
* *Silver*
* *Space Gray*
2022-01-25 14:27:41 +03:00
2022-02-02 17:12:05 +03:00
* [Google Pixelbook Go](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/pixelbookgo/preview.png) (2019) [1920 x 1080]
* *Just Black*
2022-01-31 19:31:50 +03:00
2022-02-02 17:12:05 +03:00
* [Apple Pro Display XDR](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/prodisplayxdr/preview.png) (2019) [6016 x 3384]
* *Silver*
2022-01-31 19:31:50 +03:00
2022-01-23 11:52:10 +03:00
### Tablets
2022-02-02 17:12:05 +03:00
* [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 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 Mini 5](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/ipadmini5/preview.png) (2021) [2048 x 1536]
* *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 12.9"](https://raw.githubusercontent.com/ulbwazhine/MockupEngineer/main/MockupEngineer/templates/ipadpro134/preview.png) (2020) [2732 x 2048]
* *Silver*
* *Space Gray*
2022-01-23 11:52:10 +03:00
### Wearable devices
2022-02-02 17:12:05 +03:00
* [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*
2022-01-23 11:52:10 +03:00
You can help the project by adding support for new mockups by contributing on [GitHub](https://github.com/ulbwazhine/MockupEngineer).
2022-01-22 11:42:24 +03:00
## Links
2022-01-25 11:31:48 +03:00
[<img src="https://raw.githubusercontent.com/ulbwa/ulbwa/main/static/badges/author.svg" height="30"/>](https://ulbwa.github.io)
[<img src="https://raw.githubusercontent.com/ulbwa/ulbwa/main/static/badges/github.svg" height="30"/>](https://github.com/ulbwazhine/MockupEngineer)
[<img src="https://raw.githubusercontent.com/ulbwa/ulbwa/main/static/badges/pypi.svg" height="30"/>](https://pypi.org/project/MockupEngineer)
[<img src="https://raw.githubusercontent.com/ulbwa/ulbwa/main/static/badges/donate.svg" height="30"/>](https://ulbwa.github.io/go?to=donate)