Walk down a project directory and generate a static HTML site with resized images. It looks for the following subdirectories, but not all need to be present:
iphone-portrait
iphone-landscape
ipad-portrait
ipad-landscape
In those directories it looks for files with specific format, see examples below.
Go to the releases section and download the latest binary to your favorite location, say "Downloads", then open Terminal and enter:
$ cd Downloads
$ ./mockups -d "path/to/Your Project"
Note: You may want to simply type ./mockups -d
and then drag and drop
your project directory from Finder into the Terminal and it will fill in
the path to it.
Project Name
|- mockups
| +- icon.png
|- iphone-portrait
| |- XY-[section-a]-0.png
| +- XY-[section-a]-1.png
|- iphone-landscape
| |- XY-[section-a]-0.png
| +- XY-[section-b]-0.png
|- ipad-portrait
| +- XY-[section-b]-0.png
+- ipad-landscape
|- XY-[section-a]-0.png
+- XY-[section-b]-0.png
Project Name
|- mockups
| +- icon.png
|- iphone-portrait
| |- XY-[section-a]-0.png
| +- XY-[section-a]-1.png
|- iphone-landscape
| |- XY-[section-a]-0.png
| +- XY-[section-b]-0.png
|- ipad-portrait
| +- XY-[section-b]-0.png
|- ipad-landscape
| |- XY-[section-a]-0.png
| +- XY-[section-b]-0.png
+- site
|- thumbs
| |- iphone-portrait
| | |- XY-[section-a]-0.png
| | +- XY-[section-a]-1.png
| |- iphone-landscape
| | |- XY-[section-a]-0.png
| | +- XY-[section-b]-0.png
| |- ipad-portrait
| | +- XY-[section-b]-0.png
| +- ipad-landscape
| |- XY-[section-a]-0.png
| +- XY-[section-b]-0.png
|- index.html
|- css
| +- styles.css
|- img
| |- icon.png
| +- logo.png
|- js
| +- mockups.js
|- iphone-portrait
| |- index.html
| +- section-a.html
|- iphone-landscape
| |- index.html
| |- section-a.html
| +- section-b.html
|- ipad-portrait
| |- index.html
| +- section-b.html
+- ipad-landscape
|- index.html
|- section-a.html
+- section-b.html
Awesome Mail Client
|- mockups
| +- icon.png
|- iphone-portrait
| |- MC-[inbox]-0.png
| |- MC-[inbox]-1.png
| |- MC-[account-detail]-0.png
| |- MC-[account-detail]-1.png
| +- MC-[account-detail]-2.png
|- iphone-landscape
| |- MC-[inbox]-0.png
| |- MC-[account-detail]-0.png
| |- MC-[account-detail]-1.png
| +- MC-[account-detail]-2.png
|- ipad-portrait
| |- MC-[inbox]-0.png
| +- MC-[inbox]-1.png
+- ipad-landscape
|- MC-[inbox]-0.png
|- MC-[account-detail]-0.png
+- MC-[account-detail]-1.png
Awesome Mail Client
|- mockups
| +- icon.png
|- iphone-portrait
| |- MC-[inbox]-0.png
| |- MC-[inbox]-1.png
| |- MC-[account-detail]-0.png
| |- MC-[account-detail]-1.png
| +- MC-[account-detail]-2.png
|- iphone-landscape
| |- MC-[inbox]-0.png
| |- MC-[account-detail]-0.png
| |- MC-[account-detail]-1.png
| +- MC-[account-detail]-2.png
|- ipad-portrait
| |- MC-[inbox]-0.png
| +- MC-[inbox]-1.png
|- ipad-landscape
| |- MC-[inbox]-0.png
| |- MC-[account-detail]-0.png
| +- MC-[account-detail]-1.png
+- site
|- thumbs
| |- iphone-portrait
| | |- MC-[inbox]-0.png
| | |- MC-[inbox]-1.png
| | |- MC-[account-detail]-0.png
| | |- MC-[account-detail]-1.png
| | +- MC-[account-detail]-2.png
| |- iphone-landscape
| | |- MC-[inbox]-0.png
| | |- MC-[account-detail]-0.png
| | |- MC-[account-detail]-1.png
| | +- MC-[account-detail]-2.png
| |- ipad-portrait
| | |- MC-[inbox]-0.png
| | +- MC-[inbox]-1.png
| +- ipad-landscape
| |- MC-[inbox]-0.png
| |- MC-[account-detail]-0.png
| +- MC-[account-detail]-1.png
|- index.html
|- css
| +- styles.css
|- img
| |- icon.png
| +- logo.png
|- js
| +- mockups.js
|- iphone-portrait
| |- index.html
| |- inbox.html
| +- account-detail.html
|- iphone-landscape
| |- index.html
| |- inbox.html
| +- account-detail.html
|- ipad-portrait
| |- index.html
| +- inbox.html
+- ipad-landscape
|- index.html
|- inbox.html
+- account-detail.html
Install dependencies:
And then build the crate:
$ git clone https://github.com/ollie/mockups-rust mockups
$ cd mockups
$ cargo build # Not optimized binary in target/mockups
$ cargo build --release # Optimized binary in target/mockups/release
Refactor things a bit as it is a tad ugly. :-)