/lib/docs/scrapers/love.rb
Ruby | 43 lines | 37 code | 6 blank | 0 comment | 0 complexity | f6723163214eb02d26b2682dd3a85e60 MD5 | raw file
Possible License(s): MPL-2.0, MPL-2.0-no-copyleft-exception
- module Docs
- class Love < UrlScraper
- self.name = 'LÖVE'
- self.slug = 'love'
- self.type = 'love'
- self.release = '0.10.1'
- self.base_url = 'https://love2d.org/wiki/'
- self.root_path = 'Main_Page'
- self.initial_paths = %w(love love.audio 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 enet socket utf8)
- self.links = {
- home: 'https://love2d.org/',
- code: 'https://bitbucket.org/rude/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',
- 'lua-enet' => 'enet'
- }
- options[:attribution] = <<-HTML
- © 2006–2016 LÖVE Development Team<br>
- Licensed under the GNU Free Documentation License, Version 1.3.
- HTML
- end
- end