Add links.{code,home} for MDN scrapers
Showing the changes to lib (8 of 8 files). Show all
Unified · Split
| @@ -8,6 +8,15 @@ module Docs · 7 unmodified lines | |||
| 8 | 'https://developer.mozilla.org/en-US/docs/Web/HTTP', | 8 | 'https://developer.mozilla.org/en-US/docs/Web/HTTP', |
| 9 | 'https://datatracker.ietf.org/doc/html/', | 9 | 'https://datatracker.ietf.org/doc/html/', |
| 10 | ] | 10 | ] |
| 11 | self.links = { | ||
| 12 | home: 'https://developer.mozilla.org/en-US/docs/Web/HTTP', | ||
| 13 | code: 'https://github.com/mdn/content/tree/main/files/en-us/web/http' | ||
| 14 | } | ||
| 15 | |||
| 16 | options[:attribution] = <<-HTML | ||
| 17 | © 2005–2023 MDN contributors.<br> | ||
| 18 | Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later. | ||
| 19 | HTML | ||
| 11 | 20 | ||
| 12 | html_filters.push 'http/clean_html', 'http/entries', 'title' | 21 | html_filters.push 'http/clean_html', 'http/entries', 'title' |
| 13 | 22 | ||
| @@ -4,6 +4,10 @@ module Docs · 3 unmodified lines | |||
| 4 | self.name = 'CSS' | 4 | self.name = 'CSS' |
| 5 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/CSS' | 5 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/CSS' |
| 6 | self.root_path = '/Reference' | 6 | self.root_path = '/Reference' |
| 7 | self.links = { | ||
| 8 | home: 'https://developer.mozilla.org/en-US/docs/Web/CSS', | ||
| 9 | code: 'https://github.com/mdn/content/tree/main/files/en-us/web/css' | ||
| 10 | } | ||
| 7 | 11 | ||
| 8 | html_filters.push 'css/clean_html', 'css/entries' | 12 | html_filters.push 'css/clean_html', 'css/entries' |
| 9 | 13 | ||
| @@ -5,6 +5,10 @@ module Docs · 4 unmodified lines | |||
| 5 | self.name = 'Web APIs' | 5 | self.name = 'Web APIs' |
| 6 | self.slug = 'dom' | 6 | self.slug = 'dom' |
| 7 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/API' | 7 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/API' |
| 8 | self.links = { | ||
| 9 | home: 'https://developer.mozilla.org/en-US/docs/Web/API', | ||
| 10 | code: 'https://github.com/mdn/content/tree/main/files/en-us/web/api' | ||
| 11 | } | ||
| 8 | 12 | ||
| 9 | html_filters.push 'dom/clean_html', 'dom/entries' | 13 | html_filters.push 'dom/clean_html', 'dom/entries' |
| 10 | 14 | ||
| @@ -5,6 +5,10 @@ module Docs · 4 unmodified lines | |||
| 5 | # release = '2023-01-06' | 5 | # release = '2023-01-06' |
| 6 | self.name = 'HTML' | 6 | self.name = 'HTML' |
| 7 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/HTML' | 7 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/HTML' |
| 8 | self.links = { | ||
| 9 | home: 'https://developer.mozilla.org/en-US/docs/Web/HTML', | ||
| 10 | code: 'https://github.com/mdn/content/tree/main/files/en-us/web/html' | ||
| 11 | } | ||
| 8 | 12 | ||
| 9 | html_filters.push 'html/clean_html', 'html/entries' | 13 | html_filters.push 'html/clean_html', 'html/entries' |
| 10 | 14 | ||
| @@ -6,6 +6,10 @@ module Docs · 5 unmodified lines | |||
| 6 | # release = '2023-01-06' | 6 | # release = '2023-01-06' |
| 7 | self.name = 'JavaScript' | 7 | self.name = 'JavaScript' |
| 8 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference' | 8 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference' |
| 9 | self.links = { | ||
| 10 | home: 'https://developer.mozilla.org/en-US/docs/Web/JavaScript', | ||
| 11 | code: 'https://github.com/mdn/content/tree/main/files/en-us/web/javascript' | ||
| 12 | } | ||
| 9 | 13 | ||
| 10 | html_filters.push 'javascript/clean_html', 'javascript/entries' | 14 | html_filters.push 'javascript/clean_html', 'javascript/entries' |
| 11 | 15 | ||
| @@ -2,6 +2,10 @@ module Docs · 1 unmodified line | |||
| 2 | class Mdn < UrlScraper | 2 | class Mdn < UrlScraper |
| 3 | self.abstract = true | 3 | self.abstract = true |
| 4 | self.type = 'mdn' | 4 | self.type = 'mdn' |
| 5 | self.links = { | ||
| 6 | home: 'https://developer.mozilla.org', | ||
| 7 | code: 'https://github.com/mdn/content' | ||
| 8 | } | ||
| 5 | 9 | ||
| 6 | html_filters.push 'mdn/clean_html', 'mdn/compat_tables' | 10 | html_filters.push 'mdn/clean_html', 'mdn/compat_tables' |
| 7 | 11 | ||
| @@ -6,6 +6,10 @@ module Docs · 5 unmodified lines | |||
| 6 | # release = '2022-09-06' | 6 | # release = '2022-09-06' |
| 7 | self.name = 'SVG' | 7 | self.name = 'SVG' |
| 8 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/SVG' | 8 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/SVG' |
| 9 | self.links = { | ||
| 10 | home: 'https://developer.mozilla.org/en-US/docs/Web/SVG', | ||
| 11 | code: 'https://github.com/mdn/content/tree/main/files/en-us/web/svg' | ||
| 12 | } | ||
| 9 | 13 | ||
| 10 | html_filters.push 'svg/clean_html', 'svg/entries' | 14 | html_filters.push 'svg/clean_html', 'svg/entries' |
| 11 | 15 | ||
| @@ -4,9 +4,9 @@ module Docs · 3 unmodified lines | |||
| 4 | self.name = 'Web Extensions' | 4 | self.name = 'Web Extensions' |
| 5 | self.slug = 'web_extensions' | 5 | self.slug = 'web_extensions' |
| 6 | self.links = { | 6 | self.links = { |
| 7 | home: 'https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions' | 7 | home: 'https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions', |
| 8 | code: 'https://github.com/mdn/content/tree/main/files/en-us/mozilla/add-ons/webextensions' | ||
| 8 | } | 9 | } |
| 9 | |||
| 10 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions' | 10 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions' |
| 11 | 11 | ||
| 12 | html_filters.push 'web_extensions/entries', 'web_extensions/clean_html' | 12 | html_filters.push 'web_extensions/entries', 'web_extensions/clean_html' |