devdocs/lib/docs/scrapers/kotlin.rb
2016-11-13 12:17:55 -05:00

31 lines
973 B
Ruby

module Docs
class Kotlin < UrlScraper
self.type = 'kotlin'
self.release = '1.0.4'
self.base_url = 'https://kotlinlang.org/'
self.root_path = 'api/latest/jvm/stdlib/index.html'
self.links = {
home: 'https://kotlinlang.org/',
code: 'https://github.com/JetBrains/kotlin'
}
html_filters.push 'kotlin/entries', 'kotlin/clean_html'
options[:container] = '.global-content'
options[:only_patterns] = [/\Adocs\/tutorials\//, /\Adocs\/reference\//, /\Aapi\/latest\/jvm\/stdlib\//]
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' }
options[:attribution] = <<-HTML
&copy; 2010&ndash;2016 JetBrains s.r.o.<br>
Licensed under the Apache License, Version 2.0.
HTML
end
end