Skip to content

Commit

Permalink
Updated documentation, and homebrew installation script
Browse files Browse the repository at this point in the history
  • Loading branch information
Axadiw committed Jun 5, 2015
1 parent cc1c592 commit 4047704
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
16 changes: 11 additions & 5 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Main features of **Basset** can be describd in two steps:
1. Converting vector images (.eps, .pdf, .psd, .svg) to PNG(s) with resolutions and names properly recognized by iOS apps (@2x, @3x etc.)
2. Copying assets from previous steps to selected .xcasset files


####Why just don't use XCode's PDF support?

1. Each PDF what is drag-and-dropped to XCode is assigned to @1x category in xcassets. For each of them you need to drag them again to "All" category, what is really painful when you're using hundreads of images in your projects.
2. Check of this link: [http://bjango.com/articles/idontusepdfs/](http://bjango.com/articles/idontusepdfs/)

##Getting started

###Prerequisites
Expand Down Expand Up @@ -101,11 +107,11 @@ optional arguments:

1) First of all create new iOS project. Make sure it contains *xcassets* folder inside.

![image](readme_resources/1.png =300x)
<img src="./readme_resources/1.png" style="width: 300px;"/>

2) Create Assets folder, and put all your vector images in there.

![image](readme_resources/2.png =200x)
<img src="./readme_resources/2.png" style="width: 200px;"/>

3) Create config file:

Expand All @@ -118,7 +124,7 @@ merge_with_xcassets: True

and save it as config.yml in project root folder:

![image](readme_resources/3.png =200x)
<img src="./readme_resources/3.png" style="width: 200px;"/>

4) Open terminal, change current directory to your iOS project, and type:

Expand All @@ -128,11 +134,11 @@ basset_ios -c config.yml

5) All vector images should be converted to PNGs and put into selected ```xcassets``` folder.

![image](readme_resources/5.png =600x)
<img src="./readme_resources/5.png" style="width: 600px;"/>

All images are now visible in XCode:

![image](readme_resources/4.png =600x)
<img src="./readme_resources/4.png" style="width: 600px;"/>

##License
Basset-ios is released under a MIT License. See LICENSE file for details.
4 changes: 3 additions & 1 deletion basset_ios.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
class BassetIos < Formula

desc "Converting vector images to PNG(s) and organizes them in xcassets"
homepage "https://github.com/Polidea/basset-ios"
url "https://github.com/Polidea/basset-ios/archive/0.1.tar.gz"
sha1 "070af16cf4321aed6c65bd9a4dac8e6f2c003639"

depends_on :python if MacOS.version <= :snow_leopard
depends_on "imagemagick" => :build_from_source
depends_on "ghostscript"

resource "coloredlogs" do
url "https://pypi.python.org/packages/source/c/coloredlogs/coloredlogs-1.0.tar.gz"
Expand Down Expand Up @@ -36,7 +39,6 @@ def install

ENV.prepend_create_path "PYTHONPATH", libexec

libexec.install Dir["basset"]
bin.install "basset_ios"

bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
Expand Down

0 comments on commit 4047704

Please sign in to comment.