mirror of https://github.com/freeCodeCamp/devdocs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.7 KiB
51 lines
1.7 KiB
module Docs
|
|
class Love < UrlScraper
|
|
self.name = 'LÖVE'
|
|
self.slug = 'love'
|
|
self.type = 'love'
|
|
self.release = '11.3'
|
|
self.base_url = 'https://love2d.org/wiki/'
|
|
self.root_path = 'Main_Page'
|
|
self.initial_paths = %w(love love.audio love.data love.event love.filesystem love.font
|
|
love.graphics love.image love.joystick love.keyboard love.math love.mouse love.physics
|
|
love.sound love.system love.thread love.timer love.touch love.video love.window lua-enet
|
|
socket utf8)
|
|
self.links = {
|
|
home: 'https://love2d.org/',
|
|
code: 'https://github.com/love2d/love'
|
|
}
|
|
|
|
html_filters.push 'love/entries', 'love/clean_html', 'title'
|
|
|
|
options[:root_title] = 'LÖVE'
|
|
options[:decode_and_clean_paths] = true
|
|
options[:container] = '#bodyContent'
|
|
|
|
options[:skip] = %w(Getting_Started Building_LÖVE Tutorial Tutorials Game_Distribution License
|
|
Games Libraries Software Snippets Version_History Lovers PO2_Syndrome HSL_color Guidelines)
|
|
|
|
options[:skip_patterns] = [
|
|
/_\([^\)]+\)\z/, # anything_(language)
|
|
/\A(Special|Category|File|Help|Template|User|Tutorial):/,
|
|
/\A\d/
|
|
]
|
|
|
|
options[:replace_paths] = {
|
|
'Config_Files' => 'love.conf',
|
|
'conf.lua' => 'love.conf',
|
|
'enet' => 'lua-enet',
|
|
'ImageFormat' => 'ImageEncodeFormat'
|
|
}
|
|
|
|
options[:attribution] = <<-HTML
|
|
© 2006–2020 LÖVE Development Team<br>
|
|
Licensed under the GNU Free Documentation License, Version 1.3.
|
|
HTML
|
|
|
|
def get_latest_version(opts)
|
|
doc = fetch_doc('https://love2d.org/wiki/Version_History', opts)
|
|
doc.at_css('#mw-content-text table a').content
|
|
end
|
|
end
|
|
end
|