2016-05-27 04:00:28 +02:00
|
|
|
module Docs
|
|
|
|
class Kotlin < UrlScraper
|
|
|
|
self.type = 'kotlin'
|
2018-04-28 16:16:33 +02:00
|
|
|
self.release = '1.2.41'
|
2016-06-05 17:54:30 +02:00
|
|
|
self.base_url = 'https://kotlinlang.org/'
|
|
|
|
self.root_path = 'api/latest/jvm/stdlib/index.html'
|
2016-05-27 04:00:28 +02:00
|
|
|
self.links = {
|
|
|
|
home: 'https://kotlinlang.org/',
|
|
|
|
code: 'https://github.com/JetBrains/kotlin'
|
|
|
|
}
|
|
|
|
|
|
|
|
html_filters.push 'kotlin/entries', 'kotlin/clean_html'
|
|
|
|
|
2016-06-05 17:54:30 +02:00
|
|
|
options[:container] = '.global-content'
|
|
|
|
|
|
|
|
options[:only_patterns] = [/\Adocs\/tutorials\//, /\Adocs\/reference\//, /\Aapi\/latest\/jvm\/stdlib\//]
|
2017-03-12 20:45:13 +01:00
|
|
|
options[:skip_patterns] = [/stdlib\/org\./]
|
2016-06-05 17:54:30 +02:00
|
|
|
options[:skip] = %w(
|
|
|
|
api/latest/jvm/stdlib/alltypes/index.html
|
|
|
|
docs/
|
|
|
|
docs/videos.html
|
|
|
|
docs/events.html
|
|
|
|
docs/resources.html
|
|
|
|
docs/reference/grammar.html)
|
|
|
|
options[:replace_paths] = { 'api/latest/jvm/stdlib/' => 'api/latest/jvm/stdlib/index.html' }
|
2016-05-27 04:00:28 +02:00
|
|
|
|
|
|
|
options[:attribution] = <<-HTML
|
2018-02-25 16:38:31 +01:00
|
|
|
© 2010–2018 JetBrains s.r.o.<br>
|
2016-05-27 04:00:28 +02:00
|
|
|
Licensed under the Apache License, Version 2.0.
|
|
|
|
HTML
|
|
|
|
end
|
|
|
|
end
|