1
0

kotlin.rb 973 B

12345678910111213141516171819202122232425262728293031
  1. module Docs
  2. class Kotlin < UrlScraper
  3. self.type = 'kotlin'
  4. self.release = '1.0.4'
  5. self.base_url = 'https://kotlinlang.org/'
  6. self.root_path = 'api/latest/jvm/stdlib/index.html'
  7. self.links = {
  8. home: 'https://kotlinlang.org/',
  9. code: 'https://github.com/JetBrains/kotlin'
  10. }
  11. html_filters.push 'kotlin/entries', 'kotlin/clean_html'
  12. options[:container] = '.global-content'
  13. options[:only_patterns] = [/\Adocs\/tutorials\//, /\Adocs\/reference\//, /\Aapi\/latest\/jvm\/stdlib\//]
  14. options[:skip] = %w(
  15. api/latest/jvm/stdlib/alltypes/index.html
  16. docs/
  17. docs/videos.html
  18. docs/events.html
  19. docs/resources.html
  20. docs/reference/grammar.html)
  21. options[:replace_paths] = { 'api/latest/jvm/stdlib/' => 'api/latest/jvm/stdlib/index.html' }
  22. options[:attribution] = <<-HTML
  23. &copy; 2010&ndash;2016 JetBrains s.r.o.<br>
  24. Licensed under the Apache License, Version 2.0.
  25. HTML
  26. end
  27. end