faceapp 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +22 -17
- data/faceapp.gemspec +1 -1
- data/lib/faceapp/cli.rb +14 -5
- 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: 94cafef7cf1811a03ee29bb0cd6d8f1b40e66914
|
4
|
+
data.tar.gz: fc50cf763eb1fa92ab2380b3a103c63a8a2b2eca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a169ada01c68949e0bc3f40829a354707e91222cf6bb9c1c86fa4c5d872abc53fe3784db199f69565c36ce8227450d5452b4254cc9664f344d7cf3ba658e9869
|
7
|
+
data.tar.gz: 22934aed65b8698ddf75a5efaace5ce26afd94c9e65db865980c022f56fcb4fc133e71af5693e83596eae080a69453adbac84ede1a9a4740ff2176f5fafdd793
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -2,26 +2,12 @@
|
|
2
2
|
|
3
3
|
Faceapp is neural-network face manipulation application for smartphones.
|
4
4
|
|
5
|
-
https://play.google.com/store/apps/details?id=io.faceapp&hl=ru
|
6
|
-
https://itunes.apple.com/us/app/faceapp-free-neural-face-transformations/id1180884341
|
7
|
-
|
8
5
|
This gem provides command-line utility and Ruby library to utilize Faceapp API without using smartphone application.
|
9
6
|
|
10
|
-
|
7
|
+
Faceapp Application is available on Google Play and Apple App Store:
|
11
8
|
|
12
|
-
|
13
|
-
|
14
|
-
```ruby
|
15
|
-
gem 'faceapp'
|
16
|
-
```
|
17
|
-
|
18
|
-
And then execute:
|
19
|
-
|
20
|
-
$ bundle
|
21
|
-
|
22
|
-
Or install it yourself as:
|
23
|
-
|
24
|
-
$ gem install faceapp
|
9
|
+
* https://play.google.com/store/apps/details?id=io.faceapp
|
10
|
+
* https://itunes.apple.com/us/app/faceapp-free-neural-face-transformations/id1180884341
|
25
11
|
|
26
12
|
## Usage
|
27
13
|
|
@@ -53,6 +39,7 @@ faceapp [options] <filter> <input> [ouput]
|
|
53
39
|
|
54
40
|
```bash
|
55
41
|
$ faceapp female hitler.jpg adolfina.jpg
|
42
|
+
$ faceapp female - < hitler.jpg > adolfina.jpg
|
56
43
|
```
|
57
44
|
|
58
45
|
### Ruby library
|
@@ -90,6 +77,24 @@ end
|
|
90
77
|
|
91
78
|
```
|
92
79
|
|
80
|
+
|
81
|
+
## Installation
|
82
|
+
|
83
|
+
Add this line to your application's Gemfile:
|
84
|
+
|
85
|
+
```ruby
|
86
|
+
gem 'faceapp'
|
87
|
+
```
|
88
|
+
|
89
|
+
And then execute:
|
90
|
+
|
91
|
+
$ bundle
|
92
|
+
|
93
|
+
Or install it yourself as:
|
94
|
+
|
95
|
+
$ gem install faceapp
|
96
|
+
|
97
|
+
|
93
98
|
## License
|
94
99
|
|
95
100
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/faceapp.gemspec
CHANGED
data/lib/faceapp/cli.rb
CHANGED
@@ -34,6 +34,9 @@ module Faceapp
|
|
34
34
|
info 'Done.'
|
35
35
|
rescue => e
|
36
36
|
info "Error: #{e.message}"
|
37
|
+
|
38
|
+
debug { e.backtrace.join("\n") }
|
39
|
+
|
37
40
|
exit(-1)
|
38
41
|
ensure
|
39
42
|
input.close if input.is_a?(File)
|
@@ -71,7 +74,7 @@ TEXT
|
|
71
74
|
def parse_input(input)
|
72
75
|
case input
|
73
76
|
when '-'
|
74
|
-
STDIN
|
77
|
+
StringIO.new(STDIN.read)
|
75
78
|
when nil
|
76
79
|
print_usage
|
77
80
|
else
|
@@ -124,12 +127,18 @@ TEXT
|
|
124
127
|
end
|
125
128
|
end
|
126
129
|
|
127
|
-
def debug(text)
|
128
|
-
|
130
|
+
def debug(text = nil)
|
131
|
+
return unless debug?
|
132
|
+
|
133
|
+
STDERR.puts(text) if text
|
134
|
+
STDERR.puts(yield) if block_given?
|
129
135
|
end
|
130
136
|
|
131
|
-
def info(text)
|
132
|
-
|
137
|
+
def info(text = nil)
|
138
|
+
return if silent?
|
139
|
+
|
140
|
+
STDERR.puts(text) if text
|
141
|
+
STDERR.puts(yield) if block_given?
|
133
142
|
end
|
134
143
|
|
135
144
|
def debug?
|