GithubHelp home page GithubHelp logo

isabella232 / visual-asset-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from automattic/visual-asset-generator

0.0 0.0 0.0 4.89 MB

Python application for generating branded assets

License: GNU General Public License v3.0

Python 89.47% Shell 10.53%

visual-asset-generator's Introduction

Visual Asset Generator

A python application for generating Wordpress.com brand assets.

Getting Started

Installation

In the project's root directory, compile drawbot as a python module.

After compiling drawbot, install the remaining requirements. It's recommended to run this application using a python virtual environment. From your terminal:

virtualenv env

source env/bin/activate

pip install -r requirements.txt

The project depends on drawBot and python resize image.

Usage

./local.sh

OR

Invoke the python application directly:

python app.py [options]

Options

--format

Currently supports:

  • 300_250 (70 character limit)
  • 300_600 (105 character limit)
  • 160_600 (140 character limit)
  • 970_250 (140 character limit)
--copy

The copy that should populate the asset. The character limit depends on the format.

--cta

The copy that should populate the button.

Packaging for Distribution

  1. Generate a setup file:

py2applet --make-setup app.py

  1. Edit setup.py to include the assets (images) and data (templates and faces) directories:

DATA_FILES = ['data', 'assets']

  1. Remove existing dist and build directories:

rm -rf dist build

  1. Build app:

python setup.py py2app

Instructions for installing OpenCV

OpenCV is used to determine the position of faces in a batch of portraits. To use opencv for python:

  • Install python bindings for OpenCV (here are instructions for MacOS)
  • Link haar-cascade pre-trained classifier, e.g.: $ ln -s /usr/local/opt/opencv/share/opencv4/haarcascades/haarcascade_frontalface_default.xml haarcascade_frontalface_default.xml

What's Not Included

Portraits and other assets used in composing the images.

What's Next

  • There has active discussions around its usage in international markets, however automated translation is often imperfect. Adding the ability to export layers that can be pulled into image compositing software (e.g. Sketch, Figma) is an alternative to allow for global content managers to edit.
  • Further automating this process to generate assets seeded with audience and market specific demographics.

visual-asset-generator's People

Contributors

jffng 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.