Code Monkey home page Code Monkey logo

frameit-chrome's Introduction

frameit_chrome

Embed app store and play store screenshots in device frames. Drop in replacement for fastlane frameit.

Also check out the blog article for how to use frameit-chrome for flutter apps for more details: https://codeux.design/articles/automatically-add-device-frames-and-text-to-app-screenshots/

It uses a simple dart script to locate localized screenshots and parses title.strings and keyword.strings and uses chrome headless to render the screenshot with some css and html magic.

Example Screenshot

Requirements

  • Dart ๐Ÿ˜…๏ธ (for now)
  • Google Chrome executable. By default, will look into /Applications/Google Chrome.app/Contents/MacOS/Google Chrome (tested with Chrome 86.0.4240.30).
  • Screenshots and Device Frames.

Usage

Create screenshots

Use any tool to create non-framed screenshots, for flutter I've used screenshots package.

Download device frames

Download device frames from https://github.com/fastlane/frameit-frames to $HOME/frameit-frames.

Folder hierarchy

Place your screenshots into file hierarchy as used by fastlane.

metadata/
  android/ # <-- `--base-dir` argument
    en-US/
      <device-name>-<screenshot-name>.png
      samsung-galaxy-s10-plus-password_generator.png # Example
      title.strings
      keyword.strings (optional)
    de-DE/
      <device-name>-<screenshot-name>.png
      samsung-galaxy-s10-plus-password_generator.png # Example
      title.strings
      keyword.strings (optional)
    frameit.yaml (optional)
  framed/ # <-- output directory
  • In the above example: <base-dir> = metadata/android
  • Put Screenshots into <base-dir>/<locale>/images/
  • a title.strings and keyword.strings into <base-dir>/<locale>/
  • example title.strings (key must match part of the file name of the screenshot):

"password_generator" = "Great password generator!"; ```

Install frameit_chrome

pub global activate frameit_chrome

Run frameit_chrome.dart:

(Assumes frameit-frames downloaded to $HOME/frameit-frames)

pub global run frameit_chrome --base-dir=/myproject/fastlane/metadata/android --frames-dir=$HOME/frameit-frames/latest

On non-mac platforms or when you've installed Google Chrome in non-default location:

pub global run frameit_chrome --base-dir=/myproject/fastlane/metadata/android --frames-dir=$HOME/frameit-frames/latest --chrome-binary="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

Example

See the Example Directory as well as usage of AuthPass:

TODO

  • Allow more customizations
    • Frame screenshot overrides.
    • CSS customizations.

frameit-chrome's People

Contributors

hpoul avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.