mythtvremote 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: eab62381fb4daf79d96848e905f4e5ac982a227b
4
+ data.tar.gz: 91747750d74e42814996fef3b68b73654d722cb8
5
+ SHA512:
6
+ metadata.gz: 323b447e3341f482b55c1eee0f3b0a87e5875ac0e73bfa5865c756dafc0c8a2f34a690298fbd18b14e7116a7f328f12387c405eb4999deadac11db28472b9900
7
+ data.tar.gz: 68023d22e3a82bb028a87889a71783a4abbacfc14fc388cb0102692a05884729d8b91e9c2857834610c1cbaa6471d57ae5d9dfba19626654bbcc78f8697a88c8
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ .idea/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in mythtvremote.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Christophe Augello
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,128 @@
1
+ # Mythtvremote
2
+
3
+ Mythtv frontend control socket bindings.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'mythtvremote'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install mythtvremote
18
+
19
+ ## Usage
20
+
21
+ <pre>
22
+ frontend = Your frontend ip as a string
23
+ port = integer (default = 6546 )
24
+ action = string ( action from the list)
25
+ number = optional option when the action requires it
26
+ </pre>
27
+ <code>
28
+ Mythtvremote::remote('192.168.1.10',6546,'play')
29
+ </code>
30
+
31
+ <code>
32
+ Mythtvremote::remote('192.168.1.10',6546,'volume',30)
33
+ </code>
34
+ ##Jump points
35
+ <pre>
36
+ channelpriorities ==> Channel Recording Priorities
37
+ channelrecpriority ==> Channel Recording Priorities
38
+ deletebox ==> TV Recording Deletion
39
+ deleterecordings ==> TV Recording Deletion
40
+ flixbrowse ==> Netflix Browser
41
+ flixhistory ==> Netflix History
42
+ flixqueue ==> Netflix Queue
43
+ guidegrid ==> Program Guide
44
+ livetv ==> Live TV
45
+ livetvinguide ==> Live TV In Guide
46
+ mainmenu ==> Main Menu
47
+ managerecordings ==> Manage Recordings / Fix Conflicts
48
+ manualbox ==> Manual Record Scheduling
49
+ manualrecording ==> Manual Record Scheduling
50
+ musicplaylists ==> Select music playlists
51
+ mythgallery ==> MythGallery
52
+ mythgame ==> MythGame
53
+ mythmovietime ==> MythMovieTime
54
+ mythnews ==> MythNews
55
+ mythvideo ==> MythVideo
56
+ mythweather ==> MythWeather
57
+ playbackbox ==> TV Recording Playback
58
+ playbackrecordings ==> TV Recording Playback
59
+ playdvd ==> Play DVD
60
+ playmusic ==> Play music
61
+ previousbox ==> Previously Recorded
62
+ progfinder ==> Program Finder
63
+ programfinder ==> Program Finder
64
+ programguide ==> Program Guide
65
+ programrecpriority ==> Program Recording Priorities
66
+ recordingpriorities ==> Program Recording Priorities
67
+ ripcd ==> Rip CD
68
+ ripdvd ==> Rip DVD
69
+ statusbox ==> Status Screen
70
+ videobrowser ==> Video Browser
71
+ videogallery ==> Video Gallery
72
+ videolistings ==> Video Listings
73
+ videomanager ==> Video Manager
74
+ viewscheduled ==> Manage Recordings / Fix Conflicts
75
+ </pre>
76
+ <code>
77
+ Mythtvremote::remote('192.168.1.10',6546,'videolistings')
78
+ </code>
79
+ ##Playback options
80
+ <pre>
81
+ chanup ==> Change channel Up
82
+ chandown ==> Change channel Down
83
+ volume [number] ==> Change the volume to % number
84
+ channum [number] ==> Change to a specific channel number
85
+ chanidnum [number] ==> Change to a specific channel id (chanid)
86
+ beginning ==> Seek to the beginning of the recording
87
+ forward ==> Skip forward in the video
88
+ backward ==> Skip backwards in the video
89
+ pause ==> Pause playback
90
+ play ==> Playback at normal speed
91
+ stop ==> Stop playback
92
+ menu ==> Playback menu
93
+ </pre>
94
+ <code>
95
+ Mythtvremote::remote('192.168.1.10',6546,'play')
96
+ </code>
97
+ ##Navigation
98
+ <pre>
99
+ up ==> Key up
100
+ down ==> Key down
101
+ right ==> Key right
102
+ left ==> Key left
103
+ back ==> Key back
104
+ enter ==> Key enter
105
+ spacebar ==> Key spacebar
106
+ backspace ==> Key backspace
107
+ </pre>
108
+ <code>
109
+ Mythtvremote::remote('192.168.1.10',6546,'up')
110
+ </code>
111
+ ##Keys
112
+ <pre>
113
+ from a to z
114
+ from A to Z
115
+ from 0 to 9
116
+ symbols : #,$,%,&,(,),*,+,-,.,/,:,;,<,=,>,?,[,],.
117
+ </pre>
118
+ <code>
119
+ Mythtvremote::remote('192.168.1.10',6546,'a')
120
+ </code>
121
+
122
+ ## Contributing
123
+
124
+ 1. Fork it
125
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
126
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
127
+ 4. Push to the branch (`git push origin my-new-feature`)
128
+ 5. Create new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,98 @@
1
+ require 'socket'
2
+
3
+ module Mythtvremote
4
+
5
+ def remote(frontend,port,action,number = nil)
6
+ $action = case action
7
+
8
+ when 'channelpriorities' then 'jump channelpriorities' # Channel Recording Priorities '
9
+ when 'channelrecpriority' then 'jump channelrecpriority' # Channel Recording Priorities
10
+ when 'deletebox' then 'jump deletebox' # TV Recording Deletion
11
+ when 'deleterecordings' then 'jump deleterecordings' # TV Recording Deletion
12
+ when 'flixbrowse' then 'jump flixbrowse' # Netflix Browser
13
+ when 'flixhistory' then 'jump flixhistory' # Netflix History
14
+ when 'flixqueue' then 'jump flixqueue' # Netflix Queue
15
+ when 'guidegrid' then 'jump guidegrid' # Program Guide
16
+ when 'livetv' then 'jump livetv' # Live TV
17
+ when 'livetvinguide' then 'jump livetvinguide' # Live TV In Guide
18
+ when 'mainmenu' then 'jump mainmenu' # Main Menu
19
+ when 'managerecordings' then 'jump managerecordings' # Manage Recordings / Fix Conflicts
20
+ when 'manualbox' then 'jump manualbox' # Manual Record Scheduling
21
+ when 'manualrecording' then 'jump manualrecording' # Manual Record Scheduling
22
+ when 'musicplaylists' then 'jump musicplaylists' # Select music playlists
23
+ when 'mythgallery' then 'jump mythgallery' # MythGallery
24
+ when 'mythgame' then 'jump mythgame' # MythGame
25
+ when 'mythmovietime' then 'jump mythmovietime' # MythMovieTime
26
+ when 'mythnews' then 'jump mythnews' # MythNews
27
+ when 'mythvideo' then 'jump mythvideo' # MythVideo
28
+ when 'mythweather' then 'jump mythweather' # MythWeather
29
+ when 'playbackbox' then 'jump playbackbox' # TV Recording Playback
30
+ when 'playbackrecordings' then 'jump playbackrecordings' # TV Recording Playback
31
+ when 'playdvd' then 'jump playdvd' # Play DVD
32
+ when 'playmusic' then 'jump playmusic' # Play music
33
+ when 'previousbox' then 'jump previousbox' # Previously Recorded
34
+ when 'progfinder' then 'jump progfinder' # Program Finder
35
+ when 'programfinder' then 'jump programfinder' # Program Finder
36
+ when 'programguide' then 'jump programguide' # Program Guide
37
+ when 'programrecpriority' then 'jump programrecpriority' # Program Recording Priorities
38
+ when 'recordingpriorities' then 'jump recordingpriorities' # Program Recording Priorities
39
+ when 'ripcd' then 'jump ripcd' # Rip CD
40
+ when 'ripdvd' then 'jump ripdvd' # Rip DVD
41
+ when 'statusbox' then 'jump statusbox' # Status Screen
42
+ when 'videobrowser' then 'jump videobrowser' # Video Browser
43
+ when 'videogallery' then 'jump videogallery' # Video Gallery
44
+ when 'videolistings' then 'jump videolistings' # Video Listings
45
+ when 'videomanager' then 'jump videomanager' # Video Manager
46
+ when 'viewscheduled' then 'jump viewscheduled' # Manage Recordings / Fix Conflicts
47
+
48
+ when 'chanup' then 'play channel up' # Change channel Up
49
+ when 'chandown' then 'play channel down' # Change channel Down
50
+ when 'volume' then "play volume #{number}%" # Change volume to given percentage value
51
+ when 'channum' then "play channel #{number}" # Change to a specific channel number
52
+ when 'chanidnum' then "play chanid #{number}" # Change to a specific channel id (chanid)
53
+ when 'beginning' then 'play seek beginning' # Seek to the beginning of the recording
54
+ when 'forward' then 'play seek forward' # Skip forward in the video
55
+ when 'backward' then 'play seek backward' # Skip backwards in the video
56
+ when 'pause' then 'play speed pause' # Pause playback
57
+ when 'play' then 'play speed normal' # Playback at normal speed
58
+ when 'stop' then 'play stop' # Stop playback
59
+ when 'menu' then 'key m' # Playback menu
60
+
61
+ when 'up' then 'key up' # Key up
62
+ when 'down' then 'key down' # Key down
63
+ when 'right' then 'key right' # Key right
64
+ when 'left' then 'key left' # Key left
65
+ when 'back' then 'key escape' # Key escape
66
+ when 'enter' then 'key enter' # Key enter
67
+ when 'spacebar' then 'key space' # Key space
68
+ when 'backspace' then 'key backspace' # Key backspace
69
+
70
+ else
71
+
72
+
73
+
74
+ if action.between?("a","z")
75
+ $action = "key #{action[0]}"
76
+
77
+ elsif action.between?("A","Z")
78
+ $action = "key #{action[0]}"
79
+
80
+ elsif action.between?("0","9")
81
+ $action = "key #{action[0]}"
82
+
83
+ elsif ["#","$","%","&","(",")","*","+","-",".","/",":",";","<","=",">","?","[","]","."].include?("#{action}")
84
+ $action = "key #{action[0]}"
85
+ end
86
+ end
87
+
88
+
89
+
90
+ remote = TCPSocket.open(frontend,port)
91
+ puts $action
92
+ remote.puts $action
93
+ remote.close
94
+ end
95
+
96
+ end
97
+
98
+
@@ -0,0 +1,3 @@
1
+ module Mythtvremote
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'mythtvremote/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "mythtvremote"
8
+ spec.version = Mythtvremote::VERSION
9
+ spec.authors = ["Christophe Augello"]
10
+ spec.email = ["christophe@augello.be"]
11
+ spec.description = "Mythtv front end remote control socket bindings"
12
+ spec.summary = "Mythtv front end remote control socket bindings"
13
+ spec.homepage = "https://github.com/kartouch/mythtvremote"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+ end
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mythtvremote
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Christophe Augello
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-05-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Mythtv front end remote control socket bindings
42
+ email:
43
+ - christophe@augello.be
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - .gitignore
49
+ - Gemfile
50
+ - LICENSE.txt
51
+ - README.md
52
+ - Rakefile
53
+ - lib/mythtvremote.rb
54
+ - lib/mythtvremote/version.rb
55
+ - mythtvremote.gemspec
56
+ homepage: https://github.com/kartouch/mythtvremote
57
+ licenses:
58
+ - MIT
59
+ metadata: {}
60
+ post_install_message:
61
+ rdoc_options: []
62
+ require_paths:
63
+ - lib
64
+ required_ruby_version: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - '>='
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ requirements: []
75
+ rubyforge_project:
76
+ rubygems_version: 2.0.3
77
+ signing_key:
78
+ specification_version: 4
79
+ summary: Mythtv front end remote control socket bindings
80
+ test_files: []