resper 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -2
- data/bin/resper +2 -0
- data/lib/resper.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6399b186113f375ffa6091b993102293016e8998
|
4
|
+
data.tar.gz: b882c9bc5cebd0d461cb4296706fedfcce02a734
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7f382dd38b9637d7a73394b1195e0c044c3c5942fee3e0cef3ff8215ab086ad05c6c89cd8931b0fb734887a338a5680d252eaf11a9d42740379ba4d4de6828c
|
7
|
+
data.tar.gz: 58586854051a7705cf4415f04e137091154e9be11a54c45cdc557b0b9d5d97558b4e698e05f355879fbaaa884bda8c3404fe08d44ca7c3548657b5a6805ae691
|
data/README.md
CHANGED
@@ -6,8 +6,17 @@ home :: https://src.sibext.com/snacks/resper
|
|
6
6
|
|
7
7
|
There is tool for extracting vector graphic resources to Android and iOS app
|
8
8
|
|
9
|
+
## Why?
|
9
10
|
|
10
|
-
|
11
|
+
Firstly, Mobile developers from Sibext company wastes time for transferring graphics resources from designers to mobile app. They cannot replace updates from designers to the both platform quickly.
|
12
|
+
|
13
|
+
Secondary, UX Designers wastes time for exporting a lot of bitmaps for only single icon, but they should provide only one vector image and that's it!
|
14
|
+
|
15
|
+
There is the simple solution: Designer just send to Developer *.svg* file and *base size* (width and height) for scale equals 1, but all raster resources will be extracted by *Resper* tool.
|
16
|
+
Hooray!
|
17
|
+
|
18
|
+
|
19
|
+
## Installation
|
11
20
|
|
12
21
|
```
|
13
22
|
brew remove imagemagick
|
@@ -16,7 +25,7 @@ brew install pngquant
|
|
16
25
|
gem install resper
|
17
26
|
```
|
18
27
|
|
19
|
-
|
28
|
+
## Usage
|
20
29
|
|
21
30
|
```
|
22
31
|
resper -f example/icon.svg -s 20
|
data/bin/resper
CHANGED
@@ -47,6 +47,8 @@ require 'resper'
|
|
47
47
|
options.base_width = options.base_size if options.base_width.nil?
|
48
48
|
options.base_height = options.base_size if options.base_height.nil?
|
49
49
|
|
50
|
+
return -1 unless File.exist? options.input_file
|
51
|
+
|
50
52
|
res = Resper::Parser.new options.input_file, options.base_width, options.base_height, [options.output_android, options.output_ios], options.format
|
51
53
|
|
52
54
|
res.parse_resources!
|
data/lib/resper.rb
CHANGED