opengl.rb 1008 B

12345678910111213141516171819202122232425262728293031323334
  1. module Docs
  2. class Opengl < FileScraper
  3. self.type = 'simple'
  4. self.root_path = 'index.php'
  5. self.links = {
  6. home: 'https://registry.khronos.org/OpenGL-Refpages/'
  7. }
  8. html_filters.push 'opengl/entries', 'opengl/clean_html'
  9. # indexflat.php is a copy of index.php
  10. options[:skip] = %w(indexflat.php)
  11. options[:attribution] = <<-HTML
  12. Copyright 2017-2021 The Khronos Group, Inc.. This work is licensed
  13. under a <a href="http://creativecommons.org/licenses/by/4.0/">Creative
  14. Commons Attribution 4.0 International License</a>.
  15. HTML
  16. version 'gl2.1' do
  17. self.root_path = 'index.html'
  18. self.release = 'gl2.1'
  19. self.base_url = "https://registry.khronos.org/OpenGL-Refpages/#{self.version}/"
  20. end
  21. version 'gl4' do
  22. self.root_path = 'index.php'
  23. self.release = 'gl4'
  24. self.base_url = "https://registry.khronos.org/OpenGL-Refpages/#{self.version}/"
  25. end
  26. def get_latest_version(opts)
  27. return 'v1.0.0'
  28. end
  29. end
  30. end