perl.rb 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. module Docs
  2. class Perl < FileScraper
  3. self.name = 'Perl'
  4. self.type = 'perl'
  5. self.dir = '/Users/Thibaut/DevDocs/Docs/Perl'
  6. self.root_path = 'index.html'
  7. self.links = {
  8. home: 'https://www.perl.org/'
  9. }
  10. html_filters.push 'perl/entries', 'perl/clean_html'
  11. options[:skip] = %w(
  12. preferences.html
  13. perlartistic.html
  14. perlgpl.html
  15. perlhist.html
  16. perltodo.html )
  17. options[:skip_patterns] = [/\.pdf/, /delta\.html/]
  18. options[:attribution] = <<-HTML
  19. &copy; 1993&ndash;2016 Larry Wall and others<br>
  20. Licensed under the GNU General Public License version 1 or later, or the Artistic License.<br>
  21. The Perl logo is a trademark of the Perl Foundation.
  22. HTML
  23. version '5.24' do
  24. self.release = '5.24.0'
  25. self.base_url = "http://perldoc.perl.org/#{self.release}/"
  26. end
  27. version '5.22' do
  28. self.release = '5.22.0'
  29. self.base_url = "http://perldoc.perl.org/#{self.release}/"
  30. end
  31. version '5.20' do
  32. self.release = '5.20.2'
  33. self.base_url = "http://perldoc.perl.org/#{self.release}/"
  34. end
  35. end
  36. end