iftoc 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -14
- data/bin/iftoc +1 -1
- data/iconfont/Iconfont.h +23 -0
- data/iconfont/Iconfont.m +34 -0
- data/lib/iftoc/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 13e7183c141ae4741aebcbad830cf8ae90188a5c
|
|
4
|
+
data.tar.gz: a0e81baf857601e03a790be2c21c9ca79ba76a03
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a504bd5d29e1e233eabc07f4e45253803e48b36dfc0dee78ad5b7b1a1fe38af066ce61166ebd9b8dff569cdf6f80115254d8dddce002e4c22586845d758e95e7
|
|
7
|
+
data.tar.gz: 9eebd2d074bbdc2156467ef0db10f501a4ec962817c310014c49e656577e6e13a16d193b4f6b9e03e176c1aaefc8f145e736926f3a634db37e802703c17e793a
|
data/README.md
CHANGED
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
# Iftoc
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
|
+

|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Converts CSS StyleSheets for IconFont like [iconfont.css](https://github.com/panghaijiao/iftoc/blob/master/iconfont.css) to [OC code file](https://github.com/panghaijiao/iftoc/tree/master/iconfont) automatically
|
|
6
7
|
|
|
7
|
-
##
|
|
8
|
+
## Example
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
- Input: [iconfont.css](https://github.com/panghaijiao/iftoc/blob/master/iconfont.css)
|
|
11
|
+
- Output: [Iconfont.h](https://github.com/panghaijiao/iftoc/blob/master/iconfont/Iconfont.h) [Iconfont.m](https://github.com/panghaijiao/iftoc/blob/master/iconfont/Iconfont.m)
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
gem 'iftoc'
|
|
13
|
-
```
|
|
13
|
+
## Installation
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Install it yourself as:
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
$ gem install iftoc
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## Usage
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Usage: iftoc \<cssfile> [--out \<outpath>]
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## e.g.
|
|
24
|
+
|
|
25
|
+
$ iftoc iconfont.css
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
or
|
|
26
28
|
|
|
29
|
+
$ iftoc iconfont.css --out /iconfont
|
|
30
|
+
|
|
27
31
|
## Development
|
|
28
32
|
|
|
29
33
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
@@ -32,7 +36,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
32
36
|
|
|
33
37
|
## Contributing
|
|
34
38
|
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
39
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/panghaijiao/iftoc. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
36
40
|
|
|
37
41
|
|
|
38
42
|
## License
|
data/bin/iftoc
CHANGED
data/iconfont/Iconfont.h
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//
|
|
2
|
+
// IconFont.h
|
|
3
|
+
// AutoCoding
|
|
4
|
+
//
|
|
5
|
+
// Created by AutoCoding on 2017/01/04.
|
|
6
|
+
// Copyright © 2017年 olinone. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#define theIconFont [IconFont shareInstance]
|
|
12
|
+
|
|
13
|
+
@interface IconFont : NSObject
|
|
14
|
+
|
|
15
|
+
+ (instancetype)shareInstance;
|
|
16
|
+
|
|
17
|
+
+ (UIFont *)iconFontWithSize:(CGFloat)size;
|
|
18
|
+
|
|
19
|
+
@property (readonly) NSString *icongouwuche;
|
|
20
|
+
|
|
21
|
+
@property (readonly) NSString *iconqiqiu;
|
|
22
|
+
|
|
23
|
+
@end
|
data/iconfont/Iconfont.m
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// IconFont.m
|
|
3
|
+
// AutoCoding
|
|
4
|
+
//
|
|
5
|
+
// Created by AutoCoding on 2017/01/04.
|
|
6
|
+
// Copyright © 2017年 olinone. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "IconFont.h"
|
|
10
|
+
|
|
11
|
+
@implementation IconFont
|
|
12
|
+
|
|
13
|
+
+ (instancetype)shareInstance {
|
|
14
|
+
static IconFont *iconFont = nil;
|
|
15
|
+
static dispatch_once_t onceToken;
|
|
16
|
+
dispatch_once(&onceToken, ^{
|
|
17
|
+
iconFont = [IconFont new];
|
|
18
|
+
});
|
|
19
|
+
return iconFont;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
+ (UIFont *)iconFontWithSize:(CGFloat)size {
|
|
23
|
+
return [UIFont fontWithName:@"iconfont" size:size];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
- (NSString *)icongouwuche {
|
|
27
|
+
return @"U0000e604";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
- (NSString *)iconqiqiu {
|
|
31
|
+
return @"U0000e605";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@end
|
data/lib/iftoc/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: iftoc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 庞海礁
|
|
@@ -57,6 +57,8 @@ files:
|
|
|
57
57
|
- bin/iftoc
|
|
58
58
|
- bin/setup
|
|
59
59
|
- iconfont.css
|
|
60
|
+
- iconfont/Iconfont.h
|
|
61
|
+
- iconfont/Iconfont.m
|
|
60
62
|
- iftoc.gemspec
|
|
61
63
|
- lib/iftoc.rb
|
|
62
64
|
- lib/iftoc/version.rb
|
|
@@ -80,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
80
82
|
version: '0'
|
|
81
83
|
requirements: []
|
|
82
84
|
rubyforge_project:
|
|
83
|
-
rubygems_version: 2.5.
|
|
85
|
+
rubygems_version: 2.5.2
|
|
84
86
|
signing_key:
|
|
85
87
|
specification_version: 4
|
|
86
88
|
summary: Write a short summary, because Rubygems requires one.
|