wwdcdownloader 20.15.1 → 20.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +2 -2
- data/Readme.md +4 -4
- data/VERSION +1 -1
- data/lib/wwdcdownloader.rb +7 -6
- data/wwdcdownloader.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e0d575c5ff71a424bc262a8bf2ef2069aaa17ce
|
4
|
+
data.tar.gz: 67e2e3f795a7b58a627108c04060d9dec446e61a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bf8883679598537f80239382c0573563f0f5b9455a37d8d2eb69dc1aefe2f3bdd0ea85f8e05bcf68fe5f1cdc47f55580cebf2fa03b157aad9400c05ad52784f
|
7
|
+
data.tar.gz: f86345f261eda82c4f16cb5fae88bdfae196f9e3de523a1d686dfe54d9d9674cbcb8d247dcad5397977e262b7bab7aa6e5cd28bd7379528e3f33d35873630aa9
|
data/LICENSE.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c)
|
1
|
+
Copyright (c) 2016 Johannes Fahrenkrug
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
a copy of this software and associated documentation files (the
|
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
17
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
18
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
19
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Readme.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
# WWDC
|
1
|
+
# WWDC 2016 Sample Code Downloader
|
2
2
|
|
3
3
|
![First World WWDC Sample Code Problem](http://cdn.memegenerator.net/instances/400x/21928207.jpg)
|
4
4
|
|
5
5
|
## Sad days are over
|
6
6
|
|
7
|
-
This script will download all the session material for you if you are a WWDC
|
7
|
+
This script will download all the session material for you if you are a WWDC 2016 attendee OR NOT!
|
8
8
|
You can now simply install WWDC-Downloader as a ruby gem like this:
|
9
9
|
|
10
10
|
gem install wwdcdownloader
|
@@ -13,10 +13,10 @@ or
|
|
13
13
|
|
14
14
|
sudo gem install wwdcdownloader
|
15
15
|
|
16
|
-
Run the script like this:
|
16
|
+
Run the script like this:
|
17
17
|
|
18
18
|
wwdcdownloader [<target-dir>]
|
19
19
|
|
20
|
-
The script will create a directory called "
|
20
|
+
The script will create a directory called "wwdc2016-assets" (or `target-dir` if given) in the directory you run the script from.
|
21
21
|
|
22
22
|
That's it. Enjoy and see you next year.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
20.
|
1
|
+
20.16.0
|
data/lib/wwdcdownloader.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Have fun. Use at your own risk.
|
2
|
-
# Copyright (c)
|
2
|
+
# Copyright (c) 2016 Johannes Fahrenkrug
|
3
3
|
|
4
4
|
require 'rubygems'
|
5
5
|
require 'fileutils'
|
@@ -24,8 +24,7 @@ end
|
|
24
24
|
class WWDCDownloader
|
25
25
|
#BASE_URI = 'https://developer.apple.com/wwdc-services/cy4p09ns/a4363cb15472b00287b/sessions.json'
|
26
26
|
|
27
|
-
WWDC_LIBRARIES = [{:base => 'https://developer.apple.com/library/prerelease/
|
28
|
-
{:base => 'https://developer.apple.com/library/prerelease/mac', :lib => '/navigation/library.json'}]
|
27
|
+
WWDC_LIBRARIES = [{:base => 'https://developer.apple.com/library/prerelease/content', :lib => '/navigation/library.json'}]
|
29
28
|
|
30
29
|
attr_accessor :downloaded_files, :dl_dir, :min_date, :proxy_uri
|
31
30
|
|
@@ -128,6 +127,8 @@ class WWDCDownloader
|
|
128
127
|
puts "Library #{lib}"
|
129
128
|
self.read_url(lib) do |body|
|
130
129
|
body = body.gsub("''", '""')
|
130
|
+
# Fix misformatted JSON
|
131
|
+
body = body.gsub(/\"platform\"\s*:\s*12,$\s*\}/, "\"platform\": 12\n}")
|
131
132
|
res = JSON.parse(body)
|
132
133
|
|
133
134
|
docs = res['documents']
|
@@ -164,7 +165,7 @@ class WWDCDownloader
|
|
164
165
|
end
|
165
166
|
|
166
167
|
def self.run!(*args)
|
167
|
-
puts "WWDC
|
168
|
+
puts "WWDC 2016 Session Material Downloader"
|
168
169
|
puts "by Johannes Fahrenkrug, @jfahrenkrug, springenwerk.com"
|
169
170
|
puts "See you next year!"
|
170
171
|
puts
|
@@ -174,10 +175,10 @@ class WWDCDownloader
|
|
174
175
|
dl_dir = if args.size == 1
|
175
176
|
args.last
|
176
177
|
else
|
177
|
-
'
|
178
|
+
'wwdc2016-assets'
|
178
179
|
end
|
179
180
|
|
180
|
-
w = WWDCDownloader.new(dl_dir, '
|
181
|
+
w = WWDCDownloader.new(dl_dir, '2016-06-01')
|
181
182
|
w.load
|
182
183
|
return 0
|
183
184
|
end
|
data/wwdcdownloader.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "wwdcdownloader"
|
8
|
-
s.version = "20.
|
8
|
+
s.version = "20.16.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Johannes Fahrenkrug"]
|
12
|
-
s.date = "
|
12
|
+
s.date = "2016-06-23"
|
13
13
|
s.description = "At each year's WWDC, Apple releases great sample projects. Unfortunately it is very tedious to manually download all these treasures through your browser. WWDC-Downloader solves this problem for you!"
|
14
14
|
s.email = "johannes@springenwerk.com"
|
15
15
|
s.executables = ["wwdcdownloader"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wwdcdownloader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 20.
|
4
|
+
version: 20.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johannes Fahrenkrug
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|