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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d251572d765d00aa738c844de61d11bff33d2206
4
- data.tar.gz: eb906ab62662be8f95caba4b75e4788940f5ceb3
3
+ metadata.gz: 13e7183c141ae4741aebcbad830cf8ae90188a5c
4
+ data.tar.gz: a0e81baf857601e03a790be2c21c9ca79ba76a03
5
5
  SHA512:
6
- metadata.gz: 46cadda3e5659a109994800b7a937636e524ea9ce8759de65cea9a72a70ae6fdd9db54edaa3e2ceff74c7493732f2dced83b8758fb2c1b310f305e5012db204c
7
- data.tar.gz: 60b6fe07955c790673a46b1aefca0435e4876d46bcdeb4baf3094956c6779a5d70dbe1f3578e49382e4d3084e0b00e7a2e0cca04d8c26d7ce363e8dd9941c265
6
+ metadata.gz: a504bd5d29e1e233eabc07f4e45253803e48b36dfc0dee78ad5b7b1a1fe38af066ce61166ebd9b8dff569cdf6f80115254d8dddce002e4c22586845d758e95e7
7
+ data.tar.gz: 9eebd2d074bbdc2156467ef0db10f501a4ec962817c310014c49e656577e6e13a16d193b4f6b9e03e176c1aaefc8f145e736926f3a634db37e802703c17e793a
data/README.md CHANGED
@@ -1,29 +1,33 @@
1
1
  # Iftoc
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/iftoc`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ ![](http://img.shields.io/travis/CocoaPods/CocoaPods/master.svg?style=flat)
4
+ ![](http://img.shields.io/gem/v/cocoapods.svg?style=flat)
4
5
 
5
- TODO: Delete this and the text above, and describe your gem
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
- ## Installation
8
+ ## Example
8
9
 
9
- Add this line to your application's Gemfile:
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
- ```ruby
12
- gem 'iftoc'
13
- ```
13
+ ## Installation
14
14
 
15
- And then execute:
15
+ Install it yourself as:
16
16
 
17
- $ bundle
17
+ $ gem install iftoc
18
18
 
19
- Or install it yourself as:
19
+ ## Usage
20
20
 
21
- $ gem install iftoc
21
+ Usage: iftoc \<cssfile> [--out \<outpath>]
22
22
 
23
- ## Usage
23
+ ## e.g.
24
+
25
+ $ iftoc iconfont.css
24
26
 
25
- TODO: Write usage instructions here
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/[USERNAME]/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.
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
@@ -7,7 +7,7 @@ $inpath = ARGV[0]
7
7
  $outpath = File.dirname(__FILE__)
8
8
 
9
9
  $helpString = <<-EOB
10
- Usage: iftoc <cssfile> [-out <outpath>]
10
+ Usage: iftoc <cssfile> [--out <outpath>]
11
11
  EOB
12
12
 
13
13
  def paramCheck
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Iftoc
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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.1
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.