|
|
@ -1,6 +1,7 @@
|
|
|
|
module Docs
|
|
|
|
module Docs
|
|
|
|
class Opengl < FileScraper
|
|
|
|
class Opengl < FileScraper
|
|
|
|
self.type = 'simple'
|
|
|
|
self.type = 'simple'
|
|
|
|
|
|
|
|
self.name = 'OpenGL'
|
|
|
|
self.root_path = 'index.php'
|
|
|
|
self.root_path = 'index.php'
|
|
|
|
self.links = {
|
|
|
|
self.links = {
|
|
|
|
home: 'https://registry.khronos.org/OpenGL-Refpages/'
|
|
|
|
home: 'https://registry.khronos.org/OpenGL-Refpages/'
|
|
|
@ -12,18 +13,19 @@ module Docs
|
|
|
|
|
|
|
|
|
|
|
|
options[:attribution] = ->(filter) {
|
|
|
|
options[:attribution] = ->(filter) {
|
|
|
|
# copyright is the last section in these pages
|
|
|
|
# copyright is the last section in these pages
|
|
|
|
return filter.css('.refsect1:last-child').css('p').inner_text
|
|
|
|
return filter.css('h2:contains("Copyright") ~ p').inner_text
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
version '2.1' do
|
|
|
|
|
|
|
|
self.root_path = 'index.html'
|
|
|
|
|
|
|
|
self.release = '2.1'
|
|
|
|
|
|
|
|
self.base_url = "https://registry.khronos.org/OpenGL-Refpages/gl#{self.version}/"
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
version '4' do
|
|
|
|
version '4' do
|
|
|
|
self.root_path = 'index.php'
|
|
|
|
self.root_path = 'index.php'
|
|
|
|
self.release = '4'
|
|
|
|
self.release = '4'
|
|
|
|
self.base_url = "https://registry.khronos.org/OpenGL-Refpages/gl#{self.version}/"
|
|
|
|
self.base_url = "https://registry.khronos.org/OpenGL-Refpages/gl#{self.version}/"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
version '2.1' do
|
|
|
|
|
|
|
|
self.root_path = 'index.html'
|
|
|
|
|
|
|
|
self.release = '2.1'
|
|
|
|
|
|
|
|
self.base_url = "https://registry.khronos.org/OpenGL-Refpages/gl#{self.version}/"
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|