Skip to content

Commit 62e07e4

Browse files
committed
Finish Puppeteer scraper
1 parent a6b7bd5 commit 62e07e4

File tree

11 files changed

+14
-8
lines changed

11 files changed

+14
-8
lines changed

assets/images/docs-2.png

462 Bytes
Loading

assets/images/[email protected]

768 Bytes
Loading

assets/javascripts/news.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
[
22
[
3+
"2018-09-23",
4+
"New documentation: <a href=\"/puppeteer/\">Puppeteer</a>"
5+
], [
36
"2018-08-12",
47
"New documentations: <a href=\"/dart/\">Dart</a> and <a href=\"/qt/\">Qt</a>"
58
], [

assets/stylesheets/global/_icons.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,4 @@
178178
._icon-bash:before { background-position: -6rem -3rem; @extend %doc-icon-2; }
179179
._icon-dart:before { background-position: -7rem -3rem; @extend %doc-icon-2; }
180180
._icon-qt:before { background-position: -8rem -3rem; @extend %doc-icon-2; }
181+
._icon-puppeteer:before { background-position: -9rem -3rem; @extend %doc-icon-2; }

lib/docs/filters/puppeteer/clean_html.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@ module Docs
22
class Puppeteer
33
class CleanHtmlFilter < Filter
44
def call
5+
at_css('h1').content = 'Puppeteer Documentation'
6+
57
# None of the elements to remove have classes, so the order of the remove calls is trivial
68

79
# Remove links to previous versions of the reference
8-
at_css('h5').remove
10+
at_css('h1 + ul').remove
911

1012
# Remove table of contents
11-
at_css('h5').remove
12-
at_css('ul').remove
13+
at_css('h1 + h5').remove
14+
at_css('h1 + ul').remove
1315

1416
# Make headers bigger by transforming them into a bigger variant
15-
css('h3').each {|node| node.name = 'h2'}
16-
css('h4').each {|node| node.name = 'h3'}
17+
css('h3').each { |node| node.name = 'h2' }
18+
css('h4').each { |node| node.name = 'h3' }
1719

1820
doc
1921
end

lib/docs/filters/puppeteer/entries.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def additional_entries
1717

1818
# Prepend events with the class name
1919
if current_name.start_with?('event: ')
20-
current_name = "#{name} event: '#{current_name[/'(.*)'/, 1]}'"
20+
current_name = "#{name} event: #{current_name[/'(.*)'/, 1]}"
2121
end
2222

2323
# Remove arguments from functions

lib/docs/scrapers/puppeteer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Docs
22
class Puppeteer < Github
3-
self.release = '1.6.2'
4-
self.base_url = 'https://github.com/GoogleChrome/puppeteer/blob/v1.6.2/docs/api.md'
3+
self.release = '1.8.0'
4+
self.base_url = 'https://github.com/GoogleChrome/puppeteer/blob/v1.8.0/docs/api.md'
55
self.links = {
66
code: 'https://github.com/GoogleChrome/puppeteer'
77
}

public/icons/docs-2.pxm

33.8 KB
Binary file not shown.

public/icons/[email protected]

31.9 KB
Binary file not shown.

public/icons/docs/puppeteer/16.png

-177 Bytes
Loading

0 commit comments

Comments
 (0)