PageRenderTime 48ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/docs/scrapers/love.rb

https://bitbucket.org/Ankrat/devdocs
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
  1. module Docs
  2. class Love < UrlScraper
  3. self.name = 'LÖVE'
  4. self.slug = 'love'
  5. self.type = 'love'
  6. self.release = '0.10.1'
  7. self.base_url = 'https://love2d.org/wiki/'
  8. self.root_path = 'Main_Page'
  9. self.initial_paths = %w(love love.audio love.event love.filesystem love.font love.graphics
  10. love.image love.joystick love.keyboard love.math love.mouse love.physics love.sound
  11. love.system love.thread love.timer love.touch love.video love.window enet socket utf8)
  12. self.links = {
  13. home: 'https://love2d.org/',
  14. code: 'https://bitbucket.org/rude/love'
  15. }
  16. html_filters.push 'love/entries', 'love/clean_html', 'title'
  17. options[:root_title] = 'LÖVE'
  18. options[:decode_and_clean_paths] = true
  19. options[:container] = '#bodyContent'
  20. options[:skip] = %w(Getting_Started Building_LÖVE Tutorial Tutorials Game_Distribution License
  21. Games Libraries Software Snippets Version_History Lovers PO2_Syndrome HSL_color Guidelines)
  22. options[:skip_patterns] = [
  23. /_\([^\)]+\)\z/, # anything_(language)
  24. /\A(Special|Category|File|Help|Template|User|Tutorial):/,
  25. /\A\d/
  26. ]
  27. options[:replace_paths] = {
  28. 'Config_Files' => 'love.conf',
  29. 'conf.lua' => 'love.conf',
  30. 'lua-enet' => 'enet'
  31. }
  32. options[:attribution] = <<-HTML
  33. &copy; 2006&ndash;2016 L&Ouml;VE Development Team<br>
  34. Licensed under the GNU Free Documentation License, Version 1.3.
  35. HTML
  36. end
  37. end