kaki-utils 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d5d2f2816d7ba06f5e13facb8798434194bc13bd41c81177342cc84f75f76f7
4
- data.tar.gz: e7fc93af05bd0319517ebd020c7e9e03e995821c2399ea84f980ee1cf2d71687
3
+ metadata.gz: 89d0e0453427b26cd38f5a05b6ef5a11d38dca962b7e8c6c2c6defdf4b6aa241
4
+ data.tar.gz: 88ea538f31036bcb4e6f239b20c10925c21282cb8aef1e26148361048b180da7
5
5
  SHA512:
6
- metadata.gz: cd28126491e46ad6630b346b99c8328fd7d207a80148a709b0cd46a3e1c9b7a8cc912f647c8def6baf66581b417053dae16f695ae9e22728a18913f72d9f7a00
7
- data.tar.gz: 63a830b5cc3deaa9aa9a67c8a1d5fa206de6826ddd92167b811af466fa3ff4b7b24d3360c657dd1c9106c0c3a4850edb3a6d6cdf57b3f4512af5baf79553cb9a
6
+ metadata.gz: fe76ca95e08b43a0660551e384d96894eafd87556b858368461dbaad1dead66e8b9c56a2ca577230e58acb0133dc94dbaf3c29f38ed33578cd49746d17268843
7
+ data.tar.gz: 737b5410774c70b245efcc09defd4fc11ded7fcfe61f10f9ac5514db303aca4cfc362a339612f3241bc73311801cdd563b654f8800b9145b865ee4f505a8c61f
data/README.md CHANGED
@@ -7,7 +7,7 @@ require "kaki/utils"
7
7
  methods
8
8
 
9
9
  * Utils.imgexist?(url)
10
- * Utils.getfile(url, filename, max=0)
10
+ * Utils.getfile(url, filename, max=0, ua=nil)
11
11
  * Utils.key_wait
12
12
  * Utils.delete\_non\_img(file_name)
13
13
  * Utils.delete\_empty\_folder(folder_name = './')
@@ -18,6 +18,7 @@ methods
18
18
  * Utils.repeated_permutation(a, b)
19
19
  * Utils.repeated_combination(a, b)
20
20
  * Utils.generate_random_strings(num, string_length = nil)
21
+ * Utils.m3u8(url, fname)
21
22
 
22
23
  ## Recurring decimal
23
24
 
@@ -80,11 +81,11 @@ methods
80
81
  ## instance method of "p"
81
82
 
82
83
  ```ruby
83
- require "kaki/utils/p"
84
+ require "kaki/utils/po"
84
85
  ```
85
86
  method
86
87
 
87
- * Object#p
88
+ * Object#po
88
89
 
89
90
  ## safe making directory
90
91
 
@@ -115,3 +116,10 @@ methods
115
116
  * ES.scroll\_up(n)
116
117
  * ES.clear\_below
117
118
 
119
+ ## 'require' all
120
+
121
+ ```ruby
122
+ require "kaki/utils/all"
123
+ ```
124
+
125
+
data/lib/kaki/utils.rb CHANGED
@@ -154,4 +154,11 @@ module Utils
154
154
  result
155
155
  end
156
156
  module_function :generate_random_strings
157
+
158
+
159
+ #m3u8(HLS)ダウンロード
160
+ def m3u8(url, fname)
161
+ %x(ffmpeg -i #{url} -movflags faststart -c copy -bsf:a aac_adtstoasc #{fname})
162
+ end
163
+ module_function :m3u8
157
164
  end
@@ -0,0 +1,4 @@
1
+ require_relative '../utils'
2
+
3
+ Dir.glob("*").reject {|dname| dname == "all.rb"}
4
+ .each {|dname| require_relative dname[0..-4]}
@@ -0,0 +1,7 @@
1
+ class Object
2
+ # p のインスタンス・メソッド版(put out)
3
+ def po
4
+ tap(&method(:p))
5
+ end
6
+ end
7
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaki-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - obelisk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-29 00:00:00.000000000 Z
11
+ date: 2019-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastimage
@@ -33,11 +33,12 @@ files:
33
33
  - README.md
34
34
  - lib/kaki/utils.rb
35
35
  - lib/kaki/utils/add_methods.rb
36
+ - lib/kaki/utils/all.rb
36
37
  - lib/kaki/utils/check_fname_overlapping.rb
37
38
  - lib/kaki/utils/es.rb
38
39
  - lib/kaki/utils/imgsuffix.rb
39
40
  - lib/kaki/utils/nest_loop.rb
40
- - lib/kaki/utils/p.rb
41
+ - lib/kaki/utils/po.rb
41
42
  - lib/kaki/utils/rec_decimal.rb
42
43
  - lib/kaki/utils/retry.rb
43
44
  - lib/kaki/utils/safe_mkdir.rb
@@ -60,8 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
61
  - !ruby/object:Gem::Version
61
62
  version: '0'
62
63
  requirements: []
63
- rubyforge_project:
64
- rubygems_version: 2.7.6
64
+ rubygems_version: 3.0.1
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: My trivial utilities.
data/lib/kaki/utils/p.rb DELETED
@@ -1,8 +0,0 @@
1
- class Object
2
- alias __p__ p
3
- # p のインスタンス・メソッド版
4
- def p
5
- tap(&method(:__p__))
6
- end
7
- end
8
-