Coder Social home page Coder Social logo

psdstss's Introduction

PSD Slices To StyleSheet (converter)

Extract the Slices from a PSD File and create a CSS or LESS stylesheet class structure.

Quickstart

For this quickstart you need the compiled jar file. You need to create this first.

  1. save psd as png in photoshop
  2. with console go to this directory with the psd and png file
  3. from console type: java -jar psdstss.jar -f css --html
  4. enjoy (the styles are now in new created style-directory)

Usage

psdstss [PSD-File]* [-f css|less] [-p class-prefix]

You can use more PSD-Files or leave it and let the script scan for all
PSD-Files in folder. From slices the <name> will be the <css-class>,
the <target> will be the <css-file>, in <alt-tags> are the options.

  -f, --format    Set output format (css, less). Default: less
  -p, --prefix    Set the prefix of the classes. Default: sprite-
      --html      Create a html site for testing the sprites (in css mode only).
  -v, --verbose   Show information about files and parsing etc.

Example

psdstss sprite.psd -f less -p org-logo-

Version history

final state

  • v1.0 - write output to specific directory

beta state - working

  • v0.5 - add html writer for a test site
  • v0.4 - add css writer
  • v0.3 - add less writer

alpha state - not working

  • v0.2 - create file writer
  • v0.1 - just parse the psd file

Copyright and license

Copyright 2013 René Peschmann

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

psdstss's People

Contributors

renpe avatar varonimus avatar

Watchers

 avatar

Forkers

dprinz

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.