import_remotecontrol 0.1.4 → 0.1.5
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 +8 -8
- data/lib/import_code.rb +2 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGJkMDdiMjM2ZjI2MDgzY2FjZGI1ZWU1ZGM5ZTFiNjI0N2JkYzkxMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWNjNjc4YmVhNzU0ZmI5ZTE5OWRlNGI3YzAwNjU2ZTdlMmJmM2FjMg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWFjZjQ0NDMzZDNlOWJlZjkwYzAzZWJhMjkzNmJjMTI2Zjc2MGZkNTA5ZWQy
|
10
|
+
ZWMwZGMxMDlkNTc3ZWYxYzRiYzEyZjcwMTdkZmI0MzFkMDNiYzVkY2NkYzJk
|
11
|
+
ZWEwNWZkMTgwMTJkYzZiMjQ1ODdlMTViNGI0ZTFhMWY0OGFiMTU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmIyN2U5NTVmMjRlZTEzMzExZTEyZDFjMDA3M2NhZTBiYzVmZGY4YTM4ODYy
|
14
|
+
NjMwN2E2NWEyOWVjOTIzM2FlYTg3YTIxZDQyOGNjNTQ5ZjkzNTQ3ZDk4OTgy
|
15
|
+
ZTk0M2U1OGRlZDA5NjQwMTNhMDhjMGVlNmM2ZjM0NDJhZjM4YzI=
|
data/lib/import_code.rb
CHANGED
@@ -13,7 +13,7 @@ module ImportCode
|
|
13
13
|
DEFAULT_CODENAME = {"机顶盒电源"=>"power","静音"=>"voice_quiet","菜单"=>"menu",
|
14
14
|
"上"=>"up","下"=>"down","左"=>"left","右"=>"right",
|
15
15
|
"音量+"=>'voice_up',"音量-"=>"voice_down",
|
16
|
-
"频道+"=>"channel_up","频道-"=>"channel_down"}
|
16
|
+
"频道+"=>"channel_up","频道-"=>"channel_down","电视"=>"tvf"}
|
17
17
|
|
18
18
|
BRAND ="Brand"
|
19
19
|
MODEL = "model"
|
@@ -72,6 +72,7 @@ module ImportCode
|
|
72
72
|
def self.getHashRemoteCode(file_path)
|
73
73
|
ret = {}
|
74
74
|
brand = ""
|
75
|
+
p "Open File #{file_path}"
|
75
76
|
remote_code_line = File.read(file_path)
|
76
77
|
remote_code_line.split("\r\n").each do |code|
|
77
78
|
i = code.split("=")
|
@@ -85,13 +86,9 @@ module ImportCode
|
|
85
86
|
if i[0]
|
86
87
|
if(i[0].split(",").count > 1)
|
87
88
|
key = i[0].split(",")[1]
|
88
|
-
p "*****************************"
|
89
|
-
p key
|
90
89
|
if DEFAULT_CODENAME.has_key?(key)
|
91
90
|
key = DEFAULT_CODENAME[key]
|
92
91
|
end
|
93
|
-
p key
|
94
|
-
p "********************************"
|
95
92
|
unless isProcolCode?(key)
|
96
93
|
ret.merge!({key => i[1]}) unless DEFAULT_NOIMPORT.include?(key)
|
97
94
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: import_remotecontrol
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zql
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: only use import remote control code
|
14
14
|
email: hahazhouqunli@gmail.com
|