cmus-bt 0.1.1 → 0.1.2

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: 5eb8d1c1799109a59a6af9715bb52ac9f5953feafc9f66659ac8cfb3599317ad
4
- data.tar.gz: a0516ec4172eebab275b43e1e2ecab38d4faeef4b14d4764c61675accaa9125c
3
+ metadata.gz: b4cca389c525bbd1b48c2c032407408efe22f704c3aed63aed98857f89c7155d
4
+ data.tar.gz: a7469f5a057bddb82cbee293d4087943e148f51232cfb658b6d3b95ecdd6ecc6
5
5
  SHA512:
6
- metadata.gz: a88776b65a4b6a5039e52827b89ecd3ea4e22cb1b8b6ef61a47ca80d32a384d2683b80bba6a41fa99e53204990662aa973bb89e9e78bc5d54013873178ed6b63
7
- data.tar.gz: c8d279072f4d4c6d3508cb90f06a234164414b955dcc54b66f8c46ddbee8fb7c5c5cc39084ec563232539a8c985b13e32a5485956fd1f043d41be11dec6eceae
6
+ metadata.gz: 2784af7ea935d6bb919262fc0e7b2d519138527324eb7157e1eac747bb910bb6a10c67f454bf9d610fd22111881afa69bcd4a28d3aa4e4a90af2bbc94e0c8424
7
+ data.tar.gz: e0265e0991cfa0a04e56bd019ac88612a3942aab7ed8a50f92dc5420e157c048a378f0bc942d6c8cc4713f45bc821a86f31e728eb4682851137073b36cec4f61
data/README.md CHANGED
@@ -1,9 +1,11 @@
1
1
  # cmus-bt
2
2
  Bluetooth AVRCP wrapper for [cmus](https://cmus.github.io/).
3
3
 
4
+ This is a wrapper script for manipulating an audio player "cmus" using any AVRCP-supported Bluetooth device. This script requires an environment that bluez running on the Linux. and devices used as remote controller must be paired and connected in advance.
5
+
4
6
  ## Usage
5
7
  ```
6
- cmus-bt [options] {NAME|DEVICE-ADDRESS}
8
+ cmus-bt [options] {DEVICE-NAME|DEVICE-ADDRESS}
7
9
 
8
10
  options:
9
11
  -l, --list-available-device
@@ -17,6 +19,11 @@ options:
17
19
  <dd>show available device list</dd>
18
20
  </dl>
19
21
 
22
+ ### argument
23
+ <dl>
24
+ <dt>DEVICE-NAME or DEVICE-ADDRESS</dt>
25
+ <dd>Specify the name or address of the device to use as the remote controler. The list of possible devices can be viewed with the -l option.</dd>
26
+ </dl>
20
27
 
21
28
  ## Contributing
22
29
  Bug reports and pull requests are welcome on GitHub at https://github.com/kwgt/cmus-bt.
@@ -38,7 +38,7 @@ module CMusBt
38
38
 
39
39
  def status
40
40
  ret = catch { |tag|
41
- query.each_line {|l| throw tag, $1.to_sym if /^status = (.+)/ =~ l}
41
+ query.each_line {|l| throw tag, $1.to_sym if /^status (.+)/ =~ l}
42
42
  }
43
43
 
44
44
  return ret
@@ -102,14 +102,12 @@ module CMusBt
102
102
  size = [0, 0, 0, 0, 0].pack(EVENT_STRUCTURE).bytesize
103
103
 
104
104
  until io.eof?
105
- raw = io.read(size)
106
- tmp = raw.unpack(EVENT_STRUCTURE)
107
-
105
+ tmp = io.read(size).unpack(EVENT_STRUCTURE)
108
106
  type = tmp[2]
109
107
  code = tmp[3]
110
108
  val = tmp[4]
111
109
 
112
- $logger.debug("push #{type}, #{code}, #{val}")
110
+ $logger.debug("input #{type}, #{code}, #{val}")
113
111
 
114
112
  next if type != 1 or val != 0
115
113
 
@@ -1,3 +1,3 @@
1
1
  module CMusBt
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmus-bt
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
  - Hirosho Kuwagata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-24 00:00:00.000000000 Z
11
+ date: 2020-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler