godot.rb 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. module Docs
  2. class Godot < UrlScraper
  3. self.type = 'sphinx_simple'
  4. self.links = {
  5. home: 'https://godotengine.org/',
  6. code: 'https://github.com/godotengine/godot'
  7. }
  8. html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html'
  9. options[:download_images] = false
  10. options[:container] = '.document .section'
  11. options[:only_patterns] = [/\Alearning\//, /\Aclasses\//]
  12. options[:skip] = %w(classes/class_@global\ scope.html)
  13. options[:attribution] = ->(filter) do
  14. if filter.subpath.start_with?('classes')
  15. <<-HTML
  16. &copy; 2014&ndash;2017 Juan Linietsky, Ariel Manzur, Godot Engine contributors<br>
  17. Licensed under the MIT License.
  18. HTML
  19. else
  20. <<-HTML
  21. &copy; 2014&ndash;2017 Juan Linietsky, Ariel Manzur and the Godot community<br>
  22. Licensed under the Creative Commons Attribution Unported License v3.0.
  23. HTML
  24. end
  25. end
  26. version '2.1' do
  27. self.release = '2.1'
  28. self.base_url = "http://docs.godotengine.org/en/#{self.version}/"
  29. end
  30. end
  31. end