yt-audit 0.5.1 → 0.5.2
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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/yt/audit.rb +13 -1
- data/lib/yt/audit/version.rb +1 -1
- data/lib/yt/video_audit/end_screen.rb +24 -0
- data/lib/yt/video_audit/playlist_end_screen.rb +26 -0
- data/lib/yt/video_audit/subscribe_end_screen.rb +26 -0
- data/lib/yt/video_audit/tags_length.rb +25 -0
- data/lib/yt/video_audit/video_end_screen.rb +26 -0
- data/lib/yt/video_audit/website_end_screen.rb +26 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b1fe37aecd80c49b1400627f9524dee01e121c1
|
|
4
|
+
data.tar.gz: 4ebfe22b48dd1de43377706def5699a82dafe4bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6cd840c4f215fe0247f836615c3f6d06806f3b91e6b77207188626de19c0e0dd8b96c5253f9c2b4638e2ad8bb7f5a2d143e10a0c3374a05e0908119be2e24a28
|
|
7
|
+
data.tar.gz: 9e3461470f01cf749fa6e59bc3de5e062decffac1cd3b36e5d1cb882c0cb3afb75b075e595da45e0f93c5d907db18ffdcd4e35d46462d2e16b34b69a770aab0e
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,15 @@ For more information about changelogs, check
|
|
|
6
6
|
[Keep a Changelog](http://keepachangelog.com) and
|
|
7
7
|
[Vandamme](http://tech-angels.github.io/vandamme).
|
|
8
8
|
|
|
9
|
+
## 0.5.2 - 2017-06-14
|
|
10
|
+
|
|
11
|
+
* [FEATURE] Add `VideoAudit::EndScreen` to count videos with end screens.
|
|
12
|
+
* [FEATURE] Add `VideoAudit::TagsLength` to count videos with more than 400 characters in tags.
|
|
13
|
+
* [FEATURE] Add `VideoAudit::SubscribeEndScreen` to count videos with a subscribe link in end screens.
|
|
14
|
+
* [FEATURE] Add `VideoAudit::VideoEndScreen` to count videos with a video link in end screens.
|
|
15
|
+
* [FEATURE] Add `VideoAudit::PlaylistEndScreen` to count videos with a playlist link in end screens.
|
|
16
|
+
* [FEATURE] Add `VideoAudit::WebsiteEndScreen` to count videos with a website link in end screens.
|
|
17
|
+
|
|
9
18
|
## 0.5.1 - 2017-05-03
|
|
10
19
|
|
|
11
20
|
* [ENHANCEMENT] Reduce API calls to YouTube using .count, not .size
|
data/lib/yt/audit.rb
CHANGED
|
@@ -7,6 +7,12 @@ require 'yt/video_audit/subscribe_annotation'
|
|
|
7
7
|
require 'yt/video_audit/youtube_association'
|
|
8
8
|
require 'yt/video_audit/end_card'
|
|
9
9
|
require 'yt/playlist_audit/description'
|
|
10
|
+
require 'yt/video_audit/end_screen'
|
|
11
|
+
require 'yt/video_audit/tags_length'
|
|
12
|
+
require 'yt/video_audit/subscribe_end_screen'
|
|
13
|
+
require 'yt/video_audit/video_end_screen'
|
|
14
|
+
require 'yt/video_audit/playlist_end_screen'
|
|
15
|
+
require 'yt/video_audit/website_end_screen'
|
|
10
16
|
|
|
11
17
|
module Yt
|
|
12
18
|
class Audit
|
|
@@ -24,7 +30,13 @@ module Yt
|
|
|
24
30
|
Yt::VideoAudit::SubscribeAnnotation.new(videos: @videos),
|
|
25
31
|
Yt::VideoAudit::YoutubeAssociation.new(videos: @videos),
|
|
26
32
|
Yt::VideoAudit::EndCard.new(videos: @videos),
|
|
27
|
-
Yt::PlaylistAudit::Description.new(playlists: @playlists)
|
|
33
|
+
Yt::PlaylistAudit::Description.new(playlists: @playlists),
|
|
34
|
+
Yt::VideoAudit::EndScreen.new(videos: @videos),
|
|
35
|
+
Yt::VideoAudit::TagsLength.new(videos: @videos),
|
|
36
|
+
Yt::VideoAudit::SubscribeEndScreen.new(videos: @videos),
|
|
37
|
+
Yt::VideoAudit::VideoEndScreen.new(videos: @videos),
|
|
38
|
+
Yt::VideoAudit::PlaylistEndScreen.new(videos: @videos),
|
|
39
|
+
Yt::VideoAudit::WebsiteEndScreen.new(videos: @videos)
|
|
28
40
|
]
|
|
29
41
|
end
|
|
30
42
|
end
|
data/lib/yt/audit/version.rb
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
require 'yt/video_audit/base'
|
|
2
|
+
|
|
3
|
+
module Yt
|
|
4
|
+
module VideoAudit
|
|
5
|
+
# Count how many subject videos have any end screen.
|
|
6
|
+
class EndScreen < Base
|
|
7
|
+
def title
|
|
8
|
+
'End Screens'
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def description
|
|
12
|
+
'The number of videos with at least one end screen'
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
private
|
|
16
|
+
|
|
17
|
+
def valid?(video)
|
|
18
|
+
Yt::Annotations.for(video.id).any? do |annotation|
|
|
19
|
+
annotation.instance_of? Yt::Annotations::EndScreen
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
require 'yt/video_audit/base'
|
|
2
|
+
|
|
3
|
+
module Yt
|
|
4
|
+
module VideoAudit
|
|
5
|
+
# Count how many subject videos have an end screens
|
|
6
|
+
# with a playlist link.
|
|
7
|
+
class PlaylistEndScreen < Base
|
|
8
|
+
def title
|
|
9
|
+
'Playlist End Screens'
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def description
|
|
13
|
+
'The number of videos with any link to a playlist in its end screens'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
|
|
18
|
+
def valid?(video)
|
|
19
|
+
Yt::Annotations.for(video.id).any? do |annotation|
|
|
20
|
+
annotation.instance_of?(Yt::Annotations::EndScreen) &&
|
|
21
|
+
annotation.link && annotation.link[:type] == :playlist
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
require 'yt/video_audit/base'
|
|
2
|
+
|
|
3
|
+
module Yt
|
|
4
|
+
module VideoAudit
|
|
5
|
+
# Count how many subject videos have an end screens
|
|
6
|
+
# with a subscribe link.
|
|
7
|
+
class SubscribeEndScreen < Base
|
|
8
|
+
def title
|
|
9
|
+
'Subscribe End Screens'
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def description
|
|
13
|
+
'The number of videos with any link to subscribe in its end screens'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
|
|
18
|
+
def valid?(video)
|
|
19
|
+
Yt::Annotations.for(video.id).any? do |annotation|
|
|
20
|
+
annotation.instance_of?(Yt::Annotations::EndScreen) &&
|
|
21
|
+
annotation.link && annotation.link[:type] == :subscribe
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
require 'yt/video_audit/base'
|
|
2
|
+
|
|
3
|
+
module Yt
|
|
4
|
+
module VideoAudit
|
|
5
|
+
# Count how many subject videos use at least 80% of 500 character limit
|
|
6
|
+
# of tags.
|
|
7
|
+
class TagsLength < Base
|
|
8
|
+
def title
|
|
9
|
+
'Length of Tags'
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def description
|
|
13
|
+
'The number of videos that use at least 80%'\
|
|
14
|
+
' of the available tags length limit'
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
private
|
|
18
|
+
|
|
19
|
+
def valid?(video)
|
|
20
|
+
tags_length = video.tags.map {|tag| tag.include?(' ') ? "\"#{tag}\"" : tag }.join(",").length
|
|
21
|
+
tags_length / 500.0 >= 0.8
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
require 'yt/video_audit/base'
|
|
2
|
+
|
|
3
|
+
module Yt
|
|
4
|
+
module VideoAudit
|
|
5
|
+
# Count how many subject videos have an end screens
|
|
6
|
+
# with a video link.
|
|
7
|
+
class VideoEndScreen < Base
|
|
8
|
+
def title
|
|
9
|
+
'Video End Screens'
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def description
|
|
13
|
+
'The number of videos with any link to a video in its end screens'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
|
|
18
|
+
def valid?(video)
|
|
19
|
+
Yt::Annotations.for(video.id).any? do |annotation|
|
|
20
|
+
annotation.instance_of?(Yt::Annotations::EndScreen) &&
|
|
21
|
+
annotation.link && annotation.link[:type] == :video
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
require 'yt/video_audit/base'
|
|
2
|
+
|
|
3
|
+
module Yt
|
|
4
|
+
module VideoAudit
|
|
5
|
+
# Count how many subject videos have an end screens
|
|
6
|
+
# with a website link.
|
|
7
|
+
class WebsiteEndScreen < Base
|
|
8
|
+
def title
|
|
9
|
+
'Website End Screens'
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def description
|
|
13
|
+
'The number of videos with any external link in its end screens'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
|
|
18
|
+
def valid?(video)
|
|
19
|
+
Yt::Annotations.for(video.id).any? do |annotation|
|
|
20
|
+
annotation.instance_of?(Yt::Annotations::EndScreen) &&
|
|
21
|
+
annotation.link && annotation.link[:type] == :website
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yt-audit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Claudio Baccigalupo
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2017-
|
|
12
|
+
date: 2017-06-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: yt-core
|
|
@@ -163,8 +163,14 @@ files:
|
|
|
163
163
|
- lib/yt/video_audit/base.rb
|
|
164
164
|
- lib/yt/video_audit/brand_anchoring.rb
|
|
165
165
|
- lib/yt/video_audit/end_card.rb
|
|
166
|
+
- lib/yt/video_audit/end_screen.rb
|
|
166
167
|
- lib/yt/video_audit/info_card.rb
|
|
168
|
+
- lib/yt/video_audit/playlist_end_screen.rb
|
|
167
169
|
- lib/yt/video_audit/subscribe_annotation.rb
|
|
170
|
+
- lib/yt/video_audit/subscribe_end_screen.rb
|
|
171
|
+
- lib/yt/video_audit/tags_length.rb
|
|
172
|
+
- lib/yt/video_audit/video_end_screen.rb
|
|
173
|
+
- lib/yt/video_audit/website_end_screen.rb
|
|
168
174
|
- lib/yt/video_audit/youtube_association.rb
|
|
169
175
|
- yt-audit.gemspec
|
|
170
176
|
homepage: https://github.com/fullscreen/yt-audit
|