wwdc 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +24 -0
- data/LICENSE +19 -0
- data/README.md +48 -0
- data/Rakefile +10 -0
- data/lib/wwdc/commands/info.rb +15 -0
- data/lib/wwdc/commands/open.rb +17 -0
- data/lib/wwdc/commands/search.rb +19 -0
- data/lib/wwdc/commands.rb +5 -0
- data/lib/wwdc/helpers.rb +27 -0
- data/lib/wwdc/version.rb +3 -0
- data/lib/wwdc.rb +3 -0
- data/wwdc.gemspec +27 -0
- metadata +112 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2cb9530ed9f6537d32f2b437ebf0a62b60585434
|
4
|
+
data.tar.gz: de4eed1298b531debb60a24d262e2e0ad0534f78
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2efb372f0b565e5f7054fdb526b55dc63b38535cb44926b2fd894eb4728d1d46d20a9339304eccab39c4875ace63248388b8ecbe651d55433f061028c9f00db3
|
7
|
+
data.tar.gz: eed4a1a2d357a83295f5c674b23847f563a3f143af5537a5c06cfd7afce06b65e80cf3c71c9ddbf29325793f3b73fa4e7e9b7484bec62ccdf76f076c0eba6eae
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
wwdc (0.0.1)
|
5
|
+
commander (~> 4.1.2)
|
6
|
+
excon (~> 0.25.3)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
commander (4.1.5)
|
12
|
+
highline (~> 1.6.11)
|
13
|
+
excon (0.25.3)
|
14
|
+
highline (1.6.19)
|
15
|
+
rake (0.9.2.2)
|
16
|
+
rspec (0.6.4)
|
17
|
+
|
18
|
+
PLATFORMS
|
19
|
+
ruby
|
20
|
+
|
21
|
+
DEPENDENCIES
|
22
|
+
rake
|
23
|
+
rspec
|
24
|
+
wwdc!
|
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2013 Mattt Thompson (http://mattt.me/)
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# WWDC
|
2
|
+
**A command-line interface for accessing WWDC session content**
|
3
|
+
|
4
|
+
[ASCIIwwdc](http://asciiwwdc.com) provides searchable full-text transcripts of WWDC content. `wwdc` builds on its API, [which is documented in the project's README](https://github.com/mattt/asciiwwdc.com#README).
|
5
|
+
|
6
|
+
> As a CLI aficionado, you should definitely check out [Nomad](http://nomad-cli.com/), a world-class command line utilities for iOS development.
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
```bash
|
11
|
+
$ gem install wwdc
|
12
|
+
```
|
13
|
+
|
14
|
+
## Usage
|
15
|
+
|
16
|
+
```bash
|
17
|
+
$ wwdc info 228
|
18
|
+
|
19
|
+
228: "Hidden Gems in Cocoa and Cocoa Touch"
|
20
|
+
|
21
|
+
Learn from the experts about the Cocoa and Cocoa Touch classes you may not even know exist, as well as some very obscure but extremely valuable classes that are favorites of the presenters.
|
22
|
+
|
23
|
+
https://developer.apple.com/wwdc/videos/?id=228
|
24
|
+
|
25
|
+
$ wwdc open 228
|
26
|
+
|
27
|
+
# Opens browser to Apple Developer page with links to slides and video
|
28
|
+
|
29
|
+
$ wwdc search UIView
|
30
|
+
|
31
|
+
203: "What’s New in Cocoa Touch"
|
32
|
+
|
33
|
+
> UIView property called tintColor. So, Andy talked about the fact that we've taken the tintColor concept and hoisted it all the way up to UIView, right.
|
34
|
+
```
|
35
|
+
|
36
|
+
## Contact
|
37
|
+
|
38
|
+
Mattt Thompson
|
39
|
+
|
40
|
+
- http://github.com/mattt
|
41
|
+
- http://twitter.com/mattt
|
42
|
+
- m@mattt.me
|
43
|
+
|
44
|
+
## License
|
45
|
+
|
46
|
+
WWDC is available under the MIT license. See the LICENSE file for more info.
|
47
|
+
|
48
|
+
All content copyright © 2013 Apple Inc. All rights reserved.
|
data/Rakefile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
command :info do |c|
|
2
|
+
c.syntax = 'wwdc info [SESSION]'
|
3
|
+
c.summary = 'Get information about a session by its number'
|
4
|
+
c.description = ''
|
5
|
+
|
6
|
+
c.action do |args, options|
|
7
|
+
say_error "Missing session number" and abort unless @number = (Integer(args.first) rescue nil)
|
8
|
+
|
9
|
+
session = get(path: "/2013/sessions/#{@number}")
|
10
|
+
|
11
|
+
describe session
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
alias_command :session, :info
|
@@ -0,0 +1,17 @@
|
|
1
|
+
command :open do |c|
|
2
|
+
c.syntax = 'wwdc open [SESSION]'
|
3
|
+
c.summary = 'Open your browser to the Apple Developer Center to view session slides and video'
|
4
|
+
c.description = ''
|
5
|
+
|
6
|
+
c.action do |args, options|
|
7
|
+
say_error "Missing session number" and abort unless @number = (Integer(args.first) rescue nil)
|
8
|
+
|
9
|
+
session = get(path: "/2013/sessions/#{@number}") do |response|
|
10
|
+
url = response.headers['Link'].scan(/\<(.+)\>/).flatten.first
|
11
|
+
`open "#{url}"`
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
alias_command :video, :open
|
17
|
+
alias_command :slides, :open
|
@@ -0,0 +1,19 @@
|
|
1
|
+
command :search do |c|
|
2
|
+
c.syntax = 'wwdc search [QUERY]'
|
3
|
+
c.summary = 'Find sessions containing the specified search terms'
|
4
|
+
c.description = ''
|
5
|
+
|
6
|
+
c.action do |args, options|
|
7
|
+
@query = args.join(" ")
|
8
|
+
say_error "Missing session number" and abort if @query.empty?
|
9
|
+
|
10
|
+
json = get(path: "search", query: {q: @query})
|
11
|
+
|
12
|
+
json['results'].each do |result|
|
13
|
+
describe result
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
alias_command :'?', :search
|
19
|
+
alias_command :query, :search
|
data/lib/wwdc/helpers.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'excon'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module WWDC
|
5
|
+
module Helpers
|
6
|
+
def get(options = {}, &block)
|
7
|
+
response = client.get(options)
|
8
|
+
say_error "Error #{response.status}" and abort unless response.status == 200
|
9
|
+
|
10
|
+
yield response if block_given?
|
11
|
+
|
12
|
+
JSON.parse(response.body)
|
13
|
+
end
|
14
|
+
|
15
|
+
def describe(session)
|
16
|
+
puts %{\033[1m#{session['number']}: "#{session['title']}"\033[0m}
|
17
|
+
puts session['description']
|
18
|
+
puts
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def client
|
24
|
+
@client ||= Excon.new('http://asciiwwdc.com', headers: {'Accept' => "application/json"})
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/wwdc/version.rb
ADDED
data/lib/wwdc.rb
ADDED
data/wwdc.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
|
4
|
+
require "wwdc/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "wwdc"
|
8
|
+
s.license = "MIT"
|
9
|
+
s.authors = ["Mattt Thompson"]
|
10
|
+
s.email = "m@mattt.me"
|
11
|
+
s.homepage = "http://mattt.me"
|
12
|
+
s.version = WWDC::VERSION
|
13
|
+
s.platform = Gem::Platform::RUBY
|
14
|
+
s.summary = "WWDC"
|
15
|
+
s.description = "A command-line interface for accessing WWDC session content"
|
16
|
+
|
17
|
+
s.add_dependency "commander", "~> 4.1.2"
|
18
|
+
s.add_dependency "excon", "~> 0.25.3"
|
19
|
+
|
20
|
+
s.add_development_dependency "rspec"
|
21
|
+
s.add_development_dependency "rake"
|
22
|
+
|
23
|
+
s.files = Dir["./**/*"].reject { |file| file =~ /\.\/(bin|log|pkg|script|spec|test|vendor)/ }
|
24
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
25
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
26
|
+
s.require_paths = ["lib"]
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: wwdc
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mattt Thompson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-09-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: commander
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.1.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.1.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: excon
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.25.3
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.25.3
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: A command-line interface for accessing WWDC session content
|
70
|
+
email: m@mattt.me
|
71
|
+
executables: []
|
72
|
+
extensions: []
|
73
|
+
extra_rdoc_files: []
|
74
|
+
files:
|
75
|
+
- ./Gemfile
|
76
|
+
- ./Gemfile.lock
|
77
|
+
- ./lib/wwdc/commands/info.rb
|
78
|
+
- ./lib/wwdc/commands/open.rb
|
79
|
+
- ./lib/wwdc/commands/search.rb
|
80
|
+
- ./lib/wwdc/commands.rb
|
81
|
+
- ./lib/wwdc/helpers.rb
|
82
|
+
- ./lib/wwdc/version.rb
|
83
|
+
- ./lib/wwdc.rb
|
84
|
+
- ./LICENSE
|
85
|
+
- ./Rakefile
|
86
|
+
- ./README.md
|
87
|
+
- ./wwdc.gemspec
|
88
|
+
homepage: http://mattt.me
|
89
|
+
licenses:
|
90
|
+
- MIT
|
91
|
+
metadata: {}
|
92
|
+
post_install_message:
|
93
|
+
rdoc_options: []
|
94
|
+
require_paths:
|
95
|
+
- lib
|
96
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - '>='
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - '>='
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
requirements: []
|
107
|
+
rubyforge_project:
|
108
|
+
rubygems_version: 2.0.3
|
109
|
+
signing_key:
|
110
|
+
specification_version: 4
|
111
|
+
summary: WWDC
|
112
|
+
test_files: []
|